:root{
  --bg:#0b1220;
  --bg-2:#101a2d;
  --card:#10192a;
  --card-soft:#121f33;
  --text:#e7eefc;
  --muted:#9eb0cb;
  --accent:#8b7bff;
  --accent-2:#35d2a0;
  --danger:#ff6b6b;
  --border:rgba(255,255,255,.09);
  --radius:18px;
  --shadow:0 10px 24px rgba(0,0,0,.16);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--text);
  background:linear-gradient(180deg,#0a1120,#0d1627 38%,#0b1220 100%);
}
body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(800px 400px at 0% 0%, rgba(123,92,255,.16), transparent 60%),
    radial-gradient(900px 420px at 100% 8%, rgba(34,211,238,.12), transparent 58%);
}
a{color:inherit;text-decoration:none}
.container{max-width:1160px;margin:0 auto;padding:0 16px}
.page-grow{flex:1;display:flex;flex-direction:column}
.page-main{padding-top:18px;padding-bottom:24px;position:relative;z-index:1}

.header{
  position:sticky;top:0;z-index:10;
  background:rgba(9,15,27,.94);
  border-bottom:1px solid var(--border);
}
.header__inner{display:flex;align-items:center;justify-content:space-between;padding:14px 0;gap:14px}
.logo{font-weight:900;font-size:18px;letter-spacing:.2px}
.nav{display:flex;gap:6px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.nav a{padding:10px 12px;border-radius:12px;color:#d7e4fb}
.nav a:hover{background:rgba(255,255,255,.04)}

.footer{margin-top:auto;border-top:1px solid var(--border);background:rgba(9,15,27,.94)}
.footer__inner{padding:16px 0;display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}

.card{
  background:linear-gradient(180deg, rgba(16,25,42,.95), rgba(15,24,39,.94));
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px;
  margin:18px 0;
  position:relative;
  overflow:hidden;
}
.card--hero{padding:22px}
.card--mini{padding:12px;margin:0}
.narrow{max-width:560px;margin:18px auto}
.grid{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(280px,.88fr);gap:18px}
.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.features{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.stack{display:flex;flex-direction:column;gap:10px}
.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.row--space{justify-content:space-between}

.hero--release{padding-top:6px}
.hero__grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(280px,.9fr);gap:18px;align-items:stretch}
.hero__cta{display:flex;gap:10px;flex-wrap:wrap;margin-top:8px}
.pill{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;background:rgba(255,255,255,.05);border:1px solid var(--border);color:var(--muted);font-weight:700;margin-bottom:12px}
.hero h1{font-size:clamp(30px,4vw,42px);line-height:1.08;margin:0 0 12px}
.lead{color:var(--muted);font-size:16px;line-height:1.65;margin:0}
.hero__stats{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}
.stat{flex:1;min-width:150px;border:1px solid var(--border);border-radius:16px;padding:12px;background:rgba(255,255,255,.03)}
.stat__num{font-size:26px;font-weight:900}
.stat__txt{color:var(--muted);font-size:13px;font-weight:700;margin-top:4px}
.hero-card__title{font-weight:900;font-size:18px;margin-bottom:10px}
.hero-card__list{display:flex;flex-direction:column;gap:10px}
.hero-mini,.game-card,.feature,.side-card,.stage-card,.statline__item{
  background:rgba(255,255,255,.03);
  border:1px solid var(--border);
  border-radius:16px;
}
.hero-mini{padding:12px;transition:transform .12s ease,border-color .12s ease}
.hero-mini:hover,.game-card:hover{transform:translateY(-1px);border-color:rgba(139,123,255,.35)}
.hero-mini__name,.game-card__title,.feature__title{font-weight:900}
.hero-mini__desc,.muted,.ad-note,.small-text{color:var(--muted)}
.hero-mini__desc{font-size:13px;margin-top:4px}
.game-card{padding:14px;transition:transform .12s ease,border-color .12s ease}
.badge{
  display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;
  background:rgba(255,255,255,.05);border:1px solid var(--border);font-size:13px;font-weight:700
}
.badge--ok{border-color:rgba(53,210,160,.45)}
.badge--warn{border-color:rgba(255,193,93,.45)}

.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:10px 14px;border-radius:14px;border:1px solid rgba(139,123,255,.35);
  background:linear-gradient(180deg,#9a8cff,#7c6cff);color:#0d1322;font-weight:900;cursor:pointer
}
.btn:hover{filter:brightness(1.03)}
.btn:disabled{opacity:.55;cursor:not-allowed}
.btn--ghost{background:rgba(255,255,255,.04);color:var(--text);border-color:var(--border)}
.btn--danger{background:rgba(255,107,107,.14);color:var(--text);border-color:rgba(255,107,107,.35)}
.btn--sm{padding:8px 11px;border-radius:12px;font-size:13px}

.form{display:flex;flex-direction:column;gap:10px}
label{display:flex;flex-direction:column;gap:6px;font-weight:700}
input,textarea,select{
  width:100%;padding:11px 12px;border-radius:14px;border:1px solid var(--border);
  background:#0d1524;color:var(--text);outline:none;font:inherit
}
textarea{min-height:110px;resize:vertical}
input:focus,textarea:focus,select:focus{border-color:rgba(139,123,255,.55)}

.msg{margin-top:10px;font-weight:700;min-height:20px}
.msg.ok{color:var(--accent-2)}
.msg.err{color:var(--danger)}
.alert{padding:10px 12px;border-radius:12px;background:rgba(255,255,255,.04);border:1px solid var(--border)}
.alert.ok{color:var(--accent-2)}
.alert.warn{color:var(--danger)}

.divider{height:1px;background:var(--border);margin:14px 0}
.list{margin:0;padding-left:18px}
.list li{margin:10px 0}
.big-balance{font-size:36px;font-weight:900;margin:6px 0 2px}
.table-wrap{overflow:auto}
.table{width:100%;border-collapse:collapse;font-size:14px}
.table th,.table td{padding:10px;border-bottom:1px solid var(--border);vertical-align:top;text-align:left}
.table th{color:var(--muted);font-weight:800}

.ad-slot{margin:14px 0;position:relative;z-index:1}
.ad-box{padding:14px 16px;border:1px dashed rgba(255,255,255,.16);border-radius:16px;background:rgba(255,255,255,.03)}
.ad-box--placeholder{max-width:100%}
.ad-title{font-weight:800;margin-bottom:4px}
.ad-raw > *{max-width:100%}

.game-wrap{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:14px;align-items:start}
.game-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
.game-stage{display:flex;flex-direction:column;gap:12px}
.stage-top{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.stage-title{font-weight:900;font-size:18px;margin-bottom:4px}
.stage-preview{margin-top:12px;border:1px dashed rgba(255,255,255,.16);border-radius:16px;padding:18px;background:rgba(12,18,31,.55);min-height:120px;display:flex;align-items:center;justify-content:center;text-align:center}
.compact-list{margin:0;padding-left:18px}
.compact-list li{margin:8px 0}
.game-frame{width:100%;height:560px;border:1px solid var(--border);border-radius:16px;background:#09111e}
.game-side{display:flex;flex-direction:column;gap:12px}
.prose{line-height:1.65}
.prose h2{margin-top:18px}

.modal.hidden{display:none}
.modal{position:fixed;inset:0;z-index:120}
.modal__overlay{position:absolute;inset:0;background:rgba(0,0,0,.72)}
.modal__card{
  position:relative;max-width:560px;margin:10vh auto;padding:18px;border-radius:18px;
  background:linear-gradient(180deg,#10192a,#0f1827);border:1px solid var(--border);box-shadow:0 20px 60px rgba(0,0,0,.32)
}
.modal__card--game{max-width:980px;width:calc(100% - 24px);margin:4vh auto;padding:12px}
.modal__top{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:10px;flex-wrap:wrap}
.modal__title{font-weight:900;font-size:16px}
.game-frame--modal{height:78vh;min-height:520px}
.game-freeze{position:absolute;inset:54px 12px 12px;display:grid;place-items:center;background:rgba(8,12,20,.55);border-radius:16px;z-index:2}
.game-freeze__inner{text-align:center;display:flex;flex-direction:column;gap:8px;align-items:center}
.modal-open{overflow:hidden}

.statline{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.statline__item{padding:14px}
.statline__label{color:var(--muted);font-size:13px;font-weight:700}
.statline__value{font-size:18px;font-weight:900;margin-top:6px}

.feature{padding:14px;display:flex;gap:12px;align-items:flex-start}
.feature__icon{font-size:22px}

@media (max-width:980px){
  .game-wrap,.grid,.hero__grid{grid-template-columns:1fr}
}
@media (max-width:720px){
  .cards,.features,.statline{grid-template-columns:1fr}
  .header__inner{align-items:flex-start}
  .nav{justify-content:flex-start}
  .modal__card--game{margin:2vh auto}
  .game-frame--modal{height:82vh;min-height:520px}
}
