@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("https://cdn.jsdelivr.net/npm/vazirmatn@33.0.3/fonts/webfonts/Vazirmatn[wght].woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --font-main: "Vazirmatn", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  
  /* Canvas & Base Tokens */
  --canvas-bg: #0b0b0d;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.82);
  --text-muted: rgba(255, 255, 255, 0.58);
  --text-faint: rgba(255, 255, 255, 0.36);

  /* Dynamic Artwork Extracted Colors (Apple Music Style Harmonious Palette) */
  --dynamic-c1: #6366f1;
  --dynamic-c2: #8b5cf6;
  --dynamic-c3: #3b82f6;
  --dynamic-c4: #ec4899;
  --dynamic-glow: rgba(99, 102, 241, 0.5);
  --dynamic-accent: #6366f1;
  --dynamic-fill: #a5b0f5;

  /* Optical Glass Tokens (Ultra-Clear Droplet Formula) */
  --glass-fill: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(20, 20, 25, 0.22) 100%);
  --glass-rim: 0.5px solid rgba(255, 255, 255, 0.38);
  --glass-rim-subtle: 0.5px solid rgba(255, 255, 255, 0.22);
  --glass-lens-filter: blur(14px) saturate(260%) brightness(115%) contrast(108%);
  
  /* 3D Convex Volume & Inner Specular Shadows */
  --droplet-shadow: 
    0 20px 40px -10px rgba(0, 0, 0, 0.7),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.5),
    inset 0 -1.5px 3px rgba(0, 0, 0, 0.4);

  --droplet-shadow-hover: 
    0 24px 48px -8px rgba(0, 0, 0, 0.75),
    inset 0 2px 3px rgba(255, 255, 255, 0.65),
    inset 0 -2px 4px rgba(0, 0, 0, 0.45);

  --recess-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.6),
    inset 0 -1px 2px rgba(255, 255, 255, 0.15),
    0 1px 2px rgba(255, 255, 255, 0.05);

  --accent-danger: #ff4757;
  
  /* Geometry & Physics */
  --radius-capsule: 28px;
  --radius-card: 20px;
  --radius-pill: 999px;
  --radius-recess: 24px;
  --spring-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --smooth-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html {
  min-height: 100%;
  background-color: var(--canvas-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-main);
  color: var(--text-primary);
  background: var(--canvas-bg);
  overflow-x: hidden;
  position: relative;
}

button,
input,
select {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ==========================================================================
   Ambient Chromatic Aura Canvas (Harmonious Dynamic Atmosphere)
   ========================================================================== */
.ambient-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, #10121a 0%, #08090c 100%);
  contain: strict;
  transform: translateZ(0);
}

/* Unified GPU Aurora Layer (Hardware-friendly for iOS WebKit & Android) */
.ambient-aurora-layer {
  position: absolute;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  animation: floatAurora 28s ease-in-out infinite alternate;
}

body.playing .ambient-aurora-layer {
  animation-duration: 18s;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  opacity: 0.85;
  transition: background 1.4s var(--smooth-ease), opacity 0.8s ease;
  will-change: transform;
}

body.playing .ambient-orb {
  opacity: 0.95;
  filter: saturate(135%) brightness(108%);
}

.ambient-orb-1 {
  width: 680px;
  height: 680px;
  top: -40px;
  left: -40px;
  background: radial-gradient(circle, var(--dynamic-c1) 0%, transparent 68%);
}

.ambient-orb-2 {
  width: 800px;
  height: 800px;
  top: 15%;
  right: -60px;
  background: radial-gradient(circle, var(--dynamic-c2) 0%, transparent 68%);
}

.ambient-orb-3 {
  width: 720px;
  height: 720px;
  bottom: -40px;
  left: 10%;
  background: radial-gradient(circle, var(--dynamic-c3) 0%, transparent 68%);
}

.ambient-orb-4 {
  width: 700px;
  height: 700px;
  bottom: 20%;
  right: 15%;
  background: radial-gradient(circle, var(--dynamic-c4) 0%, transparent 68%);
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.04) 1px, transparent 0);
  background-size: 32px 32px;
  opacity: 0.7;
}

@keyframes floatAurora {
  0% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
  33% { transform: translate3d(40px, 30px, 0) scale(1.06) rotate(3deg); }
  66% { transform: translate3d(-30px, 50px, 0) scale(0.95) rotate(-2deg); }
  100% { transform: translate3d(20px, -25px, 0) scale(1.02) rotate(1deg); }
}

/* ==========================================================================
   Optical Glass Base Class
   ========================================================================== */
.droplet-glass {
  background: var(--glass-fill);
  border: var(--glass-rim);
  backdrop-filter: var(--glass-lens-filter);
  -webkit-backdrop-filter: var(--glass-lens-filter);
  box-shadow: var(--droplet-shadow);
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
}

.droplet-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0.05) 25%,
    transparent 60%
  );
  pointer-events: none;
  z-index: 1;
}

/* ==========================================================================
   App Layout
   ========================================================================== */
.app-layout {
  width: min(540px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 0;
  position: relative;
  z-index: 2;
  display: block;
}

.player-container {
  width: 100%;
}

/* ==========================================================================
   Player Panel (Optical Glass Capsule)
   ========================================================================== */
.player-panel {
  border-radius: var(--radius-capsule);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}

/* Brand Row */
.brand-row {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 2;
}

.signal-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  position: relative;
  flex: 0 0 auto;
  border: 0.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(20, 20, 25, 0.4) 100%);
  box-shadow: 
    0 8px 18px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.6),
    inset 0 -1px 2px rgba(0, 0, 0, 0.5);
}

.signal-mark span {
  position: absolute;
  border: 2px solid var(--dynamic-c1);
  border-left-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(45deg);
  border-radius: 2px;
  filter: drop-shadow(0 0 4px var(--dynamic-glow));
  transition: border-color 1.2s var(--smooth-ease), filter 1.2s var(--smooth-ease);
}

.signal-mark span:nth-child(1) { width: 9px; height: 9px; }
.signal-mark span:nth-child(2) { width: 19px; height: 19px; opacity: 0.78; }
.signal-mark span:nth-child(3) { width: 29px; height: 29px; opacity: 0.45; }

.brand-text {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--dynamic-fill);
  font-size: 0.72rem;
  font-weight: 540;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 1.2s var(--smooth-ease);
}

h1 {
  font-size: 1.85rem;
  font-weight: 740;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   Radio Stage & Turntable
   ========================================================================== */
.radio-stage {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  z-index: 2;
}

.glass-recess {
  background: linear-gradient(135deg, rgba(15, 15, 20, 0.75) 0%, rgba(25, 25, 32, 0.45) 100%);
  border: 0.5px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--recess-shadow);
  border-radius: var(--radius-recess);
}

.turntable {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1;
  margin: 0 auto;
  position: relative;
  display: grid;
  place-items: center;
  transform: translateZ(0);
}

.turntable::before {
  content: "";
  position: absolute;
  inset: -15px;
  background: radial-gradient(circle at center, var(--dynamic-glow) 0%, transparent 68%);
  border-radius: 50%;
  opacity: 0.45;
  z-index: 0;
  pointer-events: none;
  transition: background 1.4s var(--smooth-ease), opacity 0.6s var(--smooth-ease);
}

.turntable.playing::before {
  opacity: 0.8;
}

.turntable::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: calc(var(--radius-recess) - 6px);
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

/* Record Platter (GPU Composited for 60fps) */
.record {
  position: relative;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  z-index: 3;
  background:
    radial-gradient(circle, var(--dynamic-c3) 0 7%, #121318 7.5% 12%, transparent 12.5%),
    repeating-radial-gradient(circle, #0e0f13 0 4px, #181921 4px 6px, #0e0f13 6px 9px);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.7),
    inset 0 0 20px rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.12);
  transform: translateZ(0);
  will-change: transform;
}

.record.playing {
  animation: spinRecord 6s linear infinite;
}

@keyframes spinRecord {
  to { transform: rotate(360deg); }
}

.record-ring {
  position: absolute;
  inset: 22%;
  border: 0.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  pointer-events: none;
}

#artworkImage {
  position: absolute;
  inset: 28%;
  width: 44%;
  height: 44%;
  border: 5px solid #111216;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dynamic-c1), var(--dynamic-c2));
  object-fit: cover;
  z-index: 1;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.8);
}

.label-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--accent-danger);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  box-shadow: 0 0 6px var(--accent-danger);
}

/* Audio Reactive Spectrum */
.record-spectrum {
  position: absolute;
  inset: 8%;
  z-index: 4;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.45;
  filter: drop-shadow(0 0 10px var(--dynamic-glow));
  transition: opacity 260ms var(--smooth-ease), filter 1.2s var(--smooth-ease);
}

.spectrum-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.spectrum-guide {
  fill: none;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 1.2;
}

.spectrum-wave {
  fill: rgba(255, 255, 255, 0.03);
  stroke: var(--dynamic-c1);
  stroke-width: 2.4;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px var(--dynamic-glow));
  transition: stroke 1.2s var(--smooth-ease);
}

.turntable.playing .record-spectrum {
  opacity: 1;
  filter: drop-shadow(0 0 16px var(--dynamic-glow));
}

/* ==========================================================================
   Realistic Audiophile Tonearm
   ========================================================================== */
.tonearm {
  position: absolute;
  top: 10px;
  right: 8px;
  width: 140px;
  height: 235px;
  z-index: 6;
  pointer-events: none;
  transform-origin: 105px 42px;
  transform: rotate(-32deg);
  transition: transform 950ms cubic-bezier(0.25, 1, 0.35, 1);
  will-change: transform;
}

.tonearm::before,
.tonearm::after {
  display: none !important;
}

.tonearm-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.65));
}

/* When playing: arm lifts smoothly, swings over, and gently drops stylus needle onto the record */
.turntable.playing .tonearm {
  transform: rotate(14deg);
  animation: tonearmMicroFloat 4s ease-in-out infinite alternate;
  animation-delay: 950ms;
}

@keyframes tonearmMicroFloat {
  0% { transform: rotate(13.8deg); }
  50% { transform: rotate(14.6deg); }
  100% { transform: rotate(14.1deg); }
}

/* ==========================================================================
   Liquid Glass Play Button (Convex Optical Droplet)
   ========================================================================== */
.liquid-play-button {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 7;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  border: 0.5px solid rgba(255, 255, 255, 0.55);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(35, 40, 50, 0.38) 100%);
  backdrop-filter: blur(16px) saturate(220%);
  -webkit-backdrop-filter: blur(16px) saturate(220%);
  box-shadow:
    0 14px 28px -4px rgba(0, 0, 0, 0.65),
    inset 0 2px 3px rgba(255, 255, 255, 0.8),
    inset 0 -2px 4px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.15);
  display: grid;
  place-items: center;
  color: #fff;
  transition: transform 180ms var(--spring-ease), box-shadow 180ms var(--smooth-ease), background 1.2s var(--smooth-ease);
  overflow: hidden;
  transform: translateZ(0);
}

.liquid-play-button::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 10px;
  right: 10px;
  height: 36%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.68) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.liquid-play-button:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow:
    0 18px 34px -4px rgba(0, 0, 0, 0.7),
    inset 0 2.5px 3.5px rgba(255, 255, 255, 0.85),
    inset 0 -2px 4px rgba(0, 0, 0, 0.5),
    0 0 20px var(--dynamic-glow);
  border-color: rgba(255, 255, 255, 0.7);
}

.liquid-play-button:active {
  transform: translateY(1px) scale(0.97);
}

.liquid-play-button svg {
  position: relative;
  z-index: 2;
  width: 30px;
  height: 30px;
  fill: currentColor;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.pause-icon,
.is-playing .play-icon {
  display: none;
}

.is-playing .pause-icon {
  display: block;
}

.liquid-play-button.is-playing {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, var(--dynamic-glow) 100%);
  border-color: var(--dynamic-c1);
  box-shadow:
    0 14px 28px -4px rgba(0, 0, 0, 0.65),
    inset 0 2px 3px rgba(255, 255, 255, 0.8),
    inset 0 -2px 4px rgba(0, 0, 0, 0.5),
    0 0 26px var(--dynamic-glow);
}

/* ==========================================================================
   Now Playing Optical Card
   ========================================================================== */
.optical-card {
  padding: 18px 20px;
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(20, 22, 28, 0.28) 100%);
  border: var(--glass-rim);
  box-shadow: var(--droplet-shadow);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateZ(0);
}

.now-playing-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dynamic-fill);
  box-shadow: 0 0 10px var(--dynamic-glow);
  animation: pulseLive 2s infinite ease-in-out;
  transition: background 1.2s var(--smooth-ease), box-shadow 1.2s var(--smooth-ease);
}

@keyframes pulseLive {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.6; }
}

.station-label {
  color: var(--dynamic-fill);
  font-size: 0.8rem;
  font-weight: 540;
  letter-spacing: 0.02em;
  transition: color 1.2s var(--smooth-ease);
}

.optical-card h2 {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.optical-card p:last-child {
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   Controls Bar
   ========================================================================== */
.optical-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px;
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(15, 18, 24, 0.35) 100%);
  border: var(--glass-rim-subtle);
  box-shadow: var(--droplet-shadow);
  position: relative;
  z-index: 2;
  transform: translateZ(0);
}

.glass-pill {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(20, 24, 30, 0.25) 100%);
  border: var(--glass-rim-subtle);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.4),
    inset 0 -1px 2px rgba(0, 0, 0, 0.3);
  transition: border-color 150ms var(--smooth-ease);
}

.volume-wrap {
  flex: 1 1 160px;
  min-width: 150px;
  gap: 10px;
}

.volume-wrap svg {
  width: 20px;
  height: 20px;
  fill: var(--text-secondary);
  flex: 0 0 auto;
}

input[type="range"] {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 0.5px solid rgba(0, 0, 0, 0.1);
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.4),
    0 0 0 4px var(--dynamic-glow);
  cursor: pointer;
  transition: transform 120ms var(--smooth-ease), box-shadow 1.2s var(--smooth-ease);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.glass-pill-btn {
  height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(20, 24, 30, 0.25) 100%);
  border: var(--glass-rim-subtle);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.4),
    inset 0 -1px 2px rgba(0, 0, 0, 0.3);
  font-weight: 620;
  font-size: 0.88rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 150ms var(--spring-ease), border-color 150ms var(--smooth-ease), background 150ms var(--smooth-ease);
}

.glass-pill-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.5);
}

.glass-pill-btn:active {
  transform: translateY(1px);
}

.download-wrap {
  gap: 6px;
  padding: 0 4px 0 10px;
}

.download-wrap select {
  height: 36px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 580;
  color: #fff;
  cursor: pointer;
}

.download-wrap select option {
  background: #15171e;
  color: #fff;
}

.glass-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0%, rgba(30, 35, 45, 0.4) 100%);
  border: 0.5px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 150ms var(--spring-ease), border-color 1.2s var(--smooth-ease);
}

.glass-action-btn:hover {
  transform: scale(1.08);
  border-color: var(--dynamic-c1);
}

.glass-action-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ==========================================================================
   Station Panel & Grid
   ========================================================================== */
.station-panel {
  border-radius: var(--radius-capsule);
  padding: 24px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  background: #10131d;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  contain: layout;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.station-panel::-webkit-scrollbar {
  width: 6px;
}
.station-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

/* Floating Glass Header */
.floating-glass-header {
  position: sticky;
  top: -24px;
  z-index: 10;
  margin: -24px -24px 20px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #151924;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.panel-head-titles {
  min-width: 0;
}

.floating-glass-header h2 {
  font-size: 1.45rem;
  font-weight: 740;
  line-height: 1.15;
  color: #ffffff;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 100;
}

.optical-status {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  color: #0b0b0d;
  background: var(--dynamic-fill);
  box-shadow: 0 2px 10px var(--dynamic-glow);
  letter-spacing: 0.01em;
  transition: background 1.2s var(--smooth-ease), box-shadow 1.2s var(--smooth-ease);
}

.status-pill[data-variant="error"] {
  color: #fff;
  background: var(--accent-danger);
  box-shadow: 0 4px 14px rgba(255, 71, 87, 0.4);
}

.status-pill[data-variant="warning"] {
  color: #0b0b0d;
  background: var(--dynamic-c3);
  box-shadow: 0 4px 14px rgba(255, 190, 59, 0.4);
}

.glass-close-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 0.5px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  cursor: pointer;
  transition: transform 150ms var(--spring-ease), background 150ms var(--smooth-ease);
}

.glass-close-btn:hover {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.25);
}

.glass-close-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Category Tabs Switcher */
.category-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border-radius: 20px;
  background: #141822;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--recess-shadow);
  margin-bottom: 20px;
}

.category-tab {
  padding: 12px 8px;
  border-radius: 14px;
  border: 0.5px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  transition: all 180ms var(--smooth-ease);
}

.category-tab span {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
}

.category-tab small {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 580;
  opacity: 0.8;
}

.category-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.category-tab.active {
  color: #0b0b0d;
  background: var(--dynamic-fill);
  border-color: transparent;
  box-shadow: 0 4px 14px var(--dynamic-glow);
  transition: background 1.2s var(--smooth-ease), box-shadow 1.2s var(--smooth-ease);
}

.category-tab.active small {
  color: #0b0b0d;
}

/* Station Group Grid */
.station-group {
  display: grid;
  gap: 16px;
}

.station-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.12);
}

.station-group-count {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 560;
}

.station-group-head h3 {
  font-size: 1.22rem;
  font-weight: 700;
}

.station-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

/* Station Cards (Optimized Optical Convex Glass with zero-glitch scrolling) */
.station-card {
  min-height: 155px;
  padding: 16px;
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(18, 22, 30, 0.55) 100%);
  border: 0.5px solid rgba(255, 255, 255, 0.32);
  box-shadow: 
    0 10px 24px rgba(0, 0, 0, 0.45),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.4),
    inset 0 -1.5px 3px rgba(0, 0, 0, 0.35);
  color: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  position: relative;
  overflow: hidden;
  /* `contain` isolates this card's paint and layout without handing it its own
     GPU layer. Forcing a layer per card (translate3d/backface-visibility) is
     fine for a handful, but the SoundCloud and instrumental lists run to
     hundreds — past the compositor's budget it simply stops painting some of
     them, which is what showed up as blank checkerboard squares while
     scrolling on mobile. */
  contain: paint layout;
  transition: transform 180ms var(--spring-ease), box-shadow 180ms var(--smooth-ease), border-color 180ms var(--smooth-ease);
}

.station-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 17, 24, 0.18) 0%, rgba(14, 17, 24, 0.92) 100%);
  z-index: 1;
}

.station-card > * {
  position: relative;
  z-index: 2;
}

.station-artwork {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  z-index: 0;
  transform: scale(1.01);
  transition: transform 300ms var(--smooth-ease), opacity 300ms var(--smooth-ease);
}

.station-card:hover .station-artwork {
  transform: scale(1.06);
  opacity: 0.8;
}

.liked-songs-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #4b1248 0%, #a81c51 40%, #ff4b4b 100%);
  opacity: 0.75;
  transition: opacity 300ms var(--smooth-ease), transform 300ms var(--smooth-ease);
}

.default-playlist-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #182848 0%, #29487d 50%, #4b6cb7 100%);
  opacity: 0.75;
  transition: opacity 300ms var(--smooth-ease), transform 300ms var(--smooth-ease);
}

.station-card:hover .liked-songs-bg,
.station-card:hover .default-playlist-bg {
  opacity: 0.95;
  transform: scale(1.05);
}

.station-card.active {
  border-color: var(--dynamic-c1);
  box-shadow:
    0 18px 36px -4px rgba(0, 0, 0, 0.7),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.7),
    0 0 20px var(--dynamic-glow);
}

.station-card.active::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dynamic-fill);
  box-shadow: 0 0 14px var(--dynamic-c1);
  z-index: 3;
}

.station-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.station-name {
  margin: 0;
  max-width: calc(100% - 70px);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.genre-chip {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  color: #0b0b0d;
  background: var(--dynamic-fill);
  font-size: 0.7rem;
  font-weight: 540;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: background 1.2s var(--smooth-ease);
}

.station-track {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.load-more-stations {
  min-height: 50px;
  border-radius: var(--radius-card);
  border: var(--glass-rim);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(20, 24, 30, 0.3) 100%);
  backdrop-filter: var(--glass-lens-filter);
  -webkit-backdrop-filter: var(--glass-lens-filter);
  box-shadow: var(--droplet-shadow);
  color: var(--text-primary);
  font-weight: 660;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 180ms var(--smooth-ease);
}

.load-more-stations:hover {
  transform: translateY(-2px);
  border-color: var(--dynamic-c1);
  box-shadow: 0 14px 28px var(--dynamic-glow);
}

/* ==========================================================================
   Mobile Floating Toggle Button & Drawer Backdrop
   ========================================================================== */
.station-drawer-toggle {
  position: fixed !important;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
  right: 20px !important;
  z-index: 9000 !important;
  height: 50px !important;
  padding: 0 22px !important;
  border-radius: var(--radius-pill) !important;
  border: 0.5px solid rgba(255, 255, 255, 0.55) !important;
  background: linear-gradient(135deg, rgba(30, 36, 50, 0.94) 0%, rgba(15, 18, 26, 0.98) 100%) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  box-shadow: 
    0 16px 36px rgba(0, 0, 0, 0.65),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.7),
    0 0 24px var(--dynamic-glow) !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  cursor: pointer !important;
  touch-action: manipulation !important;
  transition: transform 180ms var(--spring-ease), opacity 180ms var(--smooth-ease) !important;
}

.station-drawer-toggle .toggle-icon {
  width: 20px;
  height: 20px;
}

.station-drawer-toggle:hover {
  transform: scale(1.05);
}

.station-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9900 !important;
  background: rgba(0, 0, 0, 0.75) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 280ms ease, visibility 280ms ease !important;
  transform: translateZ(0);
}

body.stations-open .station-backdrop {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* ==========================================================================
   Responsive Breakpoints & Layout Switch
   ========================================================================== */

/* Desktop & Smart TV / Wide Screens (Side-by-side Dual Panels) */
@media (min-width: 1180px) {
  .app-layout {
    width: min(1480px, calc(100% - 64px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 480px 1fr;
    gap: 32px;
    align-items: start;
    padding: 32px 0;
  }

  .station-drawer-toggle,
  .station-backdrop,
  .panel-close {
    display: none !important;
  }

  .player-panel {
    height: fit-content !important;
    min-height: auto !important;
    position: sticky;
    top: 32px;
  }

  .station-panel {
    position: sticky !important;
    top: 32px !important;
    height: calc(100vh - 64px) !important;
    max-height: calc(100vh - 64px) !important;
    transform: none !important;
    visibility: visible !important;
    pointer-events: auto !important;
    border-radius: var(--radius-capsule) !important;
  }

  .station-group-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

@media (min-width: 1600px) {
  .app-layout {
    width: min(1680px, calc(100% - 80px));
    margin: 0 auto;
    grid-template-columns: 520px 1fr;
    gap: 36px;
  }

  .turntable {
    max-width: 380px;
  }

  h1 {
    font-size: 2.1rem;
  }
}

/* Mobile & Tablet Drawer Mode (Max width 1179px) */
@media (max-width: 1179px) {
  .app-layout {
    width: min(540px, calc(100% - 24px));
    padding: 20px 0 90px;
  }

  .station-panel {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: min(430px, 100vw) !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    z-index: 9999 !important;
    padding: calc(20px + env(safe-area-inset-top, 0px)) 18px calc(24px + env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 24px 0 0 24px !important;
    border: none !important;
    border-left: 1px solid rgba(255, 255, 255, 0.22) !important;
    transform: translateX(105%) !important;
    transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1), visibility 320ms !important;
    background: #10131d !important;
    box-shadow: -15px 0 50px rgba(0, 0, 0, 0.9) !important;
    visibility: hidden;
    pointer-events: none;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .station-panel::before {
    display: none !important;
  }

  .floating-glass-header {
    position: sticky !important;
    top: calc(-20px - env(safe-area-inset-top, 0px)) !important;
    margin: calc(-20px - env(safe-area-inset-top, 0px)) -18px 20px !important;
    padding: calc(18px + env(safe-area-inset-top, 0px)) 18px 16px !important;
    background: #151924 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16) !important;
    z-index: 10 !important;
  }

  body.stations-open .station-panel {
    transform: translateX(0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  body.stations-open .station-drawer-toggle {
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* Every backdrop-filter inside the drawer is a live blur layer the mobile
     compositor has to re-sample against whatever scrolls behind it. A long
     result list multiplies them (one badge per playlist card) until the GPU
     stops keeping up and ships blank tiles — the checkerboard squares. These
     all sit on the opaque #10131d drawer, so a flat fill looks the same. */
  .soundcloud-search-container,
  .spotify-search-container,
  .spotify-playlist-card,
  .load-more-stations,
  .sc-playlist-badge,
  .station-manage-badge {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .soundcloud-search-container,
  .spotify-search-container {
    background: #171b26 !important;
  }

  .load-more-stations {
    background: #1b2030 !important;
  }

  .sc-playlist-badge,
  .station-manage-badge {
    background: rgba(6, 8, 12, 0.92) !important;
  }

  /* The drawer is opaque and covers the viewport, but the aurora behind it
     keeps animating and compositing — straight competition for the GPU budget
     the scrolling list needs. */
  body.stations-open .ambient-canvas {
    visibility: hidden;
  }

  body.stations-open .ambient-aurora-layer {
    animation-play-state: paused;
  }
}

@media (max-width: 600px) {
  .player-panel {
    padding: 20px;
    border-radius: 24px;
    gap: 18px;
  }

  .signal-mark {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  h1 {
    font-size: 1.6rem;
  }

  .turntable {
    max-width: 330px;
  }

  .liquid-play-button {
    width: 66px;
    height: 66px;
    border-radius: 20px;
    right: 14px;
    bottom: 14px;
  }

  .optical-bar {
    padding: 10px;
    gap: 8px;
  }

  .volume-wrap {
    flex: 1 1 100%;
  }

  .glass-pill-btn,
  .download-wrap {
    flex: 1 1 calc(50% - 4px);
  }

  .category-switch {
    grid-template-columns: 1fr;
  }

  .station-group-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   SoundCloud Search, Filters, and Cards UI
   ========================================================================== */
.soundcloud-search-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  border-radius: var(--radius-card);
  border: var(--glass-rim);
  background: linear-gradient(135deg, rgba(255, 85, 0, 0.08) 0%, rgba(20, 24, 32, 0.45) 100%);
  backdrop-filter: var(--glass-lens-filter);
  -webkit-backdrop-filter: var(--glass-lens-filter);
  box-shadow: var(--droplet-shadow);
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-input-wrapper .search-icon {
  position: absolute;
  left: 16px;
  color: var(--text-tertiary);
  pointer-events: none;
  transition: color 200ms var(--smooth-ease);
}

.soundcloud-search-input {
  width: 100%;
  height: 48px;
  padding: 0 42px 0 46px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 12, 18, 0.65);
  color: #ffffff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 540;
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
  transition: all 220ms var(--smooth-ease);
  direction: auto;
}

.soundcloud-search-input:focus {
  border-color: #ff5500;
  background: rgba(15, 18, 26, 0.85);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(255, 85, 0, 0.35);
}

.soundcloud-search-input:focus + .search-icon {
  color: #ff5500;
}

.soundcloud-search-input::placeholder {
  color: var(--text-tertiary);
  font-weight: 500;
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 180ms var(--smooth-ease);
}

.search-clear-btn:hover {
  background: rgba(255, 85, 0, 0.6);
}

.search-type-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 620;
  cursor: pointer;
  transition: all 180ms var(--smooth-ease);
}

.filter-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.filter-pill.active {
  background: linear-gradient(135deg, #ff5500, #ff7700);
  border-color: #ffaa00;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(255, 85, 0, 0.4);
}

.sc-quick-tags {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.sc-quick-tags .eyebrow {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}

.tag-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sc-tag-btn {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.85);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 540;
  cursor: pointer;
  transition: all 180ms var(--smooth-ease);
}

.sc-tag-btn:hover {
  background: rgba(255, 85, 0, 0.25);
  border-color: rgba(255, 85, 0, 0.5);
  color: #ffffff;
  transform: translateY(-1px);
}

.station-card.sc-card {
  min-height: 86px;
  padding: 10px 14px;
  display: block;
}

.sc-card-body {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.sc-thumb-container {
  position: relative;
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  background: #11141c;
}

.sc-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sc-info-container {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sc-card .station-name {
  max-width: 100%;
  font-size: 0.95rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sc-playlist-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.85);
  border: 0.5px solid rgba(255, 85, 0, 0.8);
  color: #ff7700;
  font-size: 0.55rem;
  font-weight: 740;
  letter-spacing: 0.05em;
  backdrop-filter: blur(8px);
}

.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  opacity: 0;
  pointer-events: none;
  background: rgba(18, 22, 30, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 24px var(--dynamic-glow);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 580;
  z-index: 1000;
  transition: transform 300ms var(--spring-ease), opacity 300ms var(--smooth-ease);
  display: flex;
  align-items: center;
  gap: 8px;
  direction: rtl;
}

.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  grid-column: 1 / -1;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 540;
}

.spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid rgba(255, 85, 0, 0.2);
  border-top-color: #ff5500;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Reduced Motion & Low Power Adaptations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .record-spectrum {
    display: none !important;
  }
}

/* ==========================================================================
   User Authentication & Custom Playlists System
   ========================================================================== */
.user-auth-wrap {
  position: relative;
  margin-left: auto;
  z-index: 150;
}

.user-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--glass-fill);
  border: var(--glass-rim);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 580;
  cursor: pointer;
  transition: all 200ms var(--smooth-ease);
  box-shadow: var(--droplet-shadow);
  user-select: none;
}

.user-profile-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.user-avatar-icon {
  display: inline-flex;
  align-items: center;
  opacity: 0.75;
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  padding: 10px;
  border-radius: var(--radius-card);
  border: var(--glass-rim);
  background: linear-gradient(135deg, rgba(20, 24, 34, 0.98) 0%, rgba(10, 12, 18, 0.99) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.12);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 4px;
  direction: rtl;
}

.user-dropdown-header {
  padding: 6px 8px 10px;
}

.user-dropdown-name {
  font-weight: 660;
  font-size: 0.92rem;
  color: #ffffff;
}

.user-dropdown-user {
  font-size: 0.76rem;
  color: var(--text-tertiary);
  direction: ltr;
  text-align: right;
}

.user-dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 4px 0;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 560;
  font-family: inherit;
  cursor: pointer;
  transition: all 160ms var(--smooth-ease);
  text-align: right;
  width: 100%;
  user-select: none;
}

.user-dropdown-item .menu-icon {
  flex: 0 0 auto;
  opacity: 0.62;
  transition: opacity 160ms var(--smooth-ease);
}

.user-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.user-dropdown-item:hover .menu-icon {
  opacity: 1;
}

.user-dropdown-item.danger:hover {
  background: rgba(255, 71, 87, 0.2);
  color: #ff4757;
}

/* Favorite & Add to Playlist Buttons */
.fav-pill-btn.active {
  color: #ff4757 !important;
  background: rgba(255, 71, 87, 0.18) !important;
  border-color: rgba(255, 71, 87, 0.4) !important;
}

.fav-pill-btn.active .fav-icon {
  fill: #ff4757 !important;
  stroke: #ff4757 !important;
}

.fav-icon {
  transition: all 200ms var(--smooth-ease);
}

.fav-pill-btn:hover .fav-icon {
  transform: scale(1.18);
}

/* Modals */
.modal-backdrop[hidden],
.user-dropdown-menu[hidden],
[hidden] {
  display: none !important;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000 !important;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeInBackdrop 280ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideUpMellow {
  0% {
    opacity: 0;
    transform: translateY(28px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-backdrop:not([hidden]) .modal-card,
.modal-backdrop:not([hidden]) .lyrics-view-card,
.modal-backdrop:not([hidden]) .eq-modal-card,
.modal-backdrop:not([hidden]) .lyric-card-modal {
  animation: modalSlideUpMellow 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.modal-card {
  width: 100%;
  max-width: 420px;
  padding: 24px;
  border-radius: var(--radius-card);
  border: var(--glass-rim);
  background: linear-gradient(135deg, rgba(28, 33, 46, 0.96) 0%, rgba(12, 14, 20, 0.98) 100%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9);
  direction: rtl;
}

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

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 660;
  color: #ffffff;
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 180ms var(--smooth-ease);
}

.modal-close-btn:hover {
  background: rgba(255, 71, 87, 0.4);
}

.auth-tabs {
  display: flex;
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: var(--radius-pill);
}

.auth-tab-btn {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 620;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 180ms var(--smooth-ease);
}

.auth-tab-btn.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 580;
  color: var(--text-secondary);
}

.form-group input {
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.4);
  color: #ffffff;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 200ms var(--smooth-ease);
}

.form-group input:focus {
  border-color: #6366f1;
}

.auth-error-msg {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 71, 87, 0.15);
  border: 1px solid rgba(255, 71, 87, 0.3);
  color: #ff6b81;
  font-size: 0.82rem;
  font-weight: 560;
}

.auth-submit-btn {
  height: 46px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 660;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
  transition: all 200ms var(--smooth-ease);
}

.auth-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.6);
}

/* Playlist Picker */
.playlist-picker-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.create-playlist-quick {
  display: flex;
  gap: 8px;
}

.create-playlist-quick input {
  flex: 1;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.3);
  color: #ffffff;
  font-size: 0.86rem;
  font-family: inherit;
}

.create-playlist-btn {
  padding: 0 16px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff5500, #ff7700);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 620;
  cursor: pointer;
}

.playlist-picker-list {
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.playlist-picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 180ms var(--smooth-ease);
}

.playlist-picker-item:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
}

.picker-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.picker-item-title {
  font-size: 0.88rem;
  font-weight: 620;
  color: #ffffff;
}

.picker-item-count {
  font-size: 0.74rem;
  color: var(--text-tertiary);
}

/* Custom Playlists Tab & Cards */
.custom-playlists-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 4px;
}

.create-new-pl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 620;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
  transition: all 180ms var(--smooth-ease);
}

.create-new-pl-btn:hover {
  transform: translateY(-1px);
}

/* Spotify-style Playlist View */
.playlist-detail-card {
  max-width: 600px;
  width: 95vw;
  max-height: 88vh;
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.playlist-modal-close {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 10;
}

.spotify-pl-header {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.spotify-pl-cover-wrap {
  width: 110px;
  height: 110px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #181921;
}

.spotify-pl-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spotify-pl-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spotify-pl-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.spotify-pl-title-row h2 {
  font-size: 1.3rem;
  font-weight: 740;
  color: #ffffff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotify-edit-title-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-secondary);
  border-radius: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 160ms var(--smooth-ease);
}

.spotify-edit-title-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.spotify-pl-edit-box {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.spotify-pl-edit-box input {
  flex: 1;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.85rem;
}

.spotify-pl-meta {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  font-weight: 540;
}

.spotify-pl-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.spotify-play-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #1db954, #1ed760);
  color: #0b0b0d;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(29, 185, 84, 0.4);
  transition: all 180ms var(--smooth-ease);
}

.spotify-play-all-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 24px rgba(29, 185, 84, 0.6);
}

.delete-pl-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 71, 87, 0.15);
  border: 1px solid rgba(255, 71, 87, 0.35);
  color: #ff4757;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 180ms var(--smooth-ease);
}

.delete-pl-btn:hover {
  background: rgba(255, 71, 87, 0.35);
  transform: scale(1.05);
}

.spotify-tracklist-head {
  display: grid;
  grid-template-columns: 36px 1fr 76px;
  padding: 8px 12px;
  font-size: 0.74rem;
  font-weight: 620;
  color: var(--text-tertiary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 6px;
}

.spotify-tracks-list {
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spotify-track-row {
  display: grid;
  grid-template-columns: 36px 1fr 76px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 160ms var(--smooth-ease);
  user-select: none;
}

.spotify-track-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.spotify-track-row.active {
  background: rgba(29, 185, 84, 0.15);
  border: 1px solid rgba(29, 185, 84, 0.3);
}

.spotify-track-row.active .spotify-track-name {
  color: #1ed760 !important;
}

.spotify-track-num-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.84rem;
  font-weight: 620;
  color: var(--text-tertiary);
  position: relative;
}

.spotify-track-row:hover .spotify-num-text {
  display: none;
}

.spotify-hover-play {
  display: none;
  color: #ffffff;
}

.spotify-track-row:hover .spotify-hover-play {
  display: block;
}

.spotify-track-main-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.spotify-track-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.spotify-track-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.spotify-track-name {
  font-size: 0.86rem;
  font-weight: 620;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotify-track-artist {
  font-size: 0.74rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotify-track-actions-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.track-action-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 160ms var(--smooth-ease);
}

.track-action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.08);
}

.track-action-btn.danger:hover {
  background: rgba(255, 71, 87, 0.35);
  color: #ff4757;
}

.station-manage-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 580;
  cursor: pointer;
  transition: all 180ms var(--smooth-ease);
  display: flex;
  align-items: center;
  gap: 4px;
}

.station-manage-badge:hover {
  background: rgba(99, 102, 241, 0.6);
  border-color: rgba(99, 102, 241, 0.9);
  transform: scale(1.05);
}

/* Spotify / Apple Music Style Synced Karaoke Lyrics View */
/* ==========================================================================
   Optical Glass Synced Karaoke Lyrics & Live Translation View
   ========================================================================== */
.lyrics-modal-backdrop {
  backdrop-filter: blur(28px) saturate(200%) brightness(85%);
  -webkit-backdrop-filter: blur(28px) saturate(200%) brightness(85%);
  background: rgba(8, 9, 14, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 999999 !important;
}

.lyrics-view-card {
  max-width: 720px;
  width: 96vw;
  height: 88vh;
  max-height: 840px;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-capsule);
  border: var(--glass-rim);
  background: 
    radial-gradient(circle at 10% 20%, var(--dynamic-glow) 0%, transparent 60%),
    radial-gradient(circle at 90% 80%, rgba(var(--dynamic-c2), 0.25) 0%, transparent 65%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.12) 0%, rgba(12, 14, 22, 0.88) 100%);
  backdrop-filter: blur(36px) saturate(260%) brightness(115%);
  -webkit-backdrop-filter: blur(36px) saturate(260%) brightness(115%);
  box-shadow: 
    0 32px 80px -10px rgba(0, 0, 0, 0.85),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.45),
    inset 0 -1.5px 3px rgba(0, 0, 0, 0.55);
  direction: rtl;
}

/* Ambient multi-layer dynamic fluid glow inside lyrics card */
.lyrics-view-card::before {
  content: "";
  position: absolute;
  top: -25%;
  right: -10%;
  width: 75%;
  height: 65%;
  background: radial-gradient(circle, var(--dynamic-c1) 0%, transparent 68%);
  opacity: 0.28;
  pointer-events: none;
  filter: blur(55px);
  z-index: 0;
  animation: floatAurora 18s ease-in-out infinite alternate;
}

.lyrics-view-card::after {
  content: "";
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 70%;
  height: 60%;
  background: radial-gradient(circle, var(--dynamic-c2) 0%, transparent 68%);
  opacity: 0.25;
  pointer-events: none;
  filter: blur(50px);
  z-index: 0;
  animation: floatAurora 22s ease-in-out infinite alternate-reverse;
}

.lyrics-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.lyrics-track-info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.lyrics-track-thumb {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

.lyrics-track-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: right;
}

.lyrics-track-meta h3 {
  font-size: 1.08rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  letter-spacing: -0.01em;
}

.lyrics-track-meta p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.lyrics-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lyrics-mode-selector {
  display: flex;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.12);
  gap: 3px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.lyrics-mode-chip {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 580;
  font-family: inherit;
  cursor: pointer;
  transition: all 180ms var(--smooth-ease);
  white-space: nowrap;
}

.lyrics-mode-chip:hover {
  color: #ffffff;
}

.lyrics-mode-chip.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.1) 100%);
  color: #ffffff;
  border: 0.5px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.lyrics-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 180ms var(--smooth-ease);
  flex-shrink: 0;
}

.lyrics-close-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.05);
}

.lyrics-sync-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 6px 6px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  gap: 12px;
}

.lyrics-sync-left {
  display: flex;
  align-items: center;
}

.lyrics-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  color: #34d399;
  font-weight: 620;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.lyrics-sync-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 3px 6px;
  border-radius: var(--radius-pill);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.lyrics-nudge-btn {
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 620;
  font-family: inherit;
  cursor: pointer;
  transition: all 160ms var(--smooth-ease);
  line-height: 1.2;
}

.lyrics-nudge-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.35);
  transform: scale(1.05);
}

.lyrics-nudge-btn:active {
  transform: scale(0.95);
}

.lyrics-offset-label {
  font-size: 0.74rem;
  font-weight: 660;
  color: var(--text-secondary);
  padding: 0 5px;
  min-width: 36px;
  text-align: center;
  direction: ltr;
}

.lyrics-offset-label.has-offset {
  color: #38bdf8;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.lyrics-nudge-reset {
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: none;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  font-size: 0.7rem;
  font-weight: 620;
  font-family: inherit;
  cursor: pointer;
  transition: all 160ms var(--smooth-ease);
  line-height: 1.2;
}

.lyrics-nudge-reset:hover {
  background: rgba(239, 68, 68, 0.4);
  color: #ffffff;
}

.lyrics-tip-container {
  padding: 2px 6px 8px;
  text-align: right;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.lyrics-tip {
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: normal;
  line-height: 1.35;
}

.lyrics-content-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 24px 12px 140px;
  scroll-behavior: smooth;
  mask-image: linear-gradient(to bottom, transparent 0%, black 8%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 8%, black 90%, transparent 100%);
  position: relative;
  z-index: 2;
}

.lyrics-content-scroll::-webkit-scrollbar {
  width: 5px;
}

.lyrics-content-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.lyrics-loading, .lyrics-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary);
  gap: 14px;
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--dynamic-c1, #6366f1);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.lyrics-lines-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.karaoke-line {
  padding: 12px 16px;
  border-radius: var(--radius-card);
  cursor: pointer;
  transition: all 300ms cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.38;
  transform: scale(0.975);
  transform-origin: right center;
  user-select: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid transparent;
}

.karaoke-line:hover {
  opacity: 0.8;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.karaoke-line.active {
  opacity: 1;
  transform: scale(1.03);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.04) 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.karaoke-orig-text {
  font-size: 1.38rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.45;
  letter-spacing: -0.015em;
  transition: color 240ms ease;
  direction: ltr;
  text-align: left;
}

.karaoke-line.active .karaoke-orig-text {
  color: #ffffff;
  text-shadow: 0 0 28px rgba(255, 255, 255, 0.55);
}

.karaoke-trans-text {
  font-size: 1.08rem;
  font-weight: 580;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
  font-family: inherit;
  direction: rtl;
  text-align: right;
  transition: color 240ms ease;
}

.karaoke-line.active .karaoke-trans-text {
  color: #a5b4fc;
  text-shadow: 0 0 18px rgba(165, 180, 252, 0.6);
}

/* Mode filtering */
.lyrics-view-card[data-display="persian"] .karaoke-orig-text {
  display: none;
}
.lyrics-view-card[data-display="persian"] .karaoke-trans-text {
  font-size: 1.35rem;
  color: #ffffff;
}

.lyrics-view-card[data-display="original"] .karaoke-trans-text {
  display: none;
}

/* Responsive Mobile Rules for Lyrics Modal */
@media (max-width: 600px) {
  .lyrics-modal-backdrop {
    padding: 0 !important;
    align-items: flex-end !important;
    z-index: 999999 !important;
  }

  .lyrics-view-card {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 94vh !important;
    height: 94dvh !important;
    max-height: 94dvh !important;
    border-radius: 28px 28px 0 0 !important;
    padding: 20px 18px calc(24px + env(safe-area-inset-bottom, 0px)) !important;
    border-bottom: none !important;
  }

  .lyrics-view-header {
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 12px;
  }

  .lyrics-track-info {
    order: 1;
    width: calc(100% - 46px);
  }

  .lyrics-close-btn {
    order: 2;
  }

  .lyrics-mode-selector {
    order: 3;
    width: 100%;
    justify-content: space-between;
    margin-top: 4px;
  }

  .lyrics-mode-chip {
    flex: 1;
    text-align: center;
    padding: 7px 8px;
    font-size: 0.76rem;
  }

  .lyrics-sync-bar {
    padding: 8px 4px 4px;
    flex-wrap: wrap;
    gap: 6px;
  }

  .lyrics-tip {
    width: 100%;
    font-size: 0.72rem;
    text-align: right;
  }

  .karaoke-orig-text {
    font-size: 1.18rem;
  }

  .karaoke-trans-text {
    font-size: 0.96rem;
  }

  .karaoke-line {
    padding: 10px 12px;
    gap: 4px;
  }
}

/* Prevent auto-zoom on mobile browsers when focusing form inputs */
@media (max-width: 768px) {
  input[type="text"],
  input[type="password"],
  input[type="search"],
  input[type="number"],
  input[type="email"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Admin Users Modal Glass Styling */
.admin-modal-card {
  max-width: 640px;
  width: 92%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.admin-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-header-title h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 620;
  color: #ffffff;
}

.admin-user-badge {
  background: rgba(225, 29, 72, 0.2);
  border: 1px solid rgba(225, 29, 72, 0.4);
  color: #f43f5e;
  font-size: 0.78rem;
  font-weight: 580;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.admin-users-body {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.admin-table-head {
  display: grid;
  grid-template-columns: 36px 1fr 140px 100px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-card);
  font-size: 0.78rem;
  font-weight: 580;
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-users-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 4px;
}

.admin-user-row {
  display: grid;
  grid-template-columns: 36px 1fr 140px 100px;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-card);
  transition: all 180ms var(--smooth-ease);
}

.admin-user-row:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(-2px);
}

.admin-user-num {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 580;
}

.admin-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-user-uname {
  font-weight: 620;
  font-size: 0.88rem;
  color: #ffffff;
  direction: ltr;
  text-align: right;
}

.admin-user-disp {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.55);
}

.admin-user-date {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.6);
  direction: ltr;
}

.admin-user-stats {
  display: flex;
  gap: 6px;
  font-size: 0.74rem;
}

.stat-chip {
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 7px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Telegram Download Glass Pill Button */
.tg-download-btn {
  background: linear-gradient(135deg, rgba(34, 158, 217, 0.22), rgba(0, 136, 204, 0.35)) !important;
  border: 1px solid rgba(34, 158, 217, 0.5) !important;
  color: #38bdf8 !important;
  box-shadow: 0 4px 15px rgba(0, 136, 204, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 220ms var(--smooth-ease);
}

.tg-download-btn:hover {
  background: linear-gradient(135deg, rgba(34, 158, 217, 0.4), rgba(0, 136, 204, 0.55)) !important;
  border-color: rgba(56, 189, 248, 0.8) !important;
  box-shadow: 0 6px 20px rgba(0, 136, 204, 0.45);
  transform: translateY(-1px) scale(1.03);
  color: #ffffff !important;
}

.tg-download-btn:active {
  transform: translateY(0) scale(0.98);
}

/* ==========================================================================
   Spotify Hub & Playlist Styles
   ========================================================================== */

.spotify-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.spotify-search-container {
  background: 
    radial-gradient(circle at 10% 10%, rgba(29, 185, 84, 0.15) 0%, transparent 60%),
    linear-gradient(135deg, rgba(20, 24, 30, 0.75) 0%, rgba(12, 14, 20, 0.9) 100%);
  border: 1px solid rgba(29, 185, 84, 0.3);
  border-radius: var(--radius-capsule);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.spotify-badge-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.spotify-badge-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.spotify-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 4px 14px;
  transition: all 200ms var(--smooth-ease);
}

.spotify-input-wrapper:focus-within {
  border-color: #1db954;
  box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.25);
  background: rgba(0, 0, 0, 0.65);
}

.spotify-search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.92rem;
  padding: 10px 0;
  outline: none;
  font-family: inherit;
  direction: ltr;
  text-align: left;
}

.spotify-search-input::placeholder {
  direction: rtl;
  text-align: right;
  color: rgba(255, 255, 255, 0.4);
}

.spotify-fetch-btn {
  background: linear-gradient(135deg, #1db954, #1ed760);
  color: #000;
  font-weight: 620;
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 180ms var(--smooth-ease);
  box-shadow: 0 4px 14px rgba(29, 185, 84, 0.4);
}

.spotify-fetch-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(29, 185, 84, 0.6);
  filter: brightness(1.1);
}

.spotify-fetch-btn:active {
  transform: scale(0.97);
}

.spotify-quick-tags {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spotify-tag-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.78rem;
  font-weight: 540;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 180ms var(--smooth-ease);
  white-space: nowrap;
}

.spotify-tag-btn:hover {
  background: rgba(29, 185, 84, 0.2);
  border-color: rgba(29, 185, 84, 0.5);
  color: #1db954;
  transform: translateY(-1px);
}

/* Spotify Result & Playlist Card */
.spotify-result-container {
  width: 100%;
  scroll-margin-top: 24px;
}

.spotify-loading-card {
  padding: 40px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.75);
  border-radius: var(--radius-capsule);
}

.spotify-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(29, 185, 84, 0.2);
  border-top-color: #1db954;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spotify-playlist-card {
  background: 
    radial-gradient(circle at 80% 20%, rgba(29, 185, 84, 0.18) 0%, transparent 65%),
    linear-gradient(145deg, rgba(22, 27, 34, 0.85) 0%, rgba(10, 12, 18, 0.95) 100%);
  border: 1px solid rgba(29, 185, 84, 0.35);
  border-radius: var(--radius-capsule);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

.spotify-card-header {
  display: flex;
  gap: 22px;
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  align-items: center;
  flex-wrap: wrap;
}

.spotify-cover-wrap {
  position: relative;
  width: 130px;
  height: 130px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.spotify-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spotify-badge-corner {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.7);
  padding: 5px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spotify-meta-wrap {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.spotify-type-chip {
  align-self: flex-start;
  background: rgba(29, 185, 84, 0.2);
  color: #1db954;
  border: 1px solid rgba(29, 185, 84, 0.4);
  font-size: 0.72rem;
  font-weight: 620;
  padding: 3px 10px;
  border-radius: 12px;
}

.spotify-pl-title {
  font-size: 1.45rem;
  font-weight: 740;
  color: #ffffff;
  margin: 0;
  line-height: 1.3;
}

.spotify-pl-owner {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 10px 0;
}

.spotify-actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.spotify-play-all-btn {
  background: linear-gradient(135deg, #1db954, #1ed760);
  color: #000;
  font-weight: 660;
  font-size: 0.92rem;
  padding: 10px 22px;
  border-radius: 24px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 200ms var(--smooth-ease);
  box-shadow: 0 6px 20px rgba(29, 185, 84, 0.45);
}

.spotify-play-all-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 28px rgba(29, 185, 84, 0.65);
}

.spotify-import-acc-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-weight: 580;
  font-size: 0.88rem;
  padding: 10px 18px;
  border-radius: 24px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 200ms var(--smooth-ease);
}

.spotify-import-acc-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

/* Tracklist */
.spotify-tracklist-wrap {
  padding: 8px 16px 20px 16px;
  max-height: 480px;
  overflow-y: auto;
}

.spotify-tracklist-head {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  font-size: 0.76rem;
  font-weight: 580;
  color: rgba(255, 255, 255, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.col-num { width: 36px; text-align: center; flex-shrink: 0; }
.col-title { flex: 1; min-width: 0; }
.col-dur { width: 60px; text-align: left; direction: ltr; flex-shrink: 0; font-size: 0.8rem; color: rgba(255, 255, 255, 0.5); }
.col-action { width: 44px; text-align: center; flex-shrink: 0; }

.spotify-track-row {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 12px;
  transition: all 160ms var(--smooth-ease);
  cursor: pointer;
}

.spotify-track-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.spotify-track-row.playing {
  background: rgba(29, 185, 84, 0.15);
  border: 1px solid rgba(29, 185, 84, 0.3);
}

.spotify-track-row.playing .track-row-name {
  color: #1db954;
  font-weight: 660;
}

.spotify-track-row.playing .col-num {
  color: #1db954;
  font-weight: 740;
}

.track-row-name {
  display: block;
  font-size: 0.9rem;
  font-weight: 580;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-row-artist {
  display: block;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.row-play-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 160ms var(--smooth-ease);
}

.spotify-track-row:hover .row-play-btn {
  background: #1db954;
  color: #000;
  transform: scale(1.1);
}

/* ==========================================================================
   Fullscreen Player Expand Button & Immersive Modal
   ========================================================================== */
.fullscreen-open-btn {
  margin-right: auto;
  margin-left: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 220ms var(--smooth-ease);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.fullscreen-open-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 6px 20px var(--dynamic-glow);
}

.fullscreen-player-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 5, 8, 0.88);
  backdrop-filter: blur(45px) saturate(190%);
  -webkit-backdrop-filter: blur(45px) saturate(190%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 320ms cubic-bezier(0.16, 1, 0.3, 1), visibility 320ms cubic-bezier(0.16, 1, 0.3, 1);
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}

.fullscreen-player-backdrop.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.fullscreen-player-backdrop[hidden] {
  display: none !important;
  visibility: hidden !important;
}

.fullscreen-player-card {
  width: 100vw;
  height: 100dvh;
  max-width: 850px;
  max-height: 94vh;
  border-radius: var(--radius-capsule);
  padding: 24px 32px 32px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  background: 
    radial-gradient(circle at 50% 30%, var(--dynamic-glow) 0%, transparent 68%),
    linear-gradient(180deg, rgba(22, 27, 38, 0.82) 0%, rgba(10, 12, 18, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.85), inset 0 1px 2px rgba(255, 255, 255, 0.3);
  transform: scale(0.94) translateY(20px);
  transition: transform 380ms cubic-bezier(0.16, 1, 0.3, 1);
}

.fullscreen-player-backdrop.show .fullscreen-player-card {
  transform: scale(1) translateY(0);
}

/* Top Nav */
.fs-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  z-index: 10;
}

.fs-collapse-btn,
.fs-lyrics-toggle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 200ms var(--smooth-ease);
}

.fs-collapse-btn:hover,
.fs-lyrics-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.08);
}

.fs-header-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
}

.fs-header-meta .eyebrow {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
}

.fs-source-badge {
  font-size: 0.7rem;
  padding: 2px 10px;
  border-radius: 12px;
  background: var(--dynamic-glow);
  color: #fff;
  font-weight: 580;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 8px var(--dynamic-glow);
}

/* Center Stage: Cinematic Turntable */
.fs-stage-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 12px 0;
}

.fs-turntable-wrapper {
  position: relative;
  width: min(330px, 64vw);
  height: min(330px, 64vw);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fs-record-ambient {
  position: absolute;
  inset: -30px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--dynamic-glow) 0%, transparent 70%);
  opacity: 0.65;
  filter: blur(36px);
  transition: all 1.2s ease;
}

body.playing .fs-record-ambient {
  opacity: 0.95;
  transform: scale(1.08);
}

.fs-record {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: 
    repeating-radial-gradient(
      circle at center,
      rgba(255, 255, 255, 0.04) 0px,
      rgba(255, 255, 255, 0.04) 1px,
      transparent 1px,
      transparent 3px
    ),
    radial-gradient(circle at center, #1c1f26 0%, #0e1015 50%, #040507 100%);
  box-shadow: 
    0 24px 60px rgba(0, 0, 0, 0.85),
    inset 0 0 0 2px rgba(255, 255, 255, 0.15),
    inset 0 0 20px rgba(0, 0, 0, 0.9);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.5s var(--spring-ease);
}

body.playing .fs-record {
  animation: spinRecord 20s linear infinite;
}

#fsArtworkImage {
  width: 58%;
  height: 58%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.7);
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

/* Bottom Panel */
.fs-bottom-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  z-index: 10;
}

.fs-track-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.fs-track-texts {
  flex: 1;
  min-width: 0;
}

.fs-track-title {
  font-size: 1.35rem;
  font-weight: 740;
  color: #ffffff;
  margin: 0;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fs-artist-name {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
  margin: 4px 0 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fs-fav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 200ms var(--smooth-ease);
}

.fs-fav-btn.active {
  background: rgba(255, 71, 87, 0.2);
  border-color: rgba(255, 71, 87, 0.6);
  color: #ff4757;
}

.fs-fav-btn.active svg {
  fill: #ff4757;
}

/* Progress Bar */
.fs-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.fs-time-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 540;
}

.fs-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ff4757;
  font-weight: 620;
  animation: pulseOpacity 1.6s ease-in-out infinite;
}

.fs-live-indicator::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.fs-progress-bar-container {
  position: relative;
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  cursor: pointer;
}

.fs-progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--dynamic-c2), var(--dynamic-c1));
  border-radius: 6px;
  box-shadow: 0 0 10px var(--dynamic-glow);
}

.fs-seek-slider {
  position: absolute;
  inset: -6px 0;
  width: 100%;
  height: calc(100% + 12px);
  opacity: 0;
  cursor: pointer;
  margin: 0;
}

/* Controls */
.fs-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.fs-ctrl-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: all 180ms var(--smooth-ease);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  position: relative;
}

.fs-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: scale(1.08);
}

.fs-seek-btn .seek-tag {
  position: absolute;
  font-size: 0.58rem;
  font-weight: 740;
  color: #ffffff;
  pointer-events: none;
}

.fs-play-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #ffffff;
  color: #000000;
  border: none;
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 200ms var(--smooth-ease);
}

.fs-play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 14px 40px rgba(255, 255, 255, 0.55);
}

.fs-play-btn svg {
  width: 28px;
  height: 28px;
}

body.playing .fs-play-btn .play-icon {
  display: none;
}

body.playing .fs-play-btn .pause-icon {
  display: block;
}

body:not(.playing) .fs-play-btn .play-icon {
  display: block;
}

body:not(.playing) .fs-play-btn .pause-icon {
  display: none;
}

/* Action Bar: Volume & Telegram */
.fs-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.fs-vol-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.65);
  flex: 1;
  max-width: 180px;
}

.fs-vol-wrapper input[type="range"] {
  flex: 1;
  accent-color: var(--dynamic-accent);
}

.fs-tg-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(0, 136, 204, 0.22);
  border: 1px solid rgba(0, 136, 204, 0.5);
  color: #29b6f6;
  font-size: 0.82rem;
  font-weight: 580;
  cursor: pointer;
  transition: all 200ms var(--smooth-ease);
}

.fs-tg-btn:hover {
  background: rgba(0, 136, 204, 0.38);
  border-color: rgba(0, 136, 204, 0.7);
  transform: translateY(-1px);
}

/* Mobile Fullscreen Optimization */
@media (max-width: 680px) {
  .fullscreen-player-card {
    max-width: 100vw;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
    padding: calc(env(safe-area-inset-top, 0px) + 16px) 20px calc(env(safe-area-inset-bottom, 0px) + 20px) 20px;
    border: none;
  }

  .fs-turntable-wrapper {
    width: min(270px, 72vw);
    height: min(270px, 72vw);
  }

  .fs-controls-row {
    gap: 16px;
  }

  .fs-ctrl-btn {
    width: 40px;
    height: 40px;
  }

  .fs-play-btn {
    width: 60px;
    height: 60px;
  }
}

/* ==========================================================================
   Audio Equalizer & 8D Surround Effects Modal Styling
   ========================================================================== */
.fs-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fs-eq-toggle-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 200ms var(--smooth-ease);
}

.fs-eq-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.08);
}

.eq-modal-card {
  max-width: 520px;
  width: 95vw;
  max-height: 90vh;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.eq-presets-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.eq-section-label {
  font-size: 0.84rem;
  font-weight: 580;
  color: rgba(255, 255, 255, 0.7);
}

.eq-presets-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.eq-preset-chip {
  padding: 8px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  font-weight: 580;
  cursor: pointer;
  transition: all 200ms var(--smooth-ease);
}

.eq-preset-chip:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.eq-preset-chip.active {
  background: var(--dynamic-glow);
  border-color: var(--dynamic-c1);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--dynamic-glow);
}

.eq-bands-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 20px 12px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.eq-band-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.eq-band-val {
  font-size: 0.8rem;
  font-weight: 660;
  color: var(--dynamic-fill);
  font-variant-numeric: tabular-nums;
}

.eq-slider-vertical-wrap {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eq-slider-vertical {
  -webkit-appearance: slider-vertical;
  width: 8px;
  height: 120px;
  cursor: pointer;
  accent-color: var(--dynamic-c1);
}

.eq-band-name {
  font-size: 0.85rem;
  font-weight: 660;
  color: #ffffff;
}

.eq-band-freq {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
}

.eq-fx-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.eq-fx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.eq-fx-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.eq-fx-title {
  font-size: 0.88rem;
  font-weight: 660;
  color: #ffffff;
}

.eq-fx-desc {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.55);
}

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

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

.eq-switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 34px;
  transition: 240ms;
}

.eq-switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

.eq-toggle-switch input:checked + .eq-switch-slider {
  background: var(--dynamic-fill);
  border-color: var(--dynamic-c1);
  box-shadow: 0 0 12px var(--dynamic-glow);
}

.eq-toggle-switch input:checked + .eq-switch-slider:before {
  transform: translateX(20px);
}

.eq-slider-horizontal-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  padding: 4px 8px;
}

.eq-slider-horizontal-row input[type="range"] {
  flex: 1;
  accent-color: var(--dynamic-c1);
}

.eq-fx-slider {
  width: 120px;
  accent-color: var(--dynamic-c1);
}

.eq-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 4px;
}

/* EQ Modal Mobile Optimization */
@media (max-width: 768px) {
  .eq-modal-backdrop {
    padding: 0 !important;
    align-items: flex-end !important;
  }

  .eq-modal-card {
    width: 100vw !important;
    max-width: 100vw !important;
    max-height: 92dvh !important;
    border-radius: 28px 28px 0 0 !important;
    padding: 18px 16px calc(24px + env(safe-area-inset-bottom, 0px)) 16px !important;
    border: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.22) !important;
    background: #10141f !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 14px !important;
  }

  .eq-presets-grid {
    gap: 6px !important;
  }

  .eq-preset-chip {
    padding: 6px 12px !important;
    font-size: 0.76rem !important;
  }

  .eq-bands-container {
    gap: 10px !important;
    padding: 14px 6px !important;
  }

  .eq-slider-vertical-wrap {
    height: 110px !important;
  }

  .eq-slider-vertical {
    height: 95px !important;
  }

  .eq-modal-footer {
    position: sticky !important;
    bottom: -16px !important;
    background: #10141f !important;
    padding-top: 8px !important;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 10 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin-top: 2px !important;
  }
}

/* ==========================================================================
   Lyric Card Story Exporter Modal Styling
   ========================================================================== */
.lyrics-story-export-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 580;
  cursor: pointer;
  transition: all 200ms var(--smooth-ease);
}

.lyrics-story-export-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: var(--dynamic-c1);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--dynamic-glow);
}

.lyric-card-modal {
  max-width: 840px;
  width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.lyric-card-workspace {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(280px, 1fr);
  gap: 24px;
  align-items: start;
}

.lyric-card-preview-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.2);
  background: #000;
}

.lyric-card-preview-frame canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.lyric-card-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 72vh;
  overflow-y: auto;
}

.sidebar-title {
  font-size: 0.88rem;
  font-weight: 660;
  color: rgba(255, 255, 255, 0.9);
}

.lyric-card-lines-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding: 8px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.picker-line-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 180ms var(--smooth-ease);
}

.picker-line-row:hover {
  background: rgba(255, 255, 255, 0.1);
}

.picker-line-row.selected {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--dynamic-c1);
}

.picker-line-row input[type="checkbox"] {
  margin-top: 4px;
  accent-color: var(--dynamic-c1);
}

.picker-line-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #ffffff;
}

.picker-line-trans {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.6);
}

.lyric-card-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lyric-opt-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
}

.lyric-opt-checkbox input {
  accent-color: var(--dynamic-c1);
}

.lyric-card-export-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.export-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
}

.share-story-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
}

/* Mobile Bottom Sheet Mode */
@media (max-width: 768px) {
  .lyric-card-modal-backdrop {
    padding: 0 !important;
    align-items: flex-end !important;
  }

  .lyric-card-modal {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 94dvh !important;
    max-height: 94dvh !important;
    border-radius: 28px 28px 0 0 !important;
    padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px)) 16px !important;
    border: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.22) !important;
    background: #10141f !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 14px !important;
  }

  .lyric-card-workspace {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 14px !important;
    width: 100% !important;
  }

  .lyric-card-preview-frame {
    width: 150px !important;
    max-width: 150px !important;
    aspect-ratio: 9 / 16 !important;
    border-radius: 16px !important;
    margin: 0 auto !important;
    flex-shrink: 0 !important;
  }

  .lyric-card-sidebar {
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    gap: 12px !important;
  }

  .lyric-card-lines-picker {
    max-height: 160px !important;
    padding: 6px !important;
  }

  .picker-line-row {
    padding: 6px 10px !important;
  }

  .lyric-card-export-actions {
    position: sticky !important;
    bottom: -16px !important;
    background: #10141f !important;
    padding-top: 8px !important;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 10 !important;
    margin-top: 4px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  }
}

/* Smart TV & Ultra-Wide 4K Screen Layout Optimization */
@media (min-width: 1900px) {
  .app-layout {
    width: min(1760px, 92vw) !important;
    margin: 0 auto !important;
    grid-template-columns: 540px 1fr !important;
    gap: 40px !important;
  }

  .player-panel {
    height: fit-content !important;
    min-height: auto !important;
  }

  .fullscreen-player-card {
    max-width: 860px !important;
    max-height: 88vh !important;
    margin: auto !important;
  }

  .lyrics-view-card {
    max-width: 780px !important;
    max-height: 86vh !important;
    margin: auto !important;
  }

  .eq-modal-card {
    max-width: 560px !important;
    margin: auto !important;
  }
}



