:root {
  --bg-dark: #0b0c15;
  --bg-panel: #11131f;
  --bg-panel-soft: #151827;
  --accent: #7c3aed;
  --accent-hover: #6d28d9;
  --teal: #2dd4bf;
  --text-main: #ffffff;
  --text-muted: #a8aec2;
  --border: #24283a;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.16), transparent 32rem),
    radial-gradient(circle at top right, rgba(45, 212, 191, 0.1), transparent 30rem),
    var(--bg-dark);
  color: var(--text-main);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body.modal-open {
  overflow: hidden;
}

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

button {
  border: 0;
  color: inherit;
  font: inherit;
}

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

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 12, 21, 0.94);
  backdrop-filter: blur(14px);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(90deg, #ffffff 0%, var(--teal) 42%, var(--accent) 100%);
  color: transparent;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  -webkit-background-clip: text;
  background-clip: text;
}

.logo {
  font-size: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  transition: color 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text-main);
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
  font-weight: 800;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.btn-primary {
  padding: 0 18px;
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.btn-secondary {
  padding: 0 18px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: rgba(45, 212, 191, 0.6);
  color: #ffffff;
  transform: translateY(-2px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  cursor: pointer;
  place-items: center;
  border-radius: 8px;
  background: var(--bg-panel-soft);
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 3px auto;
  border-radius: 2px;
  background: #ffffff;
}

.hero {
  max-width: 920px;
  margin: 0 auto;
  padding: 96px 24px 58px;
  text-align: center;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 850px;
  margin: 0 auto 18px;
  font-size: clamp(38px, 7vw, 68px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.02;
}

.hero p:not(.eyebrow) {
  max-width: 650px;
  margin: 0 auto 26px;
  color: var(--text-muted);
  font-size: 17px;
}

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 24px;
}

.section-heading {
  max-width: 680px;
  margin: 0 auto 34px;
  text-align: center;
}

.section-heading h2 {
  margin-bottom: 9px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
}

.section-heading p:last-child {
  color: var(--text-muted);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}

.game-card {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 96px;
  padding: 14px;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(17, 19, 31, 0.86);
  text-align: left;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.game-card:hover,
.game-card:focus-visible {
  border-color: rgba(124, 58, 237, 0.65);
  box-shadow: var(--shadow);
  outline: none;
  transform: translateY(-3px);
}

.game-img {
  position: relative;
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #0f111d;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(124, 58, 237, 0.78);
  opacity: 0;
  transition: opacity 180ms ease;
}

.game-card:hover .play-overlay,
.game-card:focus-visible .play-overlay {
  opacity: 1;
}

.play-icon {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid #ffffff;
}

.game-title {
  display: block;
  overflow: hidden;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.rating {
  color: #fbbf24;
}

.impact-section {
  padding-top: 32px;
}

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

.stat-item {
  min-height: 120px;
  padding: 22px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(17, 19, 31, 0.72);
  text-align: center;
}

.stat-item h3 {
  margin-bottom: 4px;
  background: linear-gradient(90deg, var(--accent), var(--teal));
  color: transparent;
  font-size: 34px;
  font-weight: 900;
  -webkit-background-clip: text;
  background-clip: text;
}

.stat-item p {
  color: var(--text-muted);
  font-weight: 700;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 64px 20px 20px;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
}

.modal.active {
  display: flex;
}

.modal-content {
  width: min(100%, 1040px);
  height: min(84vh, 760px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #000000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.close-modal {
  position: absolute;
  top: 18px;
  right: max(20px, calc((100vw - 1040px) / 2));
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  cursor: pointer;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 30px;
  line-height: 1;
  transition: background 180ms ease, transform 180ms ease;
}

.close-modal:hover,
.close-modal:focus-visible {
  background: var(--accent);
  outline: none;
  transform: rotate(90deg);
}

#gameFrame {
  width: 100%;
  height: 100%;
  border: 0;
}

.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--border);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    #080910;
  background-size: 42px 42px;
}

.footer-content {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(300px, 1.4fr) minmax(190px, 0.7fr);
  gap: clamp(30px, 6vw, 76px);
  max-width: 1200px;
  margin: 0 auto;
  padding: 54px 24px 38px;
}

.footer-logo {
  margin-bottom: 18px;
  font-size: clamp(28px, 4vw, 42px);
}

.footer-col h2 {
  margin-bottom: 18px;
  color: #ffffff;
  font-size: clamp(22px, 2.4vw, 28px);
}

.footer-disclaimer h2 {
  text-transform: uppercase;
}

.footer-brand p,
.footer-disclaimer li,
.footer-legal li {
  color: #d8dbe7;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.8;
}

.footer-brand p + p {
  margin-top: 10px;
}

.footer-details {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.footer-details div {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: baseline;
}

.footer-details dt,
.footer-details dd {
  color: #d8dbe7;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.footer-details dt {
  color: #8f96ab;
}

.footer-details dd {
  margin: 0;
}

.footer-disclaimer ul,
.footer-legal ul {
  display: grid;
  gap: 13px;
  padding-left: 20px;
  list-style: disc;
}

.footer-details a,
.footer-brand a:not(.footer-logo),
.footer-legal a {
  color: #8fd9ff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-legal a:hover,
.footer-details a:hover,
.footer-brand a:not(.footer-logo):hover {
  color: #ffffff;
}

.copyright {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px 30px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.legal-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 82px) 24px clamp(62px, 8vw, 96px);
}

.legal-hero {
  display: grid;
  gap: 16px;
  margin-bottom: 30px;
}

.legal-hero h1 {
  max-width: 860px;
  color: var(--text-main);
  font-size: clamp(38px, 7vw, 74px);
  line-height: 0.96;
}

.legal-hero p {
  max-width: 760px;
  color: var(--text-muted);
  font-size: clamp(17px, 2.4vw, 21px);
  font-weight: 600;
  line-height: 1.65;
}

.legal-updated {
  color: var(--teal);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.legal-layout {
  display: grid;
  gap: 18px;
}

.legal-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(17, 19, 31, 0.88);
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 34px);
}

.legal-panel h2 {
  margin-bottom: 12px;
  color: var(--text-main);
  font-size: clamp(23px, 3vw, 32px);
  line-height: 1.1;
}

.legal-panel h3 {
  margin: 20px 0 10px;
  color: var(--text-main);
  font-size: 19px;
}

.legal-panel p,
.legal-panel li {
  color: #d8dbe7;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.75;
}

.legal-panel p + p {
  margin-top: 10px;
}

.legal-panel ul,
.legal-panel ol {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-left: 22px;
}

.legal-panel a {
  color: #8fd9ff;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.legal-meta-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.legal-meta-item,
.contact-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(21, 24, 39, 0.92);
  padding: 16px;
}

.legal-meta-item span,
.contact-card span {
  display: block;
  margin-bottom: 6px;
  color: #8f96ab;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.legal-meta-item strong,
.contact-card strong {
  color: var(--text-main);
  font-size: 16px;
}

.fade-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 860px) {
  .mobile-toggle {
    display: grid;
  }

  .nav-links {
    position: fixed;
    top: 73px;
    right: 16px;
    display: none;
    width: min(280px, calc(100vw - 32px));
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-panel);
    box-shadow: var(--shadow);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    padding: 11px 12px;
  }

  .nav-links .btn-primary {
    min-height: 40px;
  }

  .hero {
    padding-top: 72px;
  }

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

  .footer-content {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  body.legal-page .nav-links {
    position: static;
    display: flex;
    width: auto;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: flex-end;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body.legal-page .mobile-toggle {
    display: none;
  }

  .legal-meta-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .nav-container,
  .hero,
  .section,
  .footer-content,
  .copyright {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero-btns {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  body.legal-page .nav-container {
    align-items: flex-start;
    flex-direction: column;
  }

  body.legal-page .nav-links {
    justify-content: flex-start;
  }
}
