:root {
  /* Palette (Retro Neon: blue/purple/pink) */
  --p0: #0a0a0f; /* deepest background */
  --p1: #0f1117; /* dark surface */
  --p2: #1a1033; /* deep purple */
  --p3: #3a38a5; /* indigo */
  --p4: #6b5cff; /* electric indigo */
  --p5: #a64df8; /* neon purple */
  --p6: #00b2ff; /* cyan */
  --p7: #9ad8ff; /* light cyan */
  --p8: #ffffff; /* text */
  --p9: #ffffff;

  /* Base + surfaces */
  --bg: var(--p0);
  --bg-2: #12131a;
  --card: rgba(18, 19, 26, 0.6); /* glassy dark */
  --card-border: rgba(255, 255, 255, 0.08);
  --muted: rgba(243, 243, 255, 0.75);
  --muted-2: rgba(243, 243, 255, 0.55);

  /* Accents */
  --accent: var(--p5); /* Primär (Neon-Purple) */
  --accent-2: var(--p6); /* Sekundär (Cyan) */

  /* Gradients */
  --grad-bg: radial-gradient(1200px 600px at 50% 100%, rgba(166, 77, 248, 0.25), transparent 60%),
  radial-gradient(900px 500px at 85% 0%, rgba(0, 178, 255, 0.18), transparent 60%),
  linear-gradient(180deg, var(--p0) 0%, var(--p1) 60%, #1a102a 100%);
  --grad-accent: linear-gradient(135deg, #00b2ff 0%, #6b5cff 45%, #ff2d95 100%);
  --grad-accent-strong: linear-gradient(135deg, #00b2ff 0%, #6b5cff 40%, #a64df8 70%, #ff2d95 100%);

  /* Shadows */
  --shadow-1: 0 10px 30px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --shadow-accent: 0 10px 24px rgba(166, 77, 248, 0.25);
}

body {
  background-color: black;
  background: var(--grad-bg);
  color: var(--p8);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background-attachment: fixed;
}

/* Futuristic display font for headings/branding */
h1, h2, h3, .brand {
  font-family: "Audiowide", Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.brand {
  text-shadow: 0 0 10px rgba(166, 77, 248, 0.25);
}

.app {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 24px auto;
  padding: 16px;
}

.brand {
  font-weight: 700;
  letter-spacing: .3px;
}

/* Glass cards */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  backdrop-filter: saturate(130%) blur(10px);
  box-shadow: var(--shadow-1), var(--shadow-accent);
}

/* Playlist */
.playlist {
  max-height: 60vh;
  overflow: auto;
  scrollbar-width: thin;
}

.list-group-item {
  background: transparent;
  color: var(--p8);
  border-color: #2a2a2a;
}

.list-group-item:hover {
  background: rgba(166, 77, 248, 0.10);
}

.list-group-item.active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border-color: rgba(166, 77, 248, 0.55);
  box-shadow: 0 0 0 1px rgba(166, 77, 248, 0.25) inset;
  position: relative;
}

.list-group-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--grad-accent);
  border-radius: 3px;
}

/* Player controls */
.btn-round {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-accent {
  background: var(--grad-accent);
  color: #fff;
  border: none;
  box-shadow: 0 6px 18px rgba(166, 77, 248, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.btn-accent:hover {
  filter: brightness(1.05);
  box-shadow: 0 8px 22px rgba(0, 178, 255, 0.45);
}

/* Animated Play/Pause button colors */
#btnPlay {
  background-size: 250% 250%;
  transition: filter .25s ease, transform .15s ease, box-shadow .45s ease, background-position .6s ease;
}

#btnPlay.is-paused {
  /* gentle breathing gradient when paused */
  animation: gradientShift 10s linear infinite, glowPulse 3s ease-in-out infinite;
  animation-direction: normal, alternate;
  background-image: var(--grad-accent);
}

#btnPlay.is-playing {
  /* faster, more vibrant cycle when playing */
  animation: gradientShift 5s linear infinite, glowPulse 1.8s ease-in-out infinite;
  animation-direction: normal, alternate;
  background-image: var(--grad-accent-strong);
}

#btnPlay:active {
  transform: scale(0.97);
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes glowPulse {
  0% {
    /* deeper purple base glow */
    box-shadow: 0 0 16px rgba(166, 77, 248, 0.70),
    0 0 36px rgba(166, 77, 248, 0.45),
    0 10px 24px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  }
  50% {
    /* brightest cyan peak */
    box-shadow: 0 0 22px rgba(0, 178, 255, 0.95),
    0 0 54px rgba(0, 178, 255, 0.60),
    0 12px 30px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  }
  100% {
    /* vibrant pink tail */
    box-shadow: 0 0 18px rgba(255, 45, 149, 0.85),
    0 0 44px rgba(255, 45, 149, 0.55),
    0 10px 24px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  }
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.28) !important;
  color: #fff !important;
}

.btn-outline-light:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  background: rgba(166, 77, 248, 0.12) !important;
}

input[type="range"]::-webkit-slider-thumb {
  background: var(--accent);
}

input[type="range"] {
  accent-color: var(--accent);
}

input[type="range"]::-webkit-slider-runnable-track {
  background: rgba(255, 255, 255, 0.15);
  height: 6px;
  border-radius: 999px;
}

input[type="range"]::-moz-range-track {
  background: rgba(255, 255, 255, 0.15);
  height: 6px;
  border-radius: 999px;
}

input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(166, 77, 248, 0.35);
}

/* Transcript */
.transcript {
  max-height: 45vh;
  overflow: auto;
  line-height: 1.6;
}

.cue {
  color: var(--muted);
  padding: 2px 6px;
  border-radius: 8px;
  transition: background .2s, color .2s;
}

.cue.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(0, 178, 255, 0.18), rgba(166, 77, 248, 0.18));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
  border-left: 3px solid rgba(166, 77, 248, 0.65);
}

/* Pills */
.pill {
  background: #222527;
  color: #ccc;
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: .9rem;
}

.pill:hover {
  background: #2b2f32;
}

.pill.active {
  background: rgba(166, 77, 248, 0.18);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(166, 77, 248, 0.3) inset;
}

.lang-pill {
  padding: 4px 10px;
  border-radius: 999px;
}

.lang-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Scrollbars */
html {
  scrollbar-color: #444 #111;
  scrollbar-width: thin;
}

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

::-webkit-scrollbar-track {
  background: #111;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #2a2a2a, #3b3b3b);
  border-radius: 10px;
  border: 2px solid #111;
}

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

.playlist, .transcript {
  scrollbar-width: thin;
  scrollbar-color: #444 #111;
}

.playlist::-webkit-scrollbar, .transcript::-webkit-scrollbar {
  width: 8px;
}

.playlist::-webkit-scrollbar-track, .transcript::-webkit-scrollbar-track {
  background: #111;
  border-radius: 10px;
}

.playlist::-webkit-scrollbar-thumb, .transcript::-webkit-scrollbar-thumb {
  background: #2d2d2d;
  border: 2px solid #111;
  border-radius: 10px;
}

.playlist::-webkit-scrollbar-thumb:hover, .transcript::-webkit-scrollbar-thumb:hover {
  background: var(--grad-accent);
  border-color: #111;
}

@media (max-width: 991px) {
  .playlist {
    max-height: 30vh;
  }
}

/* Header-Bar */
.header-bar {
  background: linear-gradient(180deg, rgba(166, 77, 248, 0.10), rgba(22, 26, 29, 0.06));
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 10px 14px;
  backdrop-filter: saturate(120%) blur(6px);
  box-shadow: var(--shadow-1);
}