:root {
  --bg: #0b0d12;
  --bg2: #12151d;
  --card: #161a24;
  --line: #262c3a;
  --text: #eef1f7;
  --muted: #8f98ab;
  --accent: #ff3d7f;
  --accent2: #ff9f43;
  --ok: #2ed47a;
  --warn: #ffb020;
  --danger: #ff5260;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 Inter, system-ui, sans-serif; }
body { min-height: 100vh; display: flex; flex-direction: column; background:
  radial-gradient(1200px 500px at 10% -10%, #ff3d7f22, transparent 60%),
  radial-gradient(900px 400px at 100% 0%, #ff9f4318, transparent 60%), var(--bg); }
a { color: inherit; }
.hidden { display: none !important; }
h2 { font-size: 16px; margin: 0 0 10px; letter-spacing: .2px; }
.hint { color: var(--muted); font-size: 13.5px; margin: 0 0 12px; }
.label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .8px; }

.top { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: #0b0d12cc; backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 20px; background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text small { color: var(--muted); font-size: 12px; }
.status-pills { display: flex; gap: 8px; margin-left: auto; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; background: var(--bg2); border: 1px solid var(--line); font-size: 13px; }
.pill.muted { color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill.live .dot { background: var(--ok); box-shadow: 0 0 0 4px #2ed47a33; }
.pill.down .dot { background: var(--warn); }
.account { display: flex; align-items: center; }
.me { display: flex; align-items: center; gap: 10px; font-weight: 600; }

.btn { appearance: none; border: 1px solid var(--line); background: var(--bg2); color: var(--text); padding: 10px 16px; border-radius: 10px; font: 600 14px Inter, sans-serif; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .05s, background .15s, border-color .15s; }
.btn:hover { border-color: #3a4256; }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn-block { width: 100%; margin-top: 8px; }
.btn-primary { background: linear-gradient(135deg, var(--accent), #ff5a5a); border-color: transparent; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; }
.btn-danger { border-color: #ff526066; color: #ffb3ba; }
.btn-google { background: #fff; color: #1f1f1f; border-color: #fff; }
.btn-pix { background: #32bcad; border-color: transparent; color: #04211e; }
.btn-pulse { animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 #ff3d7f88; } 50% { box-shadow: 0 0 0 10px #ff3d7f00; } }

.layout { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; padding: 18px 20px; max-width: 1500px; width: 100%; margin: 0 auto; }
.stage { min-width: 0; }
.screen { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.screen iframe, .screen video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.yt-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 20px; }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; background: #000c; padding: 24px; font-size: 18px; font-weight: 600; z-index: 5; }
.hud { position: absolute; left: 12px; right: 12px; top: 12px; display: flex; gap: 8px; align-items: center; z-index: 6; }
.hud-timer { margin-right: auto; background: #000b; padding: 6px 12px; border-radius: 8px; font: 700 18px ui-monospace, monospace; }
.now { display: flex; align-items: center; gap: 24px; padding: 14px 4px; }
.now-name { font-size: 20px; font-weight: 700; }
.now-right { margin-left: auto; text-align: right; }
.now-time { font: 700 20px ui-monospace, monospace; }

.side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; }
.count { color: var(--muted); font-size: 13px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 4px 0 8px; }
.queue-list { list-style: none; margin: 12px 0 0; padding: 0; max-height: 260px; overflow: auto; border-top: 1px solid var(--line); }
.queue-list li { display: flex; gap: 10px; padding: 7px 2px; border-bottom: 1px solid #1d2230; font-size: 14px; }
.queue-list li b { color: var(--muted); width: 22px; text-align: right; font-weight: 600; }
.queue-list li.me-item { color: var(--accent); font-weight: 700; }
.chat { height: 360px; border-radius: 10px; overflow: hidden; background: var(--bg2); }
.chat iframe { width: 100%; height: 100%; border: 0; }
#turnstile { margin: 6px 0; min-height: 65px; }

.admin-card { border-color: #ff3d7f55; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.admin-row { display: flex; gap: 6px; margin-top: 8px; }
.admin-row input, .admin-row select { flex: 1; min-width: 0; background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font: inherit; }
.admin-stats { font-size: 12px; color: var(--muted); white-space: pre-wrap; margin: 8px 0 0; }

.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 50; }
.toast { background: #1d2230; border: 1px solid var(--line); border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: 10px; max-width: 340px; box-shadow: 0 10px 30px #0008; animation: in .2s ease-out; }
@keyframes in { from { transform: translateY(8px); opacity: 0; } }

.dlg { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); max-width: 560px; width: calc(100% - 32px); }
.dlg::backdrop { background: #000a; }
.test-area { background: var(--bg2); border-radius: 12px; padding: 16px; outline: none; cursor: crosshair; }
.test-area:focus { box-shadow: 0 0 0 2px var(--accent); }
.sticks { display: flex; gap: 24px; justify-content: center; margin-bottom: 12px; }
.ts { width: 90px; height: 90px; border-radius: 50%; border: 2px solid var(--line); position: relative; }
.ts i { position: absolute; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); left: 32px; top: 32px; transition: transform .03s; }
.btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.btns span { padding: 4px 8px; border-radius: 6px; background: #222838; color: var(--muted); font-size: 12px; font-weight: 700; }
.btns span.on { background: var(--accent); color: #fff; }
.keys table { font-size: 13px; color: var(--muted); border-collapse: collapse; margin-top: 8px; }
.keys td { padding: 3px 10px 3px 0; }
.keys td:nth-child(odd) { color: var(--text); font-weight: 600; }

.touch { position: absolute; inset: 0; z-index: 7; pointer-events: none; }
.touch .stick { pointer-events: auto; position: absolute; left: 4%; bottom: 8%; width: 120px; height: 120px; border-radius: 50%; background: #ffffff1a; border: 2px solid #ffffff33; touch-action: none; }
.touch .stick i { position: absolute; width: 48px; height: 48px; left: 36px; top: 36px; border-radius: 50%; background: #ffffff88; }
.touch .cam-area { pointer-events: auto; position: absolute; left: 35%; right: 30%; top: 15%; bottom: 0; touch-action: none; }
.touch .pad { pointer-events: auto; position: absolute; right: 3%; bottom: 6%; display: grid; grid-template-columns: repeat(2, 54px); gap: 8px; }
.touch .pad button { height: 54px; border-radius: 50%; border: 2px solid #ffffff44; background: #0008; color: #fff; font-size: 20px; touch-action: none; }
.touch .pad button.wide { border-radius: 12px; height: 38px; font-size: 14px; }
.touch .pad button.on { background: var(--accent); }

.foot { color: var(--muted); font-size: 12.5px; text-align: center; padding: 18px 20px 26px; border-top: 1px solid var(--line); }

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; padding: 12px 16px; }
  .status-pills { display: none; }
  .chat { height: 300px; }
}
@media (max-width: 480px) {
  .top { padding: 10px 16px; }
  .brand-text small { display: none; }
  .btn-google { padding: 8px 10px; font-size: 13px; }
  .now { flex-wrap: wrap; gap: 10px; }
}

.doc { max-width: 760px; width: 100%; margin: 0 auto; padding: 28px 20px 40px; flex: 1; }
.doc h1 { font-size: 30px; margin: 0 0 6px; }
.doc h2 { font-size: 18px; margin: 28px 0 8px; }
.doc p, .doc li { color: #d3d8e3; }
.doc ul { padding-left: 20px; }
.doc a { color: var(--accent); }
.foot a { color: var(--muted); }
