:root {
  --bg: #0a0812;
  --bg-alt: #12101c;
  --surface: #181524;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f0ff;
  --muted: #9b93b0;
  --accent: #b44cff;
  --accent-2: #00e5cc;
  --danger: #ff6b8a;
  --ok: #5dffb0;
  --radius: 14px;
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--accent-2); }
code {
  font-size: 0.88em;
  background: rgba(255,255,255,0.06);
  padding: 0.15em 0.45em;
  border-radius: 6px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: rgba(10, 8, 18, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}
.brand-logo { height: 42px; width: auto; }
.brand-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.brand-tag { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

.site-nav { display: flex; gap: 1.25rem; align-items: center; }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}
.site-nav a:hover, .site-nav a.active { color: var(--text); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
}

.hero {
  position: relative;
  min-height: min(78vh, 720px);
  display: flex;
  align-items: end;
  padding: 3rem 1.25rem 4rem;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(180, 76, 255, 0.18), transparent),
    radial-gradient(ellipse 60% 50% at 90% 20%, rgba(0, 229, 204, 0.12), transparent),
    var(--bg);
  background-size: cover;
  background-position: center;
}
.hero[style*="--hero-bg"] {
  background-image:
    linear-gradient(180deg, rgba(10,8,18,0.35) 0%, rgba(10,8,18,0.92) 75%),
    var(--hero-bg);
}
.hero-overlay { display: none; }
.hero-content { max-width: 720px; margin: 0 auto; width: 100%; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--accent-2);
  font-weight: 600;
}
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0.4rem 0 0.75rem;
}
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 3vw, 2rem); }
.lead { font-size: 1.08rem; color: #ddd5f5; max-width: 58ch; }
.muted { color: var(--muted); }

.section { padding: 3rem 1.25rem; max-width: 1100px; margin: 0 auto; width: 100%; }
.section-alt { background: var(--bg-alt); max-width: none; }
.section-alt > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.section-head { margin-bottom: 1.5rem; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #7b2fff);
  color: white;
}
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-block { width: 100%; }
.text-link { color: var(--accent-2); text-decoration: none; font-weight: 600; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.card-accent { border-color: rgba(180, 76, 255, 0.25); }
.card-kicker { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-2); margin: 0 0 0.35rem; }

.featured-set, .set-card {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 800px) {
  .featured-set { grid-template-columns: 1.4fr 1fr; align-items: start; }
}
.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.sets-list { display: grid; gap: 2.5rem; }
.set-meta h2 { font-size: 1.35rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 229, 204, 0.12);
  color: var(--accent-2);
}

.watch-page { max-width: 1100px; margin: 0 auto; padding: 2rem 1.25rem 3rem; }
.watch-layout { display: grid; gap: 1.25rem; }
@media (min-width: 900px) {
  .watch-layout { grid-template-columns: 1fr 280px; }
}
.player-shell {
  position: relative;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.live-player { width: 100%; display: block; aspect-ratio: 16/9; background: #000; }
.live-badge[hidden] {
  display: none !important;
}
.live-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0,0,0,0.72);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ok);
  letter-spacing: 0.06em;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse 1.4s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}
.player-status { padding: 0.75rem 1rem 0; margin: 0; font-weight: 600; }
.player-hint { padding: 0 1rem 1rem; margin: 0; font-size: 0.82rem; word-break: break-all; }

.book-layout, .community-layout, .about-layout {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 860px) {
  .book-layout { grid-template-columns: 1fr 1.1fr; }
  .community-layout { grid-template-columns: 1fr 1.2fr; }
  .about-layout { grid-template-columns: 0.9fr 1.1fr; gap: 2rem; align-items: start; }
}
.book-form label, .support-form label {
  display: block;
  margin-bottom: 0.85rem;
  font-size: 0.88rem;
  font-weight: 500;
}
.book-form input, .book-form select, .book-form textarea,
.support-form input, .support-form textarea {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

.alert {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.92rem;
}
.alert-success { background: rgba(93, 255, 176, 0.12); color: var(--ok); }
.alert-error { background: rgba(255, 107, 138, 0.12); color: var(--danger); }

.about-photo img, .photo-placeholder {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.photo-placeholder {
  aspect-ratio: 4/5;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.5rem;
  background: var(--surface);
  color: var(--muted);
}

.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { margin: 0.5rem 0; }
.link-list a { text-decoration: none; font-weight: 600; }

.support-messages { margin-top: 1.25rem; display: grid; gap: 0.75rem; max-height: 360px; overflow: auto; }
.support-msg {
  margin: 0;
  padding: 0.85rem 1rem;
  background: var(--bg);
  border-radius: 10px;
  border-left: 3px solid var(--accent);
}
.support-msg footer { font-size: 0.82rem; color: var(--muted); margin-top: 0.35rem; }

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(180,76,255,0.15), rgba(0,229,204,0.08));
  border: 1px solid var(--border);
}
.empty-block, .dcl-card { text-align: left; }
.empty-block {
  padding: 2rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}
.setup-steps { padding-left: 1.2rem; color: var(--muted); }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.25rem;
  background: var(--bg-alt);
}
.footer-inner { max-width: 1100px; margin: 0 auto; text-align: center; }
.footer-brand { font-family: var(--font-display); font-weight: 700; margin: 0; }
.footer-tag { color: var(--muted); margin: 0.25rem 0 1rem; font-size: 0.9rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-bottom: 1rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-copy { font-size: 0.82rem; color: var(--muted); margin: 0; }

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-alt);
    padding: 1rem 1.25rem 1.25rem;
    border-bottom: 1px solid var(--border);
  }
  .site-nav.open { display: flex; }
}
