/* Shared styles for the ucc-cs.org main page and the whole-site leaderboard. */
:root {
  --bg: #182B57; --ink: #F1F5FF; --muted: #AEBBDC; --faint: #7F8DB3; --line: rgba(255,255,255,.12); --glass: rgba(255,255,255,.07); --card: #1F3565;
  --c1: #4F7BFF; --c1b: #5CC8E8; --c2: #10B981; --c2b: #F5A524; --c3: #8B5CF6; --c3b: #B6F23A;
  --c4: #F97316; --c4b: #FDE047; --c5: #0EA5E9; --c5b: #F9A8D4; --c6: #DC2626; --c6b: #4ADE80;
  --good: #36CF7E; --bad: #FF6E72; --gold: #FFB547; --display: 'Bricolage Grotesque', Inter, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: radial-gradient(120% 80% at 50% 0%, #233D7C 0%, var(--bg) 60%) fixed, var(--bg); color: var(--ink); font: 16px/1.55 Inter, system-ui, -apple-system, Segoe UI, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
body { min-height: 100vh; overflow-x: hidden; }

/* ---------- backdrop: drifting colour fields + a fine grid ---------- */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.sky::before { content: ''; position: absolute; inset: -2px; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%); opacity: .7; }
.blob { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(100px); opacity: .28; animation: drift 26s ease-in-out infinite alternate; }
.blob.b1 { background: var(--c1); left: -14vmax; top: -18vmax; }
.blob.b2 { background: var(--c2); right: -16vmax; top: 4vmax; animation-delay: -9s; opacity: .13; }
.blob.b3 { background: var(--c3); left: 22vmax; top: 34vmax; animation-delay: -17s; opacity: .13; }
@keyframes drift { to { transform: translate(6vmax, 5vmax) scale(1.12); } }

.wrap { width: min(1160px, 100% - 40px); margin: 0 auto; }

/* ---------- top bar ---------- */
.bar { display: flex; align-items: center; gap: 14px; padding: 22px 0; }
.logo { display: flex; align-items: center; gap: 12px; font: 800 26px/1 'Bricolage Grotesque', sans-serif; letter-spacing: -.01em; text-decoration: none; }
.logo i { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--c1), var(--c3)); font: 700 16px 'JetBrains Mono', monospace; font-style: normal; box-shadow: 0 6px 22px -6px var(--c3); }
.bar .sp { flex: 1; }
.nav { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(10px); box-shadow: 0 6px 20px -14px rgba(0,0,0,.5); }
.nav a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 10px; font: 600 14px Inter, sans-serif; color: var(--muted); text-decoration: none; transition: background .2s, color .2s; }
.nav a i { width: 8px; height: 8px; border-radius: 50%; }
.nav a:hover { background: rgba(255,255,255,.08); color: var(--ink); }
.nav a[aria-current="page"] { background: #fff; color: #13244B; }
.nav .lbl { display: inline; }
.who { font-size: 14px; color: var(--muted); }
.who b { color: var(--ink); }

/* ---------- hero ---------- */
.hero { padding: 56px 0 30px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 12.5px/1 'JetBrains Mono', monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--glass); backdrop-filter: blur(8px); }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c3b); box-shadow: 0 0 0 4px rgba(182,242,58,.15); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(182,242,58,0); } }
h1 { font: 700 clamp(40px, 7.2vw, 88px)/.98 'Bricolage Grotesque', sans-serif; letter-spacing: -.045em; margin: 26px 0 0; }
h1 .grad { background: linear-gradient(100deg, #93C5FD 0%, #22D3EE 22%, #6EE7B7 45%, #FBBF24 62%, #C4B5FD 82%, #93C5FD 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 9s linear infinite; }
@keyframes sheen { to { background-position: -200% 0; } }
.lede { max-width: 640px; margin: 22px auto 0; font-size: clamp(16px, 2vw, 19px); color: var(--muted); }
.typed { font-family: 'JetBrains Mono', monospace; color: var(--ink); white-space: nowrap; }
.typed::after { content: '▍'; color: var(--c3b); animation: blink 1s steps(1) infinite; margin-left: 1px; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- module cards ---------- */
.pick { text-align: center; margin: 54px 0 0; }
.pick h2 { font: 700 clamp(24px, 3.2vw, 32px)/1.1 'Bricolage Grotesque', sans-serif; letter-spacing: -.02em; margin: 0; }
.pick p { margin: 6px 0 0; color: var(--muted); }
.exam-line { font-family: var(--display); font-size: clamp(22px, 3vw, 32px); font-weight: 800; letter-spacing: -.02em; text-align: center; color: var(--ink); margin: 18px 0 4px; }
.mods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 26px 0 0; }
.card { --a: var(--c1); --b: var(--c1b); position: relative; display: flex; flex-direction: column; border-radius: 22px; padding: 16px 18px 16px; text-decoration: none; background: var(--card); border: 1px solid var(--line); box-shadow: 0 22px 46px -26px rgba(0,0,0,.6); overflow: hidden; isolation: isolate; transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .3s, box-shadow .35s; transform-style: preserve-3d; }
.card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--a) 34%, transparent), transparent 62%); opacity: .9; transition: opacity .3s; }
.card::after { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--b) 22%, transparent), transparent 70%); opacity: 0; transition: opacity .3s; }
.card:hover, .card:focus-visible { border-color: color-mix(in srgb, var(--a) 60%, transparent); box-shadow: 0 30px 60px -32px var(--a), 0 0 0 1px color-mix(in srgb, var(--a) 30%, transparent) inset; outline: none; }
.card:hover::after, .card:focus-visible::after { opacity: 1; }
.card.m2 { --a: var(--c2); --b: var(--c2b); }
.card.m3 { --a: var(--c3); --b: var(--c3b); }
.card.m4 { --a: var(--c4); --b: var(--c4b); }
.card.m5 { --a: var(--c5); --b: var(--c5b); }
.card.m6 { --a: var(--c6); --b: var(--c6b); }
.code { align-self: flex-start; font: 700 12.5px/1 'JetBrains Mono', monospace; letter-spacing: .06em; padding: 7px 11px; border-radius: 99px; color: var(--b); background: color-mix(in srgb, var(--a) 22%, transparent); border: 1px solid color-mix(in srgb, var(--a) 35%, transparent); }
.stage { position: relative; height: 140px; margin: 6px -8px 2px; display: grid; place-items: center; }
.stage .ring { position: absolute; width: 118px; height: 118px; border-radius: 50%; background: conic-gradient(from 0deg, var(--a), var(--b), var(--a)); opacity: .28; filter: blur(2px); animation: spin 18s linear infinite; }
.stage .ring::after { content: ''; position: absolute; inset: 10px; border-radius: 50%; background: var(--card); opacity: .9; }
@keyframes spin { to { transform: rotate(1turn); } }
.stage img { position: relative; height: 128px; width: auto; filter: drop-shadow(0 16px 18px rgba(0,0,0,.35)); animation: bob 5s ease-in-out infinite; transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.card.m2 .stage img { animation-delay: -1.6s; } .card.m3 .stage img { animation-delay: -3.2s; } .card.m4 .stage img { animation-delay: -.8s; } .card.m5 .stage img { animation-delay: -2.4s; } .card.m6 .stage img { animation-delay: -4s; }
.card:hover .stage img { transform: scale(1.06) rotate(-2deg); }
@keyframes bob { 50% { translate: 0 -9px; } }
.glyphs { position: absolute; inset: 0; font: 700 11.5px 'JetBrains Mono', monospace; color: var(--b); opacity: .55; }
.glyphs span { position: absolute; animation: float 7s ease-in-out infinite; }
.glyphs span:nth-child(1) { left: 6%; top: 18%; } .glyphs span:nth-child(2) { right: 4%; top: 30%; animation-delay: -2.4s; } .glyphs span:nth-child(3) { left: 12%; bottom: 10%; animation-delay: -4.8s; }
@keyframes float { 50% { translate: 0 -10px; opacity: .9; } }
.card h2 { font: 700 20px/1.15 'Bricolage Grotesque', sans-serif; letter-spacing: -.02em; margin: 6px 0 4px; }
.with { font-size: 13.5px; color: var(--muted); margin: 0; }
.with b { color: var(--ink); font-weight: 600; }
.ready { margin: 12px 0 12px; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; }
.ready-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ready-top span { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ready-pct { font: 700 22px/1 'Bricolage Grotesque', sans-serif; color: var(--ink); letter-spacing: -.02em; }
.ready-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.ready-bar i { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--a), var(--b)); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.go { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px; border-radius: 12px; font-weight: 700; background: linear-gradient(90deg, var(--a), color-mix(in srgb, var(--a) 60%, var(--b))); color: #fff; box-shadow: 0 10px 26px -12px var(--a); }
.card.m3 .go, .card.m5 .go, .card.m6 .go { color: #fff; }
.go svg { transition: transform .25s; }
.card:hover .go svg { transform: translateX(4px); }
.prog { font-size: 12px; font-weight: 600; opacity: .85; }

/* ---------- strip ---------- */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 54px 0 0; border-radius: 20px; overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.strip div { background: rgba(26,46,92,.85); backdrop-filter: blur(8px); padding: 20px 22px; }
.strip b { display: block; font: 700 26px/1.1 'Bricolage Grotesque', sans-serif; letter-spacing: -.02em; }
.strip span { font-size: 13.5px; color: var(--muted); }

/* ---------- leaderboard ---------- */
.board { margin: 40px 0 0; display: grid; grid-template-columns: 1fr 1.25fr; gap: 34px; align-items: start; }
.board h3 { font: 700 clamp(28px, 4vw, 40px)/1.05 'Bricolage Grotesque', sans-serif; letter-spacing: -.03em; margin: 14px 0 12px; }
.board p { color: var(--muted); margin: 0 0 18px; }
.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); }
.seg button { font: 600 14px Inter, sans-serif; color: var(--muted); background: none; border: 0; padding: 8px 14px; border-radius: 9px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: rgba(255,255,255,.14); color: var(--ink); box-shadow: 0 2px 8px -4px rgba(15,23,42,.4); }
.lb { border-radius: 22px; border: 1px solid var(--line); background: var(--card); box-shadow: 0 22px 46px -26px rgba(0,0,0,.6); padding: 8px; min-height: 200px; }
.row { display: grid; grid-template-columns: 34px 36px 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; }
.row + .row { border-top: 1px solid rgba(255,255,255,.06); }
.row.me { background: rgba(182,242,58,.08); box-shadow: 0 0 0 1px rgba(182,242,58,.3) inset; }
.rk { font: 700 15px 'JetBrains Mono', monospace; color: var(--faint); text-align: center; }
.row:nth-child(1) .rk { color: #FCD34D; } .row:nth-child(2) .rk { color: #E5E7EB; } .row:nth-child(3) .rk { color: #F59E0B; }
.av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; object-fit: cover; }
.nm { min-width: 0; }
.nm b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.split { display: flex; gap: 4px; margin-top: 5px; height: 5px; border-radius: 99px; overflow: hidden; max-width: 220px; background: rgba(255,255,255,.08); }
.split i { display: block; height: 100%; }
.xp { font: 700 15px 'JetBrains Mono', monospace; white-space: nowrap; }
.xp small { font: 500 12px Inter, sans-serif; color: var(--muted); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------- footer ---------- */
footer { margin: 80px 0 0; padding: 26px 0 40px; border-top: 1px solid var(--line); display: flex; gap: 18px; flex-wrap: wrap; align-items: center; font-size: 13.5px; color: var(--faint); }
footer .sp { flex: 1; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--ink); }

/* ---------- reveal ---------- */
.js .rv.below { opacity: 0; transform: translateY(18px); }
.js .rv.below.in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.js .rv:not(.below) { animation: rvin .7s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d, 0ms); }
@keyframes rvin { from { opacity: 0; transform: translateY(18px); } }

@media (max-width: 940px) {
  .mods { grid-template-columns: 1fr; max-width: 520px; margin-left: auto; margin-right: auto; }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .board { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .hero { padding-top: 30px; }
  .stage { height: 130px; } .stage img { height: 120px; }
  .who { display: none; }
  .bar { flex-wrap: wrap; } .nav { order: 3; width: 100%; overflow-x: auto; } .nav a { padding: 8px 10px; }
  .typed { white-space: normal; word-break: break-all; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rv, .js .rv.below { opacity: 1; transform: none; }
}

/* ======================================================================
   Dashboard: character, leaderboard, Wombat Slots, avatar shop
   ====================================================================== */
h2, h3 { font-family: var(--display); letter-spacing: -.02em; }
.nav-x { padding-inline: 11px !important; }
.me-chip { flex: none; width: 40px; height: 40px; border-radius: 50%; padding: 2px; background: linear-gradient(135deg, var(--c1), var(--c3)); display: grid; place-items: center; text-decoration: none; transition: transform .2s; }
.me-chip:hover { transform: scale(1.07); }
.me-chip .me-av, .av { display: block; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--card); }
.me-chip svg, .me-chip img, .av svg, .av img { width: 100%; height: 100%; display: block; object-fit: cover; }

.hero.back { display: none; }
body.returning .mods { margin-top: 8px; }
body.returning .strip, body.returning .pick { display: none; }

.kicker { display: inline-block; font: 600 11.5px/1.2 'JetBrains Mono', monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.note { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 22px; box-shadow: 0 22px 46px -26px rgba(0,0,0,.6); }
.panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.panel h3 { margin: 4px 0 0; font-size: 22px; }

.hbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 14px Inter, sans-serif; color: var(--ink); background: rgba(255,255,255,.08); border: 1px solid var(--line); border-radius: 12px; padding: 9px 14px; cursor: pointer; text-decoration: none; transition: background .15s, transform .08s; white-space: nowrap; }
.hbtn:hover { background: rgba(255,255,255,.14); }
.hbtn:active { transform: translateY(1px); }
.hbtn.primary { background: linear-gradient(90deg, var(--c1), var(--c3)); border-color: transparent; color: #fff; box-shadow: 0 8px 22px -12px var(--c3); }
.hbtn.ghost { background: transparent; }
.hbtn.small { padding: 5px 10px; font-size: 12.5px; border-radius: 10px; }
.hbtn.wide { width: 100%; margin-top: 10px; }
.hbtn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.me-card .btn-row { justify-content: flex-start; margin-top: 16px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--c1b) 70%, transparent); outline-offset: 2px; }

.field-row { display: flex; gap: 8px; margin-top: 6px; }
.field { flex: 1; min-width: 0; font: 500 15px Inter, sans-serif; color: var(--ink); background: rgba(0,0,0,.18); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; }
.field::placeholder { color: var(--faint); }
.switch { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 14px; }
.switch input { appearance: none; -webkit-appearance: none; width: 40px; height: 24px; border-radius: 99px; background: rgba(255,255,255,.18); position: relative; cursor: pointer; flex: none; transition: background .2s; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked { background: var(--good); }
.switch input:checked::after { transform: translateX(16px); }

/* ---------- dashboard ---------- */
.dash { margin: 54px 0 0; scroll-margin-top: 20px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 22px; align-items: start; }
.me-top { display: flex; gap: 16px; align-items: center; }
.me-big { flex: none; width: 88px; height: 88px; border-radius: 50%; padding: 3px; border: 0; cursor: pointer; background: conic-gradient(from 200deg, var(--c1), var(--c2), var(--c3), var(--c1)); box-shadow: 0 10px 30px -12px var(--c3); transition: transform .2s; }
.me-big:hover { transform: rotate(-4deg) scale(1.04); }
.me-big > svg, .me-big > img { width: 100%; height: 100%; border-radius: 50%; display: block; object-fit: cover; background: var(--card); }
.me-head { min-width: 0; }
.me-head h3 { font-size: clamp(22px, 3vw, 28px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-total { font-size: 14px; color: var(--muted); }
.me-total b { color: var(--ink); font-family: 'JetBrains Mono', monospace; }
.me-mods { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.me-mods li { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 7px; padding: 9px 11px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.me-mods i { width: 8px; height: 8px; border-radius: 50%; }
.me-mods b { grid-column: 1 / -1; font: 700 16px 'JetBrains Mono', monospace; color: var(--ink); }
.me-mods small { font: 500 11px Inter, sans-serif; color: var(--faint); }
.board-card .lb { border: 0; box-shadow: none; padding: 0; min-height: 0; background: none; }
.row .av { width: 36px; height: 36px; }
.row b small { color: var(--muted); font-weight: 500; }
.empty { padding: 28px 12px; }

/* ---------- Wombat Slots ---------- */
.slots { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 22px; margin: 22px 0 0; align-items: start; scroll-margin-top: 20px; }
.slot-machine { display: grid; gap: 12px; }
.slot-machine h2 { margin: 2px 0 0; font-size: clamp(28px, 4vw, 40px); }
.wallet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wallet button { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 7px; text-align: left; padding: 8px 11px; border-radius: 13px; border: 1.5px solid var(--line); background: rgba(255,255,255,.04); color: var(--muted); font: 600 12.5px Inter, sans-serif; cursor: pointer; transition: border-color .15s, background .15s; }
.wallet button i { width: 8px; height: 8px; border-radius: 50%; background: var(--m); }
.wallet button b { grid-column: 1 / -1; font: 700 15px 'JetBrains Mono', monospace; color: var(--ink); }
.wallet button[aria-checked="true"] { border-color: var(--m); background: color-mix(in srgb, var(--m) 16%, transparent); color: var(--ink); }
.slot-frame { background: linear-gradient(#7A5232, #4E3320); border-radius: 18px; padding: 14px; box-shadow: inset 0 2px 0 rgba(255,255,255,.18), 0 14px 30px -16px rgba(0,0,0,.8); }
.reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.reel { background: #FFF8EC; border-radius: 12px; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; box-shadow: inset 0 3px 8px rgba(0,0,0,.2); transition: box-shadow .2s; }
.reel.spinning .slot-face { filter: blur(2px); transform: translateY(4px); }
.reel.hit { box-shadow: inset 0 3px 8px rgba(0,0,0,.2), 0 0 0 4px var(--gold); }
.reel .slot-face { font-size: clamp(40px, 8vw, 68px); width: 70%; height: 70%; }
.slot-face { display: inline-grid; place-items: center; line-height: 1; }
.slot-face .wombat { width: 100%; height: 100%; }
.slot-67 { font-family: var(--display); font-weight: 800; font-size: .9em; letter-spacing: -.04em; color: #D93A3F; }
.slot-msg { font-family: var(--display); font-size: 20px; font-weight: 700; text-align: center; min-height: 1.4em; }
.slot-msg.win { color: var(--good); } .slot-msg.lose { color: var(--bad); }
.slot-msg.big { color: var(--gold); font-size: 26px; }
.slot-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.slot-xpbox { position: relative; }
.slot-xp { color: var(--ink); font-family: 'JetBrains Mono', monospace; }
.xp-float { position: absolute; left: 100%; top: -4px; margin-left: 8px; font: 700 15px 'JetBrains Mono', monospace; white-space: nowrap; animation: xpfloat 1.2s ease-out forwards; pointer-events: none; }
.xp-float.gain { color: var(--good); } .xp-float.loss { color: var(--bad); }
@keyframes xpfloat { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-22px); } }
.slot-bets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.chip-btn { font: 600 13.5px Inter, sans-serif; color: var(--muted); background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 11px; padding: 8px 4px; cursor: pointer; }
.chip-btn[aria-checked="true"] { color: #13244B; background: #fff; border-color: #fff; }
.chip-btn:disabled { opacity: .4; cursor: not-allowed; }
.slot-spin { width: 100%; padding: 14px; font-size: 17px; border-radius: 14px; }
.slot-side h3 { margin: 0; font-size: 19px; }
.slot-pay { width: 100%; border-collapse: collapse; margin-top: 8px; }
.slot-pay td { padding: 7px 4px; border-top: 1px solid var(--line); font-size: 14px; }
.slot-pay td:last-child { text-align: right; font: 700 14px 'JetBrains Mono', monospace; }
.slot-pay td.dim { color: var(--muted); }
.slot-pay .slot-face { width: 24px; height: 24px; font-size: 20px; }
.slot-pay .slot-67 { font-size: 15px; }
.slot-timer { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 40; display: grid; gap: 8px; justify-items: end; }
.slot-clock { background: var(--card); color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 7px 13px; font-size: 14px; box-shadow: 0 10px 24px -12px rgba(0,0,0,.7); }
.slot-clock b { color: var(--ink); font-family: 'JetBrains Mono', monospace; }
.slot-timer.warn .slot-clock { border-color: var(--gold); color: var(--gold); }
.slot-timer.over .slot-clock { border-color: var(--bad); color: var(--bad); }
.slot-nag { width: min(290px, calc(100vw - 32px)); background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: 0 20px 40px -16px rgba(0,0,0,.7); }
.slot-nag p { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.slot-nag .btn-row { justify-content: flex-start; }

/* ---------- avatar shop ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(5,10,25,.66); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal-card { position: relative; width: min(780px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; display: grid; gap: 10px; }
.modal-card h2 { margin: 0; font-size: 26px; }
.modal-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 6px; }
.shop-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 14px 10px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.shop-tile.on { border-color: var(--c3b); box-shadow: 0 0 0 1px var(--c3b) inset; }
.shop-tile.locked .shop-av { filter: grayscale(1) opacity(.45); }
.shop-tile b { font-size: 14px; }
.shop-tile small { font-size: 12px; color: var(--muted); min-height: 1.3em; }
.shop-tile .hbtn, .shop-tile .btn-row { margin-top: 6px; }
.shop-av { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; margin-bottom: 4px; }
.shop-av svg, .shop-av img { width: 100%; height: 100%; display: block; object-fit: cover; }

#toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 70; background: #fff; color: #13244B; font-weight: 600; font-size: 14px; padding: 10px 16px; border-radius: 12px; box-shadow: 0 12px 30px -10px rgba(0,0,0,.6); transition: opacity .25s, transform .25s; max-width: calc(100vw - 32px); }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 940px) {
  .dash-grid, .slots { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .bar { flex-wrap: wrap; gap: 10px; padding: 14px 0; }
  .nav { order: 3; width: 100%; overflow-x: auto; justify-content: space-between; scrollbar-width: none; }
  .nav a { padding: 8px 9px; font-size: 13px; }
  .nav .lbl { display: none; }
  .panel { padding: 18px; border-radius: 20px; }
  .me-big { width: 72px; height: 72px; }
  .me-mods li { padding: 8px 9px; }
  .wallet button { padding: 7px 9px; }
  .slot-bets { gap: 6px; }
  .modal { padding: 8px; align-items: end; }
  .modal-card { max-height: calc(100dvh - 16px); border-radius: 22px 22px 16px 16px; }
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
  .dash { margin-top: 36px; }
}
@media (max-width: 520px) {
  .eyebrow { font-size: 10.5px; letter-spacing: .05em; padding: 7px 11px; white-space: nowrap; }
}

/* Wombat Slots is its own view (#slots), reached only from the top bar */
.slots[hidden] { display: none; }
body.slots-view .wrap > section:not(.slots), body.slots-view .wrap > footer { display: none; }
.slot-back { grid-column: 1 / -1; justify-self: start; color: var(--muted); font-weight: 600; text-decoration: none; }
.slot-back:hover { color: inherit; }

/* typed welcome in the top bar */
.hello-slot { display: flex; justify-content: center; min-width: 0; }
.hello { display: inline-flex; align-items: center; max-width: 100%; overflow: hidden; white-space: nowrap; font: 500 15px/1 'JetBrains Mono', monospace; color: var(--muted); padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(5, 12, 30, .35); backdrop-filter: blur(8px); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.hello[hidden] { display: none; }
.hello .hp { color: #6EE7B7; margin-right: 2px; }
.hello .ht { color: var(--ink); white-space: pre; }
.hello .hp { white-space: pre; }
.hello .hn { font-weight: 700; background: linear-gradient(100deg, #93C5FD 0%, #22D3EE 25%, #6EE7B7 50%, #FBBF24 75%, #C4B5FD 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 9s linear infinite; overflow: hidden; text-overflow: ellipsis; }
.hello .hc { width: 9px; height: 18px; margin-left: 3px; background: #22D3EE; border-radius: 1px; box-shadow: 0 0 10px #22D3EE; flex: none; }
.hello.done .hc { animation: blink 1s steps(1) infinite; }
@media (max-width: 680px) { .hello { font-size: 13px; padding: 8px 10px; } }

/* ---------- "hacking the Matrix" theme (main page only: <html class="matrix">) ---------- */
html.matrix { --bg: #020a05; --line: rgba(61,255,138,.13); --glass: rgba(4,22,12,.6); --card: rgba(4,18,10,.84); --muted: #9fc9ad; --faint: #6c9a7c; background: #020a05; }
html.matrix body { background: transparent; }
.matrix .sky .rain { position: absolute; inset: 0; opacity: .38; }
.matrix .sky::before { z-index: 1; opacity: .35; }
.matrix .sky::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.22) 0 1px, transparent 1px 3px), radial-gradient(ellipse 90% 70% at 50% 40%, transparent 40%, rgba(0,0,0,.7) 100%); }
.matrix .blob { z-index: 1; opacity: .12; mix-blend-mode: screen; }
.matrix .blob.b1 { background: #00ff66; } .matrix .blob.b2 { background: #00b3ff; } .matrix .blob.b3 { background: #39ff14; }
.matrix .sky .scan { position: absolute; left: 0; right: 0; height: 120px; z-index: 3; background: linear-gradient(180deg, transparent, rgba(61,255,138,.03) 60%, rgba(61,255,138,.07)); animation: scan 7s linear infinite; }
@keyframes scan { from { top: -120px; } to { top: 100%; } }
.matrix .card, .matrix .panel, .matrix .lb, .matrix .strip div { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.matrix .strip div { background: rgba(4,20,11,.82); }
.matrix .logo i { background: #031a0c; color: #3dff8a; border: 1px solid rgba(61,255,138,.5); box-shadow: 0 0 18px -4px #3dff8a; text-shadow: 0 0 6px #3dff8a; }
.matrix .eyebrow { color: #7dffb0; }
.matrix h1 { text-shadow: 0 0 28px rgba(61,255,138,.25); }
.matrix h1 .grad { background-image: linear-gradient(100deg, #b6ffcf 0%, #3dff8a 25%, #00e5ff 50%, #3dff8a 75%, #b6ffcf 100%); filter: drop-shadow(0 0 14px rgba(61,255,138,.35)); }
.matrix .typed { color: #3dff8a; text-shadow: 0 0 8px rgba(61,255,138,.6); }

/* title glitch */
#hero-title.glitch { animation: rvin .7s cubic-bezier(.2,.8,.2,1) both, glitch .42s steps(2); animation-delay: var(--d, 0ms), 0ms; }
@keyframes glitch {
  0% { transform: translate(0); text-shadow: 2px 0 #ff2bd6, -2px 0 #00e5ff; clip-path: inset(0 0 0 0); }
  20% { transform: translate(-3px, 1px); clip-path: inset(10% 0 55% 0); }
  40% { transform: translate(3px, -1px); text-shadow: -3px 0 #ff2bd6, 3px 0 #3dff8a; clip-path: inset(60% 0 8% 0); }
  60% { transform: translate(-1px, 2px); clip-path: inset(30% 0 30% 0); }
  80% { transform: translate(2px, 0); clip-path: inset(0 0 0 0); }
  100% { transform: none; text-shadow: none; }
}

/* breach terminal */
.hack-term { position: fixed; left: 18px; bottom: 18px; z-index: 5; width: 330px; border-radius: 10px; overflow: hidden; pointer-events: none;
  background: rgba(1,10,4,.82); border: 1px solid rgba(61,255,138,.35); box-shadow: 0 0 24px -6px rgba(61,255,138,.45), 0 18px 40px -20px #000; backdrop-filter: blur(6px);
  font: 500 11.5px/1.55 'JetBrains Mono', ui-monospace, monospace; color: #3dff8a; opacity: .9; }
.ht-bar { display: flex; align-items: center; gap: 5px; padding: 6px 9px; background: rgba(61,255,138,.08); border-bottom: 1px solid rgba(61,255,138,.2); color: #7dffb0; font-size: 10.5px; }
.ht-bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(61,255,138,.35); }
.ht-bar span { margin-left: 6px; opacity: .8; }
.ht-out { margin: 0; padding: 8px 11px 10px; min-height: 124px; white-space: pre-wrap; word-break: break-word; font: inherit; }
.ht-out .cmd { color: #d8ffe6; }
.ht-out .cmd:last-child::after { content: '▍'; animation: blink 1s steps(1) infinite; color: #3dff8a; }
.ht-out .dim { color: #5fae7a; }
.ht-out .ok { color: #3dff8a; }
.ht-out .err { color: #ff5d73; }
.ht-out .win { color: #020a05; background: #3dff8a; display: inline-block; padding: 0 6px; font-weight: 700; letter-spacing: .12em; animation: blink 1s steps(1) 3; }
@media (max-width: 1819px) { .hack-term { display: none; } }
@media (prefers-reduced-motion: reduce) { .matrix .sky .scan { display: none; } }
