@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;0,9..40,900&display=swap');

:root {
  --bg: #060606;
  --bg-elevated: #0f0f0f;
  --panel: #ffffff;
  --ink: #0a0a0a;
  --muted: #8a8a8a;
  --line: rgba(255, 255, 255, 0.1);
  --line-dark: rgba(0, 0,  0, 0.12);
  --white: #fff;
  --radius: 18px;
  --font: "DM Sans", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 0.9, 0.22, 1);
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--header-h);
  overflow-x: hidden;
}
::selection { background: rgba(255, 255, 255, 0.2); color: #fff; }

a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }

.container { width: min(1140px, calc(100% - 2rem)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -999px; top: 12px; z-index: 9999;
  background: #fff; color: #000; padding: 10px 14px; border-radius: 8px;
}
.skip-link:focus { left: 12px; }

#particles-canvas {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 1;
}

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: linear-gradient(180deg, rgba(0,0,0,.92), rgba(0,0,0,.55));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 16px;
  min-height: var(--header-h); padding: 0 4px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--white); flex-shrink: 0;
}
.logo img { filter: brightness(0) invert(1); }
.logo-text {
  font-weight: 800; letter-spacing: 0.14em; font-size: 0.82rem;
}
.nav { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.nav a {
  padding: 8px 12px; text-decoration: none; color: var(--muted);
  font-size: 0.9rem; font-weight: 600; border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--white); background: rgba(255,255,255,.06); }
.nav-cta {
  background: var(--white) !important; color: var(--ink) !important;
  padding: 8px 14px !important; font-weight: 800 !important;
}
.nav-cta:hover { background: #e8e8e8 !important; }

.nav-market {
  flex-shrink: 0;
  margin-left: 8px;
  padding: 8px 14px;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}
.nav-market:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; }

.burger {
  display: none; border: 1px solid var(--line); background: transparent;
  color: #fff; padding: 8px 10px; border-radius: 8px; cursor: pointer;
}

main { position: relative; z-index: 2; }

.breadcrumb {
  padding: 14px 0; font-size: 0.86rem; color: var(--muted);
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: #fff; text-decoration: underline; }
.breadcrumb .sep { margin: 0 8px; opacity: 0.5; }

/* Hero — светлая полоса как на референсе */
.kgame-hero {
  background: linear-gradient(180deg, #f4f4f4 0%, #ececec 100%);
  color: var(--ink);
  padding: clamp(48px, 8vw, 88px) 0 clamp(40px, 6vw, 64px);
  position: relative;
  z-index: 2;
  overflow: hidden;
}
.kgame-hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 400px at 90% 0%, rgba(0,0,0,.04), transparent),
    repeating-linear-gradient(90deg, transparent, transparent 79px, rgba(0,0,0,.03) 79px, rgba(0,0,0,.03) 80px);
  pointer-events: none;
}
.kgame-hero-copy { position: relative; text-align: center; }
.eyebrow {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.22em;
  text-transform: uppercase; color: #444; margin-bottom: 14px;
}
.glow-title {
  font-family: var(--font);
  font-weight: 800;
  font-size: clamp(1.85rem, 4.8vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: 16px;
  text-wrap: balance;
}
.glow-title .title-mark {
  font-weight: 900;
  letter-spacing: 0.02em;
}
.lead {
  color: #333; font-size: clamp(1rem, 2vw, 1.12rem);
  max-width: 720px; margin: 0 auto 22px;
}
.views-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(0,0,0,.06); border: 1px solid var(--line-dark);
  font-size: 0.88rem; font-weight: 600; color: #222; margin-bottom: 22px;
}
.hero-ctas {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 20px; border-radius: 10px; font-weight: 700;
  font-size: 0.92rem; text-decoration: none; transition: transform 0.2s var(--ease), box-shadow 0.2s;
  border: 1px solid transparent; min-height: 44px;
}
.btn-primary {
  background: var(--ink); color: var(--white);
  box-shadow: 0 14px 32px rgba(0,0,0,.22);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(0,0,0,.28); }
.btn-outline {
  background: #fff; color: var(--ink);
  border-color: rgba(0,0,0,.12);
  box-shadow: 0 10px 28px rgba(0,0,0,.1);
}
.btn-outline:hover { background: #f0f0f0; transform: translateY(-1px); }

/* Тёмная секция — карточки игр */
.section-dark {
  padding: clamp(48px, 6vw, 72px) 0;
  position: relative;
  isolation: isolate;
}
.section-title {
  font-family: var(--font);
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  text-align: center;
  color: var(--white);
}
.section-lead {
  text-align: center; color: var(--muted); max-width: 640px;
  margin: 0 auto 36px;
}
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}
.game-card {
  display: flex; flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  text-decoration: none; color: inherit;
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}
.game-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255,255,255,.25);
  box-shadow: 0 28px 60px rgba(0,0,0,.55);
}
.game-card-banner { width: 100%; object-fit: cover; max-height: 72px; }
.game-card-body { padding: 22px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.game-card-tag {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: #aaa;
}
.game-card h3 { font-size: 1.35rem; font-weight: 800; color: #fff; }
.game-card p { color: var(--muted); font-size: 0.95rem; flex: 1; }
.game-card-link {
  font-weight: 800; font-size: 0.88rem; color: #fff;
  margin-top: 8px;
}

/* Белые панели контента */
.section-light { background: #f0f0f0; padding: clamp(40px, 5vw, 64px) 0; }
.kgame-article { max-width: 1120px; margin: 0 auto; }
.kgame-panel {
  background: var(--panel); color: var(--ink);
  border-radius: var(--radius); padding: clamp(22px, 4vw, 32px);
  margin-bottom: 28px;
  box-shadow: 0 24px 70px rgba(0,0,0,.2);
}
.kgame-top-banner {
  width: 100%; border-radius: 12px; margin-bottom: 22px;
  border: 1px solid var(--line-dark);
}
.kgame-panel h2 {
  font-family: var(--font);
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.kgame-panel h3 { font-size: 1.15rem; margin: 22px 0 10px; font-weight: 800; }
.kgame-panel p, .kgame-panel li { color: #222; line-height: 1.8; margin-bottom: 12px; }
.kgame-panel ol, .kgame-panel ul { padding-left: 22px; margin-bottom: 16px; }
.kgame-panel a { color: var(--ink); font-weight: 600; }
.kgame-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.85fr);
  gap: 28px; align-items: start; margin-top: 8px;
}
.kgame-panel figure { margin: 0; text-align: center; }
.kgame-panel figure img {
  border-radius: 14px; border: 1px solid var(--line-dark);
}
.kgame-panel figcaption { font-size: 0.9rem; color: #555; margin-top: 10px; }
.nominals {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 20px;
}
.nominals span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 80px; padding: 10px 16px;
  border: 2px solid var(--ink); border-radius: 999px;
  font-weight: 800; background: var(--ink); color: var(--white);
}
.tip-box {
  padding: 18px 20px; border-radius: 12px;
  background: #f5f5f5; border: 1px solid var(--line-dark);
  margin: 18px 0;
}
.tip-box strong { display: block; margin-bottom: 8px; font-size: 1rem; }
.kgame-wide-figure { margin-top: 24px; text-align: center; }
.kgame-wide-figure img { border-radius: 14px; border: 1px solid var(--line-dark); margin: 0 auto; }
.message-example {
  margin-top: 24px; padding: 22px;
  background: #f8f8f8; border-radius: 14px; border: 1px solid var(--line-dark);
}
.message-example img { margin: 14px 0; border-radius: 10px; }

.stats-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin: 20px 0;
}
.stat-chip {
  padding: 14px; border: 1px solid var(--line-dark); border-radius: 12px;
  text-align: center; background: #fafafa;
}
.stat-chip b { display: block; font-size: 1.2rem; }
.stat-chip span { font-size: 0.82rem; color: #555; }

.faq-list details {
  background: #fff; border: 1px solid var(--line-dark);
  border-radius: 12px; padding: 16px 18px; margin-bottom: 10px;
}
.faq-list summary { font-weight: 800; cursor: pointer; color: var(--ink); }
.faq-list p { margin-top: 10px; color: #333; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0; margin-top: 48px;
  background: #040404;
}
.footer-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 20px; align-items: center;
}
.footer-inner .muted { color: var(--muted); font-size: 0.9rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 600; }
.footer-links a:hover { color: #fff; }
.footer-logo { filter: brightness(0) invert(1); opacity: 0.9; }

@media (max-width: 900px) {
  .nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; background: rgba(0,0,0,.97); padding: 16px; border-bottom: 1px solid var(--line); }
  .nav.is-open { display: flex; }
  .nav-market { margin-left: auto; font-size: 0.78rem; padding: 7px 10px; }
  .burger { display: block; margin-left: 8px; }
  .kgame-panel-grid { grid-template-columns: 1fr; }
  .kgame-hero-copy { text-align: left; }
  .hero-ctas { justify-content: flex-start; }
  #particles-canvas { opacity: 0.65; }
}

@media (prefers-reduced-motion: reduce) {
  #particles-canvas { display: none; }
  .game-card:hover { transform: none; }
}
