:root {
  color-scheme: light;
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-soft: #f1f5fb;
  --ink: #172033;
  --muted: #637086;
  --line: #d8e0eb;
  --dark: #101827;
  --dark-2: #172235;
  --brand: #e93443;
  --brand-dark: #b51f2d;
  --gold: #f5b642;
  --blue: #2563eb;
  --green: #23845a;
  --shadow: 0 14px 38px rgba(24, 35, 55, 0.12);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.56;
}

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

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

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
}

.nav {
  width: min(var(--max), calc(100% - 32px));
  min-height: 62px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 900;
}

.brand-logo {
  width: 118px;
  height: 34px;
  object-fit: contain;
  object-position: left center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  padding: 9px 11px;
  border-radius: var(--radius);
  color: #253147;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.is-active {
  background: #fff2d7;
  color: #9a4c00;
}

.search {
  width: 214px;
  max-width: 24vw;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 14px;
}

.page {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 56px;
}

.ad-slot {
  display: none;
}

.ad-slot.is-active {
  display: block;
  min-height: 92px;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 278px;
  gap: 18px;
  align-items: start;
}

.game-shell {
  overflow: hidden;
  border: 1px solid #111827;
  border-radius: var(--radius);
  background: #111827;
  box-shadow: var(--shadow);
}

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 10px 12px;
  color: #f8fafc;
  background: #111827;
}

.game-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.game-logo {
  display: grid;
  place-items: center;
  width: 98px;
  height: 38px;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

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

.game-title-text {
  min-width: 0;
}

.game-title-text h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.game-title-text p {
  margin: 2px 0 0;
  color: #cbd5e1;
  font-size: 13px;
}

.game-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: #ffffff;
  color: #172033;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.button.primary {
  background: var(--brand);
  color: #ffffff;
}

.button.link {
  border-color: rgba(255, 255, 255, 0.22);
  background: transparent;
  color: #f8fafc;
}

.button:hover {
  filter: brightness(0.97);
}

.frame-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 520px;
  background: #000000;
}

.frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.iframe-fallback {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  text-align: center;
}

.iframe-fallback.is-visible {
  display: grid;
}

.iframe-fallback div {
  max-width: 420px;
}

.iframe-fallback p {
  margin: 0 0 14px;
  color: #cbd5e1;
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: #182235;
  color: #dbeafe;
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  font-weight: 800;
  white-space: nowrap;
}

.side {
  display: grid;
  gap: 14px;
}

.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.panel-title {
  margin: 0;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 900;
}

.mini-list {
  display: grid;
}

.mini-game {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.mini-game:last-child {
  border-bottom: 0;
}

.mini-game:hover {
  background: #f8fafc;
}

.mini-game img {
  width: 96px;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
  background: #e5e7eb;
}

.mini-game strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.25;
}

.mini-game span span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 278px;
  gap: 18px;
  align-items: start;
  margin-top: 22px;
}

.article {
  display: grid;
  gap: 22px;
}

.section {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.section h2 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.2;
}

.block-title {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 900;
}

.section h3 {
  margin: 22px 0 8px;
  font-size: 17px;
  line-height: 1.25;
}

.section p {
  margin: 0 0 12px;
  color: #334155;
}

.section-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 2px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #f2c35f;
  border-radius: var(--radius);
  background: #fff7df;
  color: #8a4500;
  font-size: 14px;
  font-weight: 900;
}

.text-link:hover {
  background: #ffefbf;
}

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

.section-heading h2,
.section-heading p {
  margin: 0;
}

.section-heading p {
  max-width: 440px;
  color: var(--muted);
}

.section ul,
.section ol {
  margin: 0;
  padding-left: 22px;
  color: #334155;
}

.section li + li {
  margin-top: 6px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.fact {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.fact span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.fact strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
}

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

.game-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.game-card:hover {
  box-shadow: 0 8px 24px rgba(24, 35, 55, 0.10);
}

.game-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #f8fafc;
}

.game-card div {
  padding: 10px;
}

.game-card strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}

.game-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.card-category {
  margin: 0 0 7px;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.directory-hero {
  display: grid;
  min-height: 260px;
  margin-bottom: 22px;
  padding: 32px;
  align-items: end;
  border: 1px solid #111827;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 82% 22%, rgba(245, 182, 66, 0.24), transparent 28%),
    linear-gradient(135deg, rgba(233, 52, 67, 0.9), rgba(17, 24, 39, 0.9) 52%, rgba(35, 132, 90, 0.86)),
    #111827;
  color: #ffffff;
  box-shadow: var(--shadow);
}

.directory-hero div {
  max-width: 720px;
}

.directory-hero h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 0.98;
}

.directory-hero p {
  max-width: 620px;
  margin: 14px 0 0;
  color: #e5edf8;
  font-size: 18px;
}

.directory-hero .eyebrow {
  margin: 0 0 10px;
  color: #ffe8a3;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.directory-section {
  padding-top: 22px;
}

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

.directory-card img {
  aspect-ratio: 16 / 9;
}

.footer {
  margin-top: 36px;
  padding: 24px 0 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.mobile-related {
  display: none;
}

@media (max-width: 1040px) {
  .search {
    display: none;
  }

  .game-layout,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .side {
    display: none;
  }

  .mobile-related {
    display: block;
    margin-top: 18px;
  }

  .frame-wrap {
    min-height: 430px;
  }
}

@media (max-width: 760px) {
  .nav {
    width: min(100% - 20px, var(--max));
    min-height: 0;
    padding: 10px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
  }

  .page {
    width: min(100% - 20px, var(--max));
    padding-top: 10px;
  }

  .game-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .game-actions {
    width: 100%;
  }

  .button {
    flex: 1;
  }

  .game-logo {
    width: 86px;
  }

  .frame-wrap {
    aspect-ratio: 9 / 14;
    min-height: 620px;
  }

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

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

  .section {
    padding: 18px;
  }
}

@media (max-width: 460px) {
  .frame-wrap {
    min-height: 560px;
  }

  .facts,
  .game-grid,
  .directory-grid {
    grid-template-columns: 1fr;
  }

  .directory-hero {
    min-height: 220px;
    padding: 24px;
  }
}
