/* Власна тема монобренду: темний фон, зелений акцент, pill-кнопки, скляні картки */
:root {
  --ink-950: #04131c;
  --ink-900: #091b2c;
  --ink-800: #163041;
  --ink-500: #33495a;
  --ink-300: #7e94a2;
  --ink-200: #b8c8d2;
  --ink-100: #e1e9ee;
  --brand-500: #1ca471;
  --brand-400: #2fd376;
  --brand-300: #5bdf93;
  --brand-100: #c7f4da;
  --line: rgba(255, 255, 255, .06);
  --display: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--body);
  line-height: 1.6;
  color: var(--ink-100);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 600px at 50% -10%, rgba(22, 199, 101, .18), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(22, 199, 101, .1), transparent 60%),
    radial-gradient(700px 400px at 10% 30%, rgba(22, 199, 101, .08), transparent 60%),
    var(--ink-950);
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -.025em; line-height: 1.1; margin: 0; color: #fff; }
h1 { font-size: clamp(2.25rem, 6vw, 4.5rem); line-height: 1.05; color: var(--ink-100); }
h2 { font-size: clamp(1.75rem, 4vw, 3rem); }
h3 { font-size: 1.2rem; letter-spacing: -.01em; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.section { padding: 72px 0; }
.center { text-align: center; }
.lead { color: var(--ink-200); font-size: clamp(1rem, 2vw, 1.2rem); max-width: 680px; }
.center .lead { margin-left: auto; margin-right: auto; }
.muted { color: var(--ink-300); }
.gradient-text { background: linear-gradient(120deg, #fff, #c7f4da, #16c765); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--brand-500); color: var(--ink-950); padding: 8px 14px; border-radius: 8px; }

/* Кнопки та чипи */
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: 9999px; padding: .75rem 1.5rem; font-weight: 600; font-size: 1rem;
  transition: all .2s cubic-bezier(0, 0, .2, 1); cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--brand-500); color: var(--ink-950); border: 0; }
.btn-primary:hover { background: var(--brand-400); box-shadow: 0 0 0 1px rgba(22, 199, 101, .35), 0 10px 40px -10px rgba(22, 199, 101, .45); }
.btn-primary:active { transform: scale(.98); }
.btn-ghost { border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .05); color: #fff; }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .1); }
.btn-lg { padding: .875rem 1.75rem; }
.btn-sm { padding: .5rem 1rem; font-size: .875rem; }
.chip {
  display: inline-flex; align-items: center; gap: .5rem; border-radius: 9999px;
  border: 1px solid rgba(28, 164, 113, .2); background: rgba(28, 164, 113, .1);
  padding: .25rem .75rem; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .025em; color: var(--brand-100);
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-400); }
.eyebrow { color: var(--brand-400); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px; }

/* Картки */
.card {
  border-radius: 1.5rem; border: 1px solid rgba(255, 255, 255, .05); background: rgba(22, 48, 65, .6);
  padding: 1.75rem; backdrop-filter: blur(4px); transition: all .3s;
}
a.card:hover, .card-hover:hover { transform: translateY(-.25rem); border-color: rgba(28, 164, 113, .3); background: rgba(22, 48, 65, .8); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-200); font-size: .95rem; }
.card .btn-primary, .card .btn-ghost { margin-top: 18px; }
.grid { display: grid; gap: 16px; }
.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* Шапка */
.header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(12px); background: rgba(4, 19, 28, .7); border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; color: #fff; }
.logo .mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--brand-500); color: var(--ink-950); font-size: 1.1rem; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { padding: 8px 12px; border-radius: 8px; font-size: .9rem; font-weight: 500; color: var(--ink-200); }
.nav a:hover, .nav a[aria-current] { color: #fff; background: rgba(255, 255, 255, .05); }
.actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.langs { display: flex; gap: 2px; margin-right: 6px; }
.langs a { padding: 4px 7px; border-radius: 6px; font-size: .75rem; font-weight: 600; color: var(--ink-300); text-transform: uppercase; }
.langs a:hover, .langs a[aria-current] { color: #fff; background: rgba(255, 255, 255, .08); }
.burger { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }
.burger span { display: block; width: 22px; height: 2px; background: currentColor; margin: 5px 0; border-radius: 2px; }

/* Hero */
.hero { padding: 72px 0 40px; text-align: center; }
.hero h1 { margin: 20px auto; max-width: 900px; }
.hero .lead { margin: 0 auto 32px; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.stats { margin-top: 56px; text-align: left; }
.stat b { display: block; font-family: var(--display); font-size: 1.9rem; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.stat span { color: var(--ink-300); font-size: .85rem; }
.page-hero { padding: 56px 0 24px; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin: 14px 0 16px; }
.crumbs { display: flex; gap: 8px; font-size: .8rem; color: var(--ink-300); list-style: none; padding: 0; margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: .5; }
.crumbs a:hover { color: #fff; }

/* Плитки ігор */
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.head-row p { color: var(--ink-200); margin-top: 8px; max-width: 560px; }
.games { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.game {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 3 / 4;
  border-radius: 1.25rem; padding: 14px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .08);
  background:
    radial-gradient(120% 80% at 80% 0%, hsl(var(--h) 85% 60% / .55), transparent 60%),
    linear-gradient(160deg, hsl(var(--h) 60% 28%), var(--ink-900) 85%);
  transition: all .3s;
}
.game::before { content: attr(data-i); position: absolute; top: 4px; right: 12px; font-family: var(--display); font-weight: 800; font-size: 5rem; line-height: 1; color: rgba(255, 255, 255, .12); }
.game:hover { transform: translateY(-.25rem); border-color: rgba(47, 211, 118, .5); box-shadow: 0 16px 40px -16px rgba(22, 199, 101, .5); }
.game b { font-family: var(--display); font-weight: 800; font-size: 1.05rem; line-height: 1.15; color: #fff; }
.game small { color: rgba(255, 255, 255, .7); font-size: .75rem; margin-top: 2px; }
.game .meta { display: flex; gap: 6px; margin-top: 8px; font-size: .68rem; font-weight: 600; color: var(--brand-100); }
.game .meta span { background: rgba(4, 19, 28, .55); padding: 2px 7px; border-radius: 999px; }
.game .play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(4, 19, 28, .6); opacity: 0; transition: opacity .2s; }
.game:hover .play, .game:focus-visible .play { opacity: 1; }
.game .play i { font-style: normal; background: var(--brand-500); color: var(--ink-950); font-weight: 700; padding: .6rem 1.3rem; border-radius: 999px; }

.pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 28px; }
.pills span { border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .04); border-radius: 999px; padding: .55rem 1.1rem; font-weight: 600; font-size: .9rem; color: var(--ink-200); }

/* Текстові сторінки */
.prose h2 { font-size: 1.6rem; margin: 40px 0 12px; }
.prose p { color: var(--ink-200); margin-bottom: 14px; }
.prose a { color: var(--brand-300); text-decoration: underline; text-underline-offset: 3px; }

/* FAQ */
.faq { display: grid; gap: 10px; margin-top: 28px; text-align: left; }
.faq details { border-radius: 1rem; border: 1px solid rgba(255, 255, 255, .06); background: rgba(22, 48, 65, .6); padding: 0 20px; }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 600; color: #fff; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand-400); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-200); padding-bottom: 18px; }

/* CTA-банер і футер */
.banner { position: relative; overflow: hidden; border-radius: 2rem; padding: 56px 24px; text-align: center; border: 1px solid rgba(28, 164, 113, .25); background: linear-gradient(135deg, rgba(28, 164, 113, .22), rgba(22, 48, 65, .6)); }
.banner p { color: var(--ink-200); margin: 12px auto 26px; max-width: 520px; }
.footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 56px 0 32px; font-size: .9rem; }
.footer .cols { display: grid; gap: 32px; grid-template-columns: 1.6fr repeat(3, 1fr); }
.footer .logo { margin-bottom: 14px; }
.footer h4 { margin: 0 0 12px; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-300); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer a { color: var(--ink-200); }
.footer a:hover { color: #fff; }
.footer .legal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--ink-300); font-size: .8rem; }
.age { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--ink-300); font-weight: 700; font-size: .7rem; color: var(--ink-100); margin-right: 10px; }
.footer .legal a { text-decoration: underline; }

@media (max-width: 960px) {
  .burger { display: block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; padding: 12px 20px 20px; background: var(--ink-950); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; font-size: 1rem; }
  .login { display: none; }
  .footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .section { padding: 52px 0; }
  .logo { font-size: 1.1rem; gap: 8px; }
  .logo .mark { width: 28px; height: 28px; }
  .header .wrap { gap: 10px; }
  .langs a { padding: 4px 5px; }
  .games { grid-template-columns: repeat(2, 1fr); }
  .cta-row a { width: 100%; }
}

/* Посилання на служби допомоги (футер і сторінка відповідальної гри) */
.rg { display: flex; flex-wrap: wrap; gap: 8px; }
.footer .rg { margin-top: 20px; }
.rg a { border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .04); border-radius: 999px; padding: .4rem .9rem; font-size: .8rem; font-weight: 600; color: var(--ink-200); text-decoration: none; }
.rg a:hover { color: #fff; border-color: rgba(47, 211, 118, .4); }

/* Плитка з реальною обкладинкою: картинка на весь блок, знизу затемнення під підпис */
.game img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.game.has-img::before { content: ""; inset: 40% 0 0; top: 40%; right: 0; background: linear-gradient(transparent, rgba(4, 19, 28, .92)); }
.game.has-img > :not(img) { position: relative; }
.game.has-img .play { position: absolute; }

/* Форма очікування і рядок ліцензії */
.modal { width: min(460px, calc(100vw - 32px)); border: 1px solid rgba(28, 164, 113, .3); border-radius: 1.5rem; padding: 32px 28px 24px; background: var(--ink-900); color: var(--ink-100); }
.modal::backdrop { background: rgba(4, 19, 28, .75); backdrop-filter: blur(4px); }
.modal h2 { font-size: 1.6rem; margin: 14px 0 10px; }
.modal p { color: var(--ink-200); }
.modal form { display: grid; gap: 10px; margin-top: 20px; }
.modal form[hidden] { display: none; }
.modal input[type="email"] { width: 100%; padding: .85rem 1rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .05); color: #fff; font: inherit; }
.modal input[type="email"]:focus { outline: 2px solid var(--brand-400); outline-offset: 1px; }
.modal .hp { position: absolute; left: -9999px; }
.modal .x { position: absolute; top: 12px; right: 14px; background: none; border: 0; color: var(--ink-300); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.modal .msg { margin-top: 14px; color: var(--brand-300); font-weight: 600; }
.modal .msg:empty { display: none; }
.modal .msg.err { color: #ff8f8f; }
.modal .note { margin-top: 14px; font-size: .78rem; color: var(--ink-300); }
.modal .note a { text-decoration: underline; }
.footer .licence { margin: 18px 0 0; font-size: .78rem; color: var(--ink-300); max-width: 760px; }
