:root {
  --primary: #4f46e5;
  --primary-light: #6366f1;
  --secondary: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --light: #f8fafc;
  --dark: #1e293b;
  --gray: #64748b;
  
  /* Colores para el juego */
  --red: #ef4444;
  --blue: #3b82f6;
  --green: #10b981;
  --yellow: #FFFF00;
  --purple: #8b5cf6;
  --orange: #f97316;
  --pink: #ec4899;
  --cyan: #06b6d4;
}

#demo-banner {
  background: linear-gradient(90deg,#3b82f6,#6366f1);
  color: white;
  padding: 10px;
  text-align: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  font-weight: 600;
}


* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  color: white;
  min-height: 100vh;
  text-align: center;
  overflow-x: hidden;
  position: relative;
}

.background-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://assets.codepen.io/21542/brain-academy-bg.png') center/cover;
  opacity: 0.1;
  z-index: -1;
  animation: float 15s infinite ease-in-out;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-5px, -5px);
  }
  50% {
    transform: translate(5px, 5px);
  }
  75% {
    transform: translate(5px, -5px);
  }
}

.screen {
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hidden {
  display: none !important;
}

/* Start Screen */
.logo {
  margin-bottom: 2rem;
  text-align: center;
}

.brain-icon {
  font-size: 5rem;
  margin-bottom: 1rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.logo h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(to right, #fff, #c7d2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 1.2rem;
  color: #cbd5e1;
  font-weight: 300;
}

.difficulty-selector {
  margin: 2rem 0;
  width: 100%;
}

.difficulty-selector h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.difficulty-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.difficulty-btn {
  padding: 1rem 2rem;
  font-size: 1.2rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.difficulty-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.difficulty-btn:active {
  transform: translateY(1px);
}

.easy {
  background-color: #10b981;
  color: white;
}

.medium {
  background-color: #f59e0b;
  color: white;
}

.hard {
  background-color: #ef4444;
  color: white;
}

.emoji {
  font-size: 1.5rem;
}

.instructions {
  margin-top: 2rem;
  font-size: 1.1rem;
  color: #cbd5e1;
  max-width: 600px;
}

/* Game Screen */
.hud {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background-color: rgba(30, 41, 59, 0.7);
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hud-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
}

.hud-icon {
  font-size: 1.5rem;
}

.game-content {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.color-word {
  font-size: 3rem;
  font-weight: 700;
  margin: 2rem 0;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.color-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.color-option {
  padding: 1.5rem;
  border-radius: 12px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  font-size: 1.2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.color-option:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.color-option:active {
  transform: translateY(1px);
}

/* Colores específicos */
.color-red { background-color: var(--red); }
.color-blue { background-color: var(--blue); }
.color-green { background-color: var(--green); }
.color-yellow { background-color: var(--yellow); }
.color-purple { background-color: var(--purple); }
.color-orange { background-color: var(--orange); }
.color-pink { background-color: var(--pink); }
.color-cyan { background-color: var(--cyan); }

.feedback-container {
  min-height: 100px;
}

.feedback-text {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  min-height: 2.5rem;
}

.correct-feedback {
  color: var(--secondary);
}

.incorrect-feedback {
  color: var(--danger);
}

.combo-counter {
  background-color: rgba(255, 215, 0, 0.2);
  border: 2px solid gold;
  border-radius: 50px;
  padding: 0.5rem 1rem;
  display: inline-block;
  font-weight: 600;
  color: gold;
  animation: comboPulse 1s infinite;
}

@keyframes comboPulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

/* Countdown */
#countdown-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

#countdown-overlay.active {
  opacity: 1;
  pointer-events: all;
}

#countdown {
  font-size: 8rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

/* End Screen */
.result-card {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.9), rgba(99, 102, 241, 0.9));
  padding: 2rem;
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.result-card h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.result-icon {
  font-size: 4rem;
  margin: 1rem 0;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.final-score {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 1rem 0;
}

.stats {
  margin: 1.5rem 0;
  font-size: 1.1rem;
  text-align: left;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 8px;
}

.stats p {
  margin: 0.5rem 0;
}

.restart-btn {
  padding: 1rem 2rem;
  font-size: 1.2rem;
  background-color: white;
  color: var(--primary);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  margin-top: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.restart-btn:hover {
  background-color: var(--primary-light);
  color: white;
  transform: translateY(-2px);
}

/* Footer */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  background-color: rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .difficulty-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .difficulty-btn {
    width: 100%;
    justify-content: center;
  }
  
  .color-word {
    font-size: 2rem;
  }
  
  .color-options {
    grid-template-columns: 1fr;
  }
  
  .logo h1 {
    font-size: 2rem;
  }
}
