/* ============================================
   GameWikiHub — Stylesheet
   ============================================ */
:root {
  --bg: #0f1115;
  --bg-2: #161922;
  --bg-3: #1f2330;
  --bg-4: #2a2f3d;
  --border: #2a2f3d;
  --border-light: #3a3f4d;
  --text: #e6e8ee;
  --muted: #9aa0ad;
  --accent: #f5a524;
  --accent-2: #e3679a;
  --link: #7ab7ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  font-size: 15px;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

html.layout-loading,
html.layout-loading body {
  min-height: 100%;
  overflow: hidden;
}

html.layout-loading body > :not(.site-loader) {
  visibility: hidden;
}

.site-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 28% 24%, rgba(245, 165, 36, 0.18), transparent 32%),
    radial-gradient(circle at 72% 68%, rgba(227, 103, 154, 0.14), transparent 35%),
    var(--bg);
  background-size: 34px 34px, 34px 34px, auto, auto, auto;
}

html.layout-loading .site-loader {
  display: flex;
}

html.layout-ready .site-loader,
.site-loader[aria-hidden="true"] {
  display: none;
}

.loader-panel {
  width: min(100%, 420px);
  background: rgba(22, 25, 34, 0.94);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.46);
  padding: 26px;
  text-align: center;
}

.loader-mark {
  display: inline-block;
  font-weight: 900;
  letter-spacing: 0.08em;
  font-size: 24px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.loader-subtitle {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 18px;
}

.loader-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0 auto 18px;
  max-width: 240px;
}

.loader-bars span {
  height: 6px;
  border-radius: 999px;
  background: var(--bg-4);
  overflow: hidden;
  position: relative;
}

.loader-bars span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: translateX(-100%);
  animation: loader-scan 1.15s ease-in-out infinite;
}

.loader-bars span:nth-child(2)::after {
  animation-delay: 0.12s;
}

.loader-bars span:nth-child(3)::after {
  animation-delay: 0.24s;
}

.loader-bars span:nth-child(4)::after {
  animation-delay: 0.36s;
}

.loader-note {
  color: var(--text);
  margin: 0;
  font-size: 14px;
}

@keyframes loader-scan {
  0% {
    transform: translateX(-100%);
  }
  45%,
  100% {
    transform: translateX(100%);
  }
}

.layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 210px;
  gap: 24px;
  width: min(100%, 1640px);
  margin: 0 auto;
  padding: 28px 24px;
}

/* Info pages (about / privacy / contact): keep the three columns clustered
   together around a width-capped center column. On wide screens the whole
   group is centered, leaving blank margins on the outside instead of pushing
   the sidebars to the far edges. */
.layout.page-layout {
  grid-template-columns: 200px minmax(0, 1fr) 210px;
  width: min(100%, 1200px);
}

.layout main {
  max-width: none;
  padding: 0;
}

aside.left,
aside.right {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  width: 100%;
  height: fit-content;
  position: sticky;
  top: 78px;
}

aside h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  margin: 0 0 8px;
}

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

aside ul li a {
  display: block;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
}

aside ul li a:hover,
aside ul li a.active {
  background: var(--bg-3);
  color: var(--accent);
  text-decoration: none;
}

/* ============================================
   HEADER
   ============================================ */

header.site {
  background: linear-gradient(135deg, #1a1d28, #261c2e);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.logo:hover {
  text-decoration: none;
  opacity: 0.9;
}

.logo small {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  -webkit-text-fill-color: var(--muted);
  margin-left: 6px;
}

nav.top {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-left: auto;
}

nav.top a {
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
}

nav.top a:hover {
  background: var(--bg-3);
  color: var(--text);
  text-decoration: none;
}

nav.top a.active {
  color: var(--accent);
}

/* ============================================
   LAYOUT
   ============================================ */

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px;
}

/* ============================================
   HERO
   ============================================ */

.hero {
  background:
    radial-gradient(circle at 80% 20%, rgba(245, 165, 36, 0.18), transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(227, 103, 154, 0.14), transparent 50%),
    var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 48px 32px;
  margin-bottom: 28px;
  text-align: center;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 42px;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .tagline {
  margin: 0 auto 6px;
  color: var(--text);
  font-size: 18px;
  max-width: 70ch;
}

.hero p.sub {
  margin: 12px auto 0;
  color: var(--muted);
  max-width: 70ch;
  font-size: 15px;
}

/* ============================================
   GAME GRID
   ============================================ */

.section-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--muted);
  margin: 28px 0 14px;
}

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

.editorial-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 34px;
}

.article-card {
  display: block;
  background:
    linear-gradient(135deg, rgba(245, 165, 36, 0.08), transparent 52%),
    var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  color: var(--text);
  min-height: 210px;
}

.article-card:hover {
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-2px);
  transition: transform 0.15s, border-color 0.15s;
}

.article-card.featured {
  background:
    radial-gradient(circle at 80% 10%, rgba(227, 103, 154, 0.2), transparent 45%),
    linear-gradient(135deg, rgba(245, 165, 36, 0.12), transparent 55%),
    var(--bg-2);
}

.kicker {
  display: inline-block;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.article-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.25;
}

.article-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.game-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  display: block;
  color: var(--text);
  position: relative;
  overflow: hidden;
}

.game-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.game-card .icon {
  font-size: 32px;
  margin-bottom: 8px;
  display: inline-block;
}

.game-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--text);
}

.game-card .desc {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.game-card .meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
}

.game-card .tag {
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 999px;
}

.game-card .arrow {
  position: absolute;
  top: 22px;
  right: 22px;
  color: var(--muted);
  font-size: 18px;
  transition: transform 0.15s, color 0.15s;
}

.game-card:hover .arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.game-card.coming {
  border-style: dashed;
  cursor: default;
  opacity: 0.75;
}

.game-card.coming:hover {
  transform: none;
  border-color: var(--border);
  box-shadow: none;
}

/* ============================================
   ABOUT / INFO STRIP
   ============================================ */

.about-strip {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
}

.about-strip h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.about-strip p {
  margin: 0;
  color: var(--muted);
  /* max-width: 75ch; */
}

/* ============================================
   PAGE (about / privacy / contact)
   ============================================ */

.page {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 28px;
  overflow-wrap: anywhere;
}

.page h1 {
  margin: 0 0 6px;
  font-size: 28px;
}

.page .breadcrumb {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 18px;
}

.page h3 {
  margin: 22px 0 8px;
  font-size: 16px;
  color: var(--text);
}

.page p,
.page li {
  color: var(--text);
  max-width: 96ch;
}

.page ul {
  padding-left: 22px;
}

.page code {
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
}

.guide-page h2 {
  margin: 30px 0 10px;
  font-size: 21px;
  color: var(--text);
}

.guide-page h3 {
  color: var(--accent);
}

.guide-page .lede {
  font-size: 17px;
  color: var(--text);
}

.recommendation-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  background: var(--bg);
  border: 1px solid var(--border);
  table-layout: fixed;
}

.recommendation-table th,
.recommendation-table td {
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.recommendation-table th {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  background: var(--bg-3);
}

.source-note {
  background: var(--bg-3);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--muted);
}

.related-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.related-links a {
  display: block;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
}

.related-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* ============================================
   FOOTER
   ============================================ */

footer.site {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 30px 20px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

footer.site p {
  margin: 8px 0 0;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--text);
  font-size: 13px;
}

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

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 640px) {
  header.site {
    padding: 12px 16px;
    gap: 12px;
    flex-wrap: wrap;
  }

  .hero {
    padding: 32px 20px;
  }

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

  .hero .tagline {
    font-size: 16px;
  }

  main {
    padding: 20px 16px;
  }

  nav.top a {
    padding: 5px 8px;
    font-size: 13px;
  }
}

.promo-frame {
  background: var(--bg-3);
  border: 1px dashed var(--border-light);
  border-radius: 8px;
  padding: 14px;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
  contain: layout paint;
}

.promo-label {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.promo-frame ins.adsbygoogle {
  display: block;
  max-width: 100%;
}

.promo-frame iframe {
  max-width: 100% !important;
}

.promo-banner {
  min-height: 90px;
  max-height: 90px;
  width: 100%;
}

.promo-banner .adsbygoogle {
  max-width: 100%;
  height: 90px !important;
}

.promo-side {
  width: 100%;
  min-height: 190px;
  max-height: 190px;
}

.promo-side .adsbygoogle {
  width: 160px !important;
  height: 160px !important;
}

aside .promo-frame {
  margin: 14px 0 0;
  padding: 8px;
}

@media (max-width: 1100px) {

  .layout,
  .layout.page-layout {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  aside.right {
    display: none;
  }
}

@media (max-width: 920px) {
  .editorial-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {

  .layout,
  .layout.page-layout {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  aside.left {
    display: none;
  }

  .page {
    padding: 20px;
  }

  .recommendation-table {
    display: block;
    overflow-x: auto;
    table-layout: auto;
    -webkit-overflow-scrolling: touch;
  }

  .recommendation-table th,
  .recommendation-table td {
    min-width: 180px;
  }

}
