/* Theme: colors come from these variables. theme.js sets data-theme (dark/light) on <html>. */
:root {
  --bg: #0c0a0d;
  --bg-alt: #141016;
  --surface: #1b161e;
  --text: #f1ecef;
  --muted: #a89ca4;
  --border: #2a2230;
  --header-bg: rgba(12, 10, 13, 0.82);
  --accent: #e11d48;
  --accent-2: #fb923c;
  --accent-dark: #9f1239;
  --link: var(--accent-2);
  --live: #ef4444;
  --radius: 14px;
  --glow: 0 0 24px color-mix(in srgb, var(--accent) 45%, transparent);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f7f5f8;
  --bg-alt: #eeeaf0;
  --surface: #ffffff;
  --text: #1b1520;
  --muted: #645b69;
  --border: #e0d9e4;
  --header-bg: rgba(247, 245, 248, 0.85);
  --link: var(--accent-dark);
  --glow: 0 6px 22px color-mix(in srgb, var(--accent) 28%, transparent);
  color-scheme: light;
}


* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

h1, h2, h3, .logo {
  font-family: "Rajdhani", "Inter", system-ui, sans-serif;
  letter-spacing: 0.02em;
}

a {
  color: var(--link);
}

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

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

.gradient-text {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

/* Thin glowing accent line along the bottom of the header */
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
  opacity: 0.7;
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--text);
  text-decoration: none;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 1.35rem;
  box-shadow: var(--glow);
  transition: transform 0.25s;
}

.logo:hover .logo-mark {
  transform: rotate(-8deg) scale(1.06);
}

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

.nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.nav ul a {
  display: block;
  padding: 7px 16px;
  border-radius: 9px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s, background 0.2s;
}

.nav ul a:hover {
  color: var(--text);
  background: var(--bg-alt);
}

.nav ul a[aria-current="page"] {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: var(--glow);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-action,
.menu-toggle {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

.icon-action:hover {
  border-color: var(--accent);
}

.menu-toggle {
  display: none;
}

/* The header spans wider than the page content so it doesn't leave big empty sides */
.site-header .container {
  max-width: 1600px;
  padding: 0 28px;
}

.nav nav {
  margin-left: auto;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  color: #fff;
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow);
}

.button[hidden] {
  display: none;
}

.button.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.button.ghost:hover {
  border-color: var(--accent);
}

/* Live badge */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 20px;
}

.live-badge .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
}

.live-badge.is-live {
  color: #fff;
  border-color: var(--live);
}

.live-badge.is-live .dot {
  background: var(--live);
  animation: pulse 1.4s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Hero */
.hero {
  position: relative;
  padding: 120px 0 100px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  -webkit-mask-image: linear-gradient(#000 70%, transparent);
  mask-image: linear-gradient(#000 70%, transparent);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  z-index: -1;
  animation: float 12s ease-in-out infinite;
}

.hero::before {
  background: var(--accent);
  top: -160px;
  left: -120px;
}

.hero::after {
  background: var(--accent-2);
  top: -60px;
  right: -200px;
  opacity: 0.22;
  animation-delay: -6s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(40px, 30px); }
}

.hero h1 {
  font-size: clamp(2.6rem, 8vw, 5rem);
  line-height: 1.05;
  margin: 0 0 18px;
}

.hero p {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 580px;
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-hero {
  padding: 80px 0 40px;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  margin: 0 0 8px;
}

.page-hero p {
  color: var(--muted);
  margin: 0;
}

/* Sections */
.section {
  padding: 72px 0;
}

.section.alt {
  background: var(--bg-alt);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0;
  font-size: 2rem;
}

.section-head a {
  font-weight: 600;
  text-decoration: none;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.stat strong {
  display: block;
  font-family: "Rajdhani", sans-serif;
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 6px;
}

.stat span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: var(--glow);
}

.card img {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
}

.card-body {
  padding: 18px 20px 22px;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 1.3rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--link);
  margin-bottom: 6px;
}

/* Home */
.platform-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 22px;
}

.platform-row .platform {
  font-size: 0.8rem;
  padding: 4px 12px;
}

.quick-watch {
  display: flex;
  gap: 8px;
  max-width: 620px;
  margin: 0 auto;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.quick-watch select,
.quick-watch input {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  min-width: 0;
}

.quick-watch input {
  flex: 1;
}

.quick-watch select:focus,
.quick-watch input:focus {
  outline: none;
  border-color: var(--accent);
}

.hero .quick-hint {
  font-size: 0.9rem;
  margin: 16px auto 0;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.feature:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--glow);
}

.feature-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 14px;
}

.feature h3 {
  margin: 0 0 6px;
  font-size: 1.3rem;
}

.feature p {
  margin: 0;
  color: var(--muted);
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.step h3 {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.step p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 560px) {
  .quick-watch {
    flex-wrap: wrap;
  }

  .quick-watch input {
    flex-basis: 100%;
    order: -1;
  }

  .quick-watch .button {
    flex: 1;
    justify-content: center;
  }
}

.note {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 20px;
}

/* Gallery */
.tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
}

.tab {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 10px 22px;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.tab:hover {
  color: var(--text);
}

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

.tab .count:not(:empty) {
  margin-left: 6px;
  font-size: 0.8rem;
  opacity: 0.8;
}

.share-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 28px;
}

.share-form h3 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.share-row {
  display: grid;
  grid-template-columns: 2fr 1.3fr 1fr auto;
  gap: 8px;
}

.share-row input {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 0;
}

.share-row input:focus {
  outline: none;
  border-color: var(--accent);
}

.share-row .button:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.share-form .hint {
  margin-bottom: 0;
}

.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 48px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: zoom-in;
  padding: 0;
  background: var(--surface);
  animation: fade-in 0.4s ease both;
  transition: box-shadow 0.25s;
}

.gallery-item img {
  aspect-ratio: 16 / 10;
  width: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.item-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px 14px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: #fff;
  font-weight: 600;
  text-align: left;
  transform: translateY(100%);
  transition: transform 0.3s;
}

.gallery-item:hover {
  box-shadow: var(--glow);
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-item:hover .item-caption,
.gallery-item:focus-visible .item-caption {
  transform: translateY(0);
}

.clips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.clip-card {
  display: block;
  text-align: left;
  font: inherit;
  color: inherit;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  animation: fade-in 0.4s ease both;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.clip-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--glow);
}

.clip-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background: #000;
}

.clip-thumb.twitch { background: linear-gradient(135deg, #9146ff, #3a1d73); }
.clip-thumb.kick { background: linear-gradient(135deg, #1f7a0c, #0b2a05); }
.clip-thumb.youtube { background: linear-gradient(135deg, #ff0033, #5c0013); }

.clip-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clip-thumb-label {
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: rgba(255, 255, 255, 0.85);
}

.play-icon {
  position: absolute;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 1.2rem;
  padding-left: 4px;
  transition: background 0.2s, transform 0.2s;
}

.clip-card:hover .play-icon {
  background: var(--accent);
  transform: scale(1.1);
}

.clip-body {
  padding: 14px 16px 16px;
}

.clip-body h3 {
  margin: 8px 0 4px;
  font-size: 1.15rem;
  line-height: 1.3;
}

.clip-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Admin */
.admin-login {
  max-width: 460px;
  margin: 0 auto;
}

.admin-login[hidden] {
  display: none;
}

.admin-bar {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

#admin h2 {
  font-size: 1.5rem;
  margin: 28px 0 14px;
}

#admin .count {
  color: var(--muted);
  font-size: 1rem;
}

.review-list {
  display: grid;
  gap: 10px;
}

.review-item {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 16px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

.review-preview {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
  display: grid;
  place-items: center;
}

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

.review-preview .clip-thumb-label {
  font-size: 1rem;
  text-transform: capitalize;
}

.review-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.review-info .platform {
  justify-self: start;
}

.review-info a {
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-info small {
  color: var(--muted);
}

.review-actions {
  display: flex;
  gap: 8px;
}

.review-actions .button {
  padding: 8px 14px;
}

.platform.image { background: #475569; }

.review-item.chat-review {
  grid-template-columns: 1fr auto;
}

.chat-review .review-info span {
  word-break: break-word;
}

@media (max-width: 640px) {
  .review-item {
    grid-template-columns: 1fr;
  }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 760px) {
  .share-row {
    grid-template-columns: 1fr 1fr;
  }

  .share-row input[name="link"] {
    grid-column: 1 / -1;
  }

  .share-row .button {
    grid-column: 1 / -1;
    justify-content: center;
  }
}
/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 5, 10, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox figure {
  margin: 0;
  max-width: 1000px;
  width: 100%;
  transform: scale(0.95);
  transition: transform 0.25s;
}

.lightbox.open figure {
  transform: scale(1);
}

.lightbox img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox-media iframe,
.lightbox-media video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 78vh;
  border: 0;
  border-radius: var(--radius);
  background: #000;
}

.clip-open {
  white-space: nowrap;
  text-decoration: none;
  font-weight: 600;
}

.lightbox figcaption {
  text-align: center;
  margin-top: 12px;
  color: var(--muted);
}

.lightbox button {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 1;
}

.lightbox .close { top: 20px; right: 20px; }
.lightbox .prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox .next { right: 20px; top: 50%; transform: translateY(-50%); }

/* About */
.about-plain {
  max-width: 720px;
  font-size: 1.1rem;
  color: var(--muted);
}

/* CTA */
.cta {
  text-align: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, transparent), color-mix(in srgb, var(--accent-2) 10%, transparent));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 56px 24px;
}

.cta h2 {
  margin: 0 0 10px;
  font-size: 2.2rem;
}

.cta p {
  color: var(--muted);
  margin: 0 0 24px;
}

/* Watch */
.container.wide {
  max-width: 1400px;
}

.watch-layout {
  display: grid;
  gap: 24px;
}

/* Streamer list and add box sit above the player so it gets the full width */
.watch-layout .watch-side {
  order: -1;
  grid-template-columns: 360px 1fr;
  align-items: start;
}

.watch-layout .streamer-list {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.watch-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.watch-toolbar h2 {
  margin: 0;
  font-size: 1.6rem;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch-track {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: background 0.2s;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.2s, background 0.2s;
}

.switch input:checked + .switch-track {
  background: var(--accent);
  border-color: var(--accent);
}

.switch input:checked + .switch-track::after {
  transform: translateX(20px);
  background: #fff;
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.stage {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 12px;
  align-items: start;
}

.stage.no-chat {
  grid-template-columns: 1fr;
}

.stage.no-chat .chat {
  display: none;
}

.tiles {
  display: grid;
  gap: 12px;
}

.tiles.multi {
  grid-template-columns: 1fr 1fr;
}

.tiles.multi.count-1 {
  grid-template-columns: 1fr;
}

.chat-toggle {
  margin-left: auto;
  padding: 8px 14px;
  font-size: 0.85rem;
}

.stage-empty {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--bg-alt);
}

.tile {
  align-self: start;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}

.player-box {
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-box {
  position: relative;
}

.player-box iframe,
.player-box video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.player-box:fullscreen video {
  object-fit: contain;
}

.big-play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 14px 26px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--glow);
}

.player-offline {
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  color: var(--muted);
}

.player-offline p {
  margin: 0;
}

.controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 10px;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  min-height: 46px;
}

.controls-note {
  color: var(--muted);
  font-size: 0.8rem;
}

.volume {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 200px;
}

.icon-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  width: 32px;
  height: 30px;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s;
}

.icon-btn.small {
  width: 26px;
  font-weight: 700;
}

.icon-btn:hover:not(:disabled) {
  border-color: var(--accent);
}

.icon-btn:disabled,
.volume input:disabled,
.quality:disabled {
  opacity: 0.45;
  cursor: default;
}

.volume input[type="range"] {
  --fill: 80%;
  flex: 1;
  min-width: 60px;
  height: 6px;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(90deg, var(--accent) var(--fill), var(--border) var(--fill));
  cursor: pointer;
}

.volume input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: none;
}

.volume input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: none;
}

.volume-level {
  font-size: 0.8rem;
  color: var(--muted);
  width: 44px;
  text-align: right;
  flex-shrink: 0;
}

.quality {
  font: inherit;
  font-size: 0.85rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 8px;
  cursor: pointer;
}

.quality:focus {
  outline: none;
  border-color: var(--accent);
}

.tile-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface);
  font-size: 0.9rem;
  font-weight: 600;
}

.tile-bar a {
  margin-left: auto;
  font-weight: 500;
  font-size: 0.85rem;
  text-decoration: none;
}

.tile-bar button {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 4px;
}

.tile-bar button:hover {
  color: var(--text);
}

.chat {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  height: clamp(440px, 72vh, 760px);
}

.chat-head {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--border);
}

.chat-stream {
  font: inherit;
  font-size: 0.85rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
}

.chat-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.chat-tab {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
}

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

.chat-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.chat-body iframe {
  flex: 1;
  width: 100%;
  border: 0;
}

.sinners-chat {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-status {
  margin: auto;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.chat-msg {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.9rem;
}

.chat-msg img,
.chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chat-avatar {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
}

.chat-msg strong {
  font-size: 0.85rem;
  color: var(--link);
}

.chat-msg.mine strong {
  color: var(--accent);
}

.chat-msg time {
  margin-left: 6px;
  font-size: 0.7rem;
  color: var(--muted);
}

.chat-msg p {
  margin: 2px 0 0;
  word-break: break-word;
}

.chat-footer {
  border-top: 1px solid var(--border);
  padding: 10px;
}

.chat-footer .form-msg {
  margin: 6px 0 0;
  min-height: 0;
}

.chat-form {
  display: flex;
  gap: 6px;
}

.chat-form input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 10px;
}

.chat-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.chat-form .button {
  padding: 9px 14px;
}

.discord-btn {
  width: 100%;
  justify-content: center;
  background: #5865f2;
}

.discord-btn:hover {
  box-shadow: 0 0 20px rgba(88, 101, 242, 0.5);
}

/* Header login */
.nav-auth {
  display: flex;
  align-items: center;
}

.login-btn {
  height: 40px;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
  background: #5865f2;
  border: none;
  border-radius: 10px;
  padding: 0 16px;
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.login-btn:hover {
  box-shadow: 0 0 18px rgba(88, 101, 242, 0.5);
}

.profile {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 6px 0 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
}

.profile img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.profile span {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile button {
  font: inherit;
  font-size: 0.8rem;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
}

.profile button:hover {
  color: var(--text);
}

.chat-none {
  flex: 1;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
  color: var(--muted);
  font-size: 0.9rem;
}

.platform {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 999px;
  color: #fff;
  flex-shrink: 0;
}

.platform.twitch { background: #9146ff; }
.platform.youtube { background: #ff0033; }
.platform.kick { background: #53fc18; color: #000; }

.watch-side {
  display: grid;
  gap: 16px;
}

.add-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.add-form h3 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.add-row {
  display: flex;
  gap: 8px;
}

.add-row select,
.add-row input {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  min-width: 0;
}

.add-row input {
  flex: 1;
}

.add-row select:focus,
.add-row input:focus {
  outline: none;
  border-color: var(--accent);
}

.hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 10px 0 12px;
  line-height: 1.45;
}

.add-actions {
  display: flex;
  gap: 8px;
}

.add-actions .button {
  padding: 10px 20px;
}

.form-msg {
  margin: 10px 0 0;
  font-size: 0.85rem;
  min-height: 1.2em;
}

.form-msg.error { color: #fb7185; }
.form-msg.ok { color: #4ade80; }

.streamer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.streamer {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.streamer:hover {
  border-color: var(--accent);
  transform: translateX(3px);
}

.streamer.selected {
  border-color: var(--accent);
  box-shadow: var(--glow);
}

.streamer .name {
  flex: 1;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.streamer .actions {
  display: flex;
  gap: 2px;
}

.streamer .actions button {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 4px 6px;
  border-radius: 6px;
}

.streamer .actions button:hover {
  color: var(--text);
  background: var(--bg);
}

.list-empty {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 12px;
}

@media (max-width: 960px) {
  .watch-layout .watch-side {
    grid-template-columns: 1fr;
  }

  .stage {
    grid-template-columns: 1fr;
  }

  .chat {
    height: 480px;
  }
}

@media (max-width: 600px) {
  .tiles.multi {
    grid-template-columns: 1fr;
  }
}

/* Content page */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}

.content-player {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: default;
}

.content-player iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.content-player .player-offline {
  cursor: pointer;
  text-align: center;
  padding: 16px;
}

.content-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.content-now {
  display: grid;
  margin-left: 6px;
  min-width: 0;
}

.content-now small {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.content-now strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-side {
  display: grid;
  gap: 16px;
}

.side-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.side-box h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.side-box .hint {
  margin-top: 0;
}

.side-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}

.link-btn:hover {
  color: var(--text);
  background: var(--bg-alt);
}

.queue {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  max-height: 340px;
  overflow-y: auto;
}

.queue-item {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
}

.queue-item:hover {
  background: var(--bg-alt);
}

.queue-item.playing {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.queue-thumb {
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(135deg, #ff0033, #5c0013);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

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

.queue-title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.alert-status {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.alert-status:empty {
  display: none;
}

.picks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pick {
  display: grid;
  gap: 6px;
  padding: 0;
  text-align: left;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
}

.pick img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}

.pick:hover img {
  border-color: var(--accent);
}

.pick span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.live-banner {
  position: sticky;
  top: 84px;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(760px, calc(100% - 32px));
  margin: 0 auto 8px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--live);
  border-radius: 14px;
  box-shadow: 0 0 28px color-mix(in srgb, var(--live) 35%, transparent);
  animation: fade-in 0.3s ease both;
}

.live-banner[hidden] {
  display: none;
}

.live-banner strong {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-banner .button {
  padding: 8px 16px;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--live);
  flex-shrink: 0;
  animation: pulse 1.4s infinite;
}

@media (max-width: 960px) {
  .content-layout {
    grid-template-columns: 1fr;
  }
}

/* A page that's playing in the mini player while you browse another section (nav.js):
   hidden and taking no space, except for the floating player itself */
.page-parked {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}

.page-parked .player-box.mini {
  visibility: visible;
  pointer-events: auto;
}

/* Mini player (mini.js): the player floats in a small draggable window */
.mini-bar {
  display: none;
}

.player-box.mini {
  position: fixed;
  z-index: 60;
  width: min(400px, calc(100vw - 32px));
  height: auto;
  aspect-ratio: auto;
  padding-top: 34px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.player-box.mini > iframe,
.player-box.mini > video,
.player-box.mini > div:not(.mini-bar) {
  height: auto;
  aspect-ratio: 16 / 9;
}

.player-box.mini .mini-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 34px;
  padding: 0 4px 0 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.player-box.mini.dragging .mini-bar {
  cursor: grabbing;
}

/* While dragging, the pointer must not get caught by the video inside */
.player-box.mini.dragging > *:not(.mini-bar) {
  pointer-events: none;
}

.mini-title {
  flex: 1;
  min-width: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-bar button {
  width: 28px;
  height: 26px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
}

.mini-bar button:hover {
  background: var(--bg-alt);
}

.mini-placeholder {
  width: 100%;
  display: grid;
  place-items: center;
  font: inherit;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}

.mini-placeholder:hover {
  color: var(--text);
  border-color: var(--accent);
}

.tile-bar .mini-btn {
  font-size: 0.85rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 16px;
}

.site-footer a:hover {
  color: var(--text);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Mobile */
@media (max-width: 860px) {
  .menu-toggle {
    display: grid;
  }

  .nav nav {
    margin: 0;
  }

  .site-header .container {
    padding: 0 16px;
  }

  .nav-actions {
    margin-left: auto;
  }

  .nav ul {
    position: absolute;
    top: 72px;
    left: 12px;
    right: 12px;
    flex-direction: column;
    padding: 8px;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
    display: none;
  }

  .nav ul.open {
    display: flex;
  }

  .nav ul a {
    padding: 12px 14px;
  }
}

@media (max-width: 520px) {
  .logo {
    font-size: 1.3rem;
  }

  .profile span {
    display: none;
  }

  .login-btn {
    padding: 0 12px;
  }
}

@media (max-width: 720px) {

  .hero {
    padding: 80px 0 72px;
  }


  .lightbox .prev,
  .lightbox .next {
    top: auto;
    bottom: 20px;
    transform: none;
  }
}
