/* === ROOT & THEME ENGINE === */
:root {
    --bg-deep: #030305;

    /* Fallbacks — werden von PHP im <style>-Block der index.php überschrieben */
    --theme-accent: #ac81fa;
    --theme-glow: rgba(172, 129, 250, 0.5);
    --gradient-stations: linear-gradient(90deg, #ac81fa, #9eff00, #0077ff, #7FFAAB, #ac81fa);

    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Montserrat', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-deep);
    color: #f8fafc;
    font-family: var(--font-body);
    overflow-x: hidden;
}

/* === AMBIENT BACKGROUND === */
.ambient-layer {
    position: fixed;
    inset: 0;
    z-index: -2;
    background: radial-gradient(circle at 20% 30%, rgba(172,129,250,0.12) 0%, transparent 40%),
                radial-gradient(circle at 80% 20%, rgba(158,255,0,0.08) 0%, transparent 40%),
                radial-gradient(circle at 40% 80%, rgba(0,119,255,0.1) 0%, transparent 40%),
                radial-gradient(circle at 70% 70%, rgba(127,250,171,0.08) 0%, transparent 40%),
                #020203;
    filter: blur(0px);
}

.noise {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* === PARTICLE CANVAS === */
#particleCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

/* === TYPOGRAPHY === */
.font-display {
    font-family: var(--font-display);
}
.font-mono-tech {
    font-family: var(--font-mono);
}

/* === GLASS SYSTEM === */
.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

.glass-player {
    background: rgba(5, 5, 8, 0.75);
    backdrop-filter: blur(24px) saturate(120%);
    -webkit-backdrop-filter: blur(24px) saturate(120%);
    border-top: 1px solid var(--theme-accent);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.9),
                0 -2px 20px var(--theme-glow);
    transition: border-color 0.6s ease, box-shadow 0.6s ease;
}

/* ========================================
   STATION OVERLAP SLIDER — FIXED
   ======================================== */

.station-slider {
  perspective: 1200px;
  user-select: none;
  -webkit-user-select: none;
}

.slider-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.slider-track {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === EINZELNE KARTE === */
.station-slide {
  position: absolute;
  width: 380px;
  max-width: 82vw;
  transition: all 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-style: preserve-3d;
  will-change: transform, opacity, filter;
  /* KEIN cursor:pointer auf allen — nur auf klickbaren */
}

.station-slide[data-pos="center"] {
  cursor: default; /* Button innerhalb ist klickbar */
}
.station-slide:not([data-pos="center"]) {
  cursor: pointer;
}

/* === CARD INNER — KEIN TRANSFORM HIER! === */
.station-card-inner {
  position: relative;
  width: 100%;
  height: 520px;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(0,0,0,0.55);
  transition: box-shadow 0.6s ease, border-color 0.6s ease;
  /* Wichtig: KEIN transform, KEIN translateY hier! */
}

/* === POSITIONS === */

.station-slide[data-pos="far-left"] {
  transform: translateX(-155%) translateZ(-300px) scale(0.6) rotateY(40deg);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  filter: brightness(0.3);
}

.station-slide[data-pos="left"] {
  transform: translateX(-85%) translateZ(-120px) scale(0.87) rotateY(22deg);
  opacity: 0.55;
  z-index: 4;
  pointer-events: auto;
  filter: brightness(0.6) saturate(0.85);
}
.station-slide[data-pos="left"]:hover {
  opacity: 0.75;
  filter: brightness(0.75) saturate(0.95);
}

.station-slide[data-pos="center"] {
  transform: translateX(0) translateZ(0) scale(1) rotateY(0);
  opacity: 1;
  z-index: 10;
  pointer-events: auto;
  filter: brightness(1);
}

.station-slide[data-pos="right"] {
  transform: translateX(85%) translateZ(-120px) scale(0.87) rotateY(-22deg);
  opacity: 0.55;
  z-index: 4;
  pointer-events: auto;
  filter: brightness(0.6) saturate(0.85);
}
.station-slide[data-pos="right"]:hover {
  opacity: 0.75;
  filter: brightness(0.75) saturate(0.95);
}

.station-slide[data-pos="far-right"] {
  transform: translateX(155%) translateZ(-300px) scale(0.6) rotateY(-40deg);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  filter: brightness(0.3);
}

/* === KARTEN-INHALT === */
.card-body {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0.6) 50%,
    rgba(0,0,0,0.92) 100%
  );
}

/* === CARD BACKGROUND LAYER === */
.card-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* === COVER IN DER KARTE === */
.card-cover-wrap {
  flex-shrink: 0;
}

.card-cover-img {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

/* === NAVIGATION === */

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(8,8,12,0.6);
  backdrop-filter: blur(16px);
  color: rgba(255,255,255,0.8);
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-arrow:hover {
  background: var(--theme-accent);
  color: #000;
  border-color: var(--theme-accent);
  box-shadow: 0 0 25px var(--theme-glow);
}

.slider-arrow.prev { left: 15px; }
.slider-arrow.next { right: 15px; }

/* Pfeil-Symbole per CSS für saubere Darstellung */
.slider-arrow.prev::after { content: '‹'; margin-top: -2px; }
.slider-arrow.next::after { content: '›'; margin-top: -2px; }

/* === DOTS === */
#sliderDots {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 20;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(8px);
}

#sliderDots button {
  width: 28px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.2);
  border: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
#sliderDots button:not(.active) {
  width: 8px;
}
#sliderDots button.active {
  background: #fff;
  box-shadow: 0 0 12px rgba(255,255,255,0.4);
}

#sliderDots button:hover:not(.active) {
  background: rgba(255,255,255,0.4);
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

@media (prefers-reduced-motion: reduce) {
    .marquee-content.is-scrolling,
    .text-gradient,
    .animate-float,
    .animate-float-delay {
        animation: none;
    }
}

/* === MOBILE === */
@media (max-width: 768px) {
  .station-slide {
    width: 320px;
  }

  .station-card-inner {
    height: 480px;
  }

  .station-slide[data-pos="left"] {
    transform: translateX(-60%) scale(0.8) rotateY(14deg);
    opacity: 0.45;
  }
  .station-slide[data-pos="right"] {
    transform: translateX(60%) scale(0.8) rotateY(-14deg);
    opacity: 0.45;
  }

  .slider-arrow {
    display: none;
  }

  #sliderDots {
    bottom: -40px;
  }
}

@media (max-width: 480px) {
  .station-slide[data-pos="left"],
  .station-slide[data-pos="right"] {
    opacity: 0.35;
  }
}

/* === EQUALIZER CANVAS === */
.eq-bar {
    transition: height 0.05s ease;
}

/* === MARQUEE === */
.marquee-wrap {
    overflow: hidden;
    white-space: nowrap;
    min-width: 0;                    /* ← wichtig für flex-1 Eltern! */
}
.marquee-content {
    display: inline-block;
    white-space: nowrap;
    /* KEINE Animation by default! */
}
.marquee-content.is-scrolling {
    animation: marquee 14s linear infinite;
}

@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* === ANIMATIONS === */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-float-delay { animation: float 7s ease-in-out infinite 1s; }

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

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #020203; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--theme-accent); }

/* === UTILITIES === */
.text-gradient {
    background-image: var(--gradient-stations);
    background-size: 300% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-move 8s linear infinite;
}
@keyframes gradient-move {
    0% { background-position: 0% center; }
    100% { background-position: 300% center; }
}

.station-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.station-btn.active {
    background-color: var(--theme-accent);
    color: #000;
    box-shadow: 0 0 15px var(--theme-glow);
    border-color: var(--theme-accent);
}

/* === RESPONSIVE PLAYER === */
@media (max-width: 768px) {
    .player-inner {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    .player-stations {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 0.25rem;
    }
    /* Links nimmt volle Breite oben */
    .player-inner > div:first-child {
        flex: 1 1 100%;
    }
}