/* Artificial Cat INU · $CATAI. Look: dark GPU-datacenter terminal, lime "chip" glow + the cat visor's cyan/violet.
   Performance rules: animate only transform/opacity, textures static, loops paused off screen (.offscreen). */
@font-face { font-family: 'Chakra'; src: url(/fonts/chakra-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Chakra'; src: url(/fonts/chakra-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Sora'; src: url(/fonts/sora.woff2) format('woff2'); font-weight: 300 800; font-display: swap; }
@font-face { font-family: 'JBM'; src: url(/fonts/jbm.woff2) format('woff2'); font-weight: 400 800; font-display: swap; }
:root {
  --bg: #040806; --bg2: #08100b; --card: #0a130e; --card2: #0f1b14; --line: rgba(157, 255, 58, .13); --line2: rgba(255, 255, 255, .08);
  --text: #eef5ef; --mute: #93a598; --accent: #9dff3a; --accent-ink: #061000; --cyan: #3ff2ff; --violet: #a77bff; --gold: #ffc23d; --pink: #ff5fd2;
  --ok: #5dff8a; --warn: #ffb547; --bad: #ff6b6b;
  --t-common: #c3cec7; --t-rare: #3ff2ff; --t-epic: #b98bff; --t-legendary: #ffc23d; --t-mythic: #ff5fd2;
  --r: 18px; --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.56, .64, 1);
  --f-body: 'Sora', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; --f-display: 'Chakra', 'Sora', system-ui, sans-serif; --f-mono: 'JBM', ui-monospace, 'SF Mono', Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--f-body); overflow-x: hidden; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--f-display); letter-spacing: -.01em; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.mono { font-family: var(--f-mono); }
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(55% 40% at 85% 0%, rgba(157, 255, 58, .10), transparent 70%), radial-gradient(45% 35% at 0% 30%, rgba(167, 123, 255, .08), transparent 70%),
    linear-gradient(rgba(157, 255, 58, .035) 1px, transparent 1px) 0 0 / 100% 44px, linear-gradient(90deg, rgba(157, 255, 58, .035) 1px, transparent 1px) 0 0 / 44px 100%, var(--bg); }

/* nav + NVDA ticker */
.nav { position: sticky; top: 0; z-index: 30; background: rgba(4, 8, 6, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 19px/1 var(--f-display); white-space: nowrap; min-width: 0; }
.brand img { width: 38px; height: 38px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(157, 255, 58, .35); }
.brand b span { color: var(--accent); }
.nav-r { display: flex; align-items: center; gap: 8px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { white-space: nowrap; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--mute); font: 600 14px/1 var(--f-body); }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--text); background: rgba(157, 255, 58, .07); }
@media (max-width: 1180px) { .nav-links { display: none; } }
@media (max-width: 480px) { .brand b { display: none; } }
.tick { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); font: 700 12.5px/1 var(--f-mono); white-space: nowrap; }
.tick i { font-style: normal; color: var(--mute); }
.tick .up { color: var(--ok); } .tick .dn { color: var(--bad); }
.tick[hidden] { display: none; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 99px; font: 600 12.5px/1 var(--f-mono); color: var(--mute); background: rgba(10, 19, 14, .7); }
.chip b { color: var(--text); }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; font-weight: 700; background: var(--card); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 12px 20px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font: 700 15px/1 var(--f-display); letter-spacing: .02em; text-decoration: none; text-transform: uppercase;
  box-shadow: 0 0 0 1px rgba(157, 255, 58, .5), 0 8px 30px -8px rgba(157, 255, 58, .55); transition: transform .2s var(--ease), opacity .2s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(.98); }
.btn:disabled, .btn.wait { opacity: .55; pointer-events: none; }
.btn.ghost { background: rgba(10, 19, 14, .6); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn.cyan { background: var(--cyan); color: #00161a; box-shadow: 0 0 0 1px rgba(63, 242, 255, .5), 0 8px 30px -8px rgba(63, 242, 255, .5); }
.btn.small { min-height: 38px; padding: 9px 14px; font-size: 13px; }
.btn.big { width: 100%; min-height: 58px; padding: 18px 22px; font-size: 18px; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }
.offscreen, .offscreen * { animation-play-state: paused !important; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0; font: 700 12.5px/1.2 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.sec { padding: 72px 0 0; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.sec-head h2 { margin: 8px 0 0; font-size: clamp(30px, 5vw, 46px); line-height: 1; }
.sec-head p { margin: 10px 0 0; color: var(--mute); max-width: 560px; }
.card { border: 1px solid var(--line); border-radius: var(--r); background: linear-gradient(180deg, var(--card2), var(--card)); }

/* tier colours */
.t-common { --tc: var(--t-common); } .t-rare { --tc: var(--t-rare); } .t-epic { --tc: var(--t-epic); } .t-legendary { --tc: var(--t-legendary); } .t-mythic { --tc: var(--t-mythic); }
.tier { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--tc, var(--mute)) 45%, transparent);
  color: var(--tc, var(--mute)); background: color-mix(in srgb, var(--tc, var(--mute)) 10%, transparent); font: 700 11px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }

/* leaderboard (home preview + /play) */
.lb { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lb li { display: grid; grid-template-columns: 34px 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--line2); background: var(--card); }
.lb li.me { border-color: var(--accent); background: rgba(157, 255, 58, .07); }
.lb .rk { font: 700 16px/1 var(--f-mono); color: var(--mute); text-align: center; }
.lb li:nth-child(1) .rk { color: var(--gold); } .lb li:nth-child(2) .rk { color: #dfe7e2; } .lb li:nth-child(3) .rk { color: #e3a46f; }
.lb img, .lb .pf { width: 38px; height: 38px; border-radius: 50%; }
.pf { display: grid; place-items: center; background: var(--bg2); border: 1px solid var(--line); font-weight: 800; }
.lb .who { display: grid; gap: 4px; min-width: 0; }
.lb .who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb .who small { display: flex; gap: 8px; align-items: center; color: var(--mute); font: 500 12px/1 var(--f-mono); flex-wrap: wrap; }
.lb .amt { text-align: right; font: 700 15px/1.2 var(--f-mono); white-space: nowrap; }
.lb .amt small { display: block; color: var(--mute); font-weight: 500; font-size: 12px; }
.lb .empty { display: block; text-align: center; color: var(--mute); padding: 22px; }
@media (max-width: 520px) { .lb li { grid-template-columns: 26px 34px minmax(0, 1fr) auto; gap: 9px; padding: 10px; } .lb img, .lb .pf { width: 34px; height: 34px; } .lb .amt { font-size: 13.5px; } }

/* CAT ARMY missions (claim board + /play) */
.army-box { display: grid; gap: 14px; }
.army-top { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.army-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 700px) { .army-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mis { display: grid; gap: 6px; align-content: start; min-height: 96px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--text); text-decoration: none; cursor: pointer; font: inherit; text-align: left; transition: transform .2s var(--ease); }
.mis:hover { transform: translateY(-2px); }
.mis b { font: 700 16px/1.1 var(--f-display); text-transform: uppercase; letter-spacing: .03em; }
.mis span { color: var(--mute); font-size: 13px; }
.mis.done { border-color: var(--accent); background: rgba(157, 255, 58, .08); }
.mis.done b::after { content: ' ✓'; color: var(--accent); }
.mis .ic { font-size: 22px; line-height: 1; }

/* prize reveal (crate opens) */
.reveal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(2, 5, 3, .975); animation: fadeIn .3s both; overflow-y: auto; }
.reveal[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } }
.rv-in { position: relative; width: min(460px, 100%); text-align: center; }
.rv-crate { width: min(300px, 70vw); margin: 0 auto; }
.rv-crate.shake { animation: shake .5s ease-in-out 3; }
.rv-crate.open { animation: openUp .6s var(--spring) forwards; }
@keyframes shake { 20% { transform: rotate(-4deg) scale(1.02); } 40% { transform: rotate(4deg) scale(1.04); } 60% { transform: rotate(-3deg) scale(1.05); } 80% { transform: rotate(3deg) scale(1.03); } }
@keyframes openUp { to { transform: scale(.55) translateY(-30px); opacity: .9; } }
.rv-out { margin-top: -40px; opacity: 0; transform: translateY(16px) scale(.95); transition: opacity .5s var(--ease), transform .6s var(--spring); }
.rv-out.in { opacity: 1; transform: none; }
.rv-out .tier { font-size: 14px; padding: 8px 14px; }
.rv-amt { margin: 14px 0 0; font: 700 clamp(44px, 12vw, 70px)/1 var(--f-display); color: var(--tc, var(--accent)); }
.rv-tk { margin: 6px 0 0; font: 700 18px/1 var(--f-mono); color: var(--mute); }
.rv-val { margin: 10px 0 0; color: var(--mute); font-size: 14px; }
.rv-act { display: grid; gap: 10px; margin-top: 22px; }
.rv-rays { position: absolute; left: 50%; top: 150px; width: 520px; height: 520px; margin: -260px 0 0 -260px; z-index: -1; opacity: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--tc, var(--accent)) 22%, transparent) 0 8deg, transparent 8deg 24deg); border-radius: 50%;
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%); mask: radial-gradient(circle, #000 20%, transparent 68%); transition: opacity .6s; }
.rv-rays.in { opacity: 1; animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.rvl { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.rvl.in { opacity: 1; transform: none; }
.foot { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-top: 80px; padding: 34px 0 60px; border-top: 1px solid var(--line2); color: var(--mute); font-size: 13.5px; }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 6px; text-decoration: none; } .foot a:hover { color: var(--text); }
.foot .legal { flex-basis: 100%; font-size: 12px; opacity: .8; margin: 0; }
.toast { position: fixed; left: 50%; bottom: 20px; z-index: 80; transform: translateX(-50%); padding: 12px 18px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 700; animation: toastIn .4s var(--spring) both; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 14px) scale(.95); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
/* the crate art sits on near-black: fade its square edges into the page */
.crate-fade, .coin img, .bd-prize img, .crate-img, .rv-crate { -webkit-mask-image: radial-gradient(closest-side, #000 70%, transparent 100%); mask-image: radial-gradient(closest-side, #000 70%, transparent 100%); }
