/* Fretboard Note Finder Styles - Sunset Boulevard */

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

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 {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 64px);
}

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

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

.note-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
}

.note-toggle {
  padding: 0.45rem 0.25rem;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

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

.selection-controls {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.text-btn {
  background: none;
  border: none;
  color: var(--accent-primary);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
}

.text-btn:hover {
  color: var(--accent-secondary);
}

.string-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.string-toggle {
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.string-toggle.active {
  border-color: var(--accent-primary);
  box-shadow: inset 0 0 0 1px var(--accent-primary);
}

.range-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.range-row label {
  width: 50px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.range-row select {
  flex: 1;
  padding: 0.5rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.range-hint {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.stats-panel {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  padding: 1rem;
}

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

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

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

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

.start-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 0, 21, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

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

.start-content {
  text-align: center;
  max-width: 480px;
}

.start-btn {
  margin-top: 1.5rem;
  padding: 1rem 3rem;
  border: none;
  border-radius: 999px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #0f172a;
  background: var(--accent-gradient);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(255, 107, 53, 0.45);
}

.practice-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  width: 100%;
}

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

.target-card {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
}

.target-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.target-note {
  font-size: 4rem;
  font-weight: 700;
  margin: 0.25rem 0;
  color: #fff;
  text-shadow: 0 0 30px rgba(255, 107, 53, 0.5);
}

.positions-progress {
  font-size: 0.95rem;
  color: var(--accent-primary);
}

.fretboard-wrapper {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  padding: 1rem 1.5rem;
  margin: 0 auto;
  width: 100%;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fretboard {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.fret-row {
  display: flex;
  align-items: center;
  min-height: 34px;
  position: relative;
}

.string-label {
  width: 48px;
  text-align: right;
  padding-right: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.fret {
  flex: 1;
  min-width: 36px;
  max-width: 60px;
  position: relative;
  border-right: 2px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 0;
}

.fret.nut-column {
  border-left: 4px solid rgba(255, 255, 255, 0.75);
  background: linear-gradient(180deg, rgb(57, 60, 69), rgba(57, 60, 69, 1.0));
  box-shadow: inset -10px 0 22px rgb(57, 60, 69);
  position: relative;
}

.fret.nut-column::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 6px;
  background: rgba(255, 107, 53, 0);
  pointer-events: none;
}

.fret.marker-fret {
  background: rgba(255, 255, 255, 0.04);
}

.fret::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, #777, #bbb, #777);
  opacity: 0.35;
  transform: translateY(-50%);
}

.note-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.65);
  background: rgba(13, 0, 21, 0.85);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
}

.note-dot:hover:not(.inactive) {
  background: rgba(255, 107, 53, 0.85);
  border-color: var(--accent-secondary);
}

.note-dot.inactive {
  opacity: 0.2;
  pointer-events: none;
}

.note-dot.correct {
  background: var(--correct-color);
  border-color: #15803d;
  box-shadow: 0 0 10px rgba(45, 212, 168, 0.6);
}

.note-dot.incorrect {
  background: var(--wrong-color);
  border-color: #7f1d1d;
}

.fret-markers-row,
.fret-numbers {
  display: flex;
  margin-left: 48px;
  width: calc(100% - 48px);
}

.fret-marker-cell,
.fret-number {
  flex: 1;
  min-width: 36px;
  max-width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fret-marker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.fret-marker-dot.double {
  position: relative;
  width: 26px;
  height: 8px;
  background: transparent;
}

.fret-marker-dot.double::before,
.fret-marker-dot.double::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  top: 0;
}

.fret-marker-dot.double::before {
  left: 2px;
}

.fret-marker-dot.double::after {
  right: 2px;
}

.feedback {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 600;
}

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

.feedback.error {
  color: var(--wrong-color);
}

.practice-controls {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.control-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

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

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

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

  .practice-area {
    padding: 1.25rem;
  }

  .string-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .note-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
