/* Shared look for the lanparty.wtf pages (join, download). Spec §5, §6.1. */
:root {
  --ink: #f3e9d2; --dim: rgba(243, 233, 210, .6); --line: rgba(243, 233, 210, .12); --bg: #0b0908;
  --accent: #ffb347; --ok: #5ee08a; --bad: #ff5a4e;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body.site { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 28px 16px 20px; font-family: var(--sans); overflow-x: hidden; }
.glow { position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 42%, rgba(120, 170, 255, .16), transparent 70%),
              radial-gradient(ellipse 60% 40% at 50% 100%, rgba(255, 140, 60, .12), transparent 70%); }
.site > :not(.glow) { position: relative; z-index: 1; }
.logo { font-weight: 800; letter-spacing: -.03em; font-size: 18px; color: var(--ink); text-decoration: none; }
.logo i { color: var(--accent); font-style: normal; }
.panel { margin: auto 0; width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.panel h1 { margin: 0; font-size: 34px; letter-spacing: -.04em; line-height: 1; }
.lead { margin: -8px 0 8px; font-size: 14px; color: var(--dim); line-height: 1.5; }
.status { margin: 0; min-height: 18px; font: 600 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ok); }
.hint { margin: 0; min-height: 20px; font-size: 13px; line-height: 1.45; color: var(--bad); }
.home-link { margin-top: 24px; font-size: 13px; color: var(--dim); text-decoration: none; border-bottom: 1px solid var(--line); }
.home-link:hover { color: var(--ink); }
.foot { margin-top: 28px; font: 11px/1.6 var(--mono); color: var(--dim); text-align: center; }
.foot a { color: var(--dim); }

/* Frosted field with a turning gradient rim. Without JS the join input is one of these. */
@property --a { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.field, .box { position: relative; border-radius: 16px; background: rgba(255, 255, 255, .04); color: var(--ink); border: 0; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.field::before, .box::before { content: ""; position: absolute; inset: -1.5px; border-radius: 17px; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--a), rgba(255, 255, 255, .08), rgba(255, 255, 255, .08) 60%, var(--accent), #ff5ea8, #7dd3ff, rgba(255, 255, 255, .08));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .35; transition: opacity .25s; animation: rim 3.2s linear infinite; }
.field:focus-within::before { opacity: 1; }
.field input { width: 100%; padding: 16px 18px; font: 600 18px var(--sans); color: var(--ink); background: transparent; border: 0; outline: none; text-align: center; }
@keyframes rim { to { --a: 360deg; } }

/* The four code boxes: one real input laid over them (only once join.js runs). */
.code { position: relative; display: flex; gap: 10px; justify-content: center; }
.code .box { display: none; }
.code input { width: 12ch; padding: 16px; font: 700 32px var(--sans); letter-spacing: .2em; text-align: center; text-transform: uppercase; color: var(--ink); background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .16); border-radius: 16px; }
.js .code input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; opacity: 0; border: 0; font-size: 16px; caret-color: transparent; cursor: text; z-index: 3; }
.js .code .box { display: grid; place-items: center; width: 66px; height: 84px; font: 700 40px var(--sans); transition: background .2s, box-shadow .2s; }
.code .box.filled::before, .code .box.cur::before { opacity: 1; }
.code .box.filled { background: rgba(255, 179, 71, .06); }
.code .box.cur { box-shadow: 0 0 30px rgba(255, 179, 71, .25); }
.code .box.cur::after { content: ""; position: absolute; width: 2px; height: 36px; background: var(--accent); animation: caret 1s steps(1) infinite; }
.code .ch.pop { display: inline-block; animation: pop .26s cubic-bezier(.3, 1.6, .5, 1); }
.code.shake { animation: shake .38s; }
.code.ok .box::before { background: var(--ok); opacity: 1; animation: none; }
.code.ok .box { box-shadow: 0 0 34px rgba(94, 224, 138, .35); }
.code.bad .box::before { background: var(--bad); opacity: 1; animation: none; }
@keyframes caret { 50% { opacity: 0; } }
@keyframes pop { from { transform: scale(.4) translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

/* Buttons */
.btn { display: block; width: 100%; padding: 14px 18px; font: 700 15px var(--sans); color: var(--ink); background: transparent; border: 1px solid rgba(243, 233, 210, .25); border-radius: 10px; cursor: pointer; }
.btn.primary { background: var(--ink); color: #1a120c; border-color: transparent; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.js .nojs { display: none; }

@media (max-width: 340px) { .js .code .box { width: 56px; height: 72px; font-size: 34px; } }
@media (prefers-reduced-motion: reduce) {
  .field::before, .box::before, .code .box.cur::after { animation: none; }
  .code.shake, .code .ch.pop { animation: none; }
  .field::before, .js .code .box { transition: none; }
}
