:root {
  --bg: #010530;
  --bg-gradient-start: #000642;
  --bg-gradient-end: #3a2274;
  --card: #0f123c;
  --card-border: #3a2274;
  --accent: #ff7a1f;
  --accent-glow: rgba(255, 122, 31, 0.5);
  --text: #e4e4e4;
  --text-muted: rgba(228, 228, 228, 0.5);
  --stat-red: #a4283a;
  --stat-gold: #a77818;
  --stat-blue: #2a41a4;
  --stat-green: #1d5f2c;

  --container: 1200px;
  --container-pad: 24px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

p {
  margin: 0;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 700;
  line-height: 1.1;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ----- Brand ----- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand__logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.brand__name {
  font-weight: 700;
  font-size: 24px;
  color: var(--text);
  white-space: nowrap;
}

/* ----- Header ----- */
.site-header {
  position: relative;
  z-index: 10;
  padding: 20px 0;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 30px;
}

.primary-nav a {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  transition: color 0.2s ease;
}

.primary-nav a:hover {
  color: var(--accent);
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 50px;
  border-radius: 60px;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  background-color: var(--accent);
  box-shadow: 0 0 20px 0 var(--accent-glow);
  cursor: pointer;
  border: 0;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 28px 0 var(--accent-glow);
}

.btn--primary {
  align-self: flex-start;
}

.centered-cta {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

/* ----- Typography helpers ----- */
.eyebrow {
  color: var(--accent);
  font-weight: 700;
  font-size: 22px;
  margin: 0;
}

.section-title {
  color: var(--text);
  font-size: 50px;
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

.section-header--center {
  align-items: center;
  text-align: center;
}

/* ----- Hero ----- */
.hero {
  background: linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  padding: 30px 0 60px;
}

.hero__inner {
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1 1 0;
  min-width: 0;
}

.hero__title {
  color: var(--text);
  font-size: 62px;
  font-weight: 700;
  line-height: 1.05;
}

.hero__text {
  color: var(--text);
  font-size: 14px;
  max-width: 564px;
  line-height: 1.55;
}

.hero__visual {
  flex: 0 0 492px;
  max-width: 492px;
}

.hero__visual img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* ----- Game hero (single game page) ----- */
.game-hero {
  background: linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  padding: 38px 0;
}

.game-hero__inner {
  display: flex;
  align-items: center;
  gap: 40px;
}

.game-hero__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1 1 0;
  min-width: 0;
}

.game-hero__title {
  color: var(--text);
  font-size: 50px;
  font-weight: 700;
  line-height: 1.1;
}

.game-hero__text {
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

.game-hero__thumb {
  flex: 0 0 240px;
  width: 240px;
  height: 240px;
  border-radius: 24px;
  overflow: hidden;
}

.game-hero__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ----- Legal page (privacy, terms, cookies) ----- */
.legal {
  padding: 50px 0 90px;
}

.legal__inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1098px;
  color: var(--text);
}

.legal__title {
  font-size: 50px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}

.legal__body {
  font-size: 14px;
  line-height: 1.6;
}

.legal__body h2 {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  margin: 20px 0 0;
  color: var(--text);
}

.legal__body h2:first-child {
  margin-top: 0;
}

.legal__body p {
  margin: 0;
}

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

.legal__body a {
  color: var(--accent);
}

.legal__body a:hover {
  text-decoration: underline;
}

/* ----- Game detail (centered "more about the game" block) ----- */
.game-detail {
  padding: 90px 0;
}

.game-detail__inner {
  max-width: 924px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  text-align: center;
}

.game-detail__title {
  color: var(--text);
  font-size: 50px;
  font-weight: 700;
  line-height: 1.1;
}

.game-detail__text {
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

/* ----- Categories ----- */
.categories {
  padding: 90px 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 883px;
  margin: 0 auto;
}

.category-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  text-align: center;
}

.category-card__media {
  width: 145px;
  height: 145px;
  border-radius: 22px;
  overflow: hidden;
  flex-shrink: 0;
}

.category-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card__title {
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.category-card__text {
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

/* ----- Statistics ----- */
.statistics {
  padding: 60px 0;
}

.statistics__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 60px;
}

.statistics__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 628px;
}

.statistics__text {
  font-size: 14px;
  line-height: 1.55;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 261px);
  gap: 20px;
  margin-top: 80px;
}

.stat-card {
  height: 217px;
  border-top-left-radius: 40px;
  border-bottom-right-radius: 40px;
  padding: 50px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  color: var(--text);
}

.stat-card:nth-child(2),
.stat-card:nth-child(3) {
  align-self: flex-end;
}

.stat-card--red { background: var(--stat-red); }
.stat-card--gold { background: var(--stat-gold); }
.stat-card--blue { background: var(--stat-blue); }
.stat-card--green { background: var(--stat-green); }

.stat-card__value {
  font-size: 60px;
  font-weight: 700;
  line-height: 1;
}

.stat-card__label {
  font-size: 14px;
  font-weight: 400;
  max-width: 180px;
}

/* ----- Hall of Fame ----- */
.hall-of-fame {
  background: linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  padding: 60px 0;
  overflow: hidden;
  position: relative;
}

.hall-of-fame__inner {
  display: flex;
  align-items: center;
  gap: 30px;
}

.hall-of-fame__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1 1 0;
  min-width: 0;
}

.hall-of-fame__text {
  font-size: 14px;
  line-height: 1.55;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 180px);
  gap: 20px;
  margin: 10px 0;
}

.game-tile {
  display: block;
  width: 180px;
  height: 180px;
  border-radius: 24px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.game-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.hall-of-fame__visual {
  flex: 0 0 498px;
  max-width: 498px;
  margin-right: calc(min(0px, (var(--container) - 100vw) / 2) - var(--container-pad));
}

.hall-of-fame__visual img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* ----- Reviews ----- */
.reviews {
  padding: 90px 0;
}

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

.review-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  text-align: center;
}

.review-card__rating {
  display: flex;
  align-items: flex-end;
  gap: 5px;
}

.review-card__score {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.review-card__star {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.review-card__author {
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
}

.review-card__quote {
  color: var(--text);
  font-style: italic;
  font-size: 14px;
  line-height: 1.55;
}

/* ----- Contacts ----- */
.contacts {
  padding: 60px 0 90px;
}

.contacts__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.contacts__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 726px;
}

.contacts__text {
  font-size: 14px;
  line-height: 1.55;
}

.contacts__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--accent);
  font-weight: 700;
  font-size: 18px;
}

.contacts__list a {
  color: var(--accent);
  transition: opacity 0.2s ease;
}

.contacts__list a:hover {
  opacity: 0.8;
}

.contacts__visual {
  flex: 0 0 485px;
  max-width: 485px;
  margin-right: calc(min(0px, (var(--container) - 100vw) / 2) - var(--container-pad));
}

.contacts__visual img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* ----- Footer ----- */
.site-footer {
  padding: 40px 0 30px;
  border-top: 1px solid rgba(58, 34, 116, 0.6);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.footer-nav a {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--accent);
}

.socials {
  display: flex;
  align-items: center;
  gap: 15px;
}

.socials a {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.socials a:hover {
  transform: translateY(-2px);
}

.socials img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.copyright {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 14px;
}

/* ----- Cookie banner (used by script.js) ----- */
.cookies {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 4, 24, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: opacity 0.4s ease;
}

.cookies.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.cookies__card {
  width: 100%;
  max-width: 720px;
  background: #0e1535;
  border: 1px solid var(--accent);
  border-radius: 28px;
  padding: 40px;
  box-shadow: 0 0 60px var(--accent-glow), 0 30px 60px rgba(0, 0, 0, 0.55);
}

.cookies__icon {
  width: 64px;
  height: 64px;
  margin-bottom: 24px;
}

.cookies__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.cookies__title {
  margin: 0 0 20px;
  color: var(--accent);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
}

.cookies__text {
  margin: 0 0 28px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
}

.cookies__actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cookies__btn {
  font-family: inherit;
  font-weight: 700;
  font-size: 18px;
  padding: 18px 24px;
  border-radius: 999px;
  cursor: pointer;
  border: 2px solid var(--accent);
  text-align: center;
  display: inline-block;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.cookies__btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 28px var(--accent-glow);
}

.cookies__btn--ghost {
  background: transparent;
  color: var(--accent);
}

.cookies__btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  .cookies__card {
    padding: 28px 24px;
    border-radius: 22px;
  }

  .cookies__title {
    font-size: 24px;
  }

  .cookies__text {
    font-size: 14px;
  }

  .cookies__btn {
    font-size: 16px;
    padding: 16px 20px;
  }
}

/* ----- Responsive ----- */
@media (max-width: 1100px) {
  .hero__inner,
  .game-hero__inner,
  .hall-of-fame__inner,
  .statistics__inner,
  .contacts__inner {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }

  .game-hero__thumb {
    align-self: center;
  }

  .hero__visual {
    flex: 0 0 auto;
    max-width: 100%;
    align-self: center;
    margin-right: 0;
  }

  .hall-of-fame__visual,
  .contacts__visual {
    flex: 0 0 auto;
    max-width: 100%;
    align-self: flex-end;
    margin-right: calc(var(--container-pad) * -1);
  }

  .stats-grid {
    margin-top: 0;
    grid-template-columns: repeat(2, 1fr);
  }

  .game-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .game-tile {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .review-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .hero__title { font-size: 44px; }
  .game-hero__title,
  .game-detail__title { font-size: 36px; }
  .section-title { font-size: 36px; }
  .eyebrow { font-size: 18px; }

  .game-detail { padding: 60px 0; }

  .legal__title { font-size: 36px; }
  .legal { padding: 30px 0 60px; }

  .site-header__inner {
    flex-direction: column;
    gap: 16px;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .review-grid {
    grid-template-columns: 1fr;
  }

  .stat-card__value { font-size: 48px; }
  .stat-card { height: auto; padding: 36px 20px; }

  .btn { padding: 14px 36px; }

  .categories,
  .reviews { padding: 60px 0; }
}

@media (max-width: 460px) {
  .hero__title { font-size: 34px; }
  .game-hero__title,
  .game-detail__title { font-size: 28px; }
  .section-title { font-size: 28px; }
  .category-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .footer-nav ul { gap: 16px; }

  .game-hero__thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    flex-basis: auto;
  }
}
