/* Modern Theme CSS for YT-DJ YouTube Video Mixer */

:root {
  /* Neon Palette */
  --bg-primary: #08070d;
  --bg-secondary: #100f1c;
  --color-deck-a: #00d2ff;
  --color-deck-b: #ff007f;
  --color-deck-a-glow: rgba(0, 210, 255, 0.4);
  --color-deck-b-glow: rgba(255, 0, 127, 0.4);
  --color-accent: #39ff14;
  --color-accent-glow: rgba(57, 255, 20, 0.3);
  
  /* Glass Colors */
  --glass-bg: rgba(16, 15, 28, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-bg-heavy: rgba(8, 7, 13, 0.85);
  
  /* Text */
  --text-main: #f3f1f9;
  --text-muted: #8b88a5;
  --text-inverse: #08070d;
  
  /* Layout sizes */
  --border-radius-lg: 16px;
  --border-radius-md: 10px;
  --border-radius-sm: 6px;
  --font-family-sans: 'Outfit', sans-serif;
  --font-family-mono: 'JetBrains Mono', monospace;
  
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Base resets & styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-family-sans);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  padding: 2rem 1.5rem;
}

/* Stars background */
.stars-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -3;
  opacity: 0.3;
  background-image: 
    radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 40px),
    radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 30px),
    radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 40px);
  background-size: 550px 550px, 350px 350px, 250px 250px;
  background-position: 0 0, 40px 60px, 130px 270px;
}

/* Space Orbs Glow */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -2;
  opacity: 0.15;
  pointer-events: none;
}

.glow-orb-left {
  top: 10%;
  left: 5%;
  width: 500px;
  height: 500px;
  background-color: var(--color-deck-a);
}

.glow-orb-right {
  bottom: 10%;
  right: 5%;
  width: 500px;
  height: 500px;
  background-color: var(--color-deck-b);
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Glassmorphism Cards */
.card-glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  padding: 1.5rem;
}

.card-glass-heavy {
  background: var(--glass-bg-heavy);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
  padding: 2rem;
}

/* App Container */
.app-container {
  max-width: 1560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-height: calc(100vh - 4rem);
}

/* Header & Brand */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-icon {
  background: linear-gradient(135deg, var(--color-deck-a), var(--color-deck-b));
  width: 50px;
  height: 50px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.3);
}

.logo-icon i {
  color: var(--text-main);
  width: 24px;
  height: 24px;
}

.neon-pulse {
  animation: logo-glow 3s infinite ease-in-out;
}

@keyframes logo-glow {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(255,255,255,0.7)); }
  50% { filter: drop-shadow(0 0 8px rgba(0, 210, 255, 0.8)); }
}

.logo-text h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(to right, #ffffff, #a59bf2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.logo-text .subtitle {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--text-muted);
}

/* Preset Shelf */
.preset-shelf-container {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-lg);
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.shelf-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.shelf-label i {
  width: 14px;
  height: 14px;
}

.preset-list {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  max-width: 400px;
  overflow-x: auto;
  padding: 0.2rem 0;
}

.no-presets {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.preset-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.preset-badge:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.preset-badge .delete-preset {
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.preset-badge .delete-preset:hover {
  color: var(--color-deck-b);
  background: rgba(255, 0, 127, 0.15);
}

/* Main workspace layout grid */
.workspace {
  display: grid;
  grid-template-columns: 1fr 340px 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1200px) {
  .workspace {
    grid-template-columns: 1fr 1fr;
  }
  .center-panel {
    grid-column: span 2;
    order: 3;
  }
}

@media (max-width: 768px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .center-panel {
    grid-column: span 1;
  }
}

/* Decks Styles */
.deck {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.deck-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0.5rem;
}

.deck-badge {
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 2px;
  padding: 0.3rem 0.8rem;
  border-radius: var(--border-radius-sm);
  color: var(--text-inverse);
}

.badge-a {
  background-color: var(--color-deck-a);
  box-shadow: 0 0 10px var(--color-deck-a-glow);
}

.badge-b {
  background-color: var(--color-deck-b);
  box-shadow: 0 0 10px var(--color-deck-b-glow);
}

.deck-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-family-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-inactive {
  background-color: #525068;
}

.dot-ready {
  background-color: var(--color-deck-a);
  box-shadow: 0 0 6px var(--color-deck-a);
  animation: pulse-glow 2s infinite;
}

.deck-b .dot-ready {
  background-color: var(--color-deck-b);
  box-shadow: 0 0 6px var(--color-deck-b);
}

.dot-playing {
  background-color: var(--color-accent);
  box-shadow: 0 0 8px var(--color-accent);
  animation: pulse-glow 1s infinite;
}

.dot-paused {
  background-color: #ffd700;
  box-shadow: 0 0 6px #ffd700;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* Video Containers */
.video-wrapper {
  perspective: 1000px;
}

.video-card {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background-color: rgba(0,0,0,0.8);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--glass-border);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: var(--transition-smooth);
}

.deck-a .video-card:hover {
  border-color: rgba(0, 210, 255, 0.3);
  box-shadow: 0 10px 30px rgba(0, 210, 255, 0.15);
}

.deck-b .video-card:hover {
  border-color: rgba(255, 0, 127, 0.3);
  box-shadow: 0 10px 30px rgba(255, 0, 127, 0.15);
}

.player-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text-muted);
  z-index: 2;
  background-color: var(--bg-secondary);
  transition: opacity 0.5s ease;
}

.placeholder-icon {
  width: 48px;
  height: 48px;
  opacity: 0.5;
  transition: var(--transition-smooth);
}

.video-card:hover .placeholder-icon {
  opacity: 0.8;
  transform: scale(1.1);
}

.player-iframe {
  width: 100%;
  height: 100%;
  border: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.video-card.loaded .player-placeholder {
  opacity: 0;
  pointer-events: none;
}

.video-card.loaded .player-iframe {
  opacity: 1;
}

/* Inputs & Form Groups */
.input-group {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.input-wrapper {
  position: relative;
  flex: 1;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

input[type="text"], 
input[type="number"],
select {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  padding: 0.8rem 1rem 0.8rem 2.8rem;
  color: var(--text-main);
  font-family: var(--font-family-sans);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

input[type="text"]:focus, 
input[type="number"]:focus,
select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: var(--border-radius-md);
  padding: 0.8rem 1.5rem;
  font-weight: 600;
  font-family: var(--font-family-sans);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

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

.btn-primary:hover:not(:disabled) {
  background: #ffffff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-deck-a {
  background: linear-gradient(135deg, #00b8e6, #0080ff);
  color: #fff;
}

.btn-deck-a:hover:not(:disabled) {
  box-shadow: 0 0 15px var(--color-deck-a-glow);
}

.btn-deck-b {
  background: linear-gradient(135deg, #ff007f, #b30059);
  color: #fff;
}

.btn-deck-b:hover:not(:disabled) {
  box-shadow: 0 0 15px var(--color-deck-b-glow);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-main);
}

.btn-outline:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-ctrl {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-ctrl i {
  width: 18px;
  height: 18px;
  transition: var(--transition-smooth);
}

.btn-ctrl:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text-main);
  transform: scale(1.05);
}

.btn-ctrl:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.deck-a .btn-play:hover:not(:disabled) {
  background: var(--color-deck-a);
  border-color: var(--color-deck-a);
  color: var(--bg-primary);
  box-shadow: 0 0 12px var(--color-deck-a-glow);
}

.deck-b .btn-play:hover:not(:disabled) {
  background: var(--color-deck-b);
  border-color: var(--color-deck-b);
  color: var(--bg-primary);
  box-shadow: 0 0 12px var(--color-deck-b-glow);
}

.btn-mute.muted {
  background: rgba(255, 69, 58, 0.15) !important;
  border-color: rgba(255, 69, 58, 0.4) !important;
  color: #ff453a !important;
}

.btn-icon-only {
  padding: 0.5rem;
  width: 36px;
  height: 36px;
  border-radius: var(--border-radius-sm);
}

/* Audio Visualizer Waves */
.visualizer {
  height: 40px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3px;
  padding: 0.5rem 0.2rem;
  border-radius: var(--border-radius-sm);
  background: rgba(0, 0, 0, 0.2);
  margin-bottom: 1rem;
  overflow: hidden;
}

.visualizer .bar {
  flex: 1;
  background-color: var(--text-muted);
  height: 10%;
  border-radius: 2px 2px 0 0;
  opacity: 0.4;
  transition: height 0.1s ease, background-color 0.3s ease;
}

.deck-a .visualizer.playing .bar {
  background-color: var(--color-deck-a);
  animation: eq-bounce 1.2s infinite ease-in-out alternate;
}

.deck-b .visualizer.playing .bar {
  background-color: var(--color-deck-b);
  animation: eq-bounce 1.2s infinite ease-in-out alternate;
}

.visualizer.playing .bar:nth-child(1) { animation-delay: 0.1s; animation-duration: 0.8s; }
.visualizer.playing .bar:nth-child(2) { animation-delay: 0.3s; animation-duration: 1.1s; }
.visualizer.playing .bar:nth-child(3) { animation-delay: 0.5s; animation-duration: 0.7s; }
.visualizer.playing .bar:nth-child(4) { animation-delay: 0.2s; animation-duration: 1.3s; }
.visualizer.playing .bar:nth-child(5) { animation-delay: 0.6s; animation-duration: 0.9s; }
.visualizer.playing .bar:nth-child(6) { animation-delay: 0.4s; animation-duration: 1.2s; }
.visualizer.playing .bar:nth-child(7) { animation-delay: 0.7s; animation-duration: 0.8s; }
.visualizer.playing .bar:nth-child(8) { animation-delay: 0.2s; animation-duration: 1.0s; }
.visualizer.playing .bar:nth-child(9) { animation-delay: 0.9s; animation-duration: 1.4s; }
.visualizer.playing .bar:nth-child(10) { animation-delay: 0.1s; animation-duration: 0.6s; }
.visualizer.playing .bar:nth-child(11) { animation-delay: 0.5s; animation-duration: 1.1s; }
.visualizer.playing .bar:nth-child(12) { animation-delay: 0.3s; animation-duration: 0.8s; }
.visualizer.playing .bar:nth-child(13) { animation-delay: 0.6s; animation-duration: 1.2s; }
.visualizer.playing .bar:nth-child(14) { animation-delay: 0.2s; animation-duration: 0.9s; }
.visualizer.playing .bar:nth-child(15) { animation-delay: 0.8s; animation-duration: 1.3s; }

@keyframes eq-bounce {
  0% { height: 10%; }
  100% { height: 95%; }
}

.deck-controls {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.playback-quick-btns {
  display: flex;
  gap: 0.5rem;
}

.time-display {
  font-family: var(--font-family-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(0,0,0,0.15);
  padding: 0.4rem 0.8rem;
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(255,255,255,0.03);
}

/* Custom Range Sliders */
.slider-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.slider-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.slider-label i {
  width: 14px;
  height: 14px;
}

.slider-value {
  font-family: var(--font-family-mono);
  font-weight: 700;
  color: var(--text-main);
}

.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.range-slider:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Deck A Slider styles */
.slider-deck-a::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-deck-a);
  box-shadow: 0 0 8px var(--color-deck-a);
  transition: var(--transition-smooth);
}

.slider-deck-a:not(:disabled)::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 12px var(--color-deck-a);
}

/* Deck B Slider styles */
.slider-deck-b::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-deck-b);
  box-shadow: 0 0 8px var(--color-deck-b);
  transition: var(--transition-smooth);
}

.slider-deck-b:not(:disabled)::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 12px var(--color-deck-b);
}

/* Quick Speed Chips */
.chip-row {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.speed-chip {
  flex: 1;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-family: var(--font-family-mono);
  font-size: 0.75rem;
  padding: 0.3rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.speed-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.deck-a .speed-chip.active {
  background: rgba(0, 210, 255, 0.15);
  border-color: var(--color-deck-a);
  color: var(--color-deck-a);
}

.deck-b .speed-chip.active {
  background: rgba(255, 0, 127, 0.15);
  border-color: var(--color-deck-b);
  color: var(--color-deck-b);
}

/* CENTER PANEL & MIX HUB */
.center-panel {
  display: flex;
  flex-direction: column;
}

.control-hub {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.hub-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.8rem;
}

.hub-header i {
  color: var(--text-muted);
  width: 18px;
  height: 18px;
}

.hub-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-main);
}

/* Master Playback Section */
.master-playback-sec {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: center;
}

.btn-giant {
  width: 100%;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 1.1rem 2rem;
  background: linear-gradient(135deg, var(--color-accent), #2bcf0e);
  color: var(--bg-primary);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 0 20px var(--color-accent-glow);
}

.btn-giant i {
  width: 24px;
  height: 24px;
  stroke-width: 2.5;
}

.btn-giant:hover:not(:disabled) {
  background: linear-gradient(135deg, #51ff33, #35eb18);
  box-shadow: 0 0 30px var(--color-accent);
  transform: scale(1.02);
}

.btn-giant:active {
  transform: scale(0.98);
}

.master-playback-sub {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.master-playback-sub .btn {
  flex: 1;
  font-size: 0.85rem;
  padding: 0.6rem 1rem;
}

/* Delay Section */
.delay-control-sec {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 1rem;
  border-radius: var(--border-radius-md);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sec-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.sec-title i {
  width: 16px;
  height: 16px;
}

.delay-inputs {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.delay-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.select-styled {
  padding: 0.4rem 1rem 0.4rem 1rem;
  font-size: 0.85rem;
  border-radius: var(--border-radius-sm);
  width: auto;
}

.number-input-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.number-input-wrapper input {
  padding: 0.4rem 1.6rem 0.4rem 0.8rem;
  font-size: 0.85rem;
  font-family: var(--font-family-mono);
  border-radius: var(--border-radius-sm);
  width: 90px;
  text-align: center;
}

.number-input-wrapper input::-webkit-inner-spin-button {
  opacity: 1;
}

.number-input-wrapper .unit {
  position: absolute;
  right: 0.8rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
}

.delay-status-indicator {
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.2);
  color: #ffd700;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.5rem;
  border-radius: var(--border-radius-sm);
  text-align: center;
  font-family: var(--font-family-mono);
  animation: countdown-pulse 1s infinite alternate;
}

@keyframes countdown-pulse {
  from { opacity: 0.7; }
  to { opacity: 1; }
}

/* Crossfader Section */
.crossfader-sec {
  background: rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.03);
  padding: 1.2rem 1rem;
  border-radius: var(--border-radius-md);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.crossfader-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.side-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.crossfader-slider {
  flex: 1;
  height: 10px;
  background: rgba(255,255,255,0.08);
}

.crossfader-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: var(--text-main);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 10px rgba(255,255,255,0.4);
  cursor: ew-resize;
  transition: var(--transition-smooth);
}

.crossfader-slider::-webkit-slider-thumb:hover {
  background: var(--color-accent);
  box-shadow: 0 0 12px var(--color-accent);
}

.crossfader-readout {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-family-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0 0.2rem;
}

.center-indicator {
  font-weight: 700;
  cursor: pointer;
  padding: 0 0.4rem;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
}

.center-indicator:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-main);
}

.center-indicator.active {
  color: var(--color-accent);
  background: rgba(57, 255, 20, 0.15);
}

/* Linked Toggle Section */
.linked-toggle-sec {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 1rem;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255,255,255,0.1);
  border: 1px solid var(--glass-border);
  transition: .4s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-muted);
  transition: .4s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: rgba(57, 255, 20, 0.15);
  border-color: var(--color-accent);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
  background-color: var(--color-accent);
  box-shadow: 0 0 6px var(--color-accent);
}

.toggle-text {
  display: flex;
  flex-direction: column;
}

.toggle-title {
  font-size: 0.85rem;
  font-weight: 600;
}

.toggle-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(8, 7, 13, 0.7);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: modal-slide-up 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes modal-slide-up {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-close:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-main);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input {
  padding-left: 1rem;
}

.modal-info {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  border-left: 2px solid var(--color-accent);
  padding-left: 0.6rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
}

.modal-footer .btn {
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
}

/* Footer Section */
.app-footer {
  text-align: center;
  padding: 2rem 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: auto;
}

/* Touch & Mobile Optimizations (Android / iOS / Portable Screens) */
@media (max-width: 768px) {
  body {
    padding: 1rem 0.75rem;
  }

  .app-container {
    gap: 1.2rem;
  }

  .app-header {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 1rem;
    padding-bottom: 1.2rem;
  }

  .brand {
    justify-content: center;
  }

  .preset-shelf-container {
    justify-content: space-between;
    width: 100%;
  }

  .preset-list {
    max-width: none;
    flex-grow: 1;
  }

  .card-glass, .card-glass-heavy {
    padding: 1.2rem 1rem;
  }

  /* Make sliders touch-friendly */
  .range-slider {
    height: 10px; /* Thicker track on mobile */
  }

  .slider-deck-a::-webkit-slider-thumb,
  .slider-deck-b::-webkit-slider-thumb {
    width: 24px;  /* Larger grab-targets for thumbs */
    height: 24px;
  }

  .crossfader-slider::-webkit-slider-thumb {
    width: 32px;  /* Larger crossfader thumb */
    height: 32px;
  }

  /* Buttons touch target adjustment */
  .btn, .btn-ctrl {
    min-height: 48px; /* Standard accessible tap size */
  }
  
  .btn-icon-only {
    min-height: 36px;
  }

  /* Prevent tapping highlight box overlay in Chrome/Android */
  * {
    -webkit-tap-highlight-color: transparent;
  }
}
