/* ===== Custom Properties ===== */
:root {
  --neon-blue: #00d4ff;
  --neon-blue-rgb: 0, 212, 255;
  --mint: #00ffaa;
  --mint-rgb: 0, 255, 170;
  --dark-900: #060a14;
  --dark-800: #0c1220;
  --dark-700: #111a2e;
  --dark-600: #1a2540;
}

/* ===== Base ===== */
body {
  background: var(--dark-900);
  color: #f0f0f0;
}

.bg-dark-900 { background-color: var(--dark-900); }
.bg-dark-800 { background-color: var(--dark-800); }
.bg-dark-700 { background-color: var(--dark-700); }
.bg-dark-600 { background-color: var(--dark-600); }

.text-neon-blue { color: var(--neon-blue); }
.text-mint { color: var(--mint); }

.bg-neon-blue { background-color: var(--neon-blue); }
.bg-mint { background-color: var(--mint); }

.border-neon-blue { border-color: var(--neon-blue); }
.border-mint { border-color: var(--mint); }

/* ===== Animated Gradient Background ===== */
.animated-gradient {
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(var(--neon-blue-rgb), 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(var(--mint-rgb), 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(var(--neon-blue-rgb), 0.02) 0%, transparent 50%);
  animation: gradientShift 15s ease-in-out infinite alternate;
}

@keyframes gradientShift {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}

/* ===== Custom Scrollbar ===== */
.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ===== Glass Card ===== */
.glass-card {
  background: rgba(12, 18, 32, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.glass-card:hover {
  border-color: rgba(var(--neon-blue-rgb), 0.15);
  box-shadow: 0 0 30px rgba(var(--neon-blue-rgb), 0.03);
}

/* ===== Genre Preset Buttons ===== */
.genre-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.2;
  position: relative;
  overflow: hidden;
}

.genre-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(var(--neon-blue-rgb), 0.1), rgba(var(--mint-rgb), 0.05));
  opacity: 0;
  transition: opacity 0.25s;
}

.genre-btn:hover {
  border-color: rgba(var(--neon-blue-rgb), 0.3);
  color: rgba(255, 255, 255, 0.85);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(var(--neon-blue-rgb), 0.1), 0 0 20px rgba(var(--neon-blue-rgb), 0.05);
}
.genre-btn:hover::before {
  opacity: 1;
}

.genre-btn.active {
  border-color: var(--neon-blue);
  color: var(--neon-blue);
  background: rgba(var(--neon-blue-rgb), 0.08);
  box-shadow: 0 0 15px rgba(var(--neon-blue-rgb), 0.2), inset 0 0 15px rgba(var(--neon-blue-rgb), 0.05);
}
.genre-btn.active::before {
  opacity: 1;
}

.genre-btn .emoji {
  font-size: 14px;
  position: relative;
  z-index: 1;
}
.genre-btn .name {
  position: relative;
  z-index: 1;
}

/* ===== Drop Zone ===== */
.drop-zone.dragover {
  border-color: var(--neon-blue) !important;
  background: rgba(var(--neon-blue-rgb), 0.05) !important;
  box-shadow: 0 0 40px rgba(var(--neon-blue-rgb), 0.15), inset 0 0 40px rgba(var(--neon-blue-rgb), 0.03);
}

/* ===== Professional Audio Slider ===== */
.pro-slider-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pro-slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pro-slider-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.3s;
}

.pro-slider-value {
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--neon-blue);
  min-width: 36px;
  text-align: right;
  transition: text-shadow 0.3s, color 0.3s;
}

.pro-slider-track {
  position: relative;
  height: 28px;
  display: flex;
  align-items: center;
}

.pro-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: height 0.15s;
}

.pro-slider:hover {
  height: 6px;
}

.pro-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--neon-blue);
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: box-shadow 0.25s, transform 0.15s;
  position: relative;
  z-index: 3;
}

.pro-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 12px rgba(var(--neon-blue-rgb), 0.6);
}

.pro-slider:active::-webkit-slider-thumb {
  transform: scale(1.3);
  box-shadow: 0 0 20px rgba(var(--neon-blue-rgb), 0.8);
}

.pro-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--neon-blue);
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.pro-slider-fill {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--neon-blue), var(--mint));
  pointer-events: none;
  z-index: 1;
  transition: height 0.15s;
}

.pro-slider-track:hover .pro-slider-fill {
  height: 6px;
}

/* Active slider glow */
.pro-slider-wrapper.active .pro-slider-label {
  color: rgba(255, 255, 255, 0.8);
}
.pro-slider-wrapper.active .pro-slider-value {
  text-shadow: 0 0 10px rgba(var(--neon-blue-rgb), 0.5);
}

/* ===== Glow Shadows ===== */
.shadow-glow-blue {
  box-shadow: 0 0 20px rgba(var(--neon-blue-rgb), 0.3), 0 0 40px rgba(var(--neon-blue-rgb), 0.1);
}
.shadow-glow-mint {
  box-shadow: 0 0 20px rgba(var(--mint-rgb), 0.3), 0 0 40px rgba(var(--mint-rgb), 0.1);
}

/* ===== Mini Slider (Volume) ===== */
.mini-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
  cursor: pointer;
}
.mini-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
}
.mini-slider::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: white;
  border: none;
  cursor: pointer;
}

/* ===== Mobile Bottom Nav ===== */
.mobile-nav-btn {
  color: rgba(255, 255, 255, 0.35);
  transition: all 0.2s;
}
.mobile-nav-btn.active {
  color: var(--neon-blue);
}

/* ===== Toast ===== */
.toast {
  background: rgba(12, 18, 32, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.3s ease-out;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.toast.success { border-color: rgba(var(--mint-rgb), 0.3); }
.toast.error { border-color: rgba(255, 80, 80, 0.3); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

/* ===== Waveform Playhead ===== */
.playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--neon-blue);
  box-shadow: 0 0 8px rgba(var(--neon-blue-rgb), 0.6);
  z-index: 10;
  pointer-events: none;
  transition: left 0.05s linear;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .genre-btn {
    padding: 6px 8px;
    font-size: 10px;
  }
  .genre-btn .emoji {
    font-size: 12px;
  }
}

/* ===== Sidebar Desktop Shown ===== */
@media (min-width: 1024px) {
  #sidebar.shown-mobile {
    transform: none;
  }
}

/* ===== Selection ===== */
::selection {
  background: rgba(var(--neon-blue-rgb), 0.3);
  color: white;
}

/* ===== Control Sections ===== */
.control-section {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 4px;
}
.control-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.section-header {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.section-header:hover .section-chevron {
  color: rgba(0, 212, 255, 0.6) !important;
}

.section-content {
  padding: 6px 0 8px 0;
}



/* ===== Export Format Cards ===== */
.format-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  position: relative;
  overflow: hidden;
}

.format-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(var(--neon-blue-rgb), 0.08), rgba(var(--mint-rgb), 0.04));
  opacity: 0;
  transition: opacity 0.25s;
}

.format-card:hover {
  border-color: rgba(var(--neon-blue-rgb), 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--neon-blue-rgb), 0.08);
}
.format-card:hover::before {
  opacity: 1;
}

.format-card.active {
  border-color: var(--neon-blue);
  background: rgba(var(--neon-blue-rgb), 0.08);
  box-shadow: 0 0 15px rgba(var(--neon-blue-rgb), 0.15), inset 0 0 12px rgba(var(--neon-blue-rgb), 0.04);
}
.format-card.active::before {
  opacity: 1;
}

.format-card.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.format-card > div {
  position: relative;
  z-index: 1;
}

/* ===== Box Sizing ===== */
*, *::before, *::after {
  box-sizing: border-box;
}