:root {
  --bg: #07101c;
  --bg-soft: #0f1a2d;
  --card: rgba(15, 26, 45, 0.9);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #9fb0c8;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --danger: #f87171;
  --success: #34d399;
  --shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, rgba(124, 92, 255, 0.18), transparent 30%),
    linear-gradient(180deg, #08111e, #07101c 55%, #040914);
  color: var(--text);
}
button, input, textarea {
  font: inherit;
}
button {
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #5a7cff);
  color: white;
  padding: 0.9rem 1.15rem;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 12px 24px rgba(124, 92, 255, 0.25);
}
button:hover { transform: translateY(-1px); }
button:disabled { opacity: 0.6; cursor: wait; }
button.ghost {
  background: rgba(148, 163, 184, 0.08);
  box-shadow: none;
  border: 1px solid var(--line);
}
button.danger { color: #fecaca; border-color: rgba(248, 113, 113, 0.4); }
a { color: var(--accent-2); }
code { background: rgba(255,255,255,.07); padding: 0.15rem 0.4rem; border-radius: 8px; }

.shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}
.site-header, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
}
.site-footer {
  padding-bottom: 2.5rem;
  color: var(--muted);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}
.brand strong { display: block; font-size: 1.05rem; }
.brand span { color: var(--muted); font-size: 0.9rem; }
.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}
.top-nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.app-shell {
  padding-bottom: 3rem;
}
.hero-grid, .panel-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.25rem;
}
.panel-grid { align-items: start; }
.span-2 { grid-column: span 1; }
.hero-copy {
  padding: 2rem 0;
}
.hero-copy h1 {
  font-size: clamp(2.2rem, 4.5vw, 4.3rem);
  line-height: 0.98;
  margin: 0.35rem 0 1rem;
  max-width: 11ch;
}
.hero-copy p {
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 62ch;
  color: var(--muted);
}
.eyebrow {
  display: inline-block;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  font-weight: 700;
}
.hero-badges, .pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.hero-badges span, .pill {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  color: var(--text);
  font-size: 0.92rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.center-card {
  min-height: 240px;
  display: grid;
  place-items: center;
}
.auth-card { padding: 1rem; }
.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.tab { background: rgba(255,255,255,0.05); box-shadow: none; border: 1px solid transparent; }
.tab.active { border-color: rgba(124, 92, 255, 0.5); }
.auth-form, .stack-form {
  display: grid;
  gap: 0.9rem;
}
.auth-form h2, .dashboard-head h2, .card h3 {
  margin: 0 0 0.35rem;
}
label {
  display: grid;
  gap: 0.45rem;
  color: #d9e3f0;
  font-size: 0.95rem;
}
input, textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(3, 8, 16, 0.45);
  color: var(--text);
  padding: 0.95rem 1rem;
  outline: none;
}
input:focus, textarea:focus {
  border-color: rgba(124, 92, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.12);
}
.status {
  min-height: 1.5rem;
  margin: 0.5rem 0 0;
  color: var(--accent-2);
}
.muted { color: var(--muted); }
.tiny { font-size: 0.84rem; }
.hidden { display: none !important; }
.summary-grid {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 0;
}
.summary-grid div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.6rem;
}
.summary-grid dt { color: var(--muted); }
.summary-grid dd { margin: 0; font-weight: 700; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.asset-list, .audit-list {
  display: grid;
  gap: 1rem;
}
.asset-item, .audit-item {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1rem;
  background: rgba(3, 8, 16, 0.35);
}
.asset-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}
.asset-meta {
  color: var(--muted);
  font-size: 0.92rem;
}
.asset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.9rem;
}
.asset-preview {
  width: 100%;
  margin-top: 1rem;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0,0,0,0.25);
  min-height: 56px;
}
.asset-preview video,
.asset-preview img,
.asset-preview audio {
  width: 100%;
  display: block;
}
.clean-list {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}
.dashboard-head {
  margin-bottom: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
}
.bg-orb {
  position: fixed;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.16;
  pointer-events: none;
}
.orb-a { background: var(--accent); top: -120px; right: -80px; }
.orb-b { background: var(--accent-2); bottom: -100px; left: -80px; }
.spinner {
  width: 38px; height: 38px; border-radius: 999px;
  border: 3px solid rgba(255,255,255,0.18);
  border-top-color: var(--accent-2);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .hero-grid, .panel-grid, .dashboard-head {
    grid-template-columns: 1fr;
    display: grid;
  }
  .site-header, .site-footer {
    flex-direction: column;
    align-items: start;
    gap: 1rem;
  }
  .auth-tabs {
    grid-template-columns: 1fr;
  }
}


.hero-grid-home { align-items: stretch; }
.stars {
  position: fixed; inset: 0; pointer-events: none; opacity: .18;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.7) 0 1px, transparent 1.5px),
    radial-gradient(circle at 75% 30%, rgba(255,255,255,.6) 0 1px, transparent 1.5px),
    radial-gradient(circle at 55% 70%, rgba(255,255,255,.6) 0 1px, transparent 1.5px),
    radial-gradient(circle at 90% 85%, rgba(255,255,255,.5) 0 1px, transparent 1.5px),
    radial-gradient(circle at 10% 80%, rgba(255,255,255,.5) 0 1px, transparent 1.5px);
  animation: drift 18s linear infinite;
}
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(-20px); } }
.site-footer-links { gap: 1rem; flex-wrap: wrap; }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-links a { text-decoration: none; }
.progress-wrap { display: grid; gap: .45rem; }
.progress-label-row { display:flex; justify-content:space-between; color: var(--muted); font-size: .92rem; }
.progress-track { height: 12px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; border:1px solid var(--line); }
.progress-bar { height:100%; width:0%; background: linear-gradient(90deg,var(--accent-2),var(--accent)); transition: width .18s ease; }
.player-shell { display:grid; gap: .85rem; }
.player-toolbar { display:flex; flex-wrap:wrap; gap:.6rem; align-items:center; }
.player-toolbar button, .player-toolbar select { box-shadow:none; }
.player-toolbar select {
  border-radius: 12px; border:1px solid var(--line); background: rgba(255,255,255,.06); color: var(--text); padding:.65rem .75rem;
}
.time-badge { display:inline-flex; align-items:center; gap:.35rem; }
.video-stage { position:relative; overflow:hidden; border-radius: 18px; background: #020712; }
.video-stage video { width:100%; display:block; max-height: 560px; }
.ding-marker-overlay {
  position:absolute; top:1rem; right:1rem; background:rgba(10,14,30,.72); border:1px solid rgba(34,211,238,.45);
  padding:.65rem .85rem; border-radius:999px; box-shadow:0 12px 24px rgba(0,0,0,.25); backdrop-filter: blur(12px);
}
.range-row { display:grid; gap:.45rem; }
.range-row input[type="range"] { width:100%; }
.mini-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .75rem; }
.public-card { background: linear-gradient(180deg, rgba(18,25,50,.92), rgba(8,14,30,.92)); border:1px solid rgba(124,92,255,.28); }
.public-settings { display:grid; gap: .9rem; }
.public-gallery-card { overflow: hidden; }
.carousel { display:grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 1fr); gap: 1rem; overflow-x:auto; padding-bottom: .5rem; scroll-snap-type:x mandatory; }
.carousel-item { scroll-snap-align:start; min-height: 360px; position:relative; overflow:hidden; border-radius: 24px; border:1px solid rgba(124,92,255,.24); background: linear-gradient(180deg, rgba(35,43,88,.95), rgba(7,16,28,.98)); }
.carousel-media { height: 200px; background: radial-gradient(circle at top, rgba(124,92,255,.35), transparent 45%), linear-gradient(180deg, rgba(8,17,30,.4), rgba(8,17,30,.9)); display:grid; place-items:center; }
.carousel-media video, .carousel-media img { width:100%; height:100%; object-fit:cover; }
.carousel-badge { position:absolute; top:1rem; left:1rem; z-index:1; }
.carousel-content { padding: 1rem; display:grid; gap:.6rem; }
.logo-glow { position:absolute; inset:auto -20px -20px auto; width:120px; height:120px; opacity:.25; filter: blur(8px); animation: pulse 4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity:.2; } 50% { transform: scale(1.08); opacity:.35; } }
.age-gate {
  position: fixed; inset:0; background: rgba(1,4,10,.82); backdrop-filter: blur(16px); display:grid; place-items:center; z-index:999;
}
.age-card { width:min(540px, calc(100% - 2rem)); }
.legal-shell { padding: 2rem 0 4rem; }
.legal-shell h1 { margin-top: 0; }
.legal-shell h2 { margin-top: 2rem; }
.notice { border-left: 4px solid var(--accent-2); padding-left: 1rem; color: var(--muted); }
.compact-pills { margin-top: 0; }
.asset-grid-double { display:grid; gap:1rem; }
@media (min-width: 901px) {
  .asset-grid-double { grid-template-columns: 1.1fr .9fr; align-items: start; }
}
@media (max-width: 900px) {
  .carousel { grid-auto-columns: minmax(260px, 88vw); }
  .mini-grid { grid-template-columns: 1fr; }
}
