:root {
  --bg: #0d0b14;
  --panel: #17131f;
  --panel-2: #1e1930;
  --ink: #f4f1fa;
  --muted: #b3aac6;
  --accent: #ffd43b;
  --accent-ink: #1a1400;
  --live: #ff4b5c;
  --border: #2a2338;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 600px at 50% -10%, #241b3a 0%, var(--bg) 55%);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
}
a { color: inherit; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }

/* Top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-bottom: 1.25rem; margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.logo {
  display: inline-flex; align-items: center; gap: 0.4em;
  text-decoration: none; line-height: 1;
}
.logo-icon { height: 32px; width: auto; }
.logo-live {
  font-size: 1.4rem; font-weight: 800; letter-spacing: -0.01em;
  color: #fff;
}
.logo-rest {
  font-size: 1.4rem; font-weight: 800; letter-spacing: -0.01em;
  color: var(--muted);
}
@media (max-width: 600px) {
  .logo-live, .logo-rest { font-size: 1rem; }
  .logo-icon { height: 26px; }
}
@media (max-width: 420px) {
  .logo-rest { display: none; }
}
/* original image logo (kept for quick revert) */
.logo-img { display: block; width: auto; height: auto; max-height: 46px; max-width: min(480px, 66vw); }
@media (max-width: 520px) { .logo-img { max-height: 40px; } }
.topbar-tag { color: var(--muted); font-size: 0.9rem; }
.back { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.back:hover { color: var(--ink); }

/* Feed */
.feed-section { margin-top: 1.5rem; }
.section-title {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 1.15rem; margin: 0 0 1rem;
}
.live-dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--live);
  box-shadow: 0 0 0 0 rgba(255,75,92,0.6); animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,75,92,0.6); }
  70% { box-shadow: 0 0 0 8px rgba(255,75,92,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,75,92,0); }
}

/* Featured live hero (single muted autoplay player) */
.featured {
  position: relative; display: block; text-decoration: none; overflow: hidden;
  border-radius: 16px; border: 1px solid var(--border); background: #000;
  aspect-ratio: 16 / 9; margin-bottom: 0.5rem;
}
.featured-video { position: absolute; inset: 0; background-size: cover; background-position: center; }
.featured-video iframe { width: 100%; height: 100%; border: 0; display: block; pointer-events: none; }
.hero-iframe { position: absolute; inset: 0; opacity: 0; transition: opacity .45s ease; }
.hero-iframe.ready { opacity: 1; }
.hero-loader { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; color: #fff; background: rgba(0,0,0,0.35); }
.hero-loader span { font-weight: 700; font-size: 0.9rem; letter-spacing: 0.02em; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.spinner { width: 38px; height: 38px; border: 3px solid rgba(255,255,255,0.3); border-top-color: #fff;
  border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.featured-video .poster { position: absolute; inset: 0; background-size: cover; background-position: center;
  background-color: var(--panel-2); }
.featured-video .playpip { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.featured-video .playpip::after { content: "▶"; color: #fff; font-size: 2rem; background: rgba(0,0,0,0.45);
  width: 66px; height: 66px; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding-left: 6px; }
.featured-topbar { position: absolute; top: 12px; left: 12px; z-index: 2; display: flex; gap: 8px; align-items: center; }
.featured-topbar .card-badge { position: static; top: auto; left: auto; }
.featured-viewers { background: rgba(0,0,0,0.6); color: #fff; font-size: 0.78rem; font-weight: 700; padding: 3px 9px; border-radius: 6px; }
.featured-shuffle {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 3; cursor: pointer;
  width: 72px; background: transparent; color: #fff; border: none; border-radius: 0;
  font-size: 0; display: flex; align-items: center; justify-content: flex-end;
  padding-right: 14px; transition: background 0.2s;
}
.featured-shuffle::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.55) 100%);
  clip-path: polygon(40% 0, 100% 0, 100% 100%, 0% 100%);
  opacity: 0; transition: opacity 0.25s;
}
.featured-shuffle:hover::before { opacity: 1; }
.featured-shuffle::after {
  content: '\203A'; font-size: 3rem; font-weight: 300; position: relative; z-index: 1;
  opacity: 0.7; transition: opacity 0.25s; text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
.featured-shuffle:hover::after { opacity: 1; }
.featured-overlay {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 1.5rem 1.25rem 1.1rem; display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem;
  background: linear-gradient(to top, rgba(0,0,0,0.82), rgba(0,0,0,0) 78%);
}
.featured-title { margin: 0; font-size: clamp(1.2rem, 3.5vw, 1.7rem); color: #fff; line-height: 1.15; }
.featured-meta { color: #e6e1f0; font-size: 0.95rem; }
.featured-cta { margin-top: 0.5rem; background: var(--accent); color: var(--accent-ink); font-weight: 800;
  padding: 0.45rem 1rem; border-radius: 999px; font-size: 0.85rem; }

.grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.card {
  display: flex; flex-direction: column; text-decoration: none;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform .12s ease, border-color .12s ease;
}
.card:hover { transform: translateY(-2px); border-color: #3a3050; }
.card-poster {
  aspect-ratio: 16 / 9; background: linear-gradient(135deg, #2a2140, #191426);
  background-size: cover; background-position: center; position: relative;
}
.card-badge {
  position: absolute; top: 8px; left: 8px;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em;
  padding: 3px 7px; border-radius: 6px; background: var(--accent); color: var(--accent-ink);
}
.card-badge.is-live { background: var(--live); color: #fff; }
.card-body { padding: 0.85rem 0.95rem 1rem; }
.card-title { margin: 0 0 0.3rem; font-size: 1.02rem; line-height: 1.25; }
.card-meta { color: var(--ink); font-size: 0.9rem; }
.card-when { color: var(--muted); font-size: 0.85rem; margin-top: 0.25rem; }
.card-people { color: var(--muted); font-size: 0.82rem; margin-top: 0.4rem; }

.empty { color: var(--muted); padding: 1rem 0; }

/* Watch page */
.watch { margin-top: 1rem; }
.player {
  aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border);
}
.player video { width: 100%; height: 100%; display: block; background: #000; }
.player-empty {
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--ink); background: var(--panel-2);
}
.player-empty .muted { color: var(--muted); font-size: 0.9rem; }
.muted { color: var(--muted); }

.watch-info { margin-top: 1.25rem; }
.watch-head { display: flex; align-items: center; gap: 0.75rem; }
.watch-head h1 { font-size: 1.5rem; margin: 0; }
.watch-meta { font-size: 1.05rem; margin-top: 0.35rem; }
.watch-when { color: var(--muted); margin-top: 0.15rem; }
.watch-line { margin: 0.6rem 0 0; }
.watch-line .label {
  display: inline-block; min-width: 92px; color: var(--muted);
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.watch-desc { margin-top: 1rem; color: var(--muted); max-width: 60ch; }

/* For-theaters guide */
.guide-hero { margin-top: 1.5rem; max-width: 760px; }
.guide-hero h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); line-height: 1.1; margin: 0 0 1rem; letter-spacing: -0.02em; }
.lead { font-size: 1.08rem; color: var(--ink); margin: 0 0 1rem; }
.lead .muted, .lead em { color: var(--muted); }

.guide-block { margin-top: 2.5rem; }
.guide-block > h2 { font-size: 1.35rem; margin: 0 0 0.75rem; }
.small { font-size: 0.88rem; }

.standards { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.std-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 1rem; }
.std { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 1.1rem; }
.std-num {
  width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 0.6rem;
}
.std h3 { margin: 0 0 0.4rem; font-size: 1.02rem; }
.std p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 1.6rem; margin: 0.5rem 0; color: var(--ink); }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.ticks li em { color: var(--muted); }
.two-col { display: grid; gap: 0 1.5rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.tier { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.35rem; margin-top: 1rem; }
.tier-head { margin-bottom: 0.4rem; }
.tier-tag { display: inline-block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent); background: rgba(255,212,59,0.12); border: 1px solid rgba(255,212,59,0.3); padding: 3px 8px; border-radius: 6px; }
.tier-head h3 { margin: 0.55rem 0 0; font-size: 1.15rem; display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.price { color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.tier p { color: var(--muted); }
.tier a { color: var(--accent); }
.steps { margin: 0.6rem 0 0; padding-left: 1.2rem; }
.steps li { margin: 0.45rem 0; }
.steps li strong { color: var(--ink); }
.steps li em { color: var(--muted); }

.settings-table { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.settings-table > div {
  display: flex; justify-content: space-between; gap: 1rem;
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 0.7rem 0.95rem;
}
.settings-table span { color: var(--muted); }

.guide-cta { margin-top: 3rem; text-align: center; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem 1.5rem; }
.guide-cta h2 { margin: 0 0 0.4rem; }
.guide-cta p { color: var(--muted); margin: 0 0 1.2rem; }
.btn { display: inline-block; padding: 0.7rem 1.3rem; border-radius: 999px; border: 1px solid var(--border);
  color: var(--ink); text-decoration: none; font-weight: 700; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.foot { margin-top: 3rem; text-align: center; color: var(--muted); font-size: 0.9rem; }
