* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

button {
  -webkit-tap-highlight-color: transparent;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

a {
  text-decoration: none;
  color: white;
}

html,
body {
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: "Stack Sans Text", sans-serif;
  background: radial-gradient(circle at top, #1d3171, #101a35);
  color: #ffffff;
  padding: 2rem 0;
  gap: 4rem;
  animation: fadeIn .3s ease-in;
}

.scoreboard {
  width: 90%;
  max-width: 500px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border: 4px solid rgba(255, 255, 255, 0.25);
  border-radius: 0.5rem;
}

.scoreboard .title {
  flex: 1;
  text-align: left;
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.1;
  letter-spacing: 1px;
}

.score-box,
.streak-box {
  padding: 0.5rem 1.8rem;
  border-radius: 8px;
  text-align: center;
  min-width: 100px;
}

.score-box p,
.streak-box p {
  font-size: 1.8rem;
  letter-spacing: 2px;
  margin: 0;
}

.score-box span,
.streak-box span {
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1;
}

.score-box {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
}

.streak-box {
  background: linear-gradient(135deg, #3499dc, #1f6fb2);
  color: white;
}

.game {
  position: relative;
  text-align: center;
  color: #fff;
  z-index: 1;
}

.choices {
  position: relative;
  width: 500px;
  height: 360px;
}

.triangle-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  transform: scaleY(-1);
}

.triangle-lines line {
  stroke: rgba(0, 0, 0, 0.334);
  stroke-width: 15;
}

.choice {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: none;
  background: #ededed;
  font-size: 4rem;
  cursor: pointer;
  position: absolute;
  z-index: 1;

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.choice:hover {
  transform: translateY(-6px);
}

.choice:active {
  transform: translateY(2px);
}

#rock {
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border: 1rem solid #e74c3c;
}

#rock:hover {
  transform: translateX(-50%) translateY(-6px);
}

#rock:active {
  transform: translateX(-50%) translateY(2px);
}

#paper {
  top: 0;
  left: 20px;
  border: 1rem solid #3499dc;
}

#scissors {
  top: 0;
  right: 20px;
  border: 1rem solid #f1c40f;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

#resultScreen.hidden {
  display: none !important;
  opacity: 0;
}

#resultScreen {
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 5rem;
  padding: 0 2rem;
  text-align: center;
  width: min(500px, 100%);
  z-index: 100;
  transition: all 0.3s ease;
  animation: fadeIn 0.5s ease;
}

.result-picks {
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 4rem;
}

.result-picks div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.result-picks p {
  font-size: 0.8rem;
  font-weight: 800;
}

#userPick,
#housePick {
  font-size: 4rem;
  width: 140px;
  height: 140px;
  background: #2a2a2a;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

#userPick,
#housePick {
  border: 15px solid #3499dc;
}

.result-rock #userPick {
  border-color: #e74c3c;
}

.result-paper #userPick {
  border-color: #3499dc;
}

.result-scissors #userPick {
  border-color: #f1c40f;
}

.result {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#resultText {
  font-size: 3rem;
  font-weight: bold;
  margin: 10px 0;
}

#playAgain {
  display: block;
  width: 100%;
  padding: 12px 25px;
  color: #2a2a2a;
  background: #ededed;
  border: none;
  outline: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  transition:
    transform 0.2s,
    background 0.2s;
}

#playAgain:hover {
  background: #ededed;
  transform: scale(1.05);
}

@media (max-width: 480px) {
  a {
    text-decoration: none;
    color: white;
  }

  body {
    padding: 1.5rem 0;
    gap: 9rem;
  }

  .scoreboard {
    width: 95%;
    gap: 1.5rem;
    padding: 1rem;
  }

  .scoreboard .title {
    font-size: 1rem;
  }

  .scoreboard .score-box {
    padding: 0.6rem 1.2rem;
    min-width: 90px;
  }

  .score-box span,
  .streak-box span {
    font-size: 1.8rem;
  }

  .choices {
    width: 350px;
    height: 225px;
  }

  .choice {
    width: 100px;
    height: 100px;
    font-size: 32px;
  }

  #rock {
    bottom: -20px;
    border: 0.9rem solid #e74c3c;
  }

  #paper {
    border: 0.9rem solid #3499dc;
  }

  #scissors {
    border: 0.9rem solid #f1c40f;
  }

  #resultScreen {
    width: 90vw;
  }

  .result-picks {
    gap: 1.5rem;
  }

  #userPick,
  #housePick {
    font-size: 32px;
    width: 100px;
    height: 100px;
  }

  #resultText {
    font-size: 20px;
  }

  #playAgain {
    padding: 10px 20px;
    font-size: 14px;
  }
}

@media (max-width: 340px) {
  .scoreboard {
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    justify-content: space-between;
  }

  .scoreboard .title {
    font-size: 1rem;
  }

  .score-box {
    min-width: unset;
    width: 60px;
    padding: 0.5rem;
  }

  .score-box span,
  .streak-box span {
    font-size: 1.5rem;
  }

  .score-box p,
  .streak-box p {
    font-size: 0.6rem;
    letter-spacing: 1px;
  }
}