:root {
  --bg: #090c14;
  --surface: #111624;
  --surface-2: #171d2d;
  --line: #273047;
  --text: #f7f8fc;
  --muted: #a7b0c5;
  --accent: #7c5cff;
  --accent-2: #24d6a1;
  --orange: #ff8a3d;
  --max-width: 1440px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(9,12,20,.92);
  backdrop-filter: blur(16px);
}
.header-inner {
  width: min(calc(100% - 40px), var(--max-width));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), #4b36d6);
  box-shadow: 0 8px 24px rgba(124,92,255,.3);
  font-size: .75rem;
  letter-spacing: -.04em;
}
.main-nav { display: flex; align-items: center; gap: 8px; }
.main-nav a {
  padding: 9px 13px;
  border-radius: 9px;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 650;
  text-decoration: none;
}
.main-nav a:hover, .main-nav a.active { background: var(--surface-2); color: var(--text); }
.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 12px;
}

.hero {
  width: min(calc(100% - 40px), var(--max-width));
  min-height: 490px;
  margin: 0 auto;
  padding: 76px 0 68px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  align-items: center;
  gap: 70px;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  left: -250px;
  top: -180px;
  border-radius: 50%;
  background: rgba(124,92,255,.13);
  filter: blur(20px);
  pointer-events: none;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-2);
  font-size: .74rem;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: .98;
  letter-spacing: -.065em;
}
.hero h1 span { color: var(--accent); }
.hero-copy {
  max-width: 600px;
  margin: 25px 0 30px;
  color: var(--muted);
  font-size: 1.08rem;
}
.primary-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  padding: 0 20px;
  border-radius: 11px;
  background: var(--accent);
  color: white;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(124,92,255,.28);
}
.primary-button:hover { background: #8d74ff; transform: translateY(-1px); }
.hero-panel {
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(23,29,45,.96), rgba(14,18,30,.96));
  box-shadow: 0 28px 80px rgba(0,0,0,.3);
}
.panel-label {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.hero-panel > a {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 14px;
  border-radius: 13px;
  text-decoration: none;
}
.hero-panel > a:hover { background: rgba(255,255,255,.05); }
.hero-panel strong, .hero-panel small { display: block; }
.hero-panel small { margin-top: 2px; color: var(--muted); }
.hero-panel b { color: var(--muted); }
.category-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  font-size: 1.2rem;
}
.puzzle-icon { background: rgba(124,92,255,.15); color: #a894ff; }
.adventure-icon { background: rgba(67,211,167,.14); color: var(--accent); }
.shooting-icon { background: rgba(255,138,61,.14); color: var(--orange); }

.content-shell, .page-shell {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
}
.game-section { padding: 58px 0 20px; scroll-margin-top: 70px; }
.section-heading {
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
}
.section-heading h2, .about-strip h2, .page-title, .game-title {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.65rem);
  line-height: 1.12;
  letter-spacing: -.045em;
}
.section-heading > p { max-width: 390px; margin: 0; color: var(--muted); text-align: right; }
.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.game-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: #4a5573;
  box-shadow: 0 20px 48px rgba(0,0,0,.25);
}
.game-card a { display: block; text-decoration: none; }
.game-card-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f1420;
}
.game-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.game-card:hover img { transform: scale(1.035); }
.game-card-body { padding: 17px 18px 19px; }
.game-meta { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.game-category {
  color: var(--accent-2);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.play-label { color: var(--muted); font-size: .78rem; font-weight: 700; }
.game-card h3 { margin: 7px 0 5px; font-size: 1.18rem; line-height: 1.25; }
.game-card p { min-height: 48px; margin: 0; color: var(--muted); font-size: .9rem; }
.empty-state { padding: 25px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); }

.about-strip {
  margin: 80px 0;
  padding: 38px;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 55px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}
.about-strip p { margin-top: 0; color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); background: #070a11; }
.footer-inner {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding: 48px 0 38px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 50px;
}
.footer-brand p { color: var(--muted); }
.footer-column { display: flex; flex-direction: column; gap: 8px; }
.footer-column h2 { margin: 0 0 5px; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; }
.footer-column a { color: var(--muted); font-size: .9rem; text-decoration: none; }
.footer-column a:hover { color: var(--text); }
.footer-bottom {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding: 18px 0 25px;
  border-top: 1px solid #171c29;
  color: #747e94;
  font-size: .8rem;
}

.page-shell { padding: 65px 0 85px; }
.page-header { max-width: 760px; margin-bottom: 38px; }
.page-header p { color: var(--muted); font-size: 1.04rem; }
.prose {
  max-width: 820px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.prose h2 { margin: 34px 0 8px; font-size: 1.35rem; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: #c0c7d6; }
.prose a { color: #a894ff; }
.prose li + li { margin-top: 7px; }

.game-page {
  width: min(calc(100% - 64px), 1560px);
  padding: 46px 0 80px;
}
.breadcrumbs { margin-bottom: 22px; color: var(--muted); font-size: .85rem; }
.breadcrumbs a { text-decoration: none; }
.game-heading { margin-bottom: 25px; display: flex; justify-content: space-between; align-items: end; gap: 30px; }
.game-heading > div { max-width: 820px; }
.game-heading p { max-width: 560px; margin: 8px 0 0; color: var(--muted); }
.category-pill {
  flex: none;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-2);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.game-frame-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #000;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
.game-frame { display: block; width: 100%; height: min(78vh, 900px); min-height: 620px; border: 0; }
.game-details {
  margin-top: 30px;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, .75fr);
  gap: 24px;
}
.info-card {
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}
.info-card h2 { margin: 0 0 11px; font-size: 1.28rem; }
.info-card p, .info-card li { color: var(--muted); }
.info-card ul { margin-bottom: 0; padding-left: 20px; }

@media (max-width: 850px) {
  .menu-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 20px;
    right: 20px;
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface);
  }
  .main-nav.open { display: flex; }
  .hero { grid-template-columns: 1fr; gap: 38px; padding-top: 58px; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-strip, .game-details { grid-template-columns: 1fr; }
  .game-page { width: min(calc(100% - 40px), var(--max-width)); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .header-inner, .hero, .content-shell, .page-shell, .footer-inner, .footer-bottom, .game-page { width: min(calc(100% - 28px), var(--max-width)); }
  .hero { padding: 48px 0; }
  .hero h1 { font-size: 3.25rem; }
  .section-heading, .game-heading { align-items: start; flex-direction: column; gap: 8px; }
  .section-heading > p { text-align: left; }
  .game-grid { grid-template-columns: 1fr; }
  .about-strip, .prose { padding: 24px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-brand { grid-column: auto; }
  .game-frame { min-height: 68vh; }
}
