/* ═══════════════════════════════════════════════════════════
   🎛️ CHORDYNAUT CYBERPUNK UI ENHANCEMENT
   Pure CSS transformation - no JS logic touched!
   ═══════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────── 
   Global Styles & Typography
   ─────────────────────────────────────────────────────────── */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  /* Animated gradient background with hue rotation */
  background: radial-gradient(circle at 20% 20%, #0a0f1f 0%, #000 80%);
  animation: bgPulse 12s ease-in-out infinite alternate;
  
  /* Futuristic Orbitron font */
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.05em;
  
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
  
  /* Subtle ambient glow on entire page */
  text-shadow: 0 0 2px rgba(0, 255, 255, 0.1);
}

@keyframes bgPulse {
  from { filter: hue-rotate(0deg); }
  to { filter: hue-rotate(360deg); }
}

/* Accessibility: Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
  }
  .neon-bar,
  .btn-icon.active,
  .chord-card.active {
    animation: none !important;
  }
}

/* ─────────────────────────────────────────────────────────── 
   Neon Status Bar - The Only HTML Addition
   ─────────────────────────────────────────────────────────── */

.neon-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  
  /* Animated gradient flowing across the top */
  background: linear-gradient(90deg, #ff0080, #00f6ff, #ffcc00, #ff0080);
  background-size: 300% 100%;
  animation: glowFlow 5s linear infinite;
  
  /* Above everything else */
  z-index: 9999;
  
  /* Subtle glow effect */
  box-shadow: 0 0 10px rgba(0, 246, 255, 0.5);
}

@keyframes glowFlow {
  from { background-position: 0 0; }
  to { background-position: 300% 0; }
}

/* ─────────────────────────────────────────────────────────── 
   App Container & Layout
   ─────────────────────────────────────────────────────────── */

.app-container {
  padding-top: 20px; /* Account for neon bar */
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* ─────────────────────────────────────────────────────────── 
   Top Bar - Glass Panel Effect
   ─────────────────────────────────────────────────────────── */

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  margin-bottom: 30px;
  
  /* Glass morphism effect */
  background: linear-gradient(135deg, rgba(255,0,128,.08), rgba(0,255,255,.05));
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0,255,255,0.15);
  border-radius: 8px;
  
  /* Subtle outer glow */
  box-shadow: 0 0 20px rgba(0,255,255,0.05);
}

.top-bar h1 {
  background: linear-gradient(135deg, #ff0080, #00f6ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(0,255,255,0.3));
}

/* ─────────────────────────────────────────────────────────── 
   Buttons & Interactive Controls
   ─────────────────────────────────────────────────────────── */

.btn-icon,
.top-bar button,
button {
  /* Holographic border with inner and outer glow */
  border: 1px solid rgba(0,255,255,0.25);
  background: linear-gradient(135deg, rgba(255,0,128,.12), rgba(0,255,255,.08));
  box-shadow: 
    0 0 8px rgba(255,0,128,0.3), 
    inset 0 0 6px rgba(0,255,255,0.1);
  
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Orbitron', sans-serif;
  font-weight: 400;
  letter-spacing: 0.05em;
  
  /* Smooth transitions */
  transition: 
    box-shadow 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease;
}

.btn-icon:hover,
.top-bar button:hover,
button:hover {
  /* Enhanced glow on hover */
  box-shadow: 
    0 0 10px #ff0080, 
    0 0 20px #00f6ff,
    inset 0 0 10px rgba(0,255,255,0.15);
  transform: translateY(-1px);
  border-color: rgba(0,255,255,0.4);
}

.btn-icon:active,
button:active {
  transform: translateY(0);
}

/* Active state with pulsing glow */
.btn-icon.active {
  animation: pulse 1s infinite;
  border-color: rgba(0,255,255,0.5);
}

@keyframes pulse {
  0%, 100% { 
    opacity: 0.8; 
    filter: drop-shadow(0 0 4px #00f6ff); 
    box-shadow: 0 0 12px rgba(0,255,255,0.5);
  }
  50% { 
    opacity: 1; 
    filter: drop-shadow(0 0 8px #ff0080); 
    box-shadow: 0 0 20px rgba(255,0,128,0.6);
  }
}

/* ─────────────────────────────────────────────────────────── 
   Input Fields & Form Controls
   ─────────────────────────────────────────────────────────── */

input[type="range"] {
  /* Cyan accent for range sliders */
  accent-color: #00f6ff;
  width: 100%;
  cursor: pointer;
}

input[type="number"],
select {
  background: rgba(0,255,255,0.05);
  border: 1px solid rgba(0,255,255,0.2);
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.05em;
  
  transition: box-shadow 0.2s, border-color 0.2s;
}

input[type="number"]:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 8px rgba(0,255,255,0.4);
  border-color: #00f6ff;
  background: rgba(0,255,255,0.08);
}

input[type="checkbox"] {
  accent-color: #00f6ff;
  cursor: pointer;
}

label {
  display: block;
  color: rgba(255,255,255,0.9);
  margin-bottom: 5px;
  font-size: 14px;
}

/* ─────────────────────────────────────────────────────────── 
   Overlays & Modal Dialogs
   ─────────────────────────────────────────────────────────── */

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.overlay-card,
.metronome-settings,
.confirm-dialog {
  /* Glass morphism with blur and brightness */
  backdrop-filter: blur(10px) brightness(1.1);
  background: rgba(10,15,25,0.8);
  
  /* Cyan border with soft glow */
  border: 1px solid rgba(0,255,255,0.2);
  box-shadow: 0 0 20px rgba(0,255,255,0.1);
  
  border-radius: 12px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.overlay-card h2,
.metronome-settings h2,
.confirm-dialog h2 {
  background: linear-gradient(135deg, #ff0080, #00f6ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}

/* ─────────────────────────────────────────────────────────── 
   Main Controls & Content Areas
   ─────────────────────────────────────────────────────────── */

.main-controls {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr 2fr;
}

.control-panel {
  background: linear-gradient(135deg, rgba(255,0,128,.08), rgba(0,255,255,.05));
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0,255,255,0.15);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 0 15px rgba(0,255,255,0.05);
}

.chord-display {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.chord-card {
  background: linear-gradient(135deg, rgba(255,0,128,.08), rgba(0,255,255,.05));
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0,255,255,0.15);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.chord-card.active {
  border-color: rgba(0,255,255,0.5);
  box-shadow: 
    0 0 20px rgba(0,255,255,0.3),
    inset 0 0 15px rgba(0,255,255,0.1);
  animation: chordPulse 0.5s ease;
}

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

/* ─────────────────────────────────────────────────────────── 
   Mobile Responsiveness
   ─────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .main-controls {
    grid-template-columns: 1fr;
  }
  
  .top-bar {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .chord-display {
    grid-template-columns: 1fr;
  }
  
  /* Reduce blur for better mobile performance */
  .overlay-card,
  .metronome-settings,
  .confirm-dialog,
  .control-panel,
  .chord-card,
  .top-bar {
    backdrop-filter: blur(5px) brightness(1.1);
  }
}

/* ─────────────────────────────────────────────────────────── 
   Scrollbars - Cyberpunk Style
   ─────────────────────────────────────────────────────────── */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.3);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff0080, #00f6ff);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #00f6ff, #ffcc00);
}

/* ─────────────────────────────────────────────────────────── 
   Footer Link Styling
   ─────────────────────────────────────────────────────────── */

footer a:hover {
  text-shadow: 0 0 8px #00f6ff;
  transition: text-shadow 0.2s;
}

/* ─────────────────────────────────────────────────────────── 
   Performance Optimization Hints
   ─────────────────────────────────────────────────────────── */

.neon-bar,
.btn-icon.active,
.chord-card.active {
  /* Hint to browser to use GPU acceleration */
  will-change: transform, opacity;
}

/* Remove will-change after animation completes to save resources */
@media (prefers-reduced-motion: no-preference) {
  .btn-icon:not(.active),
  .chord-card:not(.active) {
    will-change: auto;
  }
}