/* Game specific styles for Rock Paper Scissors */

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

.back-btn {
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.3s ease;
}

.back-btn:hover {
  transform: translateX(-5px);
  color: var(--primary);
}

.game-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  margin-bottom: 3rem;
  position: relative;
}

.game-info {
  background-color: var(--surface);
  padding: 2rem;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.score-container {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.score-card {
  flex: 1;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  transition: transform 0.3s ease;
}

.score-card.winner {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(127, 90, 240, 0.5);
}

.score-card h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.score-card span {
  font-size: 2.5rem;
  font-weight: bold;
}

.score-card.player span {
  color: var(--primary);
}

.score-card.computer span {
  color: var(--accent);
}

.round-info {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#round-number {
  font-weight: bold;
}

#game-status {
  font-style: italic;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.option-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

select {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
}

.action-btn {
  background-color: var(--accent);
  color: var(--text);
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: auto;
}

.action-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(255, 137, 6, 0.4);
}

.gameplay-area {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.result-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.choice-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.choice-circle {
  width: 100px;
  height: 100px;
  background-color: var(--surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  transition: transform 0.5s ease;
}

.player-choice .choice-circle {
  color: var(--primary);
}

.computer-choice .choice-circle {
  color: var(--accent);
}

.choice-circle.win {
  box-shadow: 0 0 20px rgba(44, 182, 125, 0.8);
}

.choice-circle.lose {
  box-shadow: 0 0 20px rgba(231, 76, 60, 0.8);
}

.choice-circle.draw {
  box-shadow: 0 0 20px rgba(241, 196, 15, 0.8);
}

.vs-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.vs-text {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary);
}

#result-text {
  font-size: 1.2rem;
  font-weight: bold;
  text-transform: uppercase;
  min-height: 1.5rem;
}

#result-text.win {
  color: var(--secondary);
}

#result-text.lose {
  color: #e74c3c;
}

#result-text.draw {
  color: #f1c40f;
}

.choices {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.choice-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  transition: transform 0.3s ease;
}

.choice-btn:hover {
  transform: translateY(-10px);
}

.choice-btn:active {
  transform: scale(0.95);
}

.choice-icon {
  width: 80px;
  height: 80px;
  background-color: var(--surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text);
}

.choice-btn[data-choice="rock"] .choice-icon {
  color: #e74c3c;
}

.choice-btn[data-choice="paper"] .choice-icon {
  color: #3498db;
}

.choice-btn[data-choice="scissors"] .choice-icon {
  color: #f1c40f;
}

.choice-btn span {
  color: var(--text);
}

#history-container {
  background-color: var(--surface);
  border-radius: 15px;
  padding: 1.5rem;
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--surface);
}

#history-container h3 {
  margin-bottom: 1rem;
}

#history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.history-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem;
  border-radius: 5px;
  background-color: rgba(255, 255, 255, 0.05);
}

.history-item.win {
  border-left: 3px solid var(--secondary);
}

.history-item.lose {
  border-left: 3px solid #e74c3c;
}

.history-item.draw {
  border-left: 3px solid #f1c40f;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(22, 22, 26, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.overlay-content {
  text-align: center;
  padding: 2rem;
  background-color: var(--surface);
  border-radius: 15px;
  max-width: 90%;
  width: 400px;
}

.overlay-content h2 {
  margin-bottom: 1rem;
  font-size: 2rem;
}

#final-result.win {
  color: var(--secondary);
}

#final-result.lose {
  color: #e74c3c;
}

#final-result.draw {
  color: #f1c40f;
}

#final-score {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Media Queries */
@media (max-width: 768px) {
  .game-container {
      grid-template-columns: 1fr;
  }
  
  .game-info {
      order: 2;
  }
  
  .gameplay-area {
      order: 1;
  }
  
  .result-display {
      flex-direction: column;
      gap: 1.5rem;
  }
  
  .choices {
      flex-wrap: wrap;
  }
}

/* Animations */
@keyframes pulse {
  0% {
      transform: scale(1);
  }
  50% {
      transform: scale(1.05);
  }
  100% {
      transform: scale(1);
  }
}

.choice-btn:hover .choice-icon {
  animation: pulse 1.5s infinite;
}

@keyframes shake {
  0%, 100% {
      transform: translateX(0);
  }
  25% {
      transform: translateX(-5px);
  }
  50% {
      transform: translateX(5px);
  }
  75% {
      transform: translateX(-5px);
  }
}

@keyframes spin {
  0% {
      transform: rotate(0deg);
  }
  100% {
      transform: rotate(360deg);
  }
}

@keyframes slideIn {
  0% {
      transform: translateY(-20px);
      opacity: 0;
  }
  100% {
      transform: translateY(0);
      opacity: 1;
  }
}