:root{
  --bg:#0f1420;              /* глубокий тёмный */
  --surface:#151b2a;         /* карточки */
  --elev:#1a2234;            /* ховер/повышение */
  --text:#e9eef7;
  --muted:#9aa7bd;
  --accent:#4cc9f0;          /* холодный неон */
  --accent-2:#9d4edd;        /* фиолетовый неон */
  --success:#45ff99;
  --radius:14px;
  --shadow: 0 10px 30px rgba(0,0,0,.35), 0 3px 12px rgba(0,0,0,.25);
  --wrap: 1200px;
}

/* базис */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(157,78,221,.25), transparent 60%),
    radial-gradient(900px 500px at 120% 10%, rgba(76,201,240,.18), transparent 60%),
    var(--bg);
  color:var(--text);
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  letter-spacing:.2px;
}
img{max-width:100%;display:block}
.wrap{max-width:var(--wrap); margin:0 auto; padding:0 20px}

/* header */
.site-header{
  position:sticky; top:0; z-index:50;
  backdrop-filter: saturate(140%) blur(8px);
  background:rgba(10,13,20,.65);
  border-bottom:1px solid rgba(255,255,255,.06);
}
.header-row{
  height:72px; display:flex; align-items:center; justify-content:space-between; gap:24px;
}
.brand{display:flex; align-items:center; gap:12px; text-decoration:none; color:var(--text)}
.logo{height:40px; width:auto; border-radius:10px}
.brand-name{font-weight:700; letter-spacing:.3px}

/* buttons */
.btn{
  --bg:var(--surface); --fg:var(--text);
  display:inline-flex; align-items:center; justify-content:center;
  padding:12px 18px; border-radius:12px; text-decoration:none; color:var(--fg);
  background:var(--bg); border:1px solid rgba(255,255,255,.08);
  box-shadow: 0 2px 0 rgba(255,255,255,.04) inset, 0 1px 0 rgba(0,0,0,.3);
  transition: all .2s ease;
}
.btn:hover{transform: translateY(-1px); background:var(--elev)}
.btn:active{transform: translateY(0);}

.btn-primary{
  --bg: linear-gradient(120deg, var(--accent), var(--accent-2));
  border:none; color:#0c0f17; font-weight:700;
  text-shadow:0 1px 0 rgba(255,255,255,.18);
}
.btn-secondary{color:var(--text); background:rgba(255,255,255,.05)}
.btn-outline{background:transparent; border:1px solid rgba(255,255,255,.18)}
.btn-lg{padding:14px 22px; font-size:1.05rem}
.small{padding:8px 12px; font-size:.9rem}

/* hero */
.hero{
  position:relative; isolation:isolate;
  background: radial-gradient(1200px 600px at 70% -10%, rgba(76,201,240,.18), transparent 60%),
              radial-gradient(900px 500px at -10% 10%, rgba(157,78,221,.18), transparent 60%),
              #0b0f18;
}
.hero::before{
  content:""; position:absolute; inset:0; z-index:-1;
  background: var(--hero) center/cover no-repeat;
  opacity:.22;
}
.hero-inner{padding:56px 0 40px}
.hero-title{
  font-size: clamp(28px, 5vw, 44px);
  line-height:1.15; font-weight:800; letter-spacing:.2px; margin:10px 0 12px;
}
.hero-sub{max-width:760px; color:var(--muted); margin:0 0 18px}

/* section */
.section{padding:38px 0}
.section-title{font-size:28px; font-weight:800; margin:0 0 18px}

/* games */
.games-grid{
  display:grid; gap:16px;
  grid-template-columns: repeat(5,minmax(0,1fr));
}
@media (max-width: 960px){
  .games-grid{ grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 600px){
  .games-grid{ grid-template-columns: repeat(2,1fr); }
}
.game-card{
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.06);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
  display:flex; flex-direction:column;
}
.game-thumb{position:relative; aspect-ratio: 16/11; background:#0d1320}
.game-thumb img{width:100%; height:100%; object-fit:cover}
.badge{
  position:absolute; left:10px; top:10px; font-size:12px; padding:4px 8px;
  border-radius:999px; color:#001019; background:linear-gradient(120deg,var(--success),#B7FFEA);
  font-weight:800; letter-spacing:.3px;
}
.game-meta{padding:12px}
.game-title{margin:4px 0 6px; font-size:16px; font-weight:800}
.game-desc{margin:0 0 10px; color:var(--muted); font-size:13px}
.btn-play{
  width:100%; background:linear-gradient(120deg, var(--accent), var(--accent-2));
  color:#0b0f18; border:none; font-weight:800;
}

/* long text (prose) */
.prose h1, .prose h2, .prose h3, .prose h4{margin:24px 0 12px; line-height:1.25}
.prose h1{font-size:30px; font-weight:900}
.prose h2{font-size:22px; font-weight:800}
.prose h3{font-size:18px; font-weight:700}
.prose h4{font-size:16px; font-weight:700}
.prose p{margin:8px 0 12px; color:var(--text)}
.prose ul, .prose ol{margin:10px 0 16px 18px; color:var(--text)}
.faq .faq-item{
  margin:8px 0; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08);
  border-radius:12px; overflow:hidden;
}
.faq summary{cursor:pointer; padding:14px 16px; list-style:none}
.faq summary::-webkit-details-marker{display:none}
.faq .faq-a{padding:0 16px 14px; color:var(--muted)}

/* footer */
.site-footer{padding:22px 0; border-top:1px solid rgba(255,255,255,.08); background:rgba(0,0,0,.35)}
.footer-row{display:flex; align-items:center; justify-content:space-between; gap:16px}
.muted{color:var(--muted); margin:0}

/* smooth focus */
:focus-visible{outline:2px solid var(--accent); outline-offset:2px}

/* Fixes & tweaks after QA */
@media (max-width: 520px){
  .hero-inner{padding:28px 0 22px}
  .hero-title{font-size: clamp(22px, 8vw, 30px);}
  .btn.btn-lg{padding:12px 16px; font-size:.98rem}
}
.livewins .wins-ticker{overflow:auto}
.tab-link{padding:10px 14px; border-radius:999px; background:rgba(255,255,255,.06); color:#fff; text-decoration:none; display:inline-flex; align-items:center; height:38px}
.tab-link:hover{background:rgba(255,255,255,.12)}


/* === Critical header/button overlap fixes === */
.hero-cta{display:flex; gap:12px; flex-wrap:wrap}
@media (max-width: 520px){
  .site-header{position:sticky; top:0}
  .header-row{
    display:grid;
    grid-template-columns: 1fr auto;
    grid-template-rows:auto auto;
    grid-template-areas: "brand burger" "actions actions";
    gap:8px; height:auto; padding:8px 0;
  }
  .brand{grid-area:brand; min-width:0}
  .hamburger{grid-area:burger}
  .actions{grid-area:actions; display:grid; grid-template-columns:1fr; gap:8px}
  .actions .btn{width:100%; min-width:0; padding:12px 14px; font-size:.95rem}
}
@media (min-width: 521px) and (max-width: 880px){
  .actions{display:flex; flex-wrap:nowrap; gap:12px}
  .actions .btn{min-width:120px}
}
.actions{gap:14px}
.actions .btn{min-width:120px}

/* Avoid nav overlap */
.nav-open .main-nav{z-index:60}

/* Ensure sections don't hide under sticky header after anchor jump */
:target{scroll-margin-top: 84px}

/* Small polish */
.hero-title{word-break:break-word}

/* Spacing polish requested */
@media (max-width: 1200px){
  .wrap{padding: 0 28px}
}
@media (max-width: 520px){
  .wrap{padding: 0 18px}
}

/* Header CTA distance */
.actions{gap:16px}
@media (max-width: 520px){
  .actions{gap:12px}
  .actions .btn{padding:13px 16px}
}

/* Prevent edge hugging on hero */
.hero-inner{padding-left: min(5vw, 40px); padding-right: min(5vw, 40px)}
