:root{
  --bg:#0b1220;
  --card:rgba(255,255,255,.06);
  --stroke:rgba(255,255,255,.10);
  --text:#eaf0ff;
  --muted:rgba(234,240,255,.72);
  --brand:#8a5cff;
  --brand2:#22b9bb;
  --shadow: 0 16px 50px rgba(0,0,0,.45);
  --r:18px;
  --pad:18px;
  --max:1200px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}
*{box-sizing:border-box}
body{
  margin:0; font-family:var(--font);
  background: radial-gradient(900px 500px at 20% 0%, rgba(138,92,255,.22), transparent 55%),
              radial-gradient(900px 500px at 85% 10%, rgba(34,185,187,.16), transparent 60%),
              var(--bg);
  color:var(--text);
}
.wrap{max-width:var(--max); margin:0 auto; padding:18px;}
.topbar{position:sticky; top:0; backdrop-filter: blur(14px); background: rgba(11,18,32,.65); border-bottom:1px solid var(--stroke); z-index:50;}
.topbar-inner{display:flex; align-items:center; justify-content:space-between; gap:12px;}
.brand{display:flex; align-items:baseline; gap:10px; text-decoration:none; color:var(--text);}
.brand-dot{width:10px; height:10px; border-radius:999px; background: linear-gradient(135deg,var(--brand),var(--brand2)); box-shadow: 0 0 20px rgba(138,92,255,.55);}
.brand-name{font-weight:800; letter-spacing:.2px}
.brand-sub{opacity:.8; font-weight:600}
.nav{display:flex; gap:14px; flex-wrap:wrap;}
.nav a{color:var(--muted); text-decoration:none; padding:10px 10px; border-radius:12px;}
.nav a:hover{color:var(--text); background: rgba(255,255,255,.06);}

.hero{display:grid; grid-template-columns: 1.3fr .9fr; gap:16px; margin-top:14px;}
@media (max-width:980px){ .hero{grid-template-columns:1fr;} }

.hero-card{
  border:1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.04));
  border-radius: calc(var(--r) + 6px);
  padding: 28px;
  box-shadow: var(--shadow);
}
h1{margin:0 0 10px; font-size: 34px; letter-spacing:-.4px}
.lead{margin:0 0 18px; color:var(--muted); font-size:16px; line-height:1.7}
.hero-actions{display:flex; gap:10px; flex-wrap:wrap}
.btn{
  appearance:none; border:1px solid var(--stroke);
  background: linear-gradient(135deg, rgba(138,92,255,.95), rgba(34,185,187,.55));
  color:#08101e; font-weight:800;
  padding:12px 14px; border-radius: 14px; cursor:pointer;
  text-decoration:none; display:inline-flex; align-items:center; justify-content:center;
}
.btn:hover{filter:brightness(1.05)}
.btn-ghost{
  background: rgba(255,255,255,.06);
  color:var(--text);
  font-weight:700;
}
.pill{
  display:inline-flex; align-items:center;
  padding:7px 10px; border-radius:999px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.05);
  color:var(--muted); font-size:12px;
}
.pill-active{color:var(--text); border-color: rgba(138,92,255,.6); background: rgba(138,92,255,.12);}
.hero-meta{display:flex; gap:8px; flex-wrap:wrap; margin-top:14px}

.card{
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.05);
  border-radius: var(--r);
  padding: var(--pad);
}
.card-title{font-weight:800; margin-bottom:10px}
.card-big{font-weight:900; font-size:22px}
.muted{color:var(--muted)}
.small{font-size:12px}
.link{color:var(--text); opacity:.9; text-decoration:none; display:inline-block; margin-top:10px}
.link:hover{opacity:1; text-decoration:underline}

.mini-grid{display:grid; grid-template-columns:1fr; gap:10px}
.mini{display:block; text-decoration:none; color:var(--text); border:1px solid var(--stroke); background: rgba(255,255,255,.04); padding:12px; border-radius:14px}
.mini:hover{background: rgba(255,255,255,.06)}
.mini-name{font-weight:800}
.mini-sub{font-size:12px; color:var(--muted); margin-top:4px}

.page-title{font-size:28px; margin: 10px 0 6px}
.grid{display:grid; grid-template-columns: repeat(3, 1fr); gap:14px; margin-top:14px;}
@media (max-width:980px){ .grid{grid-template-columns:1fr;} }

.game-card{
  text-decoration:none; color:var(--text);
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.05);
  border-radius: var(--r);
  padding: 18px;
  transition: transform .12s ease, background .12s ease;
}
.game-card:hover{transform: translateY(-2px); background: rgba(255,255,255,.07);}
.game-title{font-weight:900; font-size:18px}
.game-tagline{color:var(--muted); margin-top:6px; line-height:1.5}
.game-meta{margin-top:12px; display:flex; gap:8px; flex-wrap:wrap}

.footer{border-top:1px solid var(--stroke); margin-top:28px; background: rgba(11,18,32,.45)}
.footer-inner{display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; padding-top:18px; padding-bottom:18px}

.layout-2{display:grid; grid-template-columns: 1.35fr .65fr; gap:14px; margin-top:12px}
@media (max-width:980px){ .layout-2{grid-template-columns:1fr;} }
.game-top{display:flex; justify-content:space-between; align-items:flex-end; gap:12px; flex-wrap:wrap; margin-top:10px}
.game-actions{display:flex; gap:10px; flex-wrap:wrap}

.game-stage{padding:16px}
.game-root{min-height:420px; border:1px dashed rgba(255,255,255,.18); border-radius:16px; padding:14px; background: rgba(0,0,0,.15)}
.bar{margin-top:12px; border-top:1px solid var(--stroke); padding-top:12px; display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap}
.stat{display:flex; flex-direction:column; gap:4px}
.bar-actions{display:flex; gap:8px; flex-wrap:wrap}

.divider{height:1px; background: var(--stroke); margin:14px 0}
.list{margin:0; padding-left:18px; color: var(--muted); line-height:1.7}
.adbox{border:1px dashed rgba(255,255,255,.18); border-radius:14px; padding:12px; background: rgba(0,0,0,.12)}

.table{width:100%; border-collapse: collapse; overflow:hidden}
.table th,.table td{padding:12px 10px; border-bottom:1px solid rgba(255,255,255,.08); text-align:left}
.table th{color:rgba(234,240,255,.85); font-weight:800; font-size:13px}
.table td{color:rgba(234,240,255,.9)}
.filters{display:flex; gap:8px; flex-wrap:wrap; margin:10px 0 14px}

/* Inputs + modal */
.input{
  width:100%;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  color:var(--text);
  padding:12px 12px;
  border-radius: 14px;
  outline:none;
}
.input:focus{border-color: rgba(138,92,255,.7); box-shadow: 0 0 0 3px rgba(138,92,255,.15)}
.modal{position:fixed; inset:0; display:none; align-items:center; justify-content:center; z-index:200}
.modal.show{display:flex}
.modal-backdrop{position:absolute; inset:0; background: rgba(0,0,0,.6)}
.modal-card{
  position:relative;
  width:min(520px, calc(100% - 28px));
  border:1px solid var(--stroke);
  background: rgba(11,18,32,.92);
  border-radius: 18px;
  padding:16px;
  box-shadow: var(--shadow);
}
.modal-title{font-weight:900; font-size:18px; margin-bottom:8px}
.modal-row{display:flex; gap:10px; margin-top:12px; flex-wrap:wrap}
.modal-row .input{flex:1; min-width:220px}
.modal-actions{display:flex; justify-content:flex-end; gap:10px; margin-top:12px}
