/* ============================================
   BEARDFLIX 2.0 — Custom Streaming Platform
   Premium Dark Cinema Design
   ============================================ */

:root {
  /* Core palette */
  --bg-deep: #050508;
  --bg-primary: #0b0b10;
  --bg-surface: #111118;
  --bg-card: #15151f;
  --bg-elevated: #1c1c28;
  --bg-hover: #222233;

  /* Accent — warm amber gold */
  --accent: #d4a017;
  --accent-light: #f0c040;
  --accent-dark: #b8860b;
  --accent-glow: rgba(212, 160, 23, 0.25);
  --accent-subtle: rgba(212, 160, 23, 0.08);

  /* Semantic */
  --live-red: #e63946;
  --live-glow: rgba(230, 57, 70, 0.3);
  --twitch: #9146ff;
  --youtube: #ff0033;
  --success: #2ecc71;
  --offline: #555;

  /* Text */
  --text-100: #ffffff;
  --text-200: #e0e0e6;
  --text-300: #a0a0b0;
  --text-400: #707080;
  --text-500: #50505e;

  /* Borders & Shadows */
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(212, 160, 23, 0.2);
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.4);
  --shadow-lg: 0 16px 50px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 40px rgba(212, 160, 23, 0.1);

  /* Layout */
  --nav-h: 64px;
  --radius: 8px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Fonts */
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --tr: all 0.3s var(--ease);
}

/* === RESET === */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-200);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
img { max-width: 100%; display: block; }
input { font-family: inherit; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: #2a2a3a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a4a; }

/* === LOADING SCREEN === */
.loading-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg-deep);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
.loading-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-content { text-align: center; }
.loading-icon {
  width: 60px; height: 60px; margin: 0 auto 1.5rem;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #000;
  animation: loadPulse 1.5s ease-in-out infinite;
}
@keyframes loadPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { transform: scale(1.1); box-shadow: 0 0 0 20px transparent; }
}
.loading-logo { margin-bottom: 2rem; }
.loading-logo .logo-text { font-family: var(--font-display); font-size: 3rem; letter-spacing: 4px; }
.loading-bar { width: 180px; height: 2px; background: rgba(255,255,255,0.06); border-radius: 2px; margin: 0 auto; overflow: hidden; }
.loading-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-light)); animation: loadFill 1.8s ease forwards; }
@keyframes loadFill { from { width: 0; } to { width: 100%; } }

/* === LOGO === */
.logo-text {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 3px;
  color: var(--text-100);
}
.accent { color: var(--accent); }
.logo .logo-text {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.35rem;
}
.logo .logo-beta {
  font-family: var(--font-body);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: rgba(201,169,97,.95);
  border: 1px solid rgba(201,169,97,.45);
  border-radius: 999px;
  padding: 0.08rem 0.32rem;
  line-height: 1.2;
  transform: translateY(-0.1rem);
}
.navbar-beta-mobile {
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: rgba(201,169,97,.95);
  background: rgba(20,16,32,.82);
  border: 1px solid rgba(201,169,97,.42);
  border-radius: 999px;
  padding: 0.16rem 0.4rem;
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10005;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}
.beta-trigger {
  cursor: pointer;
}
@media (max-width: 768px) {
  .navbar-beta-mobile {
    display: inline-flex;
  }
}
@media (orientation: landscape) and (max-height: 520px) and (max-width: 950px) {
  .navbar-beta-mobile {
    top: calc(env(safe-area-inset-top, 0px) + 6px);
    left: 50%;
    transform: translateX(-50%);
  }
}

/* === NAVBAR === */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h);
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
  transition: var(--tr);
}
.navbar.scrolled { background: rgba(5, 5, 8, 0.97); box-shadow: var(--shadow-md); }

.nav-left { display: flex; align-items: center; gap: 2.5rem; }
.logo {
  display: flex; align-items: center; gap: 0.6rem;
  transition: var(--tr);
}
.logo:hover { transform: scale(1.03); }
.logo-icon {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; color: #000;
}

.nav-links { display: flex; gap: 0.25rem; }
.nav-link {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem; border-radius: var(--radius);
  font-size: 0.88rem; font-weight: 500;
  color: var(--text-400);
  transition: var(--tr);
  position: relative;
}
.nav-link:hover { color: var(--text-200); background: rgba(255,255,255,0.04); }
.nav-link.active { color: var(--accent); background: var(--accent-subtle); }
.nav-link i { font-size: 0.9rem; }

.live-indicator {
  display: none;
  width: 7px; height: 7px;
  background: var(--live-red);
  border-radius: 50%;
  animation: blink 1.5s ease-in-out infinite;
}
.live-indicator.active { display: block; }
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0.3; } }

.nav-right { display: flex; align-items: center; gap: 1rem; }

.stream-status {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  transition: var(--tr);
}
.status-dot.offline { background: var(--offline); }
.status-dot.live { background: var(--live-red); animation: blink 1.5s ease-in-out infinite; }
.status-text { color: var(--text-400); }

.social-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  transition: var(--tr);
}
.social-btn.twitch:hover { background: var(--twitch); color: #fff; border-color: var(--twitch); }
.social-btn.youtube:hover { background: var(--youtube); color: #fff; border-color: var(--youtube); }

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.75rem 1.6rem; border-radius: var(--radius);
  font-size: 0.92rem; font-weight: 600;
  transition: var(--tr);
}
.btn-glow {
  background: var(--accent);
  color: #000;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-glow:hover { background: var(--accent-light); transform: translateY(-2px); box-shadow: 0 8px 30px var(--accent-glow); }
.btn-glass {
  background: rgba(255,255,255,0.028);
  color: var(--text-200);
  border: 1px solid var(--border-hover);
  backdrop-filter: blur(10px);
}
.btn-glass:hover { background: rgba(255,255,255,0.056); transform: translateY(-2px); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.82rem; }
.btn-twitch { background: var(--twitch); color: #fff; }
.btn-twitch:hover { filter: brightness(1.2); transform: translateY(-2px); }

/* === PAGES === */
.content { padding-top: var(--nav-h); min-height: 100vh; }
.page { display: none; opacity: 0; animation: none; }
.page.active { display: block; opacity: 1; animation: pageIn 0.4s var(--ease); }
@keyframes pageIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

/* === HERO === */
.hero {
  position: relative; min-height: 80vh;
  display: flex; align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 30% 40%, rgba(212, 160, 23, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 70% 30%, rgba(145, 70, 255, 0.04) 0%, transparent 60%),
    linear-gradient(135deg, #08080d 0%, #0e0e1a 40%, #12101e 70%, #08080d 100%);
}
.hero-gradient {
  position: absolute; bottom: 0; left: 0; right: 0; height: 50%;
  background: linear-gradient(to top, var(--bg-deep), transparent);
}
.hero-particles {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(212,160,23,0.3), transparent),
    radial-gradient(1px 1px at 30% 60%, rgba(255,255,255,0.15), transparent),
    radial-gradient(1px 1px at 50% 10%, rgba(212,160,23,0.2), transparent),
    radial-gradient(1px 1px at 70% 80%, rgba(255,255,255,0.1), transparent),
    radial-gradient(1px 1px at 90% 30%, rgba(212,160,23,0.25), transparent),
    radial-gradient(1.5px 1.5px at 20% 90%, rgba(145,70,255,0.2), transparent),
    radial-gradient(1px 1px at 60% 40%, rgba(255,255,255,0.1), transparent),
    radial-gradient(1px 1px at 80% 70%, rgba(212,160,23,0.15), transparent);
  animation: drift 20s ease-in-out infinite alternate;
}
@keyframes drift {
  0% { transform: translateY(0) translateX(0); }
  100% { transform: translateY(-15px) translateX(10px); }
}

.hero-inner {
  position: relative; z-index: 2;
  padding: 0 5%;
  max-width: 700px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.3rem 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 2px; color: var(--text-400);
  margin-bottom: 1.5rem;
}
.badge-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.hero-title { margin-bottom: 1.2rem; line-height: 1; }
.title-line {
  display: block;
  font-size: 1.2rem; font-weight: 400;
  color: var(--text-300);
  letter-spacing: 1px;
  margin-bottom: 0.3rem;
}
.title-main {
  display: block;
  font-family: var(--font-display);
  font-size: 5.5rem;
  letter-spacing: 6px;
  color: var(--text-100);
}
.hero-desc {
  font-size: 1.1rem; color: var(--text-300);
  max-width: 480px; margin-bottom: 2rem;
  line-height: 1.7;
}
.hero-buttons { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 2.5rem; }

.hero-stream-card {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.5rem;
  padding: 0.8rem 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.stream-card-status {
  display: flex; align-items: center; gap: 0.5rem;
}
.sc-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--offline);
  transition: var(--tr);
}
.sc-dot.live { background: var(--live-red); animation: blink 1.5s ease-in-out infinite; }
.sc-label { font-size: 0.85rem; font-weight: 600; color: var(--text-300); }
.stream-card-info {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  color: var(--text-400);
  font-variant-numeric: tabular-nums;
}
.stream-card-lastlive {
  flex-basis: 100%; font-size: 0.72rem; color: var(--text-400); opacity: 0.7;
  white-space: nowrap;
}

/* === SECTIONS === */
.section { padding: 2rem 4% 3rem; }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem;
}
.section-title { display: flex; align-items: center; gap: 0.8rem; }
.section-icon {
  width: 36px; height: 36px;
  background: var(--accent-subtle);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 0.9rem;
}
.section-icon.live-pulse { animation: blink 1.5s ease-in-out infinite; }
.section-title h2 { font-size: 1.3rem; font-weight: 700; color: var(--text-100); }
.section-link {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.85rem; font-weight: 600;
  color: var(--accent); transition: var(--tr);
}
.section-link:hover { gap: 0.7rem; color: var(--accent-light); }

/* === LIVE PREVIEW CARD === */
.live-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  background: #000;
  aspect-ratio: 16/9;
  border: 1px solid var(--border);
  transition: var(--tr);
}
.live-card:hover { border-color: var(--border-accent); box-shadow: var(--shadow-glow); }
.live-card-player { width: 100%; height: 100%; }
.live-card-player video { width: 100%; height: 100%; object-fit: cover; }
.live-card-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.3);
  transition: var(--tr);
  /* Klicks zurueck an den Player: sonst liegt die Schicht ueber YT-iframe → keine Steuerleiste/Vollbild */
  pointer-events: none;
}
.live-card-overlay .live-tag,
.live-card-overlay .live-fullscreen-btn,
.live-card-overlay .home-preview-mute-btn,
.live-card-overlay .play-big {
  pointer-events: auto;
}
.live-card:hover .live-card-overlay { background: rgba(0,0,0,0.15); }
/* YouTube-Embed: grosser Play-Button verdeckt Mitte; YT hat eigene Controls */
#livePreviewSection .live-card:has(#homeReplayIframe) .play-big {
  display: none;
}
#livePreviewSection .live-card:has(#homeReplayIframe) .live-card-overlay {
  background: transparent;
}
#livePreviewSection .live-card:has(#homeReplayIframe):hover .live-card-overlay {
  background: rgba(0,0,0,0.06);
}
.live-tag {
  position: absolute; top: 0.5rem; left: 0.5rem;
  display: flex; align-items: center; gap: 0.2rem;
  background: var(--live-red);
  padding: 0.12rem 0.4rem; border-radius: 3px;
  font-size: 0.36rem; font-weight: 700; letter-spacing: 0.5px; color: #fff;
}
.live-tag-dot { width: 3px; height: 3px; background: #fff; border-radius: 50%; }

.home-replay-badge {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.2rem 0.48rem;
  border-radius: 999px;
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(0,0,0,0.38);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  pointer-events: none;
}
.home-replay-badge-dot { width: 4px; height: 4px; border-radius: 50%; background: #fff; }
.home-replay-badge.is-live {
  background: rgba(230,57,70,0.9);
  border-color: rgba(255,255,255,0.36);
  font-size: 0.32rem;
  padding: 0.1rem 0.28rem;
  gap: 0.16rem;
}
.home-replay-badge.is-live .home-replay-badge-dot { width: 2px; height: 2px; }
.home-replay-badge.is-replay {
  background: rgba(24,24,34,0.78);
  border-color: rgba(212,160,23,0.55);
}
/* Roter Balken hinter REPLAY 24/7 ausblenden – live-tag nur bei LIVE anzeigen */
#livePreviewSection.is-replay .live-tag { display: none; }
.replay-now-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.04rem;
  max-width: min(96vw, 920px);
  margin-top: 0.04rem;
  text-align: left;
}
.replay-now-banner-inner {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.7rem;
  width: 100%;
}
.replay-banner-logo-mini {
  width: 3.3rem;
  height: 3.3rem;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: 0.06rem;
  opacity: 0.88;
}
.replay-now-banner-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: inherit;
  min-width: 0;
  flex: 1;
}
.replay-now-stack .replay-now-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-400);
  opacity: 0.75;
  margin-top: 0.04rem;
}
.replay-now-stack .replay-now-label:first-child { margin-top: 0; }
.replay-now-stack .replay-now-head {
  font-size: 0.96rem !important;
  font-weight: 700;
  color: var(--text-100);
  line-height: 1.1;
  word-break: break-word;
  white-space: pre-line;
}
.replay-now-stack .replay-now-sub {
  font-size: 0.88rem !important;
  font-weight: 500;
  color: var(--text-300);
  line-height: 1.1;
  word-break: break-word;
  white-space: pre-line;
}
/* Live: gleiche Struktur wie Replay (Titel + Aktuelles Video sichtbar) */
.replay-now-stack.is-live-mode .replay-now-label:nth-of-type(1) { margin-top: 0; }
.replay-now-stack.is-live-mode .replay-banner-logo-mini { display: none; }
.replay-now-text {
  display: inline-block;
  max-width: min(30vw, 280px);
  padding: 0.08rem 0.24rem;
  border-radius: 6px;
  font-size: 0.56rem !important;
  font-weight: 600;
  color: var(--text-400);
  line-height: 1.3;
  white-space: pre-line;
}
.hero-stream-card.is-live .replay-now-text,
.hero-stream-card .replay-now-text {
  font-size: 1.64rem !important;
  padding: 0.08rem 0.24rem;
  max-width: min(50vw, 320px);
}

.live-fullscreen-btn {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 2;
  transition: var(--tr);
}
.live-fullscreen-btn:hover {
  background: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.38);
}
.home-preview-mute-btn {
  position: absolute;
  bottom: 1rem;
  right: 3.5rem;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 2;
  transition: var(--tr);
}
.home-preview-mute-btn:hover {
  background: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.38);
}
.play-big {
  width: 70px; height: 70px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #000;
  transition: var(--tr);
  box-shadow: 0 8px 30px var(--accent-glow);
}
.live-card:hover .play-big { transform: scale(1.1); }

/* === CAROUSEL === */
.carousel { position: relative; }
.carousel-track {
  display: flex; gap: 1rem;
  overflow-x: auto; scroll-behavior: smooth;
  padding: 0.5rem 0 1rem;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; color: var(--text-300);
  z-index: 5; transition: var(--tr);
  opacity: 0;
}
.carousel:hover .carousel-btn { opacity: 1; }
.carousel-btn:hover { background: var(--accent); color: #000; border-color: var(--accent); }
.carousel-prev { left: -8px; }
.carousel-next { right: -8px; }

/* === VIDEO CARD === */
.vid-card {
  flex: 0 0 280px;
  background: var(--bg-card);
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(201,169,97,0.2);
  transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
  position: relative;
}
.vid-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(201,169,97,0.45);
  box-shadow:
    0 0 12px rgba(145,70,255,0.25),
    0 0 25px rgba(201,169,97,0.12),
    inset 0 0 8px rgba(145,70,255,0.08);
  z-index: 10;
}
.vid-card::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  border: 1px solid rgba(145,70,255,0.08);
  border-radius: 5px;
  box-shadow: 0 0 12px rgba(0,0,0,0.3);
  z-index: 3;
}

/* Corner dots */
.vid-card .card-dot {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: rgba(201,169,97,0.3);
  z-index: 5;
  transition: background 0.4s ease;
}
.vid-card:hover .card-dot { background: rgba(201,169,97,0.6); }
.vid-card .card-dot.tl { top: 6px; left: 6px; }
.vid-card .card-dot.tr { top: 6px; right: 6px; }
.vid-card .card-dot.bl { bottom: 6px; left: 6px; }
.vid-card .card-dot.br { bottom: 6px; right: 6px; }

/* Card shine sweep */
.vid-card .card-shine {
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  z-index: 4; pointer-events: none;
  background: linear-gradient(105deg,
    transparent 40%,
    rgba(255,255,255,0.04) 45%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 55%,
    transparent 60%
  );
  animation: cardShineSweep var(--csd, 8s) var(--csdelay, 0s) ease-in-out infinite;
}
@keyframes cardShineSweep {
  0%, 70% { left: -100%; }
  100% { left: 200%; }
}

.vid-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(145,70,255,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 60%, rgba(201,169,97,0.04) 0%, transparent 50%),
    linear-gradient(170deg, rgb(18,10,35) 0%, rgb(25,14,45) 30%, rgb(20,12,38) 70%, rgb(10,5,25) 100%);
  overflow: hidden;
}
.vid-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.vid-card:hover .vid-thumb img { transform: scale(1.08); }
.vid-duration {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.85);
  padding: 0.15rem 0.5rem; border-radius: 3px;
  font-size: 0.72rem; font-weight: 600; color: var(--text-100);
  z-index: 2;
}
.vid-play-icon {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 48px; height: 48px;
  background: linear-gradient(135deg, rgba(201,169,97,1), rgba(255,225,150,1) 30%, rgba(201,169,97,1) 55%, rgba(170,130,60,1));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #000;
  transition: transform 0.3s var(--ease);
  box-shadow: 0 0 20px rgba(201,169,97,0.3);
  z-index: 4;
}
.vid-card:hover .vid-play-icon { transform: translate(-50%, -50%) scale(1); }

/* Card progress bar */
.vid-card .card-progress {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; z-index: 4;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.vid-card .card-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(200,35,45,0.9), rgba(200,35,45,0.7));
  box-shadow: 0 0 6px rgba(200,35,45,0.4);
}

.vid-info { padding: 0.9rem 1rem; }
.vid-title {
  font-size: 0.9rem; font-weight: 600; color: var(--text-100);
  line-height: 1.4; margin-bottom: 0.35rem;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.vid-meta {
  display: flex; gap: 0.8rem;
  font-size: 0.76rem; color: var(--text-400);
}
.vid-meta span { display: flex; align-items: center; gap: 0.3rem; }

/* === LIVE PAGE === */
.live-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  height: calc(100vh - var(--nav-h));
}
.live-main { display: flex; flex-direction: column; background: #000; }

/* Player */
.player-wrapper {
  flex: 1; min-height: 0;
  position: relative; background: #000;
  overflow: hidden;
}
.player-video {
  width: 100%; height: 100%;
  object-fit: cover;
  background: #000;
}
.player-fullscreen-btn {
  position: absolute;
  bottom: 0.8rem;
  right: 0.8rem;
  z-index: 7;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.player-fullscreen-btn:hover {
  background: rgba(0, 0, 0, 0.78);
  border-color: rgba(255, 255, 255, 0.52);
}
.player-fullscreen-btn i { font-size: 0.85rem; }
.player-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  transition: var(--tr);
}
.player-offline {
  text-align: center; padding: 2rem;
}
.offline-icon {
  width: 80px; height: 80px; margin: 0 auto 1.5rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--accent);
  opacity: 0.6;
}
.player-offline h2 { font-size: 1.5rem; color: var(--text-200); margin-bottom: 0.5rem; }
.player-offline p { font-size: 0.9rem; color: var(--text-400); margin-bottom: 2rem; }
.offline-info {
  display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap;
}
.offline-info-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.8rem 1.2rem;
  text-align: left;
}
.offline-info-item .label {
  display: block; font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-400); margin-bottom: 0.3rem;
}
.offline-info-item code {
  font-size: 0.85rem; color: var(--accent);
  font-family: 'Courier New', monospace;
}

/* Player Controls */
.player-controls {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  opacity: 0; transition: opacity 0.3s ease;
}
.player-wrapper:hover .player-controls { opacity: 1; }
.controls-left, .controls-right { display: flex; align-items: center; gap: 0.8rem; }
.ctrl-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  font-size: 0.9rem; color: var(--text-200);
  transition: var(--tr);
}
.ctrl-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-100); }
.volume-slider {
  width: 80px; height: 4px;
  -webkit-appearance: none;
  background: rgba(255,255,255,0.2);
  border-radius: 4px; outline: none;
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
}
.live-badge-ctrl {
  display: flex; align-items: center; gap: 0.2rem;
  background: var(--live-red);
  padding: 0.1rem 0.4rem; border-radius: 3px;
  font-size: 0.36rem; font-weight: 700; letter-spacing: 0.5px;
}
.live-badge-dot { width: 3px; height: 3px; background: #fff; border-radius: 50%; }
.uptime { font-size: 0.8rem; color: var(--text-300); font-variant-numeric: tabular-nums; }

/* Stream Info Panel */
.stream-info-panel {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 1.2rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}
.streamer-profile { display: flex; align-items: center; gap: 0.8rem; }
.avatar {
  width: 42px; height: 42px;
  background: transparent;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 1.2rem; color: #000; font-weight: 700;
  overflow: hidden;
}
.streamer-details h3 { font-size: 1rem !important; font-weight: 700; color: var(--text-100); }
.streamer-status { font-size: 0.88rem !important; color: var(--text-400); }
.stream-actions { display: flex; align-items: center; gap: 0.6rem; }
.modal-replay-now-text,
.stream-info-panel .replay-now-text {
  font-size: 1.68rem !important;
  max-width: min(50vw, 520px);
}
.stream-info-panel .stream-actions {
  justify-content: flex-end;
}
.stream-info-panel .btn-twitch { display: none !important; }

/* Sidebar / Chat */
.live-sidebar {
  display: flex; flex-direction: column;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
}
.sidebar-header {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-header h3 {
  font-size: 0.9rem; font-weight: 700;
  display: flex; align-items: center; gap: 0.5rem;
  color: var(--text-200);
}
.sidebar-header h3 i { color: var(--accent); }
.chat-area {
  flex: 1; overflow-y: auto;
  padding: 1rem;
}
.chat-placeholder {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  height: 100%; text-align: center;
  color: var(--text-500);
}
.chat-placeholder i { font-size: 2rem; margin-bottom: 0.8rem; opacity: 0.4; }
.chat-placeholder p { font-size: 0.82rem; }
.chat-msg {
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
  line-height: 1.4;
}
.chat-avatar,
.chat-avatar-letter {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-right: 6px;
  flex: 0 0 18px;
}
.chat-avatar {
  object-fit: cover;
}
.chat-avatar-logo {
  background: transparent;
}
.chat-avatar-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #d1d5db;
  background: rgba(148, 163, 184, 0.2);
}
.chat-msg .chat-user { color: var(--accent); font-weight: 600; }
.chat-msg .chat-text { color: var(--text-200); }
.chat-platform-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  margin-right: 6px;
  font-size: 11px;
  border: 1px solid var(--border);
  color: var(--text-200);
  background: rgba(255,255,255,0.04);
}
.chat-platform-logo {
  width: 14px;
  height: 14px;
  object-fit: contain;
  border-radius: 3px;
}
.chat-platform-twitch { color: #c4b5fd; border-color: rgba(168,85,247,0.55); background: rgba(124,58,237,0.22); }
.chat-platform-youtube { color: #fecaca; border-color: rgba(239,68,68,0.55); background: rgba(185,28,28,0.2); }
.chat-platform-tiktok { color: #fbcfe8; border-color: rgba(236,72,153,0.55); background: rgba(190,24,93,0.22); }
.chat-platform-beardflix { color: #bfdbfe; border-color: rgba(59,130,246,0.55); background: rgba(30,64,175,0.2); }
.chat-platform-icon.chat-platform-beardflix {
  border-color: transparent;
  background: transparent;
}
.chat-role-markers {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 6px;
}
.chat-role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
}
.chat-role-badge.role-sub { color: #fde68a; border-color: rgba(251,191,36,0.6); background: rgba(217,119,6,0.22); }
.chat-role-badge.role-mod { color: #bbf7d0; border-color: rgba(74,222,128,0.6); background: rgba(22,163,74,0.22); }
.chat-role-badge.role-owner { color: #ddd6fe; border-color: rgba(196,181,253,0.65); background: rgba(124,58,237,0.22); }
.chat-input-area {
  display: flex; gap: 0.5rem;
  padding: 0.8rem;
  border-top: 1px solid var(--border);
}
.chat-input {
  flex: 1; padding: 0.55rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-200);
  font-size: 0.85rem;
  outline: none;
  transition: var(--tr);
}
.chat-input:focus { border-color: var(--accent); }
.chat-send {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: #000; font-size: 0.85rem;
  transition: var(--tr);
}
.chat-send:hover { background: var(--accent-light); }

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

/* === VIDEOS PAGE === */
.videos-page-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 2.5rem 4% 1.5rem;
  flex-wrap: wrap; gap: 1rem;
}
.vph-left h1 {
  font-size: 1.8rem; font-weight: 800;
  display: flex; align-items: center; gap: 0.6rem;
  color: var(--text-100);
}
.vph-left h1 i { color: var(--accent); font-size: 1.4rem; }
.vph-left p { font-size: 0.9rem; color: var(--text-400); margin-top: 0.2rem; }
.vph-right { display: flex; align-items: center; gap: 1rem; }
.filter-group { display: flex; gap: 0.3rem; }
.filter {
  padding: 0.45rem 1.1rem;
  border-radius: 20px; font-size: 0.82rem; font-weight: 600;
  color: var(--text-400);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  transition: var(--tr);
}
.filter:hover { color: var(--text-200); background: rgba(255,255,255,0.06); }
.filter.active { background: var(--accent); color: #000; border-color: var(--accent); }
.search-box {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 1rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: var(--tr);
}
.search-box:focus-within { border-color: var(--accent); }
.search-box i { color: var(--text-400); font-size: 0.85rem; }
.search-box input {
  background: transparent; border: none; outline: none;
  color: var(--text-200); font-size: 0.85rem;
  width: 160px;
}
.search-box input::placeholder { color: var(--text-500); }

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
  padding: 0 4% 2rem;
}
.videos-grid .vid-card { flex: none; width: 100%; }
.load-more { text-align: center; padding: 0 4% 3rem; }

/* === MODAL === */
.modal {
  position: fixed; inset: 0; z-index: 13000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: var(--tr);
}
.modal.active { opacity: 1; visibility: visible; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0);
  backdrop-filter: blur(8px);
}
.modal-content {
  position: relative; z-index: 1;
  width: 90%; max-width: 960px;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: none;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.4s var(--ease);
}
.modal.active .modal-content { transform: scale(1) translateY(0); }
.modal-close {
  position: absolute; top: 1rem; right: 1rem; z-index: 5;
  width: 40px; height: 40px;
  background: rgba(0,0,0,0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-200); font-size: 1rem;
  transition: var(--tr);
}
.modal-close:hover { background: var(--accent); color: #000; transform: rotate(90deg); }
.modal-player { aspect-ratio: 16/9; background: #000; }
.modal-player iframe { width: 100%; height: 100%; border: none; }
.modal-info { padding: 1.5rem 2rem 2rem; }
.modal-info h2 { font-size: 1.3rem; font-weight: 700; color: var(--text-100); margin-bottom: 0.5rem; }
.modal.pwa-video-fullscreen .modal-wrap {
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  margin: 0 !important;
}
.modal.pwa-video-fullscreen .modal-content {
  border-radius: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
}
.modal.pwa-video-fullscreen .modal-player {
  height: 100dvh !important;
  aspect-ratio: auto !important;
}
.modal.pwa-video-fullscreen .modal-info {
  display: none !important;
}
.modal.pwa-video-fullscreen .modal-wrap > .modal-close {
  position: fixed !important;
  top: calc(env(safe-area-inset-top, 0px) + 8px) !important;
  right: calc(env(safe-area-inset-right, 0px) + 8px) !important;
  z-index: 30050 !important;
}
.modal.landscape-video-modal .modal-wrap {
  width: min(96vw, 1080px) !important;
  max-width: 96vw !important;
  max-height: calc(100dvh - 14px) !important;
  margin: 7px auto !important;
}
.modal.landscape-video-modal .modal-content {
  width: 100% !important;
  max-width: 100% !important;
  max-height: calc(100dvh - 14px) !important;
  border-radius: 12px !important;
}
.modal.landscape-video-modal .modal-player {
  aspect-ratio: 16 / 9 !important;
  height: auto !important;
  max-height: calc(100dvh - 14px) !important;
}
.modal.landscape-video-modal .modal-info {
  display: none !important;
}
.modal.landscape-video-modal .modal-wrap > .modal-close {
  position: fixed !important;
  top: calc(env(safe-area-inset-top, 0px) + 8px) !important;
  right: calc(env(safe-area-inset-right, 0px) + 8px) !important;
  z-index: 30050 !important;
}
.modal-meta {
  display: flex; gap: 1.5rem; font-size: 0.82rem; color: var(--text-400);
  margin-bottom: 1rem;
}
.modal-info p {
  font-size: 0.88rem; color: var(--text-300);
  line-height: 1.7; max-height: 120px; overflow-y: auto;
}

/* === FOOTER === */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 2.5rem 4%;
}
.footer-inner { max-width: 1000px; margin: 0 auto; text-align: center; }
.footer-brand { margin-bottom: 1.2rem; }
.footer-brand .logo-text { font-size: 2rem; }
.footer-brand p { font-size: 0.82rem; color: var(--text-400); margin-top: 0.3rem; }
.footer-socials { display: flex; justify-content: center; gap: 1rem; margin-bottom: 1.2rem; }
.footer-socials a {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--text-400);
  transition: var(--tr);
}
.footer-socials a:hover { color: var(--accent); border-color: var(--accent); }
.footer-copy { font-size: 0.75rem; color: var(--text-500); }

/* Placeholder / No content */
.no-content {
  grid-column: 1/-1;
  text-align: center;
  padding: 4rem 2rem;
}
.no-content i { font-size: 2.5rem; color: var(--accent); opacity: 0.3; margin-bottom: 1rem; display: block; }
.no-content h3 { font-size: 1.2rem; color: var(--text-300); margin-bottom: 0.4rem; }
.no-content p { font-size: 0.88rem; color: var(--text-400); max-width: 350px; margin: 0 auto; }

/* Shimmer placeholder */
.placeholder { background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden; }
.placeholder .ph-thumb {
  aspect-ratio: 16/9;
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}
.placeholder .ph-info { padding: 1rem; }
.placeholder .ph-line {
  height: 10px; border-radius: 5px; margin-bottom: 0.5rem;
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}
.placeholder .ph-line:last-child { width: 50%; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ==========================================
   OFFLINE BANNER
   ========================================== */
.offline-banner {
  position: relative;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.offline-banner-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 70% at 50% 40%, rgba(212,160,23,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 30% 60%, rgba(145,70,255,0.05) 0%, transparent 60%),
    linear-gradient(160deg, #08080d 0%, #0e0e1a 40%, #0d0820 70%, #08080d 100%);
  animation: bannerShift 12s ease-in-out infinite alternate;
}
@keyframes bannerShift {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(8deg); }
}
.offline-banner-content {
  position: relative; z-index: 2;
  text-align: center; padding: 2rem;
}
.offline-avatar {
  width: 90px; height: 90px; margin: 0 auto 1.2rem;
  background: transparent;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 2.2rem; color: #000; font-weight: 700;
  box-shadow: none;
  overflow: hidden;
}
.offline-avatar img {
  width: 100%; height: 100%;
  border-radius: 50%; object-fit: cover;
}
.offline-name {
  font-family: var(--font-display);
  font-size: 2rem; letter-spacing: 3px;
  color: var(--text-100); margin-bottom: 0.6rem;
}
.offline-status {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.3rem 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.8rem; font-weight: 600; color: var(--text-400);
  margin-bottom: 1rem;
}
.offline-dot {
  width: 7px; height: 7px;
  background: var(--offline);
  border-radius: 50%;
}
.offline-msg {
  font-size: 0.9rem; color: var(--text-400);
  max-width: 350px; margin: 0 auto 1.5rem;
}
.offline-socials {
  display: flex; gap: 0.8rem; justify-content: center;
}
.offline-social {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-400);
  transition: var(--tr);
}
.offline-social.twitch:hover { background: var(--twitch); color: #fff; border-color: var(--twitch); }
.offline-social.youtube:hover { background: var(--youtube); color: #fff; border-color: var(--youtube); }
.offline-social.tiktok:hover { background: #000; color: #fff; border-color: #25f4ee; box-shadow: 0 0 15px rgba(37,244,238,0.3); }

/* ==========================================
   NAV USER
   ========================================== */
.nav-user {
  display: flex; align-items: center; gap: 0.6rem;
  position: relative; cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius);
  transition: var(--tr);
}
.nav-user:hover { background: rgba(255,255,255,0.04); }
.nav-avatar {
  width: 32px; height: 32px;
  border-radius: 50%; object-fit: cover;
  border: 2px solid var(--accent);
}
.nav-avatar-fallback {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: rgba(255,255,255,0.04);
  font-size: 0.82rem;
}
.nav-username {
  font-size: 0.85rem; font-weight: 600;
  color: var(--text-200);
  max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-user.logged-out .nav-username { display: none; }
.nav-user-menu {
  display: none;
  position: absolute; top: 100%; right: 0;
  margin-top: 0.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 180px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 100;
}
.nav-user-menu.open { display: block; }
.nav-user-menu a {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.7rem 1rem;
  font-size: 0.85rem; color: var(--text-300);
  transition: var(--tr);
}
.nav-user-menu a:hover { background: rgba(255,255,255,0.05); color: var(--accent); }

/* ==========================================
   LOGIN MODAL
   ========================================== */
.modal-sm { max-width: 420px; }
.login-modal { padding: 2rem; text-align: center; }
.login-header { margin-bottom: 2rem; }
.login-header .login-logo { margin-bottom: 1rem; }
.login-header .login-logo .logo-text { font-size: 2rem; }
.login-header h2 { font-size: 1.3rem; font-weight: 700; color: var(--text-100); margin-bottom: 0.3rem; }
.login-header p { font-size: 0.88rem; color: var(--text-400); }

.login-providers { display: flex; flex-direction: column; gap: 0.8rem; }
.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}
.auth-tab {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text-300);
  border-radius: var(--radius);
  padding: 0.55rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--tr);
}
.auth-tab.active {
  background: rgba(201,169,97,0.2);
  color: var(--text-100);
  border-color: rgba(201,169,97,0.5);
}
.local-auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.auth-input {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text-100);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  font-size: 0.88rem;
}
.auth-input:focus {
  border-color: rgba(201,169,97,0.7);
  outline: none;
}
.auth-textarea {
  min-height: 68px;
  resize: vertical;
}
.login-btn.local {
  background: linear-gradient(135deg, #c9a961 0%, #e8cb8a 100%);
  color: #111;
}
.login-btn.local:hover { transform: translateY(-2px); filter: brightness(1.03); }
.auth-message {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius);
  font-size: 0.82rem;
  color: var(--text-300);
  padding: 0.7rem 0.8rem;
  text-align: left;
}
.auth-message.error {
  border-color: rgba(255,76,76,0.5);
  color: #ff9f9f;
}
.auth-message.success {
  border-color: rgba(57,211,83,0.45);
  color: #9be8ac;
}
.login-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.7rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.95rem; font-weight: 600;
  transition: var(--tr);
  text-decoration: none;
}
.login-btn.twitch {
  background: var(--twitch);
  color: #fff;
}
.login-btn.twitch:hover { filter: brightness(1.2); transform: translateY(-2px); }
.login-btn.google {
  background: #fff;
  color: #333;
}
.login-btn.google:hover { background: #f0f0f0; transform: translateY(-2px); }
.login-btn.tiktok {
  background: #000;
  color: #fff;
  border: 1px solid #333;
}
.login-btn.tiktok:hover { border-color: #25f4ee; box-shadow: 0 0 15px rgba(37,244,238,0.2); transform: translateY(-2px); }

.login-no-providers {
  padding: 1.5rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-400);
}
.login-no-providers i { font-size: 1.5rem; color: var(--accent); margin-bottom: 0.5rem; display: block; }
.login-no-providers p { font-size: 0.82rem; line-height: 1.6; }
.login-no-providers code { color: var(--accent); font-size: 0.8rem; }

/* ==========================================
   PROFILE PAGE
   ========================================== */
.profile-page { max-width: 900px; margin: 0 auto; }
.profile-banner {
  position: relative;
  height: 300px;
  overflow: hidden;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}
.profile-banner-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(212,160,23,0.1), transparent 60%),
    radial-gradient(ellipse at 70% 30%, rgba(145,70,255,0.08), transparent 50%),
    linear-gradient(135deg, #0a0a14, #12101e, #0a0814);
}
.profile-banner-content {
  position: relative; z-index: 2;
  height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 2rem;
}
.profile-avatar-large {
  width: 100px; height: 100px; margin-bottom: 1rem;
  background: transparent;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 2.5rem; color: #000;
  box-shadow: none;
  overflow: hidden;
}
.profile-avatar-large img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.profile-name {
  font-family: var(--font-display);
  font-size: 2.5rem; letter-spacing: 3px;
  color: var(--text-100);
  margin-bottom: 0.4rem;
}
.profile-bio {
  font-size: 0.95rem; color: var(--text-300);
  max-width: 500px; margin-bottom: 1.2rem;
}
.profile-socials { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }
.profile-social-btn {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.82rem; font-weight: 600;
  transition: var(--tr);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text-300);
}
.profile-social-btn.twitch:hover { background: var(--twitch); color: #fff; border-color: var(--twitch); }
.profile-social-btn.youtube:hover { background: var(--youtube); color: #fff; border-color: var(--youtube); }
.profile-social-btn.tiktok:hover { background: #000; color: #fff; border-color: #25f4ee; }

.profile-content { padding: 2rem 1.5rem; display: flex; flex-direction: column; gap: 1.5rem; }
.profile-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.profile-card h3 {
  font-size: 1rem; font-weight: 700;
  display: flex; align-items: center; gap: 0.6rem;
  color: var(--text-100); margin-bottom: 1rem;
}
.profile-card h3 i { color: var(--accent); }

.connections-list { display: flex; flex-direction: column; gap: 0.6rem; }
.connection-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 1rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.connection-left { display: flex; align-items: center; gap: 0.8rem; }
.connection-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.connection-icon.twitch { background: rgba(145,70,255,0.15); color: var(--twitch); }
.connection-icon.google { background: rgba(66,133,244,0.15); color: #4285f4; }
.connection-icon.tiktok { background: rgba(37,244,238,0.1); color: #25f4ee; }
.connection-info { font-size: 0.85rem; }
.connection-info strong { color: var(--text-100); display: block; }
.connection-info span { color: var(--text-400); font-size: 0.78rem; }
.connection-status { font-size: 0.78rem; font-weight: 600; }
.connection-status.connected { color: var(--success); }
.connection-status.not-connected { color: var(--text-500); }

.text-muted { color: var(--text-500); font-size: 0.85rem; }
.security-list { display: flex; flex-direction: column; gap: 0.9rem; }
.security-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.security-item-info { display: flex; flex-direction: column; gap: 0.25rem; }
.security-item-info strong { color: var(--text-100); font-size: 0.9rem; }
.security-item-actions { display: flex; gap: 0.55rem; flex-wrap: wrap; }
.security-setup-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.02);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.security-verify-row { display: flex; gap: 0.5rem; }

/* Stream Key Box */
.stream-key-box { display: flex; flex-direction: column; gap: 0.8rem; }
.key-row {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.7rem 1rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.key-label {
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-400);
  min-width: 100px;
}
.key-value {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem; color: var(--accent);
  word-break: break-all;
}
.key-hash { font-size: 0.72rem; color: var(--text-500); }
.key-masked { display: flex; align-items: center; gap: 0.6rem; }
.key-hint {
  font-size: 0.78rem; color: var(--text-400);
  display: flex; align-items: center; gap: 0.5rem;
  padding-top: 0.5rem;
}
.key-hint i { color: var(--success); }

/* === PLAYLIST TABS === */
.playlist-tabs-wrapper {
  padding: 0 5% 0;
  overflow: hidden;
}
.playlist-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.8rem 0;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  -webkit-overflow-scrolling: touch;
}
.playlist-tabs::-webkit-scrollbar { height: 4px; }
.playlist-tabs::-webkit-scrollbar-track { background: transparent; }
.playlist-tabs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.playlist-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-300);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.playlist-tab:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-100);
  border-color: rgba(255,255,255,0.15);
}
.playlist-tab.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 600;
}
.playlist-tab.active .playlist-count {
  background: rgba(0,0,0,0.2);
  color: #000;
}
.playlist-count {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255,255,255,0.08);
  color: var(--text-400);
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

/* === PLAYLIST SECTIONS (Gruppierte Ansicht) === */
.playlist-section {
  margin-bottom: 2rem;
}
.playlist-section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.playlist-section-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-100);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.playlist-section-header h3 i {
  color: var(--accent);
  font-size: 0.9rem;
}
.playlist-section-count {
  font-size: 0.75rem;
  color: var(--text-400);
  font-weight: 500;
}
.playlist-load-btn {
  margin-left: auto;
  font-size: 0.75rem !important;
  padding: 0.35rem 0.8rem !important;
}
.playlist-videos-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.playlist-preview {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.playlist-preview-thumb {
  width: 160px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.playlist-preview-desc {
  font-size: 0.82rem;
  color: var(--text-400);
  line-height: 1.5;
}

.loading-videos {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-400);
  font-size: 1.1rem;
}
.loading-videos i {
  margin-right: 0.5rem;
  color: var(--accent);
}

/* === PWA INSTALL UI === */
.pwa-install-btn {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  bottom: 1rem;
  z-index: 10020;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  background: var(--accent);
  color: #000;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  touch-action: manipulation;
}
.pwa-install-btn:hover { transform: translateX(-50%) translateY(-1px) !important; }

.pwa-ios-hint {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 10021;
  background: rgba(8, 8, 12, 0.97);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 0.9rem 1rem;
}
.pwa-ios-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-100);
  margin-bottom: 0.25rem;
}
.pwa-ios-hint p { color: var(--text-300); font-size: 0.8rem; }
.pwa-ios-close {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* === RESPONSIVE === */
@media (max-width: 1100px) {
  .live-layout { grid-template-columns: 1fr; height: auto; }
  .live-sidebar { height: 350px; border-left: none; border-top: 1px solid var(--border); }
}
@media (max-width: 768px) {
  .navbar { padding: 0 1.2rem; }
  .nav-links span { display: none; }
  .nav-link { padding: 0.5rem 0.7rem; }
  .nav-link[data-page="profile"] { display: none; }
  .nav-right { gap: 0.45rem; }
  .nav-user {
    padding: 0.2rem;
    gap: 0;
  }
  .nav-username { display: none; }
  .stream-status .status-text { display: none; }
  .hero-inner { padding: 0 1.5rem; }
  .title-main { font-size: 3.5rem; }
  .hero-desc { font-size: 0.95rem; }
  .hero-buttons { flex-direction: column; }
  .section { padding: 1.5rem 3%; }
  .vid-card { flex: 0 0 240px; }
  .videos-page-header { padding: 1.5rem 3%; flex-direction: column; align-items: flex-start; }
  .videos-grid { padding: 0 3% 2rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .playlist-tabs-wrapper { padding: 0 3%; }
  .playlist-videos-row { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .playlist-preview { flex-direction: column; }
  .playlist-preview-thumb { width: 100%; height: auto; }
  .footer { padding: 2rem 3%; }
  .pwa-install-btn { bottom: 4.9rem; }
  .pwa-ios-hint { bottom: 4.7rem; }
  .player-fullscreen-btn {
    bottom: 0.55rem;
    right: 0.55rem;
    padding: 0.42rem 0.58rem;
    border-radius: 9px;
    font-size: 0.74rem;
  }
  .player-fullscreen-btn span {
    display: none;
  }
  .home-replay-badge {
    top: 0.5rem;
    left: 0.5rem;
    font-size: 0.46rem;
    padding: 0.16rem 0.4rem;
  }
  .home-replay-badge.is-live {
    font-size: 0.28rem;
    padding: 0.08rem 0.22rem;
  }
  .replay-now-text {
    font-size: 1.56rem !important;
    padding: 0.08rem 0.24rem;
    max-width: min(50vw, 280px);
  }
  .hero-stream-card.is-live .replay-now-text,
  .hero-stream-card .replay-now-text {
    font-size: 1.56rem !important;
    padding: 0.08rem 0.24rem;
  }
  .replay-now-stack { max-width: min(96vw, 920px); }
  .replay-now-stack .replay-now-head { font-size: 0.88rem !important; }
  .replay-now-stack .replay-now-sub { font-size: 0.8rem !important; }
  .live-fullscreen-btn {
    bottom: 0.6rem;
    right: 0.6rem;
  }
}
@media (min-width: 769px) {
  .pwa-install-btn,
  .pwa-ios-hint {
    display: none !important;
  }
}
@media (display-mode: standalone), (display-mode: fullscreen), (display-mode: minimal-ui) {
  .pwa-install-btn,
  .pwa-ios-hint {
    display: none !important;
  }
}
@media (max-width: 480px) {
  .logo-text { font-size: 1.2rem; letter-spacing: 2px; }
  .logo-icon { width: 28px; height: 28px; font-size: 0.7rem; }
  .title-main { font-size: 2.8rem; letter-spacing: 3px; }
  .hero { min-height: 70vh; }
  .vid-card { flex: 0 0 200px; }
}
@media (orientation: landscape) and (max-height: 560px) {
  .player-fullscreen-btn {
    bottom: 0.45rem;
    right: 0.45rem;
    padding: 0.38rem 0.5rem;
    border-radius: 8px;
  }
  .player-fullscreen-btn span {
    display: none;
  }
}
