:root {
  --bg: #0b110e;
  --surface: #131b17;
  --surface-2: #1a241f;
  --line: #24312a;
  --ink: #eef5f0;
  --muted: #8ea096;
  --brand: #3ddc84;
  --brand-ink: #062012;
  --danger: #ff6b6b;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: Inter, system-ui, sans-serif; font-size: 15px; line-height: 1.45; min-height: 100dvh; }
h1, h2, h3, .display { font-family: 'Barlow Condensed', 'Arial Narrow', Inter, system-ui, sans-serif; margin: 0; letter-spacing: 0.01em; }
button, input { font: inherit; color: inherit; }
a { color: var(--brand); }
.muted, small { color: var(--muted); }

.wrap { max-width: 560px; margin: 0 auto; padding: calc(14px + var(--safe-top)) 16px calc(28px + var(--safe-bottom)); }

/* ---------- topo ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand b { font-family: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif; font-size: 24px; font-weight: 800; letter-spacing: 0.02em; }
.iconbtn { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; width: 42px; height: 42px; display: grid; place-items: center; cursor: pointer; }

.arena-pick {
  width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer;
}
.arena-pick .l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.arena-pick .n { font-family: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif; font-size: 24px; font-weight: 700; line-height: 1.1; }

/* ---------- chips ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; margin: 12px -16px 0; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; background: var(--surface); border: 1px solid var(--line); border-radius: 99px;
  padding: 8px 14px; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.chip.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chips.days .chip { display: grid; text-align: center; line-height: 1.15; border-radius: 14px; padding: 7px 12px; min-width: 62px; }
.chips.days .chip small { font-size: 11px; font-weight: 600; color: inherit; opacity: 0.75; text-transform: uppercase; }

/* ---------- lista ---------- */
.hour { display: flex; align-items: baseline; gap: 10px; margin: 22px 0 10px; }
.hour h3 { font-size: 26px; font-weight: 800; }
.hour span { flex: 1; height: 1px; background: var(--line); }
.list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.clip { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; text-decoration: none; color: inherit; display: block; }
.clip .th { aspect-ratio: 16/9; background: #050806 center/cover no-repeat; position: relative; }
.clip .th::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.55)); }
.clip .dur { position: absolute; right: 7px; bottom: 6px; z-index: 1; font-size: 12px; font-weight: 600; }
.clip .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 1; width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,.45); display: grid; place-items: center; }
.clip .meta { padding: 8px 10px 10px; }
.clip .t { font-family: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif; font-size: 21px; font-weight: 700; line-height: 1; }
.clip .c { font-size: 12px; color: var(--muted); }
.clip.new { outline: 2px solid var(--brand); }

.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty .display { color: var(--ink); font-size: 26px; margin-bottom: 6px; }

/* ---------- vídeo ---------- */
.player { margin: 0 -16px; background: #000; }
.player video { width: 100%; max-height: 70dvh; display: block; background: #000; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.btn {
  border: 0; border-radius: 14px; padding: 14px; font-weight: 700; font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--line);
}
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn:disabled { opacity: 0.6; }
.btn.block { width: 100%; }
.info { margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.info .display { font-size: 26px; }

/* ---------- auth ---------- */
.auth { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; }
.hero { text-align: center; margin-bottom: 26px; }
.hero img { width: 76px; height: 76px; border-radius: 20px; margin-bottom: 14px; }
.hero h1 { font-size: 40px; font-weight: 800; line-height: 1; }
.hero p { color: var(--muted); margin: 8px 0 0; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px; margin-bottom: 16px; }
.tabs button { background: none; border: 0; padding: 10px; border-radius: 10px; font-weight: 600; cursor: pointer; color: var(--muted); }
.tabs button.on { background: var(--surface-2); color: var(--ink); }
form.f { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
.field input { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; font-size: 16px; color: var(--ink); }
.field input:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
.err { color: var(--danger); font-size: 14px; min-height: 1.2em; }
.field .opt { font-weight: 400; opacity: 0.8; }
.pw { position: relative; display: block; }
.pw input { width: 100%; padding-right: 52px; }
.pw .eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; color: var(--muted); cursor: pointer; border-radius: 10px; }
.pw .eye:hover { color: var(--ink); }
.link { background: none; border: 0; color: var(--muted); font-size: 14px; padding: 6px; cursor: pointer; text-decoration: underline; justify-self: center; }

/* ---------- folha (escolher arena) ---------- */
.sheet { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; z-index: 20; }
.sheet .box { background: var(--bg); border-top: 1px solid var(--line); border-radius: 22px 22px 0 0; width: 100%; max-width: 560px; margin: 0 auto; max-height: 86dvh; display: flex; flex-direction: column; padding: 16px 16px calc(16px + var(--safe-bottom)); }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 14px; }
.sheet .scroll { overflow-y: auto; margin-top: 12px; }
.arena-item { width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 8px; cursor: pointer; }
.arena-item b { font-size: 16px; }

#toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 12px; font-weight: 600; opacity: 0; transition: .2s; pointer-events: none; z-index: 30; max-width: 90vw; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

.spin { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: s 0.8s linear infinite; margin: 40px auto; }
@keyframes s { to { transform: rotate(360deg); } }
