/* ============================================
   ChordFlow — Design System & Styles
   A premium karaoke chord/lyric teleprompter
   ============================================ */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */
:root {
  /* -- Base Colors -- */
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-tertiary: #1a2235;
  --bg-elevated: #1e293b;
  --bg-hover: #243247;
  --bg-active: #2d3f58;

  /* -- Surface / Glass -- */
  --glass-bg: rgba(17, 24, 39, 0.75);
  --glass-border: rgba(99, 179, 237, 0.15);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --glass-blur: blur(20px);

  /* -- Accent Colors -- */
  --accent-primary: #38bdf8;
  --accent-primary-rgb: 56, 189, 248;
  --accent-secondary: #818cf8;
  --accent-tertiary: #a78bfa;
  --accent-glow: rgba(56, 189, 248, 0.3);
  --accent-gradient: linear-gradient(135deg, #38bdf8, #818cf8, #a78bfa);
  --accent-gradient-hover: linear-gradient(135deg, #7dd3fc, #a5b4fc, #c4b5fd);

  /* -- Text Colors -- */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-muted: #475569;
  --text-accent: #38bdf8;

  /* -- Semantic Colors -- */
  --color-success: #34d399;
  --color-warning: #fbbf24;
  --color-error: #f87171;
  --color-info: #60a5fa;

  /* -- Chord Colors -- */
  --chord-color: #fbbf24;
  --chord-glow: rgba(251, 191, 36, 0.3);
  --section-verse: #38bdf8;
  --section-chorus: #a78bfa;
  --section-bridge: #34d399;
  --section-intro: #f472b6;
  --section-outro: #fb923c;
  --section-solo: #f87171;
  --section-default: #94a3b8;

  /* -- Typography -- */
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  /* -- Spacing -- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* -- Borders -- */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  --border-color: rgba(99, 179, 237, 0.12);

  /* -- Transitions -- */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* -- Sidebar -- */
  --sidebar-width: 280px;
  --sidebar-collapsed: 64px;

  /* -- Performance Mode Font Size (adjustable) -- */
  --perf-font-size: 1.4rem;
  --perf-chord-size: 1.1rem;
  --perf-line-height: 2.2;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-ui);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow: hidden;
  line-height: 1.6;
}

/* ============================================
   Scrollbar Styling
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-active);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* ============================================
   App Layout
   ============================================ */
#app {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  transition: width var(--transition-base);
  z-index: 100;
  flex-shrink: 0;
}

.sidebar-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-gradient);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  box-shadow: 0 0 20px var(--accent-glow);
}

.sidebar-logo-text {
  font-size: var(--text-xl);
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.sidebar-nav {
  flex: 1;
  padding: var(--space-4);
  overflow-y: auto;
}

.nav-section {
  margin-bottom: var(--space-6);
}

.nav-section-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-1);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: var(--text-sm);
  font-weight: 500;
  position: relative;
  user-select: none;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(var(--accent-primary-rgb), 0.12);
  color: var(--accent-primary);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--accent-primary);
  border-radius: var(--radius-full);
}

.nav-item-icon {
  font-size: var(--text-lg);
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.nav-item-badge {
  margin-left: auto;
  background: var(--bg-active);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: var(--space-4);
  border-top: 1px solid var(--border-color);
}

.storage-indicator {
  padding: var(--space-3);
}

.storage-label {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-bottom: var(--space-2);
}

.storage-bar {
  height: 4px;
  background: var(--bg-active);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.storage-bar-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  transition: width var(--transition-base);
}

/* ============================================
   Main Content Area
   ============================================ */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* ============================================
   Top Bar
   ============================================ */
.top-bar {
  height: 64px;
  padding: 0 var(--space-8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  flex-shrink: 0;
  z-index: 50;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.top-bar-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
}

.top-bar-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-lg);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #0f172a;
  font-weight: 600;
  border: none;
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-gradient-hover);
  box-shadow: 0 0 30px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-danger {
  background: rgba(248, 113, 113, 0.1);
  color: var(--color-error);
  border-color: rgba(248, 113, 113, 0.2);
}

.btn-danger:hover {
  background: rgba(248, 113, 113, 0.2);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn-lg {
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
}

/* ============================================
   View Container
   ============================================ */
.view-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--space-8);
}

.view {
  display: none;
  animation: fadeIn 0.3s ease;
}

.view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Library View
   ============================================ */
.library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.library-header h1 {
  font-size: var(--text-3xl);
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.search-box {
  position: relative;
  width: 320px;
}

.search-box input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  padding-left: 40px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  outline: none;
  transition: all var(--transition-fast);
}

.search-box input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.15);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-box-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* Song Cards Grid */
.song-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-5);
}

.song-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.song-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.song-card:hover {
  border-color: rgba(var(--accent-primary-rgb), 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.song-card:hover::before {
  opacity: 1;
}

.song-card-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-card-artist {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

.song-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.song-card-tag {
  font-size: var(--text-xs);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-weight: 500;
}

.song-card-tag.key {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.song-card-tag.capo {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
}

.song-card-tag.bpm {
  background: rgba(129, 140, 248, 0.15);
  color: #818cf8;
}

.song-card-actions {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  display: flex;
  gap: var(--space-2);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.song-card:hover .song-card-actions {
  opacity: 1;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-8);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: var(--space-6);
  opacity: 0.5;
}

.empty-state-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.empty-state-text {
  font-size: var(--text-base);
  color: var(--text-secondary);
  max-width: 450px;
  margin: 0 auto var(--space-6);
  line-height: 1.7;
}

/* ============================================
   Editor View
   ============================================ */
.editor-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  height: calc(100vh - 64px - 4rem);
}

.editor-panel {
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.editor-panel-header {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.editor-panel-title {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.editor-textarea {
  flex: 1;
  width: 100%;
  padding: var(--space-6);
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.8;
  resize: none;
  outline: none;
  overflow-y: auto;
  tab-size: 4;
}

.editor-textarea::placeholder {
  color: var(--text-muted);
}

.editor-preview {
  flex: 1;
  padding: var(--space-6);
  overflow-y: auto;
  font-family: var(--font-mono);
}

/* Song Metadata Form */
.song-meta-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.form-input,
.form-select {
  padding: var(--space-3) var(--space-4);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  outline: none;
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.15);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ============================================
   Song Display (Parsed Chords + Lyrics)
   ============================================ */
.song-display {
  font-family: var(--font-mono);
  line-height: var(--perf-line-height);
}

.song-section {
  margin-bottom: var(--space-8);
}

.section-label {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-md);
  display: inline-block;
  margin-bottom: var(--space-4);
}

.song-section--verse .section-label {
  background: rgba(56, 189, 248, 0.12);
  color: var(--section-verse);
}

.song-section--chorus .section-label {
  background: rgba(167, 139, 250, 0.12);
  color: var(--section-chorus);
}

.song-section--bridge .section-label {
  background: rgba(52, 211, 153, 0.12);
  color: var(--section-bridge);
}

.song-section--intro .section-label,
.song-section--instrumental .section-label {
  background: rgba(244, 114, 182, 0.12);
  color: var(--section-intro);
}

.song-section--outro .section-label {
  background: rgba(251, 146, 60, 0.12);
  color: var(--section-outro);
}

.song-section--solo .section-label {
  background: rgba(248, 113, 113, 0.12);
  color: var(--section-solo);
}

.song-section--unknown .section-label,
.song-section--pre-chorus .section-label,
.song-section--interlude .section-label {
  background: rgba(148, 163, 184, 0.12);
  color: var(--section-default);
}

.song-line {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: var(--space-2);
  min-height: 1.2em;
}

.chord-lyric-pair {
  display: inline-flex;
  flex-direction: column;
  position: relative;
  white-space: pre;
}

.chord {
  color: var(--chord-color);
  font-weight: 700;
  font-size: var(--perf-chord-size);
  line-height: 1.4;
  min-height: 1.4em;
  text-shadow: 0 0 12px var(--chord-glow);
  user-select: text;
}

.lyric {
  color: var(--text-primary);
  font-size: var(--perf-font-size);
  line-height: 1.5;
  white-space: pre;
}

.chord-only-line .chord {
  margin-bottom: var(--space-2);
}

.lyric-only-line {
  font-size: var(--perf-font-size);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  white-space: pre-wrap;
}

/* ============================================
   Performance Mode
   ============================================ */
.performance-mode {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 1000;
  display: none;
  flex-direction: column;
}

.performance-mode.active {
  display: flex;
}

.performance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-6);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  z-index: 10;
  transition: opacity var(--transition-base);
}

.performance-header.auto-hide {
  opacity: 0;
}

.performance-header:hover {
  opacity: 1 !important;
}

.performance-song-info {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.performance-song-title {
  font-size: var(--text-lg);
  font-weight: 700;
}

.performance-song-key {
  font-size: var(--text-sm);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  font-weight: 600;
}

.performance-controls {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.speed-control {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.speed-value {
  min-width: 50px;
  text-align: center;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.performance-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--space-8) var(--space-16);
  scroll-behavior: auto;
  position: relative;
}

/* Progress Bar */
.progress-bar {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--bg-tertiary);
  z-index: 1001;
}

.progress-bar-fill {
  width: 100%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  transition: height 100ms linear;
  position: absolute;
  top: 0;
}

/* Countdown Overlay */
.countdown-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 14, 23, 0.85);
  z-index: 1002;
}

.countdown-overlay.active {
  display: flex;
}

.countdown-number {
  font-size: 8rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: countPulse 1s ease-in-out;
}

@keyframes countPulse {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* Scroll State Indicator */
.scroll-indicator {
  position: fixed;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-2) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  z-index: 1001;
  transition: all var(--transition-base);
  opacity: 0;
  pointer-events: none;
}

.scroll-indicator.visible {
  opacity: 1;
}

.scroll-indicator.playing {
  background: rgba(52, 211, 153, 0.15);
  color: var(--color-success);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.scroll-indicator.paused {
  background: rgba(251, 191, 36, 0.15);
  color: var(--color-warning);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.scroll-indicator.manual-pause {
  background: rgba(129, 140, 248, 0.15);
  color: var(--accent-secondary);
  border: 1px solid rgba(129, 140, 248, 0.3);
}

/* Pedal Input Flash */
.pedal-flash {
  position: fixed;
  bottom: var(--space-4);
  right: var(--space-4);
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--color-success);
  box-shadow: 0 0 12px var(--color-success);
  z-index: 1001;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.pedal-flash.active {
  opacity: 1;
  animation: pedalPulse 0.3s ease;
}

@keyframes pedalPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.8); }
  100% { transform: scale(1); }
}

/* ============================================
   Settings Modal
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 23, 0.8);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: var(--text-xl);
  font-weight: 700;
}

.modal-body {
  padding: var(--space-6);
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
}

/* Settings Sections */
.settings-section {
  margin-bottom: var(--space-8);
}

.settings-section:last-child {
  margin-bottom: 0;
}

.settings-section-title {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-color);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) 0;
}

.setting-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.setting-value {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Key Mapping Row */
.key-mapping-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
}

.key-mapping-action {
  font-size: var(--text-sm);
  font-weight: 500;
}

.key-mapping-key {
  padding: var(--space-1) var(--space-3);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-accent);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.key-mapping-key:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-glow);
}

.key-mapping-key.listening {
  border-color: var(--color-warning);
  color: var(--color-warning);
  animation: pulse 1s infinite;
}

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

/* ============================================
   Confirm Dialog
   ============================================ */
.confirm-dialog .modal {
  max-width: 400px;
}

.confirm-message {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.7;
  text-align: center;
  padding: var(--space-4) 0;
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.toast {
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  animation: toastSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--glass-shadow);
  min-width: 250px;
}

.toast.toast-success {
  background: rgba(52, 211, 153, 0.15);
  color: var(--color-success);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.toast.toast-error {
  background: rgba(248, 113, 113, 0.15);
  color: var(--color-error);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.toast.toast-info {
  background: rgba(96, 165, 250, 0.15);
  color: var(--color-info);
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.toast-exit {
  animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes toastSlideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .editor-layout {
    grid-template-columns: 1fr;
  }

  .song-meta-form {
    grid-template-columns: 1fr;
  }

  .performance-body {
    padding: var(--space-6) var(--space-8);
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -100%;
    transition: left var(--transition-base);
    z-index: 200;
  }

  .sidebar.open {
    left: 0;
  }

  .library-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-box {
    width: 100%;
  }

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

  .performance-body {
    padding: var(--space-4);
  }
}

/* ============================================
   Utility Classes
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hidden {
  display: none !important;
}

/* ============================================
   Phase 2: Learning System Styles
   ============================================ */

/* Fretboard Container */
.fretboard-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  overflow-x: auto;
}

.fretboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.fretboard-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.fretboard-svg-wrapper {
  width: 100%;
  overflow-x: auto;
  padding: var(--space-2) 0;
}

/* CAGED & Scale Controls Toolbar */
.learn-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
  background: var(--bg-secondary);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
}

.caged-btn-group {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.caged-shape-btn {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.caged-shape-btn[data-shape="C"].active {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.caged-shape-btn[data-shape="A"].active {
  background: rgba(167, 139, 250, 0.2);
  color: #a78bfa;
  border-color: #a78bfa;
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.3);
}

.caged-shape-btn[data-shape="G"].active {
  background: rgba(52, 211, 153, 0.2);
  color: #34d399;
  border-color: #34d399;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.3);
}

.caged-shape-btn[data-shape="E"].active {
  background: rgba(251, 146, 60, 0.2);
  color: #fb923c;
  border-color: #fb923c;
  box-shadow: 0 0 12px rgba(251, 146, 60, 0.3);
}

.caged-shape-btn[data-shape="D"].active {
  background: rgba(248, 113, 113, 0.2);
  color: #f87171;
  border-color: #f87171;
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.3);
}

.caged-shape-btn[data-shape="ALL"].active {
  background: var(--accent-gradient);
  color: #0f172a;
  border-color: transparent;
}

.caged-shape-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 12-Key Chromatic Stepper Strip */
.caged-all-keys-strip-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-4) var(--space-6);
  animation: fadeIn 0.25s ease-out;
}

.caged-key-pill-group {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: 4px;
}

.caged-key-pill-group::-webkit-scrollbar {
  height: 4px;
}

.caged-key-pill-group::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 2px;
}

.caged-key-pill {
  flex: 1 0 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 6px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.caged-key-pill:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.caged-key-pill.active {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #38bdf8;
  font-weight: bold;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.caged-key-pill-fret {
  font-size: 0.7rem;
  opacity: 0.8;
  margin-top: 3px;
}

/* Learning Info Card */
.learn-info-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--space-6);
}

@media (max-width: 900px) {
  .learn-info-grid {
    grid-template-columns: 1fr;
  }
}

.guided-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
}

.guided-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.guided-card-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--accent-primary);
}

.guided-card-summary {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-color);
}

.guided-card-body {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: var(--space-6);
}

.guided-nav-buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Chord Popup Tooltip in Performance Mode */
.chord-popup-tooltip {
  position: absolute;
  z-index: 2500;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  box-shadow: var(--glass-shadow);
  pointer-events: none;
  animation: fadeIn 0.15s ease;
}

.chord-hoverable {
  cursor: pointer;
  text-decoration: underline dotted var(--accent-primary);
  text-underline-offset: 3px;
}

.chord-hoverable:hover {
  color: var(--accent-primary) !important;
}

/* ============================================================
 * Rocksmith Note Highway & Guitar Lessons UI
 * ============================================================ */

.note-highway-card {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.highway-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.highway-title-area {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.highway-badge {
  font-size: var(--text-xs);
  color: var(--accent-primary);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.highway-title {
  font-size: var(--text-lg);
  font-weight: bold;
  color: var(--text-primary);
}

.highway-counter {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: var(--bg-tertiary);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  color: var(--accent-primary);
  font-weight: bold;
}

.highway-progress-track {
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
}

.highway-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), #a78bfa);
  transition: width 0.25s ease;
}

/* Fretboard Canvas Container */
.highway-canvas-container {
  position: relative;
  height: 320px;
  background: #0f172a;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  display: flex;
}

.highway-lanes {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.highway-string-lane {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-right: 1px dashed rgba(255, 255, 255, 0.05);
}

.highway-string-lane:last-child {
  border-right: none;
}

.lane-label {
  font-size: 0.7rem;
  font-weight: bold;
  color: var(--string-color);
  padding: 6px 0;
  text-transform: uppercase;
  z-index: 2;
}

.lane-line {
  position: absolute;
  top: 28px;
  bottom: 0;
  width: 3px;
  background: var(--string-color);
  opacity: 0.4;
  box-shadow: 0 0 8px var(--string-color);
}

.highway-notes-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Note Node Bubbles */
.highway-note-node {
  position: absolute;
  bottom: 120px;
  left: calc((var(--string-col) - 1) * (100% / 6) + (100% / 12));
  transform: translate(-50%, var(--offset-y));
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 10;
}

.highway-note-node.upcoming {
  opacity: 0.45;
  transform: translate(-50%, var(--offset-y)) scale(0.85);
}

.highway-note-node.played {
  opacity: 0.2;
  transform: translate(-50%, var(--offset-y)) scale(0.7);
}

.highway-note-node.active {
  opacity: 1;
  transform: translate(-50%, 0) scale(1.2);
  z-index: 20;
}

.highway-note-bubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: #000;
  box-shadow: 0 0 20px var(--note-color), inset 0 0 10px rgba(255, 255, 255, 0.5);
  font-weight: bold;
}

.highway-note-node.active .highway-note-bubble {
  animation: pulseGlow 1.5s infinite alternate;
}

@keyframes pulseGlow {
  from { box-shadow: 0 0 15px var(--note-color); }
  to { box-shadow: 0 0 30px var(--note-color), 0 0 40px var(--note-color); }
}

.note-label {
  font-size: 1.1rem;
  line-height: 1;
}

.fret-tag {
  font-size: 0.65rem;
  opacity: 0.9;
  text-transform: uppercase;
}

.highway-completed-screen {
  text-align: center;
  padding: 40px;
}

/* Instruction Box */
.highway-instruction-box {
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  border-left: 4px solid var(--accent-primary);
}

.instruction-main {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-md);
  flex-wrap: wrap;
}

.string-badge {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
}

.magic-badge {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 1px solid #fbbf24;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: bold;
}

.instruction-tip {
  margin-top: 6px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.highway-controls {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
}

/* Lesson Cards Sidebar */
.lesson-item-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  color: var(--text-primary);
}

.lesson-item-btn:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--accent-primary);
}

.lesson-item-btn.active {
  background: var(--accent-primary);
  color: #000;
  font-weight: bold;
}

.lesson-item-btn.completed {
  border-left: 3px solid #10b981;
}

@media (max-width: 850px) {
  .lessons-layout {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
   LIME GREEN FOOT PEDALS & KILL PEDAL STYLES
   ============================================================ */

/* Stage Container in Pedal Test Modal */
.pedal-test-modal-dialog {
  max-width: 680px !important;
}

.pedal-test-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.pedalboard-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2.2rem;
  padding: 2rem 1.5rem;
  background: radial-gradient(circle at 50% 35%, #18261e 0%, #0c1510 65%, #070d0a 100%);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(74, 222, 128, 0.25);
  box-shadow: inset 0 4px 24px rgba(0, 0, 0, 0.85), 0 10px 30px rgba(0, 0, 0, 0.6);
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}

.pedalboard-stage::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(74, 222, 128, 0.6), transparent);
}

/* Stompbox Outer Housing (TS9 / Tube Screamer Lime Green) */
.lime-stompbox {
  width: 220px;
  background: linear-gradient(168deg, #86efac 0%, #4ade80 18%, #22c55e 50%, #16a34a 82%, #14532d 100%);
  border-radius: 18px;
  padding: 12px;
  box-shadow: 
    0 18px 36px rgba(0, 0, 0, 0.75),
    0 6px 12px rgba(0, 0, 0, 0.5),
    inset 0 2px 3px rgba(255, 255, 255, 0.7),
    inset 0 -4px 8px rgba(0, 0, 0, 0.6);
  border: 2px solid #a7f3d0;
  position: relative;
  cursor: pointer;
  user-select: none;
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.lime-stompbox:hover {
  transform: translateY(-3px);
  filter: brightness(1.06);
  box-shadow: 
    0 22px 44px rgba(0, 0, 0, 0.8),
    0 0 24px rgba(74, 222, 128, 0.35),
    inset 0 2px 3px rgba(255, 255, 255, 0.8);
}

.lime-stompbox:active,
.lime-stompbox.stomped {
  transform: translateY(5px) scale(0.975);
  box-shadow: 
    0 6px 14px rgba(0, 0, 0, 0.9),
    0 0 16px rgba(74, 222, 128, 0.5),
    inset 0 4px 10px rgba(0, 0, 0, 0.7);
  filter: brightness(1.18);
}

/* Kill Pedal Variation (Lime Chassis with Emergency Accents) */
.lime-stompbox.kill-pedal-variant {
  background: linear-gradient(168deg, #a7f3d0 0%, #34d399 15%, #10b981 45%, #15803d 75%, #064e3b 100%);
  border-color: #fecaca;
}

.lime-stompbox.kill-pedal-variant:hover {
  box-shadow: 
    0 22px 44px rgba(0, 0, 0, 0.8),
    0 0 24px rgba(239, 68, 68, 0.35),
    inset 0 2px 3px rgba(255, 255, 255, 0.8);
}

.lime-stompbox.kill-pedal-variant:active,
.lime-stompbox.kill-pedal-variant.stomped {
  box-shadow: 
    0 6px 14px rgba(0, 0, 0, 0.9),
    0 0 18px rgba(239, 68, 68, 0.6),
    inset 0 4px 10px rgba(0, 0, 0, 0.7);
}

/* Top Plate with Screws and Jewel LED */
.pedal-top-chassis {
  background: linear-gradient(180deg, #18231c 0%, #101813 100%);
  border-radius: 10px;
  padding: 10px 8px;
  border: 1px solid rgba(74, 222, 128, 0.35);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.85);
}

.kill-pedal-variant .pedal-top-chassis {
  border-color: rgba(248, 113, 113, 0.35);
}

.pedal-screw {
  width: 7px;
  height: 7px;
  background: radial-gradient(circle, #f1f5f9 30%, #64748b 90%);
  border-radius: 50%;
  position: absolute;
  box-shadow: inset 0 1px 1px #fff, 0 1px 2px rgba(0,0,0,0.8);
}
.pedal-screw::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 1px;
  width: 5px;
  height: 1px;
  background: #334155;
}
.pedal-screw.top-left { top: 6px; left: 6px; }
.pedal-screw.top-right { top: 6px; right: 6px; }
.pedal-screw.bottom-left { bottom: 6px; left: 6px; }
.pedal-screw.bottom-right { bottom: 6px; right: 6px; }

.pedal-led-housing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin-bottom: 6px;
}

.pedal-led {
  width: 14px;
  height: 14px;
  background: radial-gradient(circle at 35% 35%, #86efac, #16a34a 65%, #052e16 100%);
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.7), 0 2px 4px rgba(0,0,0,0.8);
  transition: all 0.1s ease;
}

.pedal-led.active,
.lime-stompbox.stomped .pedal-led {
  background: radial-gradient(circle at 35% 35%, #ffffff 10%, #4ade80 40%, #22c55e 80%) !important;
  box-shadow: 
    0 0 12px #4ade80,
    0 0 24px #22c55e,
    0 0 40px #16a34a,
    inset 0 1px 3px #fff !important;
}

.pedal-led.kill-led {
  background: radial-gradient(circle at 35% 35%, #fca5a5, #dc2626 65%, #450a0a 100%);
  border-color: #fca5a5;
}

.pedal-led.kill-led.active,
.lime-stompbox.kill-pedal-variant.stomped .pedal-led.kill-led {
  background: radial-gradient(circle at 35% 35%, #ffffff 10%, #f87171 40%, #ef4444 80%) !important;
  box-shadow: 
    0 0 12px #ef4444,
    0 0 26px #dc2626,
    0 0 45px #b91c1c,
    inset 0 1px 3px #fff !important;
}

.pedal-led-label {
  font-family: monospace, system-ui;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #86efac;
}

.kill-pedal-variant .pedal-led-label {
  color: #fca5a5;
}

.pedal-branding {
  text-align: center;
}

.pedal-brand-name {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #a7f3d0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.pedal-model-name {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #f0fdf4;
  font-family: 'Arial Black', Impact, sans-serif;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}

/* Stomp Foot Plate with Rubber Tread */
.pedal-stomp-plate {
  background: linear-gradient(180deg, #1b261e 0%, #0e1611 100%);
  border-radius: 10px;
  height: 124px;
  border: 1.5px solid rgba(74, 222, 128, 0.45);
  box-shadow: inset 0 3px 10px rgba(0,0,0,0.9), 0 2px 4px rgba(0,0,0,0.4);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.kill-pedal-variant .pedal-stomp-plate {
  border-color: rgba(248, 113, 113, 0.4);
}

.pedal-hazard-stripe {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: repeating-linear-gradient(
    -45deg,
    #ef4444,
    #ef4444 8px,
    #111827 8px,
    #111827 16px
  );
  border-bottom: 1px solid #7f1d1d;
  z-index: 1;
}

.pedal-rubber-tread {
  position: absolute;
  inset: 12px;
  background: #101612;
  border-radius: 6px;
  border: 1px solid #1c2b21;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  padding: 4px 8px;
  pointer-events: none;
}

.tread-line {
  height: 2px;
  background: linear-gradient(90deg, #090e0b, #2f4335, #090e0b);
  border-radius: 1px;
}

/* Heavy Duty 3PDT Chrome Footswitch */
.pedal-footswitch {
  width: 60px;
  height: 60px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.switch-nut-outer {
  position: absolute;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #e2e8f0 0%, #64748b 50%, #334155 100%);
  clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
  box-shadow: 0 4px 10px rgba(0,0,0,0.8);
}

.switch-nut-inner {
  position: absolute;
  width: 42px;
  height: 42px;
  background: radial-gradient(circle, #ffffff 20%, #94a3b8 70%, #475569 100%);
  border-radius: 50%;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.9), 0 2px 5px rgba(0,0,0,0.6);
}

.switch-plunger {
  position: absolute;
  width: 28px;
  height: 28px;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #e2e8f0 40%, #64748b 85%, #334155 100%);
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 3px 6px rgba(0,0,0,0.7), inset 0 1px 2px #fff;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.lime-stompbox:active .switch-plunger,
.lime-stompbox.stomped .switch-plunger {
  transform: scale(0.86);
  box-shadow: 0 1px 2px rgba(0,0,0,0.9), inset 0 2px 4px rgba(0,0,0,0.7);
}

/* Bottom Label Plate */
.pedal-bottom-plate {
  text-align: center;
  padding: 7px 4px;
  background: linear-gradient(180deg, #15803d 0%, #166534 100%);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.4), 0 2px 4px rgba(0,0,0,0.4);
  position: relative;
}

.kill-pedal-variant .pedal-bottom-plate {
  background: linear-gradient(180deg, #991b1b 0%, #7f1d1d 100%);
  border-color: rgba(254, 202, 202, 0.3);
}

.pedal-badge-title {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #ffffff;
  font-family: 'Arial Black', Impact, sans-serif;
  text-shadow: 0 2px 4px rgba(0,0,0,0.9);
}

.pedal-badge-sub {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #bbf7d0;
  margin-top: 1px;
}

.kill-pedal-variant .pedal-badge-sub {
  color: #fecaca;
}

/* Status Bar in Pedal Test Modal */
.pedal-test-status-bar {
  text-align: center;
  padding: 10px 14px;
  background: #0d1611;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
  transition: all 0.15s ease;
}

.pedal-test-status-bar.kill-active {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
  background: #180d0d;
}

/* Console log styling */
.pedal-test-console {
  min-height: 120px;
  max-height: 180px;
  background: #090d0b;
  border-radius: var(--radius-lg);
  padding: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-align: left;
  overflow-y: auto;
  color: var(--text-secondary);
  border: 1px solid #1e2e23;
}

/* Mini Lime Green Pedals in Note Highway & Performance Mode */
.btn-lime-pedal {
  background: linear-gradient(145deg, #4ade80, #22c55e, #16a34a);
  color: #05220e !important;
  font-weight: 800;
  border: 2px solid #86efac;
  border-radius: 10px;
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35), inset 0 1px 2px rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all 0.1s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-lime-pedal:hover {
  background: linear-gradient(145deg, #86efac, #4ade80, #22c55e);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.5);
  color: #021206 !important;
}

.btn-lime-pedal:active,
.btn-lime-pedal.active-stomp {
  transform: translateY(2px);
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.4), inset 0 2px 4px rgba(0,0,0,0.4);
}

.btn-lime-pedal.kill-pedal-btn {
  background: linear-gradient(145deg, #22c55e, #16a34a 40%, #991b1b 100%);
  color: #ffffff !important;
  border-color: #fca5a5;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35), inset 0 1px 2px rgba(255,255,255,0.4);
}

.btn-lime-pedal.kill-pedal-btn:hover {
  background: linear-gradient(145deg, #16a34a, #dc2626, #991b1b);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.5);
}

.pedal-mini-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #15803d;
  border: 1px solid #fff;
  box-shadow: 0 0 6px #4ade80;
  transition: all 0.1s ease;
  display: inline-block;
}

.btn-lime-pedal:hover .pedal-mini-led,
.btn-lime-pedal:active .pedal-mini-led,
.btn-lime-pedal.active-stomp .pedal-mini-led {
  background: #86efac;
  box-shadow: 0 0 12px #86efac;
}

.btn-lime-pedal.kill-pedal-btn .pedal-mini-led {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.btn-lime-pedal.kill-pedal-btn:hover .pedal-mini-led,
.btn-lime-pedal.kill-pedal-btn:active .pedal-mini-led,
.btn-lime-pedal.kill-pedal-btn.active-stomp .pedal-mini-led {
  background: #fca5a5;
  box-shadow: 0 0 14px #ef4444;
}
