/* karaoke.css - Styling for Christmas Carol Karaoke */

/* Navigation Bar */
.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.nav-link.active {
  background: rgba(76, 175, 80, 0.3);
  border: 1px solid rgba(76, 175, 80, 0.5);
}

.nav-link .material-icons {
  font-size: 20px;
}

/* Adjust hero for smaller size */
.hero-small {
  min-height: 40vh;
  padding-top: 80px;
}

/* Carol Grid */
.carol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.carol-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.carol-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.carol-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.carol-card h3 {
  color: #fff;
  margin: 0.5rem 0;
  font-size: 1.25rem;
}

.carol-difficulty {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.difficulty-easy {
  background: rgba(76, 175, 80, 0.3);
  color: #a5d6a7;
}

.difficulty-medium {
  background: rgba(255, 193, 7, 0.3);
  color: #ffd54f;
}

.difficulty-hard {
  background: rgba(244, 67, 54, 0.3);
  color: #ef9a9a;
}

/* Karaoke Player */
.karaoke-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.karaoke-header h2 {
  flex: 1;
  text-align: center;
  color: #fff;
  margin: 0;
}

/* Controls */
.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.speed-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.speed-control label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
}

.speed-control input[type="range"] {
  width: 100px;
  cursor: pointer;
}

#speed-value {
  color: #4caf50;
  font-weight: 600;
  min-width: 40px;
}

/* Score Display */
.score-display {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: rgba(76, 175, 80, 0.2);
  border-radius: 12px;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.score-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  font-size: 1.1rem;
}

.score-item .material-icons {
  color: #ffd700;
}

/* Lyrics Container */
.lyrics-container {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  padding: 2rem;
  min-height: 300px;
  max-height: 500px;
  overflow-y: auto;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lyrics {
  font-size: 1.5rem;
  line-height: 2.5;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

.lyric-line {
  display: block;
  margin: 0.5rem 0;
  transition: all 0.5s ease;
  opacity: 0.5;
}

.lyric-line.current {
  color: #fff;
  font-weight: 600;
  font-size: 1.75rem;
  opacity: 1;
  text-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
  animation: pulse 1.5s ease-in-out infinite;
}

.lyric-line.past {
  opacity: 0.3;
}

.blank-word {
  background: rgba(255, 255, 0, 0.3);
  padding: 0.25rem 1rem;
  border-radius: 8px;
  display: inline-block;
  border: 2px dashed rgba(255, 255, 255, 0.5);
}

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

/* Karaoke Input */
.karaoke-input {
  margin: 2rem 0;
}

.input-prompt {
  text-align: center;
}

.input-prompt label {
  display: block;
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.input-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

#karaoke-input {
  flex: 1;
  padding: 1rem;
  font-size: 1.1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: all 0.3s ease;
}

#karaoke-input:focus {
  outline: none;
  border-color: #4caf50;
  background: rgba(255, 255, 255, 0.15);
}

#karaoke-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.feedback {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.feedback.correct {
  background: rgba(76, 175, 80, 0.3);
  color: #a5d6a7;
  border: 1px solid rgba(76, 175, 80, 0.5);
}

.feedback.incorrect {
  background: rgba(244, 67, 54, 0.3);
  color: #ef9a9a;
  border: 1px solid rgba(244, 67, 54, 0.5);
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 2rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4caf50, #8bc34a);
  width: 0%;
  transition: width 0.3s ease;
}

/* Results Section */
.results-content {
  text-align: center;
  padding: 2rem;
}

.results-content h3 {
  color: #fff;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.results-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card .stat-value {
  display: block;
  font-size: 2.5rem;
  color: #4caf50;
  font-weight: 700;
  margin: 0.5rem 0;
}

.stat-card .stat-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
}

.results-message {
  margin: 2rem 0;
  padding: 1.5rem;
  background: rgba(76, 175, 80, 0.2);
  border-radius: 12px;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.results-message p {
  color: #fff;
  font-size: 1.2rem;
  margin: 0.5rem 0;
}

.results-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-bar {
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .nav-link span {
    display: none;
  }

  .hero-small {
    min-height: 30vh;
  }

  .carol-grid {
    grid-template-columns: 1fr;
  }

  .karaoke-header {
    flex-direction: column;
  }

  .controls {
    flex-direction: column;
  }

  .speed-control {
    width: 100%;
    justify-content: center;
  }

  .lyrics {
    font-size: 1.2rem;
  }

  .lyric-line.current {
    font-size: 1.4rem;
  }

  .input-group {
    flex-direction: column;
  }

  .results-stats {
    grid-template-columns: 1fr;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .lyric-line,
  .carol-card,
  .nav-link {
    transition: none;
  }

  .lyric-line.current {
    animation: none;
  }
}

/* Print styles */
@media print {
  .nav-bar,
  .controls,
  .karaoke-input,
  .score-display,
  .snowfall {
    display: none;
  }
}
