:root {
  --bg: #09111f;
  --bg-soft: #12223f;
  --panel: rgba(14, 24, 46, 0.78);
  --panel-strong: rgba(10, 19, 35, 0.92);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f6fbff;
  --muted: #bfd0ea;
  --lime: #c9ff4f;
  --cyan: #54f2ff;
  --orange: #ff9d42;
  --pink: #ff5ebc;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
  --header-height: 72px;
}

* {
  box-sizing: border-box;
}

.header {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  padding: 0 15px;
  gap: 10px;
  z-index: 1000;
  align-items: center;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(84, 242, 255, 0.18), transparent 30%),
    radial-gradient(circle at 85% 12%, rgba(255, 94, 188, 0.18), transparent 24%),
    linear-gradient(180deg, #112347 0%, #0b1326 52%, #08101d 100%);
}

body.modal-open {
  overflow: hidden;
}

body.app-ready .page-shell {
  display: block;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  z-index: -1;
  pointer-events: none;
  filter: blur(20px);
}

body::before {
  top: 110px;
  left: -50px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(201, 255, 79, 0.18);  
}

body::after {
  right: -40px;
  bottom: 120px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255, 157, 66, 0.14);
}

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

.age-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 0;
}

.age-modal[hidden] {
  display: none;
}

.age-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.age-modal__card {
  position: relative;
  width: min(880px, calc(100vw - 40px));
  padding: 72px 88px 64px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.35);
}

.age-modal__title {
  margin: 0;
  color: #111111;
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", "Segoe UI", sans-serif;
  font-size: clamp(2.2rem, 3vw, 3.2rem);
  font-weight: 400;
  line-height: 1.15;
  text-align: center;
}

.age-modal__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px;
  margin-top: 26px;
}

.age-modal__button {
  min-height: 72px;
  border: 3px solid #3b7bd6;
  border-radius: 18px;
  background: #ffffff;
  color: #3b7bd6;
  font: inherit;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  font-weight: 400;
  cursor: pointer;
}

.age-modal__button:hover,
.age-modal__button:focus-visible {
  box-shadow: 0 10px 30px rgba(59, 123, 214, 0.16);
  outline: none;
}

.underage-screen__image {
  display: block;
  width: 100%;
  height: auto;
}

.underage-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 0;
  background: #ffffff;
}

.underage-screen[hidden] {
  display: none;
}

.underage-screen__card {
  width: min(1081px, 100vw);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: calc(var(--header-height) + 24px) 0 48px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(145deg, rgba(13, 27, 55, 0.92), rgba(8, 17, 31, 0.82)),
    url("assets/game-13-lost-treasures.png") center/cover no-repeat;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, rgba(8, 17, 31, 0.1), rgba(8, 17, 31, 0.78) 55%),
    linear-gradient(180deg, rgba(8, 17, 31, 0.02), rgba(8, 17, 31, 0.34));
  z-index: -1;
}

.topbar,
.hero-copy,
.feature-strip,
.section-heading {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 64px;
}

.brand,
.toplink,
.button {
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  height: 100%;
}

.brand__logo {
  display: block;
  width: auto;
  height: 60px;
  object-fit: contain;
  border-radius: 15px;
}

.toplink {
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
}

.hero-copy {
  max-width: 620px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--lime);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
.spotlight-card h2 {
  margin: 0;
  font-family: "Cooper Black", "Arial Black", "Trebuchet MS", cursive;
  line-height: 0.95;
}

h1 {
  font-size: clamp(2.3rem, 4.8vw, 4.5rem);
  text-wrap: balance;
}

.hero-text {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
}

.button.primary {
  color: #05101f;
  background: linear-gradient(135deg, var(--lime), #ffe76a);
}

.button.secondary {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero-stats div {
  min-width: 130px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  background: rgba(7, 14, 27, 0.5);
  backdrop-filter: blur(10px);
}

.hero-stats strong {
  display: block;
  font-size: 1.1rem;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.92rem;
}

.spotlight {
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: min(400px, 42%);
}

.spotlight-card {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(10, 19, 35, 0.9), rgba(18, 34, 63, 0.75));
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.spotlight-label {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.spotlight-card h2 {
  font-size: clamp(1.7rem, 2vw, 2.5rem);
  line-height: 1.02;
}

.spotlight-card p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 36px;
}

.feature-strip article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(18, 34, 63, 0.76), rgba(10, 19, 35, 0.88));
  box-shadow: var(--shadow);
}

.feature-strip h3 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.feature-strip p,
.section-note,
.game-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.library-section {
  padding: 10px 0 0;
}

.site-footer {
  margin-top: 32px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(18, 34, 63, 0.76), rgba(10, 19, 35, 0.92));
  box-shadow: var(--shadow);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.site-footer p + p {
  margin-top: 4px;
}

.site-footer strong {
  color: var(--text);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-heading h2 {
  font-size: clamp(2.1rem, 4vw, 3.6rem);
}

.section-note {
  max-width: 340px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.game-card {
  position: relative;
  overflow: hidden;
  min-height: 390px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  transform: translateY(0);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.game-card:hover {
  transform: translateY(-6px);
  border-color: rgba(201, 255, 79, 0.48);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
}

.game-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 14, 27, 0) 32%, rgba(7, 14, 27, 0.9) 92%);
}

.game-content {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 18px;
}

.game-tag {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #07121f;
  background: linear-gradient(135deg, var(--cyan), #c2fffa);
  font-size: 0.84rem;
  font-weight: 700;
}

.game-card h3 {
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: 8px;
}

@media (max-width: 1080px) {
  .game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .spotlight {
    position: static;
    width: 100%;
    margin-top: 18px;
  }

  .hero-copy {
    max-width: none;
    padding-bottom: 0;
  }
}

@media (max-width: 780px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
  }

  .hero {
    padding: 20px;
    border-radius: 28px;
    background-position: center;
  }

  .topbar,
  .section-heading {
    flex-direction: column;
    align-items: start;
  }

  .feature-strip,
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-card {
    min-height: 320px;
  }

  .age-modal {
    padding: 20px;
  }

  .age-modal__card {
    width: 100%;
    padding: 34px 22px 26px;
  }

  .age-modal__actions {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .age-modal__button {
    min-height: 60px;
    border-radius: 14px;
  }
}

@media (max-width: 520px) {
  .feature-strip,
  .game-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    flex-direction: column;
  }

  .hero-stats div {
    width: 100%;
  }

  .game-card {
    min-height: 360px;
  }
}
