/* Note Practice Styles - Sunset Boulevard */

body {
  font-family: var(--font-stack);
  background: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

header {
  background: var(--glass-bg);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--glass-border);
}

.home-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  transition: color 0.3s ease;
}

.home-link:hover {
  color: var(--accent-secondary);
}

header h1 {
  font-size: 1.5rem;
  font-weight: 600;
}

/* Main Layout */
.main-layout {
  display: flex;
  flex: 1;
  height: calc(100vh - 60px);
}

/* Settings Sidebar */
.settings-sidebar {
  width: var(--sidebar-width);
  background: var(--glass-bg);
  padding: 1.5rem;
  border-right: 1px solid var(--glass-border);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.settings-section h3 {
  font-size: 0.9rem;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Duration Selector */
.duration-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.duration-btn {
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.duration-btn:hover {
  background: rgba(255, 107, 53, 0.3);
}

.duration-btn.active {
  background: var(--accent-gradient);
  color: #0d0015;
  font-weight: 600;
}

/* Note Presets */
.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.preset-btn {
  padding: 0.5rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.3s ease;
}

.preset-btn:hover {
  background: rgba(255, 107, 53, 0.3);
}

.preset-btn.active {
  background: var(--accent-gradient);
  color: #0d0015;
  font-weight: 600;
}

/* Scale Selector */
.scale-selector {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--glass-border);
}

.scale-selector select {
  padding: 0.6rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
}

.scale-selector select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* Note Grid */
.note-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--glass-border);
}

.note-toggle {
  padding: 0.5rem 0.25rem;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

.note-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.note-toggle.active {
  background: var(--accent-gradient);
  color: #0d0015;
  font-weight: 600;
}

/* Stats Section */
.stats-section {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 1rem;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--glass-border);
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.stat-value {
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 0.85rem;
}

/* Tuner Button */
.tuner-btn {
  padding: 0.8rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #c840e9 0%, var(--accent-secondary) 100%);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  margin-top: auto;
}

.tuner-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(200, 64, 233, 0.4);
}

/* Practice Area */
.practice-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
}

/* Start Overlay */
.start-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  z-index: 10;
}

.start-overlay.hidden {
  display: none;
}

.start-overlay p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 400px;
}

.start-btn {
  padding: 1rem 3rem;
  font-size: 1.3rem;
  border: none;
  border-radius: 50px;
  background: var(--accent-gradient);
  color: #0d0015;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.start-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(255, 107, 53, 0.5);
}

/* Practice Content */
.practice-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  width: 100%;
  max-width: 500px;
}

.practice-content.hidden {
  display: none;
}

/* Timer */
.timer-display {
  font-size: 1.5rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timer-display span {
  color: var(--accent-primary);
  font-weight: 600;
}

/* Target Note */
.target-note-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.target-label {
  font-size: 1rem;
  color: var(--text-secondary);
}

.target-note {
  font-size: 8rem;
  font-weight: 700;
  color: var(--text-primary);
  text-shadow: 0 0 30px rgba(255, 107, 53, 0.5);
  line-height: 1;
}

/* Detection Display */
.detection-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-height: 80px;
}

.detected-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.detected-note {
  font-size: 2rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.detected-note.correct {
  color: var(--correct-color);
  text-shadow: 0 0 20px rgba(45, 212, 168, 0.5);
}

.detected-note.incorrect {
  color: var(--wrong-color);
}

/* Feedback */
.feedback-container {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feedback {
  font-size: 1.5rem;
  font-weight: 600;
  opacity: 0;
  transition: all 0.3s ease;
}

.feedback.correct {
  color: var(--correct-color);
  opacity: 1;
}

.feedback.incorrect {
  color: var(--wrong-color);
  opacity: 1;
}

/* Practice Controls */
.practice-controls {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.pause-btn,
.stop-btn {
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pause-btn {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.pause-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.stop-btn {
  background: rgba(255, 71, 87, 0.3);
  color: var(--wrong-color);
}

.stop-btn:hover {
  background: rgba(255, 71, 87, 0.5);
}

/* End Screen */
.end-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-gradient);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  z-index: 100;
}

.end-screen.hidden {
  display: none;
}

.end-screen h2 {
  font-size: 2.5rem;
  color: var(--accent-primary);
}

.final-stats {
  background: var(--glass-bg);
  border-radius: 15px;
  padding: 2rem;
  min-width: 300px;
}

.final-stat {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--glass-border);
  font-size: 1.1rem;
}

.final-stat:last-child {
  border-bottom: none;
}

.final-stat span:first-child {
  color: var(--text-secondary);
}

.final-stat span:last-child {
  color: var(--accent-primary);
  font-weight: 600;
}

.end-actions {
  display: flex;
  gap: 1rem;
}

.restart-btn,
.home-btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.restart-btn {
  background: var(--accent-gradient);
  color: #0d0015;
}

.restart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.home-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.home-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Tuner Screen */
.tuner-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-gradient);
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.tuner-screen.hidden {
  display: none;
}

.tuner-header {
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
}

.tuner-header h2 {
  font-size: 1.5rem;
  color: var(--accent-primary);
}

.back-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.tuner-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
}

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

.tuner-note {
  font-size: 6rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tuner-frequency {
  font-size: 1.5rem;
  color: var(--text-secondary);
}

.tuner-meter {
  width: 300px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.tuner-meter-center {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  background: var(--accent-primary);
  transform: translateX(-50%);
}

.tuner-meter-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  background: var(--text-primary);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: left 0.1s ease;
}

.tuner-meter-indicator.in-tune {
  background: var(--correct-color);
  box-shadow: 0 0 10px rgba(45, 212, 168, 0.5);
}

.tuning-status {
  font-size: 1.2rem;
  color: var(--text-secondary);
}

.tuning-status.in-tune {
  color: var(--correct-color);
}

/* Flash Animation */
@keyframes flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.target-note.flash {
  animation: flash 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
  .main-layout {
    flex-direction: column;
    height: auto;
  }

  .settings-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
    max-height: 40vh;
  }

  .practice-area {
    min-height: 60vh;
  }

  .target-note {
    font-size: 5rem;
  }

  .tuner-note {
    font-size: 4rem;
  }

  .tuner-meter {
    width: 250px;
  }
}
