/* Shared V2 theme: tokens, space backdrop, header, buttons, dialogs, footer. */
@font-face {
  font-family: 'Outfit';
  src: url('../assets/fonts/outfit-latin.woff2') format('woff2');
  font-weight: 300 800;
  font-display: swap;
}
@view-transition { navigation: auto; }

:root {
  color-scheme: dark;
  --space: #030706;
  --glass: rgba(8, 17, 15, .8);
  --glass-strong: rgba(7, 14, 13, .9);
  --line: rgba(160, 230, 200, .13);
  --line-strong: rgba(170, 240, 210, .24);
  --text: #eef3f1;
  --muted: #a9b6b1;
  --dim: #75837e;
  --green: #3ddc84;
  --neon: #2be36b;
  --neon-bright: #5cf07e;
  --on-green: #051a0d;
  --red: #ff5362;
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(10px, 2.2vw, 28px);
  --frame: min(1290px, calc(100vw - var(--gutter) * 2));
}
* { box-sizing: border-box; }
html, body { margin: 0; min-width: 320px; background: var(--space); }
body { color: var(--text); font: 15px/1.4 var(--font); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--neon-bright); outline-offset: 3px; }
svg { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Space backdrop: the generated plate, or a painted scene as fallback. */
.backdrop { position: fixed; inset: 0; height: 100lvh; overflow: hidden; pointer-events: none; background: var(--space); }
.backdrop-plate { position: absolute; inset: -2.5%; background: center / cover no-repeat; animation: plate-drift 50s ease-in-out infinite alternate; }
.backdrop-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.backdrop-floaters { position: absolute; inset: 0; }
.floater { position: absolute; animation: drift 9s ease-in-out infinite alternate; will-change: transform; }
@keyframes plate-drift { from { transform: scale(1) translate3d(0, 0, 0); } to { transform: scale(1.04) translate3d(-.7%, .5%, 0); } }
@keyframes drift { from { transform: translate3d(0, -6px, 0) rotate(-5deg); } to { transform: translate3d(0, 7px, 0) rotate(6deg); } }

/* Header */
.topbar { display: flex; align-items: center; gap: 18px; min-height: 52px; }
.brand { display: inline-flex; align-items: center; gap: 18px; color: #f4f7f6; }
.brand-orb { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 60% 55%, #000402 0 27%, #0a3a1d 30%, transparent 31%), radial-gradient(circle at 32% 28%, #dcffd2, #3fe070 30%, #138a3b 72%, #0a4f22); box-shadow: 0 0 18px rgba(50, 225, 105, .35); }
.brand-orb img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); border-radius: 50%; }
.wordmark { font-size: 30px; font-weight: 500; letter-spacing: .2em; line-height: 1; white-space: nowrap; margin-right: -.2em; }
.topbar-tools { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.demo-pill { padding: 10px 15px; border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(18, 32, 29, .88); color: #dce5e1; font-size: 13px; font-weight: 500; letter-spacing: .12em; line-height: 1; }
.wallet { display: inline-flex; align-items: center; gap: 12px; margin-left: 12px; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wallet svg { width: 26px; height: 26px; stroke-width: 1.6; }
.add-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(150, 255, 180, .35); border-radius: 8px; background: linear-gradient(#35c262, #229548); box-shadow: 0 0 16px rgba(60, 220, 110, .22), inset 0 1px 0 rgba(255, 255, 255, .25); color: #fff; }
.add-button svg { width: 24px; height: 24px; stroke-width: 2.4; }
.add-button:hover:not(:disabled) { background: linear-gradient(#41d06e, #27a350); }
.add-button:disabled { opacity: .6; }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid transparent; border-radius: 10px; background: none; color: #e7eeeb; }
.icon-button svg { width: 28px; height: 28px; stroke-width: 1.6; }
.icon-button:hover { background: rgba(190, 255, 220, .06); border-color: rgba(190, 255, 220, .12); }
.icon-button[aria-pressed=true] { color: var(--neon-bright); }
.tools-gap { width: 18px; }

/* Glossy green button: Play now on the home screen, Play/Cash out in game. */
.glossy { position: relative; overflow: hidden; border: 1px solid rgba(215, 255, 220, .7); border-radius: 11px; background: linear-gradient(180deg, #a6f5b4 0%, #6fea8c 22%, #45dc6d 55%, #2fc85a 100%); color: var(--on-green); box-shadow: 0 0 26px rgba(60, 230, 110, .38), 0 6px 18px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -3px 8px rgba(0, 90, 35, .22); transition: transform .15s, box-shadow .2s, filter .2s; }
.glossy::before { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255, 255, 255, .35) 0 18%, rgba(255, 255, 255, 0) 38%), radial-gradient(ellipse 60% 55% at 50% -10%, rgba(255, 255, 255, .45), transparent 70%); pointer-events: none; }
.glossy:hover:not(:disabled) { filter: brightness(1.05); box-shadow: 0 0 36px rgba(60, 235, 115, .5), 0 8px 20px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .75), inset 0 -3px 8px rgba(0, 90, 35, .22); }
.glossy:active:not(:disabled) { transform: translateY(1px); }
.ghost { border: 1px solid var(--line-strong); border-radius: 11px; background: rgba(12, 24, 21, .72); color: var(--text); transition: background .2s, border-color .2s; }
.ghost:hover { background: rgba(24, 44, 38, .8); border-color: rgba(190, 255, 220, .32); }

/* Footer */
.footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #c9d3cf; font-size: 14px; }
.status { display: inline-flex; align-items: center; gap: 10px; }
.status i { width: 13px; height: 13px; border-radius: 50%; background: #45e27a; box-shadow: 0 0 10px rgba(69, 226, 122, .6); }
.responsible { display: inline-flex; align-items: center; gap: 18px; }
.responsible b { display: grid; place-items: center; width: 38px; height: 38px; border: 1.5px solid #e9efec; border-radius: 50%; font-size: 13px; font-weight: 500; }

/* Dialogs */
dialog { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 32px; overflow-y: auto; border: 1px solid var(--line-strong); border-radius: 20px; color: var(--text); background: radial-gradient(ellipse at 0 0, rgba(43, 227, 107, .1), transparent 60%), #08120f; box-shadow: 0 30px 90px rgba(0, 0, 0, .7), 0 0 0 1px rgba(0, 0, 0, .4); }
dialog::backdrop { background: rgba(1, 6, 4, .72); backdrop-filter: blur(6px); }
dialog h1 { margin: 6px 0 22px; font-size: 30px; font-weight: 600; letter-spacing: -.01em; }
dialog p { color: var(--muted); font-size: 14px; line-height: 1.7; }
dialog b { color: var(--text); font-weight: 600; }
.dialog-close { position: absolute; top: 14px; right: 14px; }
.eyebrow { color: var(--neon-bright); font-size: 12px; font-weight: 500; letter-spacing: .2em; }
.steps { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 14px; }
.steps li > span { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border: 1px solid rgba(92, 240, 126, .45); border-radius: 50%; color: var(--neon-bright); font-size: 12px; font-weight: 600; }
.steps h2 { margin: 2px 0 4px; font-size: 16px; font-weight: 600; }
.steps p { margin: 0; font-size: 13.5px; }
.dialog-note { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--dim) !important; font-size: 12.5px !important; }
.dialog-actions { display: flex; gap: 10px; margin-top: 18px; }
.dialog-actions button { flex: 1; height: 48px; font-size: 16px; font-weight: 600; }
.link-button { padding: 4px 0; border: 0; background: none; color: var(--neon-bright); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(92, 240, 126, .4); }
.notification { position: fixed; z-index: 30; left: 50%; bottom: 28px; max-width: calc(100vw - 32px); padding: 12px 18px; border: 1px solid rgba(150, 255, 180, .45); border-radius: 12px; background: rgba(10, 34, 20, .95); color: #d9ffe3; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); opacity: 0; transform: translate(-50%, 10px); pointer-events: none; transition: opacity .2s, transform .2s; }
.notification.visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 760px) {
  .topbar { gap: 10px; min-height: 44px; }
  .brand { gap: 10px; }
  .brand-orb { width: 32px; height: 32px; }
  .wordmark { font-size: 19px; letter-spacing: .16em; }
  .topbar-tools { gap: 6px; }
  .demo-pill { padding: 7px 9px; font-size: 10px; }
  .wallet { gap: 6px; margin-left: 2px; font-size: 15px; }
  .wallet svg { width: 19px; height: 19px; }
  .add-button { width: 34px; height: 34px; border-radius: 7px; }
  .add-button svg { width: 19px; height: 19px; }
  .icon-button { width: 34px; height: 34px; }
  .icon-button svg { width: 22px; height: 22px; }
  .tools-gap { width: 0; }
  .footer { font-size: 12px; }
  .responsible { gap: 10px; }
  .responsible b { width: 30px; height: 30px; font-size: 11px; }
}
@media (max-width: 480px) {
  .wordmark { display: none; }
  .demo-pill { padding: 6px 7px; font-size: 9px; letter-spacing: .08em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .backdrop-plate, .floater { animation: none !important; }
}
