@import url('https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@600;800;900&family=Archivo:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap');

:root {
  --night: #0a1020;
  --night-2: #111a30;
  --line: #24304d;
  --chalk: #f3efe4;
  --muted: #9aa5c0;
  --amber: #ffb627;
  --turf: #2fd27a;
  --flag: #ff4d4d;
  --radius: 14px;
  --display: 'Big Shoulders Display', Impact, sans-serif;
  --body: 'Archivo', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--body); color: var(--chalk); background: var(--night); -webkit-font-smoothing: antialiased; }
a { color: inherit; }

.page {
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 15% -10%, rgba(255, 182, 39, .14), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(47, 210, 122, .10), transparent 60%),
    repeating-linear-gradient(90deg, transparent 0 119px, rgba(255,255,255,.035) 119px 120px),
    var(--night);
}

.eyebrow { font-family: var(--mono); font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--amber); margin: 0 0 1rem; }
h1, h2, h3 { font-family: var(--display); text-transform: uppercase; letter-spacing: .01em; line-height: .92; margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 700 .95rem var(--body); letter-spacing: .02em;
  padding: .85rem 1.3rem; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--amber); color: #1a1205; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255, 182, 39, .28); }
.btn:disabled { opacity: .55; cursor: progress; transform: none; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--chalk); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--muted); box-shadow: none; }
.btn.small { padding: .5rem .9rem; font-size: .82rem; }
.btn.danger { background: transparent; color: var(--flag); border: 1px solid rgba(255, 77, 77, .35); }

/* Header */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 1.4rem clamp(1.2rem, 4vw, 3rem); }
.brand { display: flex; align-items: center; gap: .65rem; font-family: var(--display); font-weight: 900; font-size: 1.6rem; text-transform: uppercase; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--amber); display: grid; place-items: center; color: var(--night); font-size: 1.1rem; }

/* Landing */
.hero { padding: clamp(3rem, 9vw, 7rem) clamp(1.2rem, 4vw, 3rem) 3rem; max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.hero h1 { font-size: clamp(3.4rem, 9vw, 7.5rem); font-weight: 900; }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero p.lede { color: var(--muted); font-size: 1.15rem; line-height: 1.6; max-width: 34rem; margin: 1.5rem 0 2rem; }
.hero .actions { display: flex; gap: .8rem; flex-wrap: wrap; }

.ticket {
  background: linear-gradient(160deg, #18233f, #0e1629);
  border: 1px solid var(--line); border-radius: 20px; padding: 1.6rem; position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,.45); transform: rotate(2deg);
}
.ticket::before, .ticket::after { content: ''; position: absolute; top: 62%; width: 26px; height: 26px; border-radius: 50%; background: var(--night); }
.ticket::before { left: -14px; } .ticket::after { right: -14px; }
.ticket .label { font-family: var(--mono); font-size: .7rem; letter-spacing: .16em; color: var(--muted); text-transform: uppercase; }
.ticket .title { font-family: var(--display); font-size: 2.3rem; font-weight: 800; text-transform: uppercase; margin: .4rem 0 1.2rem; line-height: .95; }
.ticket .url { font-family: var(--mono); font-size: .9rem; background: rgba(255,182,39,.1); color: var(--amber); padding: .7rem .9rem; border-radius: 10px; border: 1px dashed rgba(255,182,39,.4); }
.ticket .divider { border-top: 2px dashed var(--line); margin: 1.4rem -1.6rem; }
.ticket .row { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); }
.ticket .row b { color: var(--chalk); }

.plays { max-width: 1200px; margin: 0 auto; padding: 2rem clamp(1.2rem, 4vw, 3rem) 6rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.play { border-top: 3px solid var(--amber); background: rgba(255,255,255,.02); padding: 1.4rem; border-radius: 0 0 var(--radius) var(--radius); }
.play:nth-child(2) { border-color: var(--turf); } .play:nth-child(3) { border-color: var(--chalk); }
.play .num { font-family: var(--display); font-size: 3rem; font-weight: 900; color: rgba(255,255,255,.14); }
.play h3 { font-size: 1.6rem; margin: .2rem 0 .6rem; }
.play p { color: var(--muted); line-height: 1.55; margin: 0; }

footer.foot { text-align: center; padding: 2rem; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }

/* Studio */
.studio { max-width: 1100px; margin: 0 auto; padding: 1rem clamp(1.2rem, 4vw, 3rem) 5rem; }
.studio h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); font-weight: 900; margin-bottom: .6rem; }
.studio .sub { color: var(--muted); margin: 0 0 2.2rem; line-height: 1.55; max-width: 40rem; }
.panel { background: var(--night-2); border: 1px solid var(--line); border-radius: 18px; padding: clamp(1.2rem, 3vw, 2rem); }
.gate { max-width: 460px; margin: 4rem auto; }
.gate h2 { font-size: 2.2rem; margin-bottom: .5rem; }
.gate p { color: var(--muted); line-height: 1.5; margin: 0 0 1.4rem; }

.field { display: grid; gap: .45rem; margin-bottom: 1.1rem; }
.field label { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.field input[type=text], .field input[type=password] {
  font: 500 1rem var(--body); color: var(--chalk); background: var(--night); border: 1px solid var(--line);
  border-radius: 10px; padding: .8rem .9rem; outline: none; width: 100%;
}
.field input:focus { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255,182,39,.18); }
.slug-input { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--night); }
.slug-input:focus-within { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255,182,39,.18); }
.slug-input span { font-family: var(--mono); font-size: .85rem; color: var(--muted); padding: .85rem 0 .85rem .9rem; white-space: nowrap; }
.slug-input input { border: 0 !important; box-shadow: none !important; padding-left: 0 !important; font-family: var(--mono) !important; }
.hint { font-size: .82rem; color: var(--muted); }
.error { color: var(--flag); font-size: .9rem; min-height: 1.2em; margin: .2rem 0 0; }

.studio-grid { display: grid; grid-template-columns: 420px 1fr; gap: 1.4rem; align-items: start; }
.drop {
  border: 2px dashed var(--line); border-radius: 14px; padding: 1.8rem 1rem; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s; color: var(--muted);
}
.drop:hover, .drop.over { border-color: var(--amber); background: rgba(255,182,39,.05); }
.drop strong { display: block; color: var(--chalk); font-size: 1.05rem; margin-bottom: .3rem; }
.drop.has-file { border-style: solid; border-color: var(--turf); color: var(--chalk); }
.drop input { display: none; }

.panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1rem; }
.panel-head h2 { font-size: 1.8rem; }
.count { font-family: var(--mono); font-size: .8rem; color: var(--muted); }

.program { display: grid; grid-template-columns: 1fr auto; gap: .8rem; padding: 1rem 0; border-top: 1px solid var(--line); align-items: center; }
.program:first-of-type { border-top: 0; }
.program h3 { font-family: var(--body); text-transform: none; font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.program .link { font-family: var(--mono); font-size: .82rem; color: var(--amber); text-decoration: none; word-break: break-all; }
.program .meta { font-size: .78rem; color: var(--muted); margin-top: .25rem; }
.program .acts { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.empty { color: var(--muted); padding: 2rem 0; text-align: center; line-height: 1.6; }

.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(120%); background: var(--chalk); color: var(--night); font-weight: 600; padding: .8rem 1.2rem; border-radius: 999px; transition: transform .25s ease; z-index: 10; }
.toast.show { transform: translateX(-50%) translateY(0); }

.empty-state { min-height: 100vh; display: grid; place-content: center; text-align: center; padding: 2rem; gap: .4rem; }
.empty-state h1 { font-size: clamp(2.6rem, 7vw, 4.5rem); font-weight: 900; }
.empty-state p { color: var(--muted); margin: .6rem 0 1.6rem; }
.empty-state .btn { justify-self: center; }

/* Viewer */
.viewer { background: #000; overflow: hidden; }
.viewer-frame { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.share-chip {
  position: fixed; right: 14px; bottom: 14px; z-index: 5; font: 600 .8rem var(--body);
  background: rgba(10, 16, 32, .82); color: var(--chalk); border: 1px solid rgba(255,255,255,.15);
  padding: .55rem .9rem; border-radius: 999px; cursor: pointer; backdrop-filter: blur(8px); opacity: .75; transition: opacity .15s;
}
.share-chip:hover { opacity: 1; }

@media (max-width: 880px) {
  .hero, .studio-grid { grid-template-columns: 1fr; }
  .plays { grid-template-columns: 1fr; }
  .ticket { transform: none; }
}
