/* ═══════════════════════════════════════════════════
   WELKIN — Design System & Global Styles
   Theme: Ethereal sky · Deep blue stratosphere · Clouds
   ═══════════════════════════════════════════════════ */

/* ── CSS Custom Properties ─────────────────────── */
:root {
  /* ── Brand Palette (from BRAND_GUIDELINES.md) ── */
  --clr-deep: #0b1e3d;
  /* Abyss Blue — dark bg */
  --clr-navy: #0a2d6e;
  /* Stratosphere Navy — primary deep */
  --clr-twilight: #163a6b;
  /* Twilight — cards / overlays */
  --clr-azure: #1e6cc7;
  /* Azure Sky — interactive */
  --clr-cerulean: #3a8fe0;
  /* Cerulean — highlights */
  --clr-daylight: #6cb4f0;
  /* Daylight Blue — accents */
  --clr-haze: #b8cbe4;
  /* Mist / Haze */
  --clr-horizon: #d6e5f5;
  /* Horizon glow */
  --clr-cirrus: #e8eff8;
  /* Cloud Light */
  --clr-cumulus: #f7faff;
  /* Cloud White */

  /* Dark‑mode semantic tokens */
  --bg-primary: var(--clr-deep);
  --bg-secondary: var(--clr-twilight);
  --bg-tertiary: var(--clr-navy);
  --text-primary: var(--clr-cumulus);
  --text-secondary: var(--clr-horizon);
  --text-muted: #8fa4c2;
  /* Nimbus */
  --accent: var(--clr-daylight);
  --accent-hover: var(--clr-cerulean);
  --border: rgba(255, 255, 255, 0.12);

  /* Gradients */
  --gradient-sky: linear-gradient(
    180deg,
    #0a2d6e 0%,
    #1e6cc7 40%,
    #6cb4f0 70%,
    #d6e5f5 100%
  );
  --gradient-deep: linear-gradient(
    180deg,
    #0b1e3d 0%,
    #0a2d6e 50%,
    #1e6cc7 100%
  );
  --gradient-glass: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(10, 45, 110, 0.06);
  --shadow-md: 0 4px 16px rgba(10, 45, 110, 0.1);
  --shadow-lg: 0 8px 32px rgba(10, 45, 110, 0.15);
  --shadow-xl: 0 16px 48px rgba(10, 45, 110, 0.2);
  --shadow-glow: 0 0 20px rgba(58, 143, 224, 0.35);

  /* Typography */
  --ff-base: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --fs-hero: clamp(2.8rem, 6vw, 5.2rem);
  --fs-h2: clamp(1.6rem, 3vw, 2.4rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 0.2s;
  --duration-normal: 0.4s;
  --duration-slow: 0.7s;
}

/* ── Reset ─────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--ff-base);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
}

/* --- Liquid Glass Scrollbar Styling --- */

/* 1. Set the width and height of the scrollbar */
::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

/* 2. Style the background track */
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
}

/* 3. Style the "Liquid Glass" thumb */
::-webkit-scrollbar-thumb {
  background: rgba(135, 206, 235, 0.4);
  /* Sky Blue at 40% opacity */
  backdrop-filter: blur(8px);
  /* The frosting effect */
  -webkit-backdrop-filter: blur(8px);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  /* Glass edge highlight */

  /* Inner glow for depth */
  box-shadow:
    inset 0 0 6px rgba(255, 255, 255, 0.5),
    inset 0 0 10px rgba(135, 206, 235, 0.2);
}

/* 4. Hover effect for interaction */
::-webkit-scrollbar-thumb:hover {
  background: rgba(135, 206, 235, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.8);
}

/* 5. Firefox Support (Simple version) */
@supports (scrollbar-width: thin) {
  * {
    scrollbar-width: thin;
    scrollbar-color: rgba(135, 206, 235, 0.5) transparent;
  }
}

/* ═══════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-lg);
  transition:
    background var(--duration-normal) var(--ease-out),
    backdrop-filter var(--duration-normal) var(--ease-out);
}

#navbar.scrolled {
  background: rgba(11, 30, 61, 0.35);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
  font-size: 1.5rem;
  font-weight: var(--fw-bold);
  letter-spacing: -0.5px;
  transition: opacity var(--duration-fast);
}

.logo:hover {
  opacity: 0.8;
}

.logo-dot {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
}

.nav-link {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  position: relative;
  padding: var(--space-xs) 0;
  transition: color var(--duration-fast);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--duration-normal) var(--ease-out);
}

.nav-link:hover,
.nav-link.active {
  color: var(--clr-cumulus);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ── Buttons ───────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  transition: all var(--duration-fast) var(--ease-out);
  cursor: pointer;
  white-space: nowrap;
}

.btn-icon {
  width: 16px;
  height: 16px;
}

.btn-accent {
  background: var(--accent);
  color: var(--clr-deep);
}

.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.btn-primary {
  background: var(--accent);
  color: var(--clr-deep);
  font-size: var(--fs-body);
  padding: 1rem 2rem;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(58, 143, 224, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--clr-cumulus);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  font-size: var(--fs-body);
  padding: 1rem 2rem;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ── Mobile Menu ───────────────────────────────── */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--clr-cumulus);
  border-radius: 2px;
  transition: all var(--duration-fast);
}

.mobile-menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ═══════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--gradient-deep);
}

/* ── Background / Video Container ──────────────── */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

#canvas-container {
  width: 100%;
  height: 100%;
  display: block;
}

/* Video background styles removed */

/* Gradient overlay to ensure text readability */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(
      ellipse 80% 70% at 50% 45%,
      transparent 0%,
      rgba(11, 30, 61, 0.5) 100%
    ),
    linear-gradient(
      to bottom,
      rgba(11, 30, 61, 0.2) 0%,
      transparent 25%,
      transparent 75%,
      rgba(11, 30, 61, 0.7) 100%
    );
  pointer-events: none;
}

/* ── Hero Content ──────────────────────────────── */
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 820px;
  padding: var(--space-xl) var(--space-md);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  /* Glassmorphism badge */
  background: rgba(247, 250, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  padding: 0.5rem 1.25rem;
  font-size: var(--fs-small);
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s var(--ease-out) 0.2s forwards;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(108, 180, 240, 0.6);
  animation: pulse 2s ease-in-out infinite;
}

.hero-heading {
  font-size: var(--fs-hero);
  font-weight: var(--fw-extrabold);
  line-height: 1.08;
  letter-spacing: -2.5px;
  color: var(--clr-cumulus);
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 30px rgba(10, 45, 110, 0.4);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.9s var(--ease-out) 0.4s forwards;
}

.hero-sub {
  font-size: clamp(0.95rem, 1.5vw, 1.125rem);
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto var(--space-lg);
  line-height: 1.7;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.9s var(--ease-out) 0.6s forwards;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.9s var(--ease-out) 0.8s forwards;
}

/* ── Scroll Indicator ──────────────────────────── */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 20px;
  height: 36px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  display: flex;
  justify-content: center;
  padding-top: 6px;
  opacity: 0;
  animation: fadeIn 1s var(--ease-out) 1.4s forwards;
}

.scroll-line {
  width: 2px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollBounce 2s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════ */
#footer {
  border-top: 1px solid var(--border);
  padding: var(--space-md) var(--space-lg);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  font-size: 1.2rem;
  font-weight: var(--fw-bold);
}

.footer-copy {
  font-size: var(--fs-small);
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════ */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Startup View Styles */
.startup-card {
  cursor: pointer;
  transition:
    transform 0.2s,
    opacity 0.2s;
  flex-shrink: 0;
}

.startup-card:hover {
  transform: translateY(-4px);
  opacity: 0.9;
}

.scroll-container {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 12px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  -ms-overflow-style: -ms-autohidingbar;
}

.scroll-container::-webkit-scrollbar {
  height: 8px;
}

.scroll-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.scroll-container::-webkit-scrollbar-thumb {
  background: rgba(135, 206, 235, 0.4);
  backdrop-filter: blur(4px);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.scroll-container::-webkit-scrollbar {
  height: 10px;
}

.scroll-container::-webkit-scrollbar-thumb:hover {
  background: rgba(135, 206, 235, 0.6);
}

.music-scroll-wrapper {
  max-width: 100%;
  width: 100%;
  position: relative;
  overflow: visible;
}

.music-results {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  -ms-overflow-style: -ms-autohidingbar;
}

.music-scroll-wrapper::-webkit-scrollbar,
.music-results::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.music-scroll-wrapper::-webkit-scrollbar-track,
.music-results::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.music-scroll-wrapper::-webkit-scrollbar-thumb,
.music-results::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.music-scroll-wrapper:hover::-webkit-scrollbar-thumb,
.music-results:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.5);
}

.music-scroll-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.music-scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(11, 30, 61, 0.9);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 24px;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.music-scroll-wrapper:hover .music-scroll-btn {
  opacity: 1;
}

.music-scroll-btn:hover {
  background: var(--accent);
  transform: translateY(-50%) scale(1.1);
}

.music-scroll-btn:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.9);
}

.music-scroll-btn.left {
  left: 5px;
}

.music-scroll-btn.right {
  right: 5px;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.85);
  }
}

@keyframes scrollBounce {
  0%,
  100% {
    transform: translateY(0);
    opacity: 1;
  }

  50% {
    transform: translateY(8px);
    opacity: 0.3;
  }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 768px) {
  #navbar {
    padding: var(--space-sm) var(--space-sm);
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background: rgba(11, 30, 61, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem var(--space-lg);
    gap: var(--space-md);
    transition: right var(--duration-normal) var(--ease-out);
    border-left: 1px solid var(--border);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-link {
    font-size: 1.1rem;
  }

  .btn-accent {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .hero-heading {
    letter-spacing: -1.5px;
  }

  .hero-ctas {
    flex-direction: column;
  }

  .btn-primary,
  .btn-outline {
    width: 100%;
    justify-content: center;
  }

  .footer-inner {
    flex-direction: column;
    gap: var(--space-xs);
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-heading {
    font-size: 2.2rem;
    letter-spacing: -1px;
  }
}

/* ═══════════════════════════════════════════════════
   PAGE TRANSITIONS
   ═══════════════════════════════════════════════════ */
@keyframes slideInFromLeft {
  0% {
    transform: translateX(-50px);
    opacity: 0;
  }

  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutToRight {
  0% {
    transform: translateX(0);
    opacity: 1;
  }

  100% {
    transform: translateX(50px);
    opacity: 0;
    filter: blur(4px);
  }
}

.page-transition-enter {
  animation: slideInFromLeft 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.page-transition-exit {
  animation: slideOutToRight 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* ═══════════════════════════════════════════════════
   MUSIC PLAYER POPUP
   ═══════════════════════════════════════════════════ */
.music-player-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 30, 61, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 20000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.music-player-overlay.open {
  display: flex;
  opacity: 1;
}

.music-player-card {
  width: 900px;
  height: 600px;
  max-width: 95vw;
  max-height: 90vh;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  display: flex;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  position: relative;
}

.music-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  color: white;
  font-size: 24px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.music-close-btn:hover {
  opacity: 1;
}

/* Left Panel: Current Song */
.music-left {
  flex: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.music-cover-large {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: spinCover 8s linear infinite;
  animation-play-state: paused;
  border: 4px solid rgba(255, 255, 255, 0.1);
}

.music-cover-large.spinning {
  animation-play-state: running;
}

.music-cover-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

@keyframes spinCover {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.music-song-title {
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
  text-align: center;
}

.music-song-artist {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
  text-align: center;
}

.music-controls {
  display: flex;
  align-items: center;
  gap: 24px;
}

.music-btn {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  opacity: 0.8;
  transition: all 0.2s;
}

.music-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.music-btn-play {
  width: 64px;
  height: 64px;
  background: var(--accent);
  border-radius: 50%;
  color: var(--clr-deep);
  box-shadow: 0 0 20px rgba(30, 108, 199, 0.4);
}

.music-btn-play:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 30px rgba(30, 108, 199, 0.6);
}

.music-progress-container {
  width: 100%;
  margin-top: 32px;
}

.music-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  transition: height 0.15s ease;
}

.music-progress-bar:hover {
  height: 10px;
}

.music-progress-current {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  width: 0%;
  pointer-events: none;
}

.music-time {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Right Panel: Search & Results */
.music-tabs {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.music-tab {
  padding: 8px 0;
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.music-tab.active {
  color: white;
}

.music-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

.music-view {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.music-view.active {
  display: flex;
}

#playlists-list-container,
#playlist-detail-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.music-right {
  flex: 1.2;
  padding: 30px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.music-search-container {
  position: relative;
  margin-bottom: 24px;
}

.music-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 12px 16px 12px 44px;
  color: white;
  font-family: inherit;
  outline: none;
}

.music-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.music-results {
  flex: 1;
  overflow-y: auto;
  padding-right: 10px;
}

.music-results::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.music-results::-webkit-scrollbar {
  width: 8px;
}

.music-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.music-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.music-item-img {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
}

.music-item-info {
  flex: 1;
}

.music-item-title {
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin-bottom: 2px;
}

.music-item-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════
   MOVIES HUB — TMDB + Vidking (Welkin brand / Cineby-style)
   ═══════════════════════════════════════════════════ */

.movies-hub {
  --mh-accent: var(--clr-azure);
  --mh-accent-hot: var(--clr-cerulean);
  --mh-glow: var(--clr-daylight);
  min-height: 100vh;
  background:
    radial-gradient(
      ellipse 120% 80% at 50% -20%,
      rgba(30, 108, 199, 0.35) 0%,
      transparent 55%
    ),
    linear-gradient(
      180deg,
      var(--clr-deep) 0%,
      #070f1f 45%,
      var(--clr-deep) 100%
    );
  color: var(--clr-cumulus);
  padding-bottom: var(--space-xl);
}

.movies-hub .logo-dot {
  color: var(--mh-glow);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.movies-config-error {
  margin: 0;
  padding: var(--space-sm) var(--space-lg);
  background: rgba(199, 48, 78, 0.2);
  border-bottom: 1px solid rgba(255, 120, 140, 0.35);
  color: #ffd6dc;
  font-size: var(--fs-small);
}

.movies-config-error a {
  color: var(--clr-daylight);
  text-decoration: underline;
}

.movies-config-error code {
  background: rgba(0, 0, 0, 0.25);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

/* Top nav */
.movies-topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
  padding: var(--space-sm) var(--space-lg);
  background: rgba(11, 30, 61, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.movies-brand {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: var(--clr-cumulus);
  white-space: nowrap;
}

.movies-topnav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.movies-topnav-links a {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--duration-fast);
}

.movies-topnav-links a:hover {
  color: var(--mh-glow);
}

.movies-search-wrap {
  position: relative;
  flex: 1 1 220px;
  min-width: 160px;
  max-width: 420px;
  margin-left: auto;
}

.movies-search-input {
  width: 100%;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(247, 250, 255, 0.08);
  color: var(--clr-cumulus);
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  transition:
    border-color var(--duration-fast),
    box-shadow var(--duration-fast);
}

.movies-search-input::placeholder {
  color: var(--text-muted);
}

.movies-search-input:focus {
  border-color: var(--mh-accent);
  box-shadow: 0 0 0 3px rgba(30, 108, 199, 0.25);
}

.movies-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 70vh;
  overflow-y: auto;
  background: rgba(22, 58, 107, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  padding: 0.5rem;
  z-index: 200;
}

.movies-search-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0.5rem 0.35rem 0.25rem;
}

.movies-search-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--clr-cumulus);
  font-size: 0.875rem;
  cursor: pointer;
  font-family: inherit;
}

.movies-search-item span {
  float: right;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.movies-search-item:hover {
  background: rgba(30, 108, 199, 0.35);
}

.movies-search-empty {
  padding: 0.75rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Hero */
.movies-hero {
  position: relative;
  min-height: min(72vh, 640px);
  display: flex;
  align-items: flex-end;
}

.movies-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  transition: opacity 0.5s ease;
}

.movies-hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(11, 30, 61, 0.97) 0%,
      rgba(11, 30, 61, 0.75) 42%,
      rgba(11, 30, 61, 0.25) 100%
    ),
    linear-gradient(0deg, var(--clr-deep) 0%, transparent 45%);
  pointer-events: none;
}

.movies-hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
}

.movies-hero-kicker {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--mh-glow);
  margin-bottom: 0.5rem;
  letter-spacing: 0.04em;
}

.movies-hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.movies-hero-overview {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--clr-horizon);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.movies-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: var(--space-md);
}

.movies-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition:
    transform var(--duration-fast),
    box-shadow var(--duration-fast),
    background var(--duration-fast);
}

.movies-btn-primary {
  background: linear-gradient(
    135deg,
    var(--clr-azure) 0%,
    var(--clr-cerulean) 100%
  );
  color: var(--clr-cumulus);
  box-shadow: 0 8px 24px rgba(30, 108, 199, 0.4);
}

.movies-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(58, 143, 224, 0.45);
}

.movies-btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--clr-cumulus);
  background: rgba(255, 255, 255, 0.06);
}

.movies-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.movies-hero-dots {
  display: flex;
  gap: 8px;
}

.movies-hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition:
    transform 0.2s,
    background 0.2s;
}

.movies-hero-dot.active {
  background: var(--mh-glow);
  transform: scale(1.25);
  box-shadow: 0 0 0 3px rgba(108, 180, 240, 0.35);
}

/* Main rows */
.movies-main {
  padding: 0 var(--space-lg);
  max-width: 1600px;
  margin: 0 auto;
}

.movies-row-section {
  margin-top: var(--space-xl);
}

.movies-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.movies-row-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.movies-tabs {
  display: flex;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px;
  border-radius: var(--radius-full);
}

.movies-tab {
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.movies-tab.active {
  background: var(--mh-accent);
  color: var(--clr-cumulus);
}

.movies-row-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.5rem 0 1rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(108, 180, 240, 0.45) transparent;
}

.movies-row-scroll::-webkit-scrollbar {
  height: 6px;
}

.movies-row-scroll::-webkit-scrollbar-thumb {
  background: rgba(108, 180, 240, 0.4);
  border-radius: 3px;
}

/* Top 10 strip */
.movies-top10 {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.5rem 0 1rem;
  scroll-snap-type: x mandatory;
}

.movies-top10-item {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: 120px;
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s;
}

.movies-top10-item:hover {
  transform: translateY(-4px);
}

.movies-top10-rank {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  font-size: 1.65rem;
  font-weight: 900;
  font-style: italic;
  color: var(--clr-cumulus);
  text-shadow: 0 2px 12px rgba(11, 30, 61, 0.9);
  pointer-events: none;
  line-height: 1;
}

.movies-top10-item img,
.movies-top10-ph {
  width: 120px;
  height: 180px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}

.movies-top10-ph {
  background: rgba(255, 255, 255, 0.08);
}

.movies-top10-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
  max-width: 120px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Cards */
.movies-card {
  flex: 0 0 150px;
  scroll-snap-align: start;
  cursor: pointer;
}

.movies-card-poster-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 0.5rem;
  box-shadow: var(--shadow-md);
}

.movies-card-poster {
  width: 150px;
  height: 225px;
  object-fit: cover;
  display: block;
  transition: transform 0.35s var(--ease-out);
}

.movies-card-poster--empty {
  background: rgba(255, 255, 255, 0.08);
}

.movies-card-hover {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(11, 30, 61, 0.9) 0%, transparent 55%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
}

.movies-card:hover .movies-card-hover {
  opacity: 1;
}

.movies-card:hover .movies-card-poster {
  transform: scale(1.05);
}

.movies-card-play {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--mh-accent);
  color: var(--clr-cumulus);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  padding-left: 3px;
  box-shadow: var(--shadow-glow);
}

.movies-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movies-card-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Genre chips */
.movies-genre-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-sm);
}

.movies-chip {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: var(--clr-horizon);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition:
    background 0.2s,
    border-color 0.2s;
}

.movies-chip:hover,
.movies-chip.active {
  background: rgba(30, 108, 199, 0.45);
  border-color: var(--mh-accent-hot);
  color: var(--clr-cumulus);
}

.movies-foot {
  margin-top: var(--space-2xl);
  padding: var(--space-lg) 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.movies-foot a {
  color: var(--mh-glow);
  text-decoration: underline;
}

/* Detail modal */
.movies-modal[hidden] {
  display: none !important;
}

.movies-modal {
  position: fixed;
  inset: 0;
  z-index: 25000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

.movies-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 15, 31, 0.85);
  backdrop-filter: blur(10px);
}

.movies-modal-panel {
  position: relative;
  width: min(880px, 100%);
  max-height: 90vh;
  overflow: hidden auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(22, 58, 107, 0.95);
  box-shadow: var(--shadow-xl);
}

.movies-modal-x {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: none;
  background: rgba(0, 0, 0, 0.35);
  color: var(--clr-cumulus);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.movies-modal-x:hover {
  background: rgba(30, 108, 199, 0.6);
}

.movies-modal-bg {
  height: 180px;
  background-size: cover;
  background-position: center;
  opacity: 0.55;
}

.movies-modal-body {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg) var(--space-lg);
  margin-top: -80px;
  position: relative;
}

.movies-modal-poster {
  width: 160px;
  height: 240px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: var(--shadow-xl);
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.movies-modal-copy {
  flex: 1 1 220px;
  min-width: 0;
}

.movies-modal-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.movies-modal-meta {
  font-size: 0.8rem;
  color: var(--mh-glow);
  margin-bottom: var(--space-sm);
}

.movies-modal-overview {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--clr-horizon);
  margin-bottom: var(--space-md);
}

.movies-modal-actions {
  display: flex;
  gap: 0.75rem;
}

/* Player */
.movies-player-modal .movies-player-shell {
  position: relative;
  width: min(960px, 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--clr-deep);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-xl);
}

.movies-player-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(11, 30, 61, 0.95);
  border-bottom: 1px solid var(--border);
  gap: 12px;
  min-height: 60px;
}

.movies-player-title {
  font-size: 1.1rem;
  font-weight: 700;
  padding-right: 1rem;
  flex-shrink: 0;
}

.server-switcher {
  flex: 1;
  max-width: 250px;
}

.server-select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: var(--clr-cumulus);
  font-family: "Inter", sans-serif;
  font-size: 13px;
  padding: 8px 32px 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  width: 100%;
}

.server-select:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.server-select:focus {
  outline: none;
  border-color: var(--clr-azure);
  box-shadow: 0 0 0 3px rgba(30, 108, 199, 0.15);
}

.server-select option {
  background: var(--clr-deep);
  color: var(--clr-cumulus);
}

.movies-modal-x {
  position: relative;
  right: 0;
  top: auto;
  flex-shrink: 0;
}

.movies-player-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.movies-player-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 640px) {
  .movies-modal-body {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .movies-modal-actions {
    justify-content: center;
  }
}

/* ═══════════════════════════════════════════════════
   PLAYLISTS & MUSIC WIDGET UI
   ═══════════════════════════════════════════════════ */
/* Sidebar Widget styling */
.sidebar-music-widget {
  background: rgba(30, 108, 199, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px;
  margin-top: auto;
  border-radius: 16px;
  margin: 16px;
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-md);
}

.sidebar-widget-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sw-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--clr-cumulus);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sw-artist {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.sw-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 4px;
  margin-bottom: 4px;
}

.sw-btn {
  background: none;
  border: none;
  color: var(--clr-cumulus);
  opacity: 0.8;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.2s,
    transform 0.2s;
}

.sw-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.sw-play {
  width: 32px;
  height: 32px;
}

.sw-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sw-time {
  font-size: 10px;
  color: var(--text-muted);
  min-width: 25px;
  text-align: center;
}

.sw-progress {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  cursor: pointer;
  overflow: hidden;
}

.sw-progress-fill {
  height: 100%;
  background: var(--clr-cumulus);
  border-radius: 2px;
  width: 0%;
}

.sw-right-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sw-vol {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
}

.sw-vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  background: var(--clr-cumulus);
  border-radius: 50%;
  cursor: pointer;
}

.sw-expand {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.sw-expand:hover {
  color: var(--clr-cumulus);
}

.music-tabs {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.music-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
  padding: 10px 0;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.music-tab:hover {
  color: var(--clr-cumulus);
}

.music-tab.active {
  color: var(--clr-cumulus);
}

.music-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

.music-view {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.music-view.active {
  display: flex;
}

.music-create-btn {
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: var(--clr-cumulus);
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 20px;
  transition: background 0.2s;
}

.music-create-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.music-back-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 16px;
  display: block;
  text-align: left;
  transition: color 0.2s;
}

.music-back-btn:hover {
  color: var(--clr-cumulus);
}

.music-item {
  position: relative;
}

.music-item-add {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition:
    opacity 0.2s,
    background 0.2s;
}

.music-item:hover .music-item-add {
  opacity: 1;
}

.music-item-add:hover {
  background: var(--accent);
}

.music-add-popup {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--clr-navy);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow-xl);
  z-index: 100;
  min-width: 160px;
}

.pl-option {
  padding: 10px 12px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 8px;
  font-weight: 500;
  transition: background 0.2s;
  color: var(--clr-cumulus);
}

.pl-option:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Playlist Layout */
.pl-header {
  display: flex;
  flex-direction: column;
  padding: 0 10px 20px;
  align-items: center;
  text-align: center;
}

.pl-cover {
  width: 240px;
  height: 240px;
  border-radius: 16px;
  object-fit: cover;
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
}

.pl-info {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pl-type {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.pl-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--clr-cumulus);
}

.pl-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 90%;
}

.pl-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.pl-like {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s;
}

.pl-like:hover {
  background: rgba(255, 255, 255, 0.2);
}

.pl-tracklist {
  margin-top: 10px;
  padding-bottom: 20px;
}

.pl-track {
  display: flex;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  gap: 16px;
  transition: background 0.2s;
  cursor: pointer;
}

.pl-track:hover {
  background: rgba(255, 255, 255, 0.05);
}

.pl-track-img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
}

.pl-track-info {
  flex: 1;
}

.pl-track-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--clr-cumulus);
}

.pl-track-artist {
  font-size: 13px;
  color: var(--text-muted);
}

.pl-track-dur {
  font-size: 13px;
  color: var(--text-muted);
}

.pl-track-rm {
  opacity: 0;
  color: #ff6b6b;
  cursor: pointer;
  font-size: 20px;
  padding: 4px;
  transition: opacity 0.2s;
}

.pl-track:hover .pl-track-rm {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════
   FLOATING MUSIC PLAYER CAPSULE
   ═══════════════════════════════════════════════════ */
.floating-player {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 700px;
  height: 80px;
  padding: 0 32px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  background: rgba(18, 18, 18, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  z-index: 99999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.floating-player.open {
  display: flex;
}

.floating-player.hidden {
  display: none;
}

/* Main Control Row */
.floating-player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Left Section: Album Art & Info */
.floating-player-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  flex: 1;
}

.floating-player-art {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-player-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.floating-player-art svg {
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, 0.3);
}

.floating-player-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.floating-player-title {
  color: white;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.floating-player-artist {
  color: #a1a1aa;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floating-player-shuffle {
  background: none;
  border: none;
  color: #22c55e;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-player-shuffle.inactive {
  color: #52525b;
}

.floating-player-shuffle.inactive:hover {
  color: white;
}

/* Center Section: Playback Controls */
.floating-player-center {
  display: flex;
  align-items: center;
  gap: 24px;
}

.floating-player-btn {
  background: none;
  border: none;
  color: #a1a1aa;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.floating-player-btn:hover {
  color: white;
}

.floating-player-btn svg {
  fill: currentColor;
}

.floating-player-play {
  width: 44px;
  height: 44px;
  background: white !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.floating-player-play:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.floating-player-play:active {
  transform: scale(0.98);
}

.floating-player-play svg {
  color: black;
  fill: black;
}

/* Right Section: Volume & Repeat */
.floating-player-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.floating-player-repeat {
  background: none;
  border: none;
  color: #a1a1aa;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-player-repeat:hover {
  color: white;
}

.floating-player-volume {
  display: flex;
  align-items: center;
  gap: 12px;
}

.floating-player-volume svg {
  color: #a1a1aa;
  flex-shrink: 0;
}

.floating-player-vol-slider {
  width: 80px;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  cursor: pointer;
  position: relative;
}

.floating-player-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  cursor: pointer;
}

.floating-player-vol-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

/* Bottom Section: Timeline Progress */
.floating-player-timeline {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.floating-player-time {
  color: #71717a;
  font-size: 11px;
  font-weight: 500;
  width: 32px;
  text-align: right;
  flex-shrink: 0;
}

.floating-player-progress {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.floating-player-progress-fill {
  height: 100%;
  background: white;
  border-radius: 9999px;
  transition: background 0.2s;
}

.floating-player-progress:hover .floating-player-progress-fill {
  background: #22c55e;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .floating-player {
    bottom: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 12px 16px;
    height: auto;
  }

  .floating-player-row {
    gap: 12px;
  }

  .floating-player-left {
    gap: 10px;
    flex: 0 0 auto;
  }

  .floating-player-art {
    width: 40px;
    height: 40px;
  }

  .floating-player-info {
    display: none;
  }

  .floating-player-shuffle,
  .floating-player-repeat,
  .floating-player-volume {
    display: none;
  }

  .floating-player-center {
    gap: 16px;
  }

  .floating-player-play {
    width: 40px;
    height: 40px;
  }

  .floating-player-timeline {
    margin-top: 4px;
  }
}

/* ── Server Switcher ─────────────────────────── */
.server-switcher {
  position: relative;
  margin-left: 12px;
}

.server-select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: var(--clr-cumulus);
  font-family: "Inter", sans-serif;
  font-size: 13px;
  padding: 8px 32px 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.server-select:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.server-select:focus {
  outline: none;
  border-color: var(--clr-azure);
  box-shadow: 0 0 0 3px rgba(30, 108, 199, 0.15);
}

.server-select option {
  background: var(--clr-deep);
  color: var(--clr-cumulus);
}

.episode-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  flex-wrap: wrap;
}

.episode-selector label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
}

.episode-selector select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: var(--clr-cumulus);
  font-family: "Inter", sans-serif;
  font-size: 13px;
  padding: 6px 28px 6px 10px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23ffffff' d='M5 6L1 2h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.episode-selector select:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.movies-player-info {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  line-height: 1.4;
  max-height: 60px;
  overflow-y: auto;
  margin: 8px 0;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

@media (max-width: 640px) {
  .episode-selector {
    gap: 6px;
  }
  .movies-player-info {
    max-height: 40px;
    font-size: 12px;
  }
}

.season-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.season-tab {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.8);
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.season-tab:hover {
  background: rgba(255, 255, 255, 0.12);
}

.season-tab.active {
  background: var(--clr-azure);
  border-color: var(--clr-azure);
  color: white;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  margin: 8px 0;
}

.episode-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.episode-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.episode-card.active {
  border-color: var(--clr-azure);
  background: rgba(30, 108, 199, 0.2);
}

.ep-num {
  font-weight: 600;
  font-size: 12px;
  color: var(--clr-azure);
}

.ep-name {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin: 4px 0;
}

.ep-overview {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.3;
}

.ep-loading, .ep-error {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  padding: 12px;
  text-align: center;
}

.movies-player-info {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  line-height: 1.4;
  max-height: 60px;
  overflow-y: auto;
  margin: 8px 0;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

@media (max-width: 640px) {
  .episode-grid {
    grid-template-columns: 1fr;
    max-height: 150px;
  }
}

.movies-player-info.faded {
  max-height: 36px;
  overflow: hidden;
  transition: max-height 0.3s ease;
  cursor: pointer;
  position: relative;
}

.movies-player-info.faded::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  pointer-events: none;
}

.movies-player-info.faded:hover,
.movies-player-info.faded.expanded {
  max-height: 200px;
}

.movies-player-info.faded:hover::after,
.movies-player-info.faded.expanded::after {
  display: none;
}
