:root {
  --green: #6eff00;
  --ink: #070709;
  --panel: #101014;
  --line: #2a2a32;
  --text: #f4f4f0;
  --muted: #8a8a97;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 84% 2%, rgba(110,255,0,.09), transparent 23rem),
    radial-gradient(circle at -5% 85%, rgba(110,255,0,.05), transparent 28rem),
    var(--ink);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
}
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.noise {
  position: fixed; inset: 0; pointer-events: none; opacity: .055; z-index: 50;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}
.topbar {
  height: 94px; padding: 0 4.5vw; border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: space-between;
}
.brand-lockup { display: flex; gap: 16px; align-items: center; }
.brand-lockup img { width: 58px; height: 58px; object-fit: contain; }
.brand-lockup div { display: flex; flex-direction: column; }
.brand-lockup strong { font-family: "Archivo Black"; letter-spacing: -.5px; }
.brand-lockup span { color: var(--muted); font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; margin-top: 4px; }
.system-state { color: #aaaab4; font-size: 12px; letter-spacing: 2px; font-weight: 700; }
.system-state i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 14px var(--green); margin-right: 9px; }
main { width: min(1480px, 91vw); margin: 0 auto; }
.loader-screen { min-height: calc(100vh - 94px); display: grid; place-items: center; padding: 72px 0; }
.loader-card { width: min(760px, 100%); }
.eyebrow { color: var(--green); font-size: 12px; letter-spacing: 3.5px; font-weight: 700; margin-bottom: 24px; }
.loader-copy h1 { font-family: "Archivo Black"; font-size: clamp(48px, 6vw, 78px); line-height: .98; letter-spacing: -4px; margin: 0; max-width: 720px; }
.loader-copy p { color: var(--muted); max-width: 600px; font-size: 17px; line-height: 1.65; margin: 22px 0 34px; }
.parlay-loader { border: 1px solid var(--line); border-radius: 22px; background: rgba(17,17,22,.86); padding: 28px; box-shadow: 0 40px 100px rgba(0,0,0,.35); }
.parlay-loader label { color: var(--muted); font-size: 11px; letter-spacing: 2.6px; font-weight: 700; }
.id-control { display: flex; margin-top: 14px; }
.id-control input { min-width: 0; flex: 1; height: 62px; padding: 0 20px; border: 1px solid #34343d; border-radius: 13px 0 0 13px; background: #0b0b0f; color: white; outline: none; }
.id-control input:focus { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.id-control button, .render-button { border: 0; background: var(--green); color: #071000; font-family: "Archivo Black"; }
.id-control button { padding: 0 24px; border-radius: 0 13px 13px 0; }
.id-control button span { margin-left: 15px; }
.id-control button:disabled { opacity: .55; cursor: wait; }
.loader-footer { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; }
.backend-state { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.backend-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px rgba(110,255,0,.7); }
.backend-state.offline i { background: #ffbd52; box-shadow: none; }
.demo-button { border: 0; background: transparent; color: #aaaab4; font-size: 10px; letter-spacing: 1.8px; font-weight: 700; }
.demo-button:hover { color: var(--green); }
.load-error { min-height: 20px; margin: 14px 0 -4px; color: #ff7c7c; font-size: 13px; }
.editor-screen { padding: 72px 0 160px; }
.editor-heading { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 54px; }
.text-button { color: var(--muted); border: 0; background: transparent; padding: 0; font-size: 11px; letter-spacing: 2px; font-weight: 700; margin-bottom: 30px; }
.editor-heading h2 { margin: 0; font-family: "Archivo Black"; font-size: 58px; letter-spacing: -3px; }
.parlay-summary { display: flex; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.parlay-summary div { min-width: 150px; padding: 19px 24px; border-right: 1px solid var(--line); }
.parlay-summary div:last-child { border: 0; background: rgba(110,255,0,.06); }
.parlay-summary span { display: block; color: var(--muted); font-size: 10px; letter-spacing: 2px; margin-bottom: 7px; }
.parlay-summary strong { font-size: 21px; }
.parlay-summary div:last-child strong { color: var(--green); }
.leg-editors { display: grid; gap: 24px; }
.leg-editor { position: relative; border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(145deg, rgba(19,19,24,.97), rgba(12,12,16,.97)); padding: 30px; overflow: hidden; }
.leg-index { position: absolute; right: 22px; top: -18px; color: rgba(110,255,0,.055); font-family: "Archivo Black"; font-size: 150px; line-height: 1; }
.leg-identity { position: relative; display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 20px; margin-bottom: 26px; }
.headshot { position: relative; width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--green); background: #23232b; overflow: hidden; display: grid; place-items: center; font-family: "Archivo Black"; font-size: 22px; }
.headshot img { display: none; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.leg-kicker { color: var(--green); font-size: 10px; letter-spacing: 2.4px; font-weight: 700; }
.leg-identity h3 { font-family: "Archivo Black"; font-size: 30px; letter-spacing: -1px; margin: 5px 0 3px; }
.leg-matchup { color: var(--muted); margin: 0; }
.line-chip { min-width: 150px; border: 1px solid #383841; background: #111116; border-radius: 15px; padding: 13px 16px; text-align: right; }
.line-chip strong { display: block; font-size: 23px; }
.line-chip span { color: var(--muted); font-size: 12px; }
.clip-workspace { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .4fr); gap: 20px; }
.video-shell { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: black; border: 1px solid #2d2d35; }
.video-shell video { width: 100%; height: 100%; object-fit: contain; }
.upload-prompt { position: absolute; inset: 0; display: none; place-items: center; align-content: center; background: radial-gradient(circle, #17200f, #0c0c10 68%); cursor: pointer; }
.video-shell.empty .upload-prompt { display: grid; }
.upload-prompt input { display: none; }
.upload-prompt b { color: var(--green); font-size: 14px; letter-spacing: 2px; }
.upload-prompt span { color: var(--muted); font-size: 12px; margin-top: 8px; }
.timing-panel { border: 1px solid #303038; border-radius: 18px; background: #0d0d11; padding: 24px; display: flex; flex-direction: column; }
.timing-label { color: var(--muted); font-size: 10px; letter-spacing: 2px; font-weight: 700; }
.hit-time { display: block; font-family: "Archivo Black"; color: var(--green); font-size: 32px; margin-top: 8px; }
.mark-button { border: 1px solid var(--green); color: var(--green); background: rgba(110,255,0,.06); border-radius: 11px; padding: 14px; font-size: 11px; letter-spacing: 1.5px; font-weight: 700; margin: 22px 0; }
.fine-tune { height: 46px; border: 1px solid #303038; border-radius: 10px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; padding: 0 13px; gap: 10px; }
.fine-tune span, .fine-tune b { color: var(--muted); font-size: 9px; letter-spacing: 1.5px; }
.fine-tune input { min-width: 0; width: 100%; color: white; background: transparent; border: 0; text-align: right; outline: none; }
.timing-panel p { color: #686874; font-size: 12px; line-height: 1.55; margin: auto 0 0; padding-top: 22px; }
.render-dock { position: fixed; z-index: 20; left: 50%; bottom: 20px; transform: translateX(-50%); width: min(1120px, 91vw); padding: 18px 20px 18px 26px; border: 1px solid #34343d; border-radius: 20px; background: rgba(14,14,18,.9); backdrop-filter: blur(24px); display: flex; align-items: center; justify-content: space-between; box-shadow: 0 24px 80px rgba(0,0,0,.55); }
.render-copy span { display: block; color: var(--green); font-size: 9px; letter-spacing: 2px; font-weight: 700; margin-bottom: 5px; }
.render-copy span.dirty { color: #ffbd52; }
.render-copy strong { font-size: 13px; font-weight: 500; color: #b9b9c2; }
.render-copy a { color: var(--green); }
.render-actions { display: flex; gap: 10px; }
.secondary-button, .render-button { height: 50px; border-radius: 11px; padding: 0 21px; }
.secondary-button { border: 1px solid #393942; color: white; background: #17171c; font-size: 11px; font-weight: 700; letter-spacing: 1px; }
.render-button { min-width: 210px; font-size: 12px; }
.render-button:disabled { opacity: .45; cursor: progress; }

@media (max-width: 900px) {
  .loader-screen { padding: 54px 0; }
  .editor-heading { display: block; }
  .parlay-summary { margin-top: 30px; }
  .clip-workspace { grid-template-columns: 1fr; }
  .render-copy { display: none; }
  .render-dock { justify-content: flex-end; }
}

@media (max-width: 620px) {
  .topbar { height: 76px; padding: 0 5vw; }
  .brand-lockup img { width: 44px; height: 44px; }
  .system-state { display: none; }
  .loader-screen { min-height: calc(100vh - 76px); }
  .loader-copy h1 { font-size: 44px; letter-spacing: -2.5px; }
  .id-control { display: grid; gap: 10px; }
  .id-control input, .id-control button { border-radius: 12px; width: 100%; }
  .id-control button { height: 54px; }
}
