:root {
  --bg: #070b14;
  --surface: #0f172a;
  --surface-2: #162033;
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-2: #818cf8;
  --green: #39ff6e;
  --amber: #f59e0b;
  --danger: #f43f5e;
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 40%), var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(7, 11, 20, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 64px; flex-wrap: wrap; padding: 10px 0;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 1.2rem; color: var(--text);
}
.brand-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #020617; font-weight: 900; font-size: 0.95rem;
}
.nav {
  display: flex; gap: 14px; align-items: center; font-size: 0.9rem;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--muted); font-weight: 600; white-space: nowrap; }
.nav a:hover, .nav a.active { color: var(--text); text-decoration: none; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: #020617; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px; font-weight: 700; font-size: 0.92rem;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  cursor: pointer; transition: transform 0.12s ease, border-color 0.15s ease;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); text-decoration: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #020617; border: none;
}
.btn-green { background: var(--green); color: #052e16; border: none; }

.hero { padding: 48px 0 28px; }
.eyebrow {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  background: rgba(56, 189, 248, 0.12); color: var(--accent);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}
h1 {
  font-family: 'Outfit', sans-serif; font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.12; margin: 14px 0 12px;
}
.grad { background: linear-gradient(90deg, var(--accent), #a5b4fc, var(--green)); -webkit-background-clip: text; color: transparent; }
.lead { color: var(--muted); max-width: 720px; font-size: 1.05rem; margin: 0 0 22px; }

.ad-slot {
  min-height: 98px;
  margin: 24px 0;
  border-radius: 16px;
}

.zz-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 98px;
  padding: 16px 22px;
  border-radius: 16px;
  text-decoration: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 24%, rgba(56, 189, 248, 0.2), transparent 42%),
    radial-gradient(circle at 14% 80%, rgba(232, 195, 90, 0.14), transparent 45%),
    linear-gradient(135deg, #050811 0%, #0b1221 55%, #111b33 100%);
  border: 1px solid rgba(212, 175, 55, 0.48);
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.48), inset 0 1px 0 rgba(255, 243, 184, 0.14);
  transition: transform 0.16s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.zz-banner:hover {
  transform: translateY(-2px);
  border-color: rgba(248, 214, 109, 0.85);
  box-shadow: 0 16px 38px rgba(2, 6, 23, 0.62), 0 0 24px rgba(56, 189, 248, 0.16);
  text-decoration: none;
}
.zz-left { display: flex; align-items: center; gap: 15px; min-width: 0; }
.zz-emblem { flex: 0 0 56px; border-radius: 14px; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.55)); }
.zz-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.zz-kicker {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; color: #38bdf8;
}
.zz-ad-pill {
  padding: 2px 6px; border-radius: 4px; font-size: 0.65rem; font-weight: 800;
  background: rgba(232, 195, 90, 0.16); color: #f8d66d; border: 1px solid rgba(212, 175, 55, 0.38);
}
.zz-title-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.zz-wordmark {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  font-size: 1.32rem;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, #fff3b8 0%, #e8c35a 48%, #c69228 85%, #9d6f15 100%);
  -webkit-background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.75));
}
.zz-headline { color: #f8fafc; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1rem; }
.zz-sub { color: #cbd5e1; font-size: 0.85rem; }
.zz-cta-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
.zz-cta {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px; border-radius: 10px; font-weight: 800; font-size: 0.88rem;
  color: #050811;
  background: linear-gradient(135deg, #fff3b8 0%, #e8c35a 55%, #c69228 100%);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
  white-space: nowrap;
}
.zz-domain { font-size: 0.72rem; color: #94a3b8; font-weight: 600; letter-spacing: 0.03em; }
@media (max-width: 720px) {
  .zz-banner { flex-direction: column; align-items: flex-start; padding: 15px 16px; }
  .zz-cta-wrap { width: 100%; flex-direction: row; align-items: center; justify-content: space-between; }
}

.card {
  transition: transform 0.16s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.32);
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 14px 34px rgba(2, 6, 23, 0.5);
}
.panel {
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.38);
}

.controls-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 20px 0; }
.input, select, textarea {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px; font-family: inherit; font-size: 0.94rem;
}
.input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.search-input { flex: 1 1 260px; }

.pill-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); font-weight: 600; font-size: 0.85rem; cursor: pointer;
}
.pill.active, .pill:hover { background: rgba(56, 189, 248, 0.16); color: var(--text); border-color: var(--accent); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin: 18px 0 36px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 10px;
}
.card.featured { border-color: rgba(57, 255, 110, 0.45); box-shadow: 0 0 0 1px rgba(57, 255, 110, 0.12); }
.badge-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tag { font-size: 0.74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(129, 140, 248, 0.18); color: #c7d2fe; }
.tag.live { background: rgba(57, 255, 110, 0.16); color: var(--green); }
.tag.mit { background: rgba(56, 189, 248, 0.16); color: var(--accent); }
.card h2, .card h3 { margin: 2px 0; font-family: 'Outfit', sans-serif; font-size: 1.2rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.92rem; flex: 1; }

.studio-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 22px; align-items: start; margin: 18px 0 32px; }
@media (max-width: 920px) { .studio-grid { grid-template-columns: 1fr; } }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.panel h2 { margin: 0 0 12px; font-family: 'Outfit', sans-serif; font-size: 1.15rem; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.field label { display: block; font-size: 0.78rem; color: var(--muted); font-weight: 600; margin-bottom: 5px; }
.field select, .field input {
  width: 100%;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.92rem;
}
.field input[type="color"] { padding: 3px 6px; height: 40px; cursor: pointer; }

textarea.codebox {
  width: 100%; min-height: 190px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem; resize: vertical;
}

.stage-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.stage-frame {
  width: 100%; max-width: 310px; aspect-ratio: 9 / 16;
  background: #020617; border-radius: 18px; overflow: hidden;
  border: 2px solid rgba(148, 163, 184, 0.3); position: relative;
}
.stage-frame.landscape { max-width: 100%; aspect-ratio: 16 / 9; }
.stage-frame canvas { width: 100%; height: 100%; display: block; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px; text-align: center; }
.stat b { display: block; font-size: 1.15rem; font-family: 'Outfit', sans-serif; }
.stat span { font-size: 0.74rem; color: var(--muted); }
.warn-list { margin: 10px 0 0; padding-left: 18px; color: var(--amber); font-size: 0.85rem; }
.ok-note { color: var(--green); font-size: 0.86rem; font-weight: 600; margin-top: 8px; }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(2, 6, 23, 0.78);
  display: none; align-items: center; justify-content: center; padding: 20px; z-index: 60;
}
.modal-backdrop.open { display: flex; }
.modal {
  max-width: 480px; width: 100%; background: var(--surface); border: 1px solid var(--accent);
  border-radius: 18px; padding: 24px;
}

.footer {
  border-top: 1px solid var(--border); padding: 28px 0 42px; margin-top: 32px;
  color: var(--muted); font-size: 0.88rem;
}
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
