/* assets/css/styles.css */

/* ========== CSS Reset & Base ========== */
*,
*::before,
*::after { box-sizing: border-box; }

html { line-height: 1.5; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  font-size: 16px; /* min 16px per requirement */
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden; /* no horizontal scroll */
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .5em; line-height: 1.2; }
p { margin: 0 0 1em; }

/* ========== Theme Variables ========== */
:root{
  --bg: #0b1020;
  --bg-soft: #0f1630;
  --card: #121a3a;
  --card-2:#0e1733;
  --muted: #b7c2ee;
  --text: #e8ecff;
  --accent: #4f7cff;   /* primary brand */
  --accent-2:#10b981;  /* secondary */
  --warning:#f59e0b;
  --danger:#ef4444;
  --ring: rgba(79,124,255,.45);
  --radius: 16px;
  --shadow: 0 14px 40px rgba(0,0,0,.35);
  --container: 1200px;
}

/* ========== Helpers ========== */
.container{
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.visually-hidden{
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.grid-3{
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 20px;
}

.btn{
  display: inline-flex;
  align-items: center; justify-content: center;
  gap: .5rem;
  padding: .9rem 1.2rem;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: calc(var(--radius) - 4px);
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(79,124,255,.35);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover{ transform: translateY(-1px); box-shadow: 0 10px 24px rgba(79,124,255,.45); }
.btn:active{ transform: translateY(0); }
.btn:focus-visible{ outline: 3px solid var(--ring); outline-offset: 2px; }

.btn--ghost{
  background: transparent; color: var(--text);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: none;
}
.btn--outline{
  background: transparent; color: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: none;
}

/* ========== Header ========== */
header{
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,16,32,.7);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
header .container{
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 14px 0;
}

.logo img{ width: 160px; height: 40px; }

nav[aria-label="Primary"] .nav{
  display: flex; align-items: center; gap: 16px;
  overflow-x: auto; padding-bottom: 2px;
  scrollbar-width: thin;
}
.nav a{
  display: inline-block; padding: .6rem .8rem;
  border-radius: 10px;
  color: var(--muted);
  transition: background .15s ease, color .15s ease;
}
.nav a:hover, .nav a:focus-visible{
  background: rgba(255,255,255,.06); color: #fff;
  outline: none;
}

.contact-mini{
  display: flex; align-items: center; gap: 12px;
}
.contact-mini a{
  color: var(--muted); font-size: .95rem;
}
.contact-mini a:hover{ color: #fff; text-decoration: underline; }

/* ========== Hero ========== */
.hero{
  background:
    radial-gradient(900px 600px at 10% -10%, rgba(79,124,255,.20) 0%, transparent 60%),
    radial-gradient(900px 600px at 90% 10%, rgba(16,185,129,.18) 0%, transparent 60%),
    var(--bg);
  padding: 56px 0 28px;
}
.hero .container{
  display: grid; gap: 28px;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
}
.hero__text p{ color: var(--muted); max-width: 56ch; }
.hero__cta{ display: flex; gap: 12px; margin: 14px 0 6px; }
.hero__note{ font-size: .95rem; color: #cbd5ff; opacity: .9; }

.hero__media{
  justify-self: end;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0));
  border-radius: var(--radius);
  padding: 10px;
}

/* ========== Features ========== */
.features{ padding: 28px 0 12px; }
.card{
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover{ transform: translateY(-2px); border-color: rgba(79,124,255,.35); box-shadow: 0 18px 48px rgba(0,0,0,.45); }
.card p{ color: var(--muted); }

/* ========== Games Grid ========== */
.games{ padding: 20px 0 8px; }
#games-title{ margin-bottom: 12px; }
.game-grid{
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.game-card{
  background: var(--card);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.game-card a{ display: block; height: 100%; }
.game-card img{ width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.game-card h3{ font-size: 1.1rem; padding: 12px 14px 0; }
.game-card p{ color: var(--muted); padding: 6px 14px 16px; }
.game-card:hover{ transform: translateY(-3px); border-color: rgba(79,124,255,.35); box-shadow: 0 18px 48px rgba(0,0,0,.45); }

/* ========== FAQ ========== */
.faq{ padding: 16px 0 8px; }
.faq details{
  background: var(--card);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 10px;
}
.faq summary{
  cursor: pointer; font-weight: 600;
  outline: none; list-style: none;
}
.faq summary::-webkit-details-marker{ display: none; }
.faq summary::after{
  content: "▸"; float: right; transition: transform .15s ease; opacity: .7;
}
.faq details[open] summary::after{ transform: rotate(90deg); opacity: 1; }
.faq p{ color: var(--muted); margin-top: 6px; }

/* ========== 18+ Notice ========== */
.notice-18{
  margin-top: 8px;
  background: linear-gradient(90deg, rgba(239,68,68,.15), rgba(245,158,11,.15));
  border-top: 1px solid rgba(239,68,68,.35);
  border-bottom: 1px solid rgba(245,158,11,.35);
}
.notice-18 .container{ padding: 14px 0; }
.notice-18 strong{ color: #fff; }

/* ========== Footer ========== */
footer{ margin-top: 24px; background: #0a0f1f; border-top: 1px solid rgba(255,255,255,.06); }
footer .container{ padding: 24px 0; }
.footer__grid{
  display: grid;
  grid-template-columns: 1.1fr .9fr .8fr;
  gap: 22px;
  padding-bottom: 10px;
}
address{ font-style: normal; color: var(--muted); }
address a{ color: #fff; text-decoration: underline; }

.footer-links { display: grid; gap: 10px; }
.footer-links a{
  color: var(--muted);
  padding: 6px 0;
}
.footer-links a:hover{ color: #fff; text-decoration: underline; }

.badges{ display: flex; align-items: center; gap: 14px; }
.badges img{ filter: drop-shadow(0 6px 20px rgba(0,0,0,.35)); }

copyright, .copyright{
  color: var(--muted); font-size: .95rem; padding-bottom: 8px;
}

/* ========== Cookie Banner (Yes / No / Partial) ========== */
.cookie-banner{
  position: fixed; inset: auto 16px 16px 16px; z-index: 60;
  background: var(--card);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 980px;
}
.cookie-banner__inner{ padding: 16px; }
.cookie-banner h2{ font-size: 1.2rem; margin-bottom: 6px; }
.cookie-banner p{ color: var(--muted); margin-bottom: 10px; }
.cookie-form fieldset{ border: 0; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.cookie-form label{ display: flex; align-items: center; gap: 8px; color: var(--text); }
.cookie-actions{ display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.cookie-links{ font-size: .95rem; color: var(--muted); }
.cookie-links a{ color: #fff; text-decoration: underline; }

/* Make sure banner doesn't overwhelm small screens */
@media (max-width: 540px){
  .cookie-banner{ left: 8px; right: 8px; bottom: 8px; }
  .cookie-banner__inner{ padding: 12px; }
}

/* ========== Age Gate (non-blocking popup) ========== *//* ===== Age Gate: hard lock ===== */
.age-gate{
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(2px);
}
.age-gate[hidden]{ display: none !important; }

.age-gate__inner{
  max-width: 560px;
  width: 100%;
  border-radius: 12px;
  padding: 24px;
  background: #fff;
  color: #111;
  box-shadow: 0 10px 40px rgba(0,0,0,.35);
}

/* Блокируем прокрутку, пока открыт age-gate */
html.no-scroll { overflow: hidden; }

.age-gate__inner{ padding: 16px; }
.age-gate h2{ font-size: 1.2rem; margin-bottom: 6px; }
.age-gate p{ color: var(--card); margin-bottom: 10px; }
.age-gate .btn--ghost{color: var(--card);}
.age-actions{ display: flex; flex-wrap: wrap; gap: 10px; }

/* ========== Forms & Focus ========== */
input[type="checkbox"]{
  width: 18px; height: 18px;
  accent-color: var(--accent);
}
a:focus-visible, button:focus-visible, summary:focus-visible{
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: 10px;
}

/* ========== Responsive ========== */
@media (max-width: 1100px){
  .hero .container{ grid-template-columns: 1fr; }
  .hero__media{ justify-self: start; }
  .grid-3{ grid-template-columns: 1fr 1fr; }
  .footer__grid{ grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px){
  header .container{ grid-template-columns: auto 1fr; grid-auto-rows: auto; }
  nav[aria-label="Primary"]{ grid-column: 1 / -1; }
  .contact-mini{ display: none; }
  .game-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px){
  .grid-3{ grid-template-columns: 1fr; }
  .game-grid{ grid-template-columns: 1fr; }
  .hero{ padding: 36px 0 16px; }
  .hero__cta{ flex-direction: column; align-items: stretch; }
  .footer__grid{ grid-template-columns: 1fr; }
}

/* ========== Media & Elements ========== */
figure{ margin: 0; }
figcaption{ color: var(--muted); font-size: .95rem; }

/* ========== Tables (if added later) ========== */
table{ width: 100%; border-collapse: collapse; }
th, td{ padding: 10px; border-bottom: 1px solid rgba(255,255,255,.08); text-align: left; }
thead th{ position: sticky; top: 0; background: var(--bg-soft); }

/* ========== Animations (subtle) ========== */
@media (prefers-reduced-motion: no-preference){
  .btn, .card, .game-card, .nav a, .faq summary::after { transition: all .2s ease; }
}

/* ========== Print ========== */
@media print{
  header, .cookie-banner, .age-gate { display: none !important; }
  body{ background: #fff; color: #000; }
  a{ color: #000; text-decoration: underline; }
}
/* ===== Copyright strip with help logos ===== */
.copyright-box{
  border-top: 1px solid var(--border-weak, #e8e8e8);
  margin-top: 16px;
  padding: 16px 0;
}

.footer-linkImg{
  /* Легко настраиваемые переменные */
  --help-logo-height: 40px;   /* базовая высота логотипов */
  --help-logo-gap: 16px;      /* расстояние между логотипами */

  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--help-logo-gap);
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-linkImg a{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;          /* увеличиваем кликабельную область */
  border-radius: 10px;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.footer-linkImg a:hover{ transform: translateY(-2px); }
.footer-linkImg a:active{ transform: translateY(0); }

.footer-linkImg a:focus-visible{
  outline: 2px solid #0a7cff;
  outline-offset: 2px;
}

.footer-linkImg img{
  display: block;
  height: var(--help-logo-height) !important; /* перекрываем инлайновые стили */
  width: auto;
  max-width: 200px;           /* защита от слишком широких SVG/PNG */
  object-fit: contain;
  vertical-align: middle;
}

/* Мобильная адаптация */
@media (max-width: 640px){
  .footer-linkImg{
    --help-logo-height: 32px;
    --help-logo-gap: 12px;
  }
  .copyright-box{ padding: 12px 0; }
}

/* Небольшой контраст в тёмной теме, не искажая цвета логотипов */
@media (prefers-color-scheme: dark){
  .footer-linkImg a{
    background: rgba(255,255,255,.05);
  }
}
/* === Header mobile-only (phones) — no horizontal scroll === */
@media (max-width: 480px){

  /* Контейнер шапки в одну колонку */
  header .container{
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px 0;
  }

  /* Разрешаем грид-ячейкам сжиматься, чтобы не выталкивали ширину */
  header .container > .logo,
  header .container > nav[aria-label="Primary"],
  header .container > .contact-mini{
    min-width: 0;
  }

  /* Лого по центру и компактнее */
  .logo{ justify-self: center; }
  .logo img{ width: 140px; height: auto; }

  /* Навигация не скроллит по горизонтали, а переносится сеткой */
  nav[aria-label="Primary"]{ overflow: hidden; }
  nav[aria-label="Primary"] .nav{
    display: grid;                 /* было flex */
    grid-template-columns: 1fr 1fr;/* 2 колонки на телефонах */
    gap: 8px 10px;
    padding-bottom: 0;
    max-width: 100%;
  }

  /* Пункты меню — блочные, центрируем текст и разрешаем перенос строк */
  .nav a{
    display: block;
    text-align: center;
    white-space: normal;           /* вместо nowrap на десктопе */
    padding: .5rem .6rem;
    border-radius: 10px;
    background: rgba(255,255,255,.06);
    color: #fff;
  }
  .nav a:hover,
  .nav a:focus-visible{
    background: rgba(255,255,255,.12);
  }

  /* Контакты в шапке прячем на телефонах (если не нужны) */
  .contact-mini{ display: none !important; }

  /* Страховка от субпиксельных «выпадений» */
  html{ overflow-x: clip; }
}


