/* Game Screen Styles */

.game-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, #FFE5B4 0%, #FFD1DC 25%, #C7CEEA 50%, #B4E7FF 75%, #FFFACD 100%);
  background-attachment: fixed;
  color: var(--sw-color-text-primary);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 9999;
  padding: 0;
  margin: 0;
}

.game-screen::before {
  content: '';
  position: fixed;
  top: 5%;
  left: -50px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 200, 100, 0.6) 0%, rgba(255, 150, 100, 0.3) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  animation: float 8s ease-in-out infinite;
  box-shadow: 0 0 80px rgba(255, 200, 100, 0.5);
}

.game-screen::after {
  content: '';
  position: fixed;
  bottom: 5%;
  right: -80px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(100, 200, 255, 0.5) 0%, rgba(100, 150, 255, 0.2) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  animation: float 10s ease-in-out infinite reverse;
  box-shadow: 0 0 100px rgba(100, 200, 255, 0.4);
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.game-screen__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sw-spacing-md);
  padding: var(--sw-spacing-lg);
  background: linear-gradient(90deg, #FF6B6B 0%, #FFA500 25%, #FFD700 50%, #4ECDC4 75%, #FF69B4 100%);
  color: white;
  border-bottom: 4px solid #FFFFFF;
  box-shadow: 0 8px 32px rgba(255, 165, 0, 0.3), 0 4px 16px rgba(255, 107, 107, 0.3);
  position: relative;
  z-index: 20;
  width: 100%;
  backdrop-filter: blur(10px);
}

.game-screen__title {
  margin: 0;
  font-size: var(--sw-font-size-h2);
  font-family: var(--sw-font-family-display);
  flex: 1;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: 1px;
}

.game-screen__score {
  font-size: var(--sw-font-size-lg);
  font-weight: 700;
  color: #FFD700;
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.game-screen__main {
  flex: 1;
  padding: var(--sw-spacing-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sw-spacing-xl);
  max-width: 700px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 10;
  min-height: 60vh;
}

.game-screen__question-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sw-spacing-lg);
  width: 100%;
  background: linear-gradient(135deg, #FFFFFF 0%, #FFF8F0 100%);
  padding: var(--sw-spacing-xl);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(255, 150, 100, 0.2), 0 0 40px rgba(100, 200, 255, 0.15);
  border: 3px solid #FFD700;
  backdrop-filter: blur(20px);
  transition: all 0.3s ease;
}

.game-screen__problem {
  margin: 0;
  font-size: var(--sw-font-size-h1);
  font-family: var(--sw-font-family-display);
  text-align: center;
  color: #FF1493;
  line-height: 1.5;
  letter-spacing: 0.5px;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(255, 20, 147, 0.2);
}

.game-screen__timer {
  font-size: var(--sw-font-size-lg);
  font-weight: 600;
  color: var(--sw-color-warning);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.game-screen__input-section {
  display: flex;
  flex-direction: column;
  gap: var(--sw-spacing-lg);
  width: 100%;
  align-items: center;
}

.game-screen__input-section label {
  font-size: var(--sw-font-size-md);
  font-weight: 600;
  color: #374151;
  letter-spacing: 0.5px;
}

.game-screen__input {
  width: 100%;
  max-width: 350px;
  padding: 16px 20px;
  font-size: var(--sw-font-size-lg);
  font-family: inherit;
  border: 3px solid #FFB6C1;
  border-radius: 16px;
  background: linear-gradient(135deg, #FFFACD 0%, #FFE4E1 100%);
  color: #333;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 182, 193, 0.3);
  font-weight: 600;
}

.game-screen__input:hover {
  border-color: #FF69B4;
  box-shadow: 0 6px 20px rgba(255, 105, 180, 0.4);
  transform: scale(1.02);
}

.game-screen__input:focus {
  outline: none;
  border: 3px solid #FF1493;
  background: linear-gradient(135deg, #FFFFFF 0%, #FFE4E1 100%);
  box-shadow: 0 0 0 5px rgba(255, 20, 147, 0.2), 0 6px 20px rgba(255, 105, 180, 0.5);
}

.game-screen__progress-container {
  width: 100%;
  padding: var(--sw-spacing-lg);
  background: linear-gradient(135deg, #FFF8DC 0%, #FFE4B5 100%);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(255, 165, 0, 0.2), inset 0 2px 0 rgba(255, 255, 255, 0.8);
  border: 2px solid #FF8C00;
  backdrop-filter: blur(10px);
}

/* Keep bright colors for kids games - no dark mode override */
@media (prefers-color-scheme: dark) {
  .game-screen {
    background: linear-gradient(135deg, #FFE5B4 0%, #FFD1DC 25%, #C7CEEA 50%, #B4E7FF 75%, #FFFACD 100%);
  }

  .game-screen__input {
    background: linear-gradient(135deg, #FFFACD 0%, #FFE4E1 100%);
    border-color: #FFB6C1;
    color: #333;
  }

  .game-screen__input:hover {
    border-color: #FF69B4;
  }

  .game-screen__input:focus {
    background: linear-gradient(135deg, #FFFFFF 0%, #FFE4E1 100%);
    border-color: #FF1493;
    box-shadow: 0 0 0 5px rgba(255, 20, 147, 0.2), 0 6px 20px rgba(255, 105, 180, 0.5);
  }

  .game-screen__question-section {
    background: linear-gradient(135deg, #FFFFFF 0%, #FFF8F0 100%);
    border-color: #FFD700;
  }

  .game-screen__progress-container {
    background: linear-gradient(135deg, #FFF8DC 0%, #FFE4B5 100%);
    border-color: #FF8C00;
  }
}

/* When game screen is active, hide body scroll and home content */
body.game-active {
  overflow: hidden;
}

body.game-active section#hero,
body.game-active section#az-games,
body.game-active section#num-games,
body.game-active section#all-games,
body.game-active footer.site-footer {
  display: none !important;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .game-screen__timer {
    animation: none;
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .game-screen::before {
    width: 150px;
    height: 150px;
  }

  .game-screen::after {
    width: 200px;
    height: 200px;
    right: -50px;
  }

  .game-screen__header {
    flex-direction: column;
    gap: var(--sw-spacing-sm);
    text-align: center;
    padding: var(--sw-spacing-md);
  }

  .game-screen__title {
    flex: none;
    font-size: var(--sw-font-size-h3);
  }

  .game-screen__score {
    font-size: var(--sw-font-size-md);
    padding: 6px 12px;
  }

  .game-screen__main {
    padding: var(--sw-spacing-lg);
    gap: var(--sw-spacing-lg);
  }

  .game-screen__question-section {
    padding: var(--sw-spacing-lg);
  }

  .game-screen__problem {
    font-size: var(--sw-font-size-h2);
  }

  .game-screen__input {
    max-width: 100%;
  }
}
