:root {
  --primary-color: #081b31;
  --secondary-color: #2c3e50;
  --accent-color: #3498db;
  --success-color: #2ecc71;
  --danger-color: #e74c3c;
  --text-color: #ecf0f1;
  --transition-speed: 0.3s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: var(--primary-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  text-align: center;
  padding: 2rem;
  background: var(--secondary-color);
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  max-width: 800px;
  width: 95%;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--accent-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.scoreboard {
  display: flex;
  justify-content: space-around;
  margin-bottom: 2rem;
  font-size: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 1rem;
  border-radius: 10px;
}

.message {
  background: var(--primary-color);
  color: var(--text-color);
  font-size: 1.2rem;
  margin: 2rem 0;
  padding: 1rem;
  border-radius: 10px;
  transition: all var(--transition-speed);
}

.choices {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.choice {
  background: var(--secondary-color);
  border-radius: 50%;
  padding: 1rem;
  cursor: pointer;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.choice:hover {
  transform: translateY(-10px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.choice img {
  height: 100px;
  width: 100px;
  object-fit: contain;
}

/* Animation Classes */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.pulse {
  animation: pulse 0.5s ease-in-out;
}

/* Game Controls */
.game-controls {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn {
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition-speed);
  background: var(--accent-color);
  color: var(--text-color);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Theme Toggle */
.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem;
  border-radius: 50%;
  background: var(--accent-color);
  border: none;
  cursor: pointer;
  transition: all var(--transition-speed);
}

/* Game Stats */
.stats-panel {
  margin-top: 2rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.stats-panel h2 {
  margin-bottom: 1rem;
  color: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  .choices {
    flex-direction: column;
    align-items: center;
  }
  
  .choice {
    margin: 1rem 0;
  }
  
  .scoreboard {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
}

.modal-content {
  background-color: var(--secondary-color);
  margin: 15% auto;
  padding: 2rem;
  border-radius: 10px;
  max-width: 500px;
  position: relative;
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-content h2 {
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.modal-content ul {
  list-style-type: none;
  padding: 0;
  margin: 1rem 0;
}

.modal-content li {
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 5px;
}

/* History Items */
.history-list {
  max-height: 200px;
  overflow-y: auto;
  margin-top: 1rem;
}

.history-item {
  padding: 0.5rem;
  margin: 0.5rem 0;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.2);
  transition: all var(--transition-speed);
}

.history-item.win {
  border-left: 4px solid var(--success-color);
}

.history-item.lose {
  border-left: 4px solid var(--danger-color);
}

.history-item.draw {
  border-left: 4px solid var(--secondary-color);
}

/* Light Theme */
.light-theme {
  --primary-color: #f0f2f5;
  --secondary-color: #ffffff;
  --accent-color: #1a73e8;
  --text-color: #202124;
}

.light-theme .container {
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.light-theme .choice {
  background: #f8f9fa;
}

.light-theme .history-item {
  background: #f8f9fa;
}

/* Tooltip */
.choice {
  position: relative;
}

.choice::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--secondary-color);
  padding: 0.5rem;
  border-radius: 5px;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-speed);
}

.choice:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Game Mode Button */
.game-mode {
  margin-bottom: 1rem;
}

#modeToggle {
  background: var(--accent-color);
  color: var(--text-color);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all var(--transition-speed);
}

#modeToggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Stats Panel */
.stats-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.stats-content p {
  background: rgba(0, 0, 0, 0.2);
  padding: 0.5rem;
  border-radius: 5px;
  font-size: 0.9rem;
}

/* Responsive Design Updates */
@media (max-width: 768px) {
  .modal-content {
    margin: 20% auto;
    width: 90%;
  }
  
  .stats-content {
    grid-template-columns: 1fr;
  }
  
  .game-controls {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    margin: 0.5rem 0;
  }
}
  