* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Barlow Semi Condensed', sans-serif;
  background: radial-gradient(circle at top, hsl(214, 47%, 23%), hsl(237, 48%, 15%));
  min-height: 100vh;
  color: white;
  display: flex;
  flex-direction: column;
}

.game {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
  max-width: 700px;
  margin: 0 auto;
  width: 100%;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border: 3px solid hsl(246, 11%, 37%);
  border-radius: 15px;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
}

.logo {
  height: 50px;
}

.score-box {
  background: white;
  color: hsl(229, 25%, 31%);
  padding: 1rem 2rem;
  border-radius: 8px;
  text-align: center;
  min-width: 80px;
}

.score-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: hsl(229, 64%, 46%);
}

.score-value {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

.mode-switcher {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.mode-btn {
  background: none;
  border: 2px solid hsl(246, 11%, 37%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.mode-btn.active {
  background: white;
  color: hsl(229, 25%, 31%);
}

.bonus-unlock {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.unlock-message {
  background: white;
  color: hsl(229, 25%, 31%);
  padding: 3rem;
  border-radius: 15px;
  text-align: center;
  max-width: 400px;
  animation: bounceIn 0.6s ease-out;
}

.unlock-message h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: hsl(39, 89%, 49%);
}

.unlock-message p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.unlock-btn {
  background: linear-gradient(hsl(39, 89%, 49%), hsl(28, 76%, 44%));
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s;
}

.unlock-btn:hover {
  transform: scale(1.05);
}

.mode-toggle {
  position: absolute;
  bottom: 6rem;
  right: 2rem;
}

.toggle-btn {
  background: none;
  border: 2px solid hsl(246, 11%, 37%);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-btn:hover {
  background: white;
  color: hsl(229, 25%, 31%);
}

@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

.game-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.choices {
  position: relative;
  width: 420px;
  height: 420px;
}

.original-choices {
  background: url('./images/bg-triangle.svg') no-repeat center;
  background-size: 50%;
}

.bonus-choices {
  background: url('./images/bg-pentagon.svg') no-repeat center;
  background-size: 55%;
}

.choice {
  position: absolute;
  width: 140px;
  height: 140px;
  border: none;
  cursor: pointer;
  background: none;
  padding: 0;
  transition: transform 0.2s;
}

.choice:hover {
  transform: scale(1.05);
}

.choice-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: inset 0 8px 0 rgba(0,0,0,0.15);
}

.choice-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 8px;
  border-radius: 50%;
  background: #f3f3f3;
  box-shadow: inset 0 8px 0 #dadada;
}

.choice img {
  width: 50px;
  height: 50px;
  z-index: 1;
  position: relative;
}

/* Original game positions */
.original-choices .choice.paper {
  top: 0;
  left: 0;
}

.original-choices .choice.scissors {
  top: 0;
  right: 0;
}

.original-choices .choice.rock {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

/* Bonus game positions */
.bonus-choices .choice.scissors {
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
}

.bonus-choices .choice.spock {
  top: 20%;
  right: -25px;
}

.bonus-choices .choice.paper {
  top: 20%;
  left: -25px;
}

.bonus-choices .choice.lizard {
  bottom: -20px;
  left: 15%;
}

.bonus-choices .choice.rock {
  bottom: -20px;
  right: 15%;
}

/* Choice colors */
.choice.paper .choice-inner {
  background: linear-gradient(hsl(230, 89%, 62%), hsl(229, 64%, 46%));
}

.choice.scissors .choice-inner {
  background: linear-gradient(hsl(39, 89%, 49%), hsl(28, 76%, 44%));
}

.choice.rock .choice-inner {
  background: linear-gradient(hsl(349, 71%, 52%), hsl(347, 75%, 35%));
}

.choice.lizard .choice-inner {
  background: linear-gradient(hsl(261, 73%, 60%), hsl(261, 51%, 44%));
}

.choice.spock .choice-inner {
  background: linear-gradient(hsl(189, 59%, 53%), hsl(194, 58%, 42%));
}

.result-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.picks {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 3rem;
  align-items: center;
  width: 100%;
  max-width: 600px;
}

.pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.pick-label {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.choice-result {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: inset 0 8px 0 rgba(0,0,0,0.15);
}

.choice-result::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 8px;
  border-radius: 50%;
  background: #f3f3f3;
  box-shadow: inset 0 8px 0 #dadada;
}

.choice-result img {
  width: 60px;
  height: 60px;
  z-index: 1;
  position: relative;
}

.choice-result.paper {
  background: linear-gradient(hsl(230, 89%, 62%), hsl(229, 64%, 46%));
}

.choice-result.scissors {
  background: linear-gradient(hsl(39, 89%, 49%), hsl(28, 76%, 44%));
}

.choice-result.rock {
  background: linear-gradient(hsl(349, 71%, 52%), hsl(347, 75%, 35%));
}

.choice-result.lizard {
  background: linear-gradient(hsl(261, 73%, 60%), hsl(261, 51%, 44%));
}

.choice-result.spock {
  background: linear-gradient(hsl(189, 59%, 53%), hsl(194, 58%, 42%));
}

.result-text {
  text-align: center;
}

.result-text h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.play-again {
  background: white;
  color: hsl(229, 25%, 31%);
  border: none;
  padding: 1rem 3rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s;
}

.play-again:hover {
  color: hsl(349, 71%, 52%);
}

.rules-btn {
  background: none;
  border: 2px solid hsl(246, 11%, 37%);
  color: white;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 2rem;
  transition: background-color 0.2s;
  position: absolute;
  bottom: 2rem;
  right: 2rem;
}

.rules-btn:hover {
  background: white;
  color: hsl(229, 25%, 31%);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  color: hsl(229, 25%, 31%);
  padding: 2rem;
  border-radius: 8px;
  width: 400px;
  max-width: 90vw;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.modal-header h2 {
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.close-btn:hover {
  opacity: 1;
}

.close-btn img {
  width: 20px;
  height: 20px;
}

.rules-image {
  width: 100%;
  height: auto;
  display: block;
}

.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .game {
    padding: 1rem;
  }
  
  .header {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .logo {
    height: 40px;
  }
  
  .score-box {
    padding: 0.8rem 1.5rem;
  }
  
  .score-value {
    font-size: 2.5rem;
  }
  
  .choices {
    width: 280px;
    height: 280px;
  }
  
  .choice {
    width: 110px;
    height: 110px;
  }
  
  .choice img {
    width: 40px;
    height: 40px;
  }
  
  /* Mobile bonus positions */
  .bonus-choices .choice.scissors {
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
  }

  .bonus-choices .choice.spock {
    top: 20%;
    right: -10px;
  }

  .bonus-choices .choice.paper {
    top: 20%;
    left: -10px;
  }

  .bonus-choices .choice.lizard {
    bottom: -5px;
    left: 18%;
  }

  .bonus-choices .choice.rock {
    bottom: -5px;
    right: 18%;
  }
  
  .picks {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 1.5rem;
    text-align: center;
  }
  
  .result-text {
    order: 3;
  }
  
  .choice-result {
    width: 120px;
    height: 120px;
  }
  
  .choice-result img {
    width: 50px;
    height: 50px;
  }
  
  .result-text h2 {
    font-size: 2rem;
  }
  
  .rules-btn {
    position: static;
    margin-top: 1rem;
  }
  
  .modal {
    align-items: flex-end;
    padding: 0;
  }
  
  .modal-content {
    width: 100%;
    max-width: none;
    border-radius: 8px 8px 0 0;
    max-height: 90vh;
    overflow-y: auto;
    margin: 0;
  }
  
  .modal-header {
    justify-content: center;
    position: relative;
  }
  
  .close-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
  }
}
