/* ========== Base ========== */
:root{
  --bg:#0f0f12;
  --panel:#15151a;
  --muted:#b8b9c4;
  --text:#f2f3f8;
  --brand:#ff2e6a;
  --brand-2:#ffc400;
  --border:#242433;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 10% -10%, #1a1a24, transparent), var(--bg);
  color: var(--text);
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* ========== Header ========== */
.site-header{
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  align-items:center;
  gap:12px;
  padding:14px 20px;
  background:#121218;
  border-bottom:1px solid var(--border);
  position:sticky; top:0; z-index:10;
}
.logo{ font-weight:700; letter-spacing:.3px; }
.nav{ display:flex; gap:10px; justify-content:center; }
.nav-link{ color:var(--muted); text-decoration:none; padding:6px 10px; border-radius:8px; }
.nav-link:hover, .nav-link.active{ background:#1a1a24; color:var(--text); }
.user{ text-align:right; color:var(--muted); font-size:.95rem; }

/* ========== Hero ========== */
.hero{
  text-align:center;
  padding:48px 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color:#1a1a24;
  border-bottom:1px solid var(--border);
}
.hero h1{ margin:0 0 6px; font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
.hero p{ margin:0; color:#231b1b; }

/* ========== Dashboard Grid ========== */
.dashboard{
  display:grid;
  grid-template-columns: repeat( auto-fit, minmax(240px, 1fr) );
  gap:18px;
  padding:26px;
  max-width:1200px;
  margin: 0 auto;
}
.game-card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:16px;
  overflow:hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  transition: transform .18s ease, box-shadow .18s ease;
  display:flex; flex-direction:column;
}
.game-card.disabled{ opacity:.8; }
.game-card:hover{ transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0,0,0,.45); }
.game-card img{ width:100%; height:160px; object-fit:cover; display:block; }
.game-card h2{ margin:12px 14px 4px; font-size:1.1rem; }
.game-card p{ margin:0 14px 12px; color:var(--muted); }
.game-card .btn{ margin: 0 14px 16px; align-self:flex-start; }

/* ========== Buttons ========== */
.btn{
  background:var(--brand);
  color:white;
  padding:10px 14px;
  border-radius:10px;
  text-decoration:none;
  display:inline-flex;
  gap:8px;
  align-items:center;
  border:none;
  cursor:pointer;
  font-weight:600;
  box-shadow: 0 4px 10px rgba(0,0,0,.25);
}
.btn:hover{ filter:brightness(1.05); }
.btn:active{ transform: translateY(1px); }
.btn.outline{ background:transparent; border:1px solid var(--border); color:var(--text); }
.btn.subtle{ background:#1a1a24; color:var(--muted); }
.btn.back-btn{ justify-self:start; }
.btn:disabled{ opacity:.6; cursor:not-allowed; }

/* ========== Game pages ========== */
.page-title{ text-align:center; margin:0; font-size:1.2rem; }
.game-container{ padding:24px 16px; display:flex; justify-content:center; }
.card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:16px;
  width:min(680px, 100%);
  padding:18px;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.card.center{ text-align:center; }
.controls-row{ display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin:10px 0; }
input[type="number"]{
  background:#1b1b22;
  color:var(--text);
  padding:10px 12px;
  border-radius:10px;
  border:1px solid var(--border);
  width:180px;
  outline:none;
}
input[type="number"]:focus{ border-color:#2d2d40; }
.feedback{ margin:10px 0; color:var(--text); }
.feedback.warn{ color:#ffdc60; }
.feedback.success{ color:#52ff8f; }
.feedback.hint{ color:#8ecbff; }
.muted{ color:var(--muted); }

/* ========== Footer ========== */
.site-footer{ border-top:1px solid var(--border); margin-top:28px; }
.footer-inner{ max-width:1200px; padding:16px; margin:0 auto; text-align:center; color:var(--muted); }
.footer-inner a{ color:var(--muted); }
