/* Aura Farming — mobile-first (ADR 0009). Dark stage, acid-green aura, built for phones held in one hand. */
:root {
  --bg: #0a0d09; --bg-2: #10160d; --fg: #f3f7ee; --muted: #93a488; --aura: #b7ff5c; --aura-dim: #5e8f1f;
  --aura-soft: rgba(183,255,92,.12); --danger: #ff5c7a; --card: #141b11; --line: #243220; --violet: #b48cff;
  --radius: 1.1rem;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom);
  background-image: radial-gradient(60% 40% at 50% -5%, rgba(183,255,92,.16), transparent 70%); background-repeat: no-repeat; }
a { color: var(--aura); text-decoration-thickness: 1px; text-underline-offset: 2px; }
main { flex: 1; padding: 1rem; max-width: 640px; width: 100%; margin: 0 auto; }
h1 { font-size: 1.9rem; line-height: 1.05; margin: 0 0 .5rem; letter-spacing: -.03em; font-weight: 900; }
h2 { font-size: 1.25rem; margin: 0 0 .6rem; letter-spacing: -.02em; font-weight: 800; }
p { margin: .4rem 0 .8rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
.lead { font-size: 1.1rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 700; color: var(--aura); margin: 0 0 .4rem; }
.glow { color: var(--aura); text-shadow: 0 0 24px rgba(183,255,92,.45); }
code { background: var(--card); padding: .1em .35em; border-radius: .35em; font-size: .9em; }

/* header / footer */
.top { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: .7rem 1rem; gap: 1rem;
  background: rgba(10,13,9,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top nav { display: flex; gap: .9rem; align-items: center; flex-wrap: wrap; font-size: .9rem; justify-content: flex-end; }
.top nav a { color: var(--fg); text-decoration: none; opacity: .85; } .top nav a:hover { opacity: 1; color: var(--aura); }
.top nav .navbtn { background: var(--aura); color: #0b0f0a; font-weight: 800; padding: .3rem .8rem; border-radius: 999px; opacity: 1; }
.top nav .nav-me { color: var(--aura); font-weight: 700; }
.brand { font-weight: 900; text-decoration: none; color: var(--fg); letter-spacing: -.03em; white-space: nowrap; }
footer { padding: 1.5rem 1rem 2rem; text-align: center; color: var(--muted); font-size: .8rem; border-top: 1px solid var(--line); margin-top: 2rem; }
footer nav { margin-bottom: .4rem; } footer a { color: var(--muted); }
.flash { margin: 0; padding: .6rem 1rem; font-size: .9rem; text-align: center; } .notice { background: #1d2a14; } .alert { background: #3a1420; }

/* controls */
.btn, .linkish { font: inherit; cursor: pointer; border-radius: 999px; padding: .65rem 1.3rem; border: 1px solid var(--line); background: var(--card); color: var(--fg); text-decoration: none; display: inline-block; transition: transform .08s ease, box-shadow .15s ease; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--aura); color: #0b0f0a; border-color: var(--aura); font-weight: 800; box-shadow: 0 6px 24px -8px rgba(183,255,92,.6); }
.btn.primary:hover { box-shadow: 0 8px 32px -6px rgba(183,255,92,.8); }
.btn.big { padding: 1.05rem 2rem; font-size: 1.15rem; width: 100%; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.linkish { background: none; border: none; color: var(--aura); padding: 0; text-decoration: underline; }
form.inline { display: inline-flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
input[type=text], textarea { font: inherit; width: 100%; padding: .8rem 1rem; border-radius: .7rem; border: 1px solid var(--line); background: var(--bg-2); color: var(--fg); margin: .25rem 0 1rem; }
input[type=text]:focus, textarea:focus { outline: 2px solid var(--aura); outline-offset: 1px; border-color: var(--aura); }
label { display: block; font-weight: 600; } .check { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; margin-bottom: 1rem; }
.errors { color: var(--danger); padding-left: 1.2rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }
.card.empty { text-align: center; }
table { width: 100%; border-collapse: collapse; } td, th { padding: .6rem .5rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; } tr.me { background: var(--aura-soft); }
details.danger { margin-top: 2rem; } details.danger summary { cursor: pointer; }
.prose h2 { font-size: 1.1rem; margin-top: 1.6rem; } .prose li { margin-bottom: .4rem; } .prose ol, .prose ul { padding-left: 1.3rem; }
.prose .btn { margin-top: .5rem; }
.faq h2 { font-size: 1rem; margin-top: 1.4rem; color: var(--aura); }

/* landing */
.landing .hero { text-align: center; padding: 2rem 0 1.5rem; }
.landing .hero h1 { font-size: clamp(2.4rem, 9vw, 3.4rem); }
.landing .hero .lead { max-width: 34rem; margin: .75rem auto 1.25rem; }
.landing section { margin-bottom: 1.5rem; }
.step-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.step-grid li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1rem 1rem 3.4rem; position: relative; }
.step-grid li p { margin: .2rem 0 0; color: var(--muted); font-size: .95rem; }
.step-n { position: absolute; left: 1rem; top: 1rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--aura); color: #0b0f0a; font-weight: 900; display: grid; place-items: center; font-size: .9rem; }
@media (min-width: 600px) { .step-grid { grid-template-columns: 1fr 1fr; } }
.rule-list { list-style: none; padding: 0; margin: 0 0 .5rem; } .rule-list li { padding: .45rem 0; border-bottom: 1px dashed var(--line); } .rule-list li:last-child { border: 0; }
.mini-board { list-style: none; padding: 0; margin: 0 0 .5rem; }
.mini-board li { display: flex; align-items: center; gap: .75rem; padding: .55rem .75rem; border-radius: .7rem; background: var(--card); margin-bottom: .35rem; border: 1px solid var(--line); }
.mini-board .rank { color: var(--muted); width: 2.2rem; font-weight: 700; } .mini-board a { text-decoration: none; font-weight: 700; flex: 1; color: var(--fg); }
.aura-pts { color: var(--aura); font-weight: 800; white-space: nowrap; }
.share-cta { background: linear-gradient(135deg, var(--card), #1a2413); }

/* leaderboard */
.podium { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .5rem; }
.podium li { display: flex; align-items: center; gap: .75rem; padding: .9rem 1rem; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.podium .p1 { border-color: var(--aura); background: linear-gradient(135deg, #1a2413, var(--card)); box-shadow: 0 0 40px -12px rgba(183,255,92,.5); }
.podium .medal { font-size: 1.6rem; } .podium .handle { flex: 1; font-weight: 800; text-decoration: none; color: var(--fg); font-size: 1.1rem; }
.podium .p1 .handle { font-size: 1.3rem; }
.board-table .rank { color: var(--muted); width: 3rem; } .board-table a { text-decoration: none; color: var(--fg); font-weight: 600; }
.me-rank { color: var(--aura); }

/* profile */
.profile { text-align: center; padding: 1.75rem 1.25rem; }
.profile h1 { font-size: 2rem; word-break: break-all; }
.big-number { font-size: 4.5rem; font-weight: 900; line-height: 1; margin: .5rem 0; color: var(--aura); text-shadow: 0 0 32px rgba(183,255,92,.35); }
.big-number .small { font-size: 1rem; color: var(--muted); font-weight: 400; }
.stat-row { list-style: none; padding: 0; margin: 1rem 0; display: flex; justify-content: center; gap: 1.5rem; }
.stat-row li { display: flex; flex-direction: column; } .stat-row strong { font-size: 1.3rem; } .stat-row span { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.profile .actions { margin-top: .5rem; flex-direction: row; flex-wrap: wrap; justify-content: center; }

/* play */
.play .stage { margin-bottom: .75rem; }
.live-dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--aura); margin-right: .4rem; animation: pulse 1.4s ease-in-out infinite; }
.pulse { animation: pulse 1.4s ease-in-out infinite; } @keyframes pulse { 50% { opacity: .4; } }

/* stage: portrait tiles */
.stage { position: relative; width: 100%; border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--line); }
.stage.single { aspect-ratio: 3 / 4; }
.stage.duo { aspect-ratio: 9 / 16; max-height: 70dvh; }
.tile { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile.local { transform: scaleX(-1); }
.stage.duo .local { position: absolute; right: .75rem; bottom: .75rem; width: 30%; height: auto; aspect-ratio: 3 / 4; border-radius: .75rem; border: 2px solid var(--aura); z-index: 2; }
.stage.duo .remote { position: absolute; inset: 0; }
@media (min-width: 720px) { .stage.duo { aspect-ratio: 16 / 9; max-height: 70vh; } .stage.duo .local { width: 22%; } }

.overlay { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(10,13,9,.74); backdrop-filter: blur(6px); text-align: center; padding: 1rem; }
.overlay.hidden { display: none; }
.phase { font-size: 1.5rem; font-weight: 800; margin: .5rem 0 0; }
.countdown { font-size: 5rem; font-weight: 900; color: var(--aura); margin: 0; line-height: 1; min-height: 5rem; text-shadow: 0 0 40px rgba(183,255,92,.5); }
.aura-ring { width: 120px; height: 120px; border-radius: 50%; border: 6px solid var(--aura-dim); border-top-color: var(--aura); display: none; }
.judging .aura-ring { display: block; animation: spin 1.1s linear infinite, glow 2s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes glow { 50% { box-shadow: 0 0 60px 10px rgba(183,255,92,.35); } }

/* Recording timer badge — visible while the overlay is hidden */
.rec-timer { position: absolute; top: .75rem; left: 50%; transform: translateX(-50%); z-index: 2; font-size: 1.25rem; font-weight: 900; color: var(--aura); background: rgba(10,13,9,.65); border: 1px solid var(--aura-dim); border-radius: 999px; padding: .3rem .9rem; }
.rec-timer.hidden { display: none; }

/* Jury (ADR 0012): bot votes popping in during judging */
.jury-tally { font-size: 1.75rem; font-weight: 900; color: var(--aura); margin: .25rem 0 0; min-height: 1.75rem; line-height: 1; }
.jury { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; max-width: 92%; margin-top: .75rem; }
.juror { display: inline-flex; gap: .35rem; align-items: baseline; font-size: .8rem; padding: .25rem .65rem; border-radius: 999px; background: var(--aura-soft); border: 1px solid var(--aura-dim); animation: pop .25s ease-out; }
.juror .juror-name { opacity: .75; }
.juror .juror-vote { color: var(--aura); font-weight: 700; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

/* result */
.result { text-align: center; padding: 1.5rem 0; } .result.won h1 { color: var(--aura); text-shadow: 0 0 30px rgba(183,255,92,.45); }
.result h1 { font-size: 1.6rem; }
.verdict-tally { font-size: 3.2rem; font-weight: 900; color: var(--aura); margin: .5rem 0 0; line-height: 1; }
.result.lost .verdict-tally { color: var(--fg); opacity: .85; }
.result .jury { margin: .75rem auto 0; }
.juror.for-me { border-color: var(--aura); }
.juror.for-them { opacity: .65; }
.actions { display: flex; flex-direction: column; gap: .75rem; align-items: center; margin-top: 1.5rem; }

/* Ad slots (ADR 0009, 0014): only on content pages, clearly labelled, never overlapping content.
   Reserved height stops layout shift; the label keeps them honest. */
.ad-slot { position: relative; min-height: 110px; margin: 1.5rem auto; max-width: 640px; border: 1px dashed var(--line); border-radius: .75rem; background: var(--bg-2); }
.ad-slot::before { content: "Ad"; position: absolute; top: .3rem; left: .6rem; font-size: .65rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.ad-slot:not(.live)::after { content: "advertisement"; display: block; text-align: center; color: var(--muted); font-size: .7rem; line-height: 110px; opacity: .5; }
.ad-slot.live { border-color: var(--line); padding-top: 1.1rem; }

/* admin */
body.admin main { max-width: 1100px; }
.clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin: 1rem 0; }
.clips video { width: 100%; border-radius: .5rem; background: #000; }
.clips figure { margin: 0; } .clips figcaption { font-size: .85rem; }
blockquote { border-left: 3px solid var(--aura-dim); margin: .5rem 0; padding-left: .75rem; }

/* language switcher (ADR 0015) */
footer .lang { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin-top: .75rem; }
footer .lang form { display: inline; } footer .lang .linkish { color: var(--muted); font-size: .8rem; } footer .lang .current { color: var(--aura); font-size: .8rem; font-weight: 700; }
