:root {
  --ink: #122033;
  --muted: #5a6b7c;
  --paper: #e8f1f6;
  --paper-deep: #d5e8f0;
  --card: #ffffff;
  --line: #c5d7e4;
  --accent: #ff4d1a;
  --accent-dark: #d63a0c;
  --teal: #0d8f86;
  --teal-soft: rgba(13, 143, 134, 0.12);
  --shadow: 0 12px 32px rgba(18, 32, 51, 0.08);
  --display: "Syne", Georgia, sans-serif;
  --sans: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(13, 143, 134, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 40% at 95% 5%, rgba(255, 77, 26, 0.14), transparent 50%),
    radial-gradient(ellipse 50% 35% at 70% 100%, rgba(13, 143, 134, 0.1), transparent 55%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); transition: color 0.2s ease; }
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 0 0 0.75rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 0.75rem; }
h3 { font-size: 1.2rem; margin: 0; }
p { margin: 0 0 1rem; }

.wrap { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.skip-link {
  position: absolute; left: -999px; top: 0.5rem;
  background: var(--ink); color: #fff; padding: 0.5rem 0.8rem;
}
.skip-link:focus { left: 0.5rem; z-index: 20; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(232, 241, 246, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(197, 215, 228, 0.85);
}
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.logo { display: flex; align-items: center; gap: 0.7rem; color: var(--ink); text-decoration: none; font-weight: 700; font-family: var(--display); }
.logo-mark {
  width: 2.35rem; height: 2.35rem; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--accent) 0%, #ff8a3d 55%, var(--teal) 120%);
  color: #fff; border-radius: 10px;
  font-family: var(--display); font-size: 0.82rem; font-weight: 800;
  box-shadow: 0 4px 14px rgba(255, 77, 26, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.logo:hover .logo-mark {
  transform: rotate(-6deg) scale(1.05);
  box-shadow: 0 6px 18px rgba(13, 143, 134, 0.35);
}
.site-nav { display: flex; gap: 1.1rem; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.site-nav a[aria-current="page"], .site-nav a:hover { color: var(--accent); }

.intro { padding: 3.4rem 0 1.5rem; }
.intro-hero { max-width: 40rem; animation: rise-in 0.5s ease both; }
.intro-grid, .layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2rem; align-items: start; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.25rem; }
.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.lede { font-size: 1.15rem; }
.trust-strip { padding: 0.5rem 0 1.5rem; }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.trust-grid > div {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}
.trust-grid strong {
  display: block;
  font-family: var(--display);
  margin-bottom: 0.35rem;
}
.trust-grid p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.intro-note, .rail-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow);
}
.intro-note {
  border-top: 3px solid var(--teal);
  animation: rise-in 0.55s ease both;
}
.intro-note ol, .rail-card ul { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.intro-note li, .rail-card li { margin: 0.45rem 0; }
.cat-nav {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin: 0 0 1.5rem;
}
.cat-nav a {
  text-decoration: none;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-weight: 600;
  font-size: 0.9rem;
}
.cat-nav a:hover { border-color: var(--accent); color: var(--accent); }
.site-info { padding: 0 0 2rem; }
.site-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.info-links { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; margin: 0.75rem 0 0; }
.info-links a, .text-link { font-weight: 600; text-decoration: none; }
.text-link { display: inline-block; margin-top: 0.5rem; }
.ad-zone { padding-bottom: 2.5rem; }
.about-page { padding: 2.2rem 0 3rem; }
.catalog, .guide { padding: 0.5rem 0 2.5rem; }
.section-head { margin-bottom: 1.25rem; }
.cat-title { margin: 1.6rem 0 0.8rem; color: var(--teal); }
.game-list { display: grid; gap: 0.8rem; }
.game-row {
  display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 0.9rem;
  padding: 0.55rem; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; color: inherit; text-decoration: none; box-shadow: var(--shadow);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.game-row:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(255, 77, 26, 0.12);
}
.game-row img { width: 100%; height: 104px; object-fit: cover; border-radius: 12px; background: var(--paper-deep); }
.game-row strong { display: block; font-size: 1.05rem; font-family: var(--display); }
.game-row em { display: block; margin: 0.15rem 0 0.3rem; color: var(--muted); font-style: normal; font-size: 0.85rem; }
.game-row span span { color: var(--muted); }

.rail { display: grid; gap: 1rem; position: sticky; top: 5.2rem; }
.prose { max-width: 46rem; }
.prose ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.prose li { margin: 0.35rem 0; }

.game-page { padding: 2rem 0 3.5rem; }
.breadcrumb { color: var(--muted); font-size: 0.92rem; }
.game-head { max-width: 42rem; margin-bottom: 1rem; }
.player {
  background: #0a1520; border-radius: 18px; overflow: hidden;
  border: 1px solid #0a1520;
  box-shadow: 0 18px 40px rgba(10, 21, 32, 0.28);
}
.player--idle { min-height: 280px; display: grid; place-items: center; }
.player-idle {
  text-align: center;
  color: #e8f1f6;
  padding: 2rem 1.25rem;
  max-width: 28rem;
}
.player-idle p { margin: 0 0 0.75rem; }
.player-idle .btn { margin-top: 0.5rem; }
.player iframe { width: 100%; height: min(68vh, 620px); border: 0; display: block; background: #0a1520; }
.player iframe[hidden] { display: none; }
.player.is-playing { display: block; min-height: 0; }
.player.is-playing .player-idle { display: none; }
.game-guide { margin-bottom: 1.25rem; }
.player-actions { margin: 0.9rem 0 1.4rem; display: flex; flex-wrap: wrap; gap: 0.6rem; }

.btn {
  appearance: none; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), #ff7a3d);
  color: #fff; text-decoration: none;
  font: inherit; font-weight: 700; border-radius: 12px;
  padding: 0.72rem 1.2rem;
  box-shadow: 0 6px 16px rgba(255, 77, 26, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(255, 77, 26, 0.35);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn--ghost:hover { background: var(--card); filter: none; box-shadow: none; }

.ad-slot {
  margin: 1.5rem 0;
  padding: 0.7rem 0.8rem 0.85rem;
  border: 1px dashed #b8cddb;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
}
.ad-slot__label {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ad-slot__unit { min-height: 90px; }
.ad-slot--rail { margin: 0; }
.ad-slot--rail .ad-slot__unit { min-height: 250px; }
.player-actions + .prose .ad-slot,
.game-row + .ad-slot { margin-top: 2rem; }

.contact-form { display: grid; gap: 0.85rem; margin-top: 1rem; }
.contact-form label { display: grid; gap: 0.35rem; font-weight: 600; }
.contact-form input, .contact-form textarea {
  font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem 0.8rem;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: 2px solid rgba(13, 143, 134, 0.35);
  border-color: var(--teal);
}

.site-footer { border-top: 1px solid var(--line); padding: 2rem 0 2.4rem; color: var(--muted); background: rgba(255,255,255,0.35); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; }
.footer-grid--3 { grid-template-columns: 1.3fr 1fr 1fr; }
.footer-brand { display: block; color: var(--ink); margin-bottom: 0.4rem; font-family: var(--display); font-size: 1.15rem; }
.footer-links { display: flex; flex-direction: column; flex-wrap: wrap; gap: 0.55rem; align-content: start; }
.footer-links a { color: var(--ink); text-decoration: none; font-weight: 600; }
.footer-copy { width: min(1120px, calc(100% - 2rem)); margin: 1.2rem auto 0; font-size: 0.9rem; }

.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 2147483000;
  display: none;
  gap: 1.1rem;
  align-items: center;
  justify-content: space-between;
  width: auto;
  max-width: 720px;
  margin: 0 auto;
  background: linear-gradient(135deg, #122033 0%, #163a45 100%);
  color: #e8f1f6;
  border-radius: 18px;
  padding: 1.1rem 1.15rem;
  box-shadow: 0 18px 48px rgba(10, 21, 32, 0.35);
  border: 1px solid rgba(255,255,255,0.08);
  pointer-events: auto;
}
.cookie-banner.is-open {
  display: flex !important;
}
.cookie-banner__copy { flex: 1; min-width: 0; }
.cookie-banner__copy strong {
  display: block; margin-bottom: 0.35rem;
  font-family: var(--display); font-size: 1.05rem; color: #fff;
}
.cookie-banner a { color: #7fe0d6; }
.cookie-banner p { margin: 0; font-size: 0.95rem; line-height: 1.5; }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: 0.45rem; flex-shrink: 0; }
.cookie-banner .btn { background: #fff; color: var(--ink); box-shadow: none; }
.cookie-banner .btn--ghost { color: #e8f1f6; border-color: rgba(255,255,255,0.28); background: transparent; }
body.has-cookie-banner { padding-bottom: 8rem; }

.cookie-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem; }
.cookie-modal[hidden] { display: none; }
.cookie-modal__backdrop { position: absolute; inset: 0; background: rgba(10, 21, 32, 0.55); }
.cookie-modal__card {
  position: relative; width: min(520px, 100%); max-height: min(86vh, 720px); overflow: auto;
  background: var(--card); border-radius: 18px; padding: 1.1rem 1.15rem 1.2rem;
  border: 1px solid var(--line);
}
.cookie-modal__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.cookie-cat { border-top: 1px solid var(--line); padding: 0.75rem 0; }
.cookie-cat p { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.95rem; }
.cookie-cat__head { display: flex; justify-content: space-between; align-items: center; }
.switch { position: relative; width: 2.6rem; height: 1.5rem; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #c5d7e4; border-radius: 999px; }
.switch span::after {
  content: ""; position: absolute; top: 0.18rem; left: 0.18rem;
  width: 1.14rem; height: 1.14rem; background: #fff; border-radius: 50%;
  transition: transform 0.2s ease;
}
.switch input:checked + span { background: var(--teal); }
.switch input:checked + span::after { transform: translateX(1.05rem); }
.switch input:disabled + span { opacity: 0.7; }

.game-modal { position: fixed; inset: 0; z-index: 60; background: rgba(10, 21, 32, 0.9); padding: 0.8rem; }
.game-modal[hidden] { display: none; }
.game-modal__panel { height: 100%; display: flex; flex-direction: column; gap: 0.5rem; }
.game-modal__bar { display: flex; justify-content: space-between; align-items: center; color: #fff; }
.game-modal__frame { flex: 1; width: 100%; border: 0; background: #000; border-radius: 12px; }
.game-modal__close {
  width: 2.4rem; height: 2.4rem; border-radius: 999px; border: 0; cursor: pointer;
  background: #fff; color: var(--ink); font-size: 1.4rem; line-height: 1;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 860px) {
  .intro-grid, .layout, .footer-grid, .footer-grid--3, .game-row, .trust-grid, .site-info-grid { grid-template-columns: 1fr; }
  .rail { position: static; }
  .game-row img { height: 180px; }
  .cookie-banner { flex-direction: column; align-items: stretch; bottom: 0.75rem; }
  .cookie-banner__actions { width: 100%; }
  .cookie-banner__actions .btn { flex: 1; text-align: center; }
  .header-bar { min-height: 3.6rem; }
  .logo-text { font-size: 0.98rem; }
  .site-nav { gap: 0.7rem; font-size: 0.92rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .intro-note { animation: none; }
  .game-row, .btn, .logo-mark { transition: none; }
  .game-row:hover, .btn:hover, .logo:hover .logo-mark { transform: none; }
}
