/* =========================================================
   VERDANT ARCADE — Redesign theme for HTML5 Games portal
   Primary background: #b2e099 (light green)
   ========================================================= */

/* ---- Google Font ---- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap');

/* ---- CSS variables ---- */
:root {
  --primary-bg: #b2e099;
  --primary-bg-soft: #c4ecaf;
  --primary-bg-deep: #9bcc82;
  --card-bg: #ffffff;
  --card-hover-bg: #f5fbf0;
  --header-bg: #ffffff;
  --footer-bg: #1f3d1a;
  --footer-bg-2: #14280f;
  --sidebar-bg: #ffffff;
  --text-primary: #1a2e1a;
  --text-secondary: #5a6b5a;
  --text-muted: #8a9a8a;
  --accent: #4a7c2e;
  --accent-light: #6ba344;
  --accent-dark: #2f5320;
  --highlight: #d97706;
  --highlight-soft: #fcd9a0;
  --border: rgba(74, 124, 46, 0.18);
  --border-strong: rgba(74, 124, 46, 0.35);
  --shadow-sm: 0 2px 8px rgba(31, 61, 26, 0.08);
  --shadow-md: 0 8px 24px rgba(31, 61, 26, 0.12);
  --shadow-lg: 0 16px 48px rgba(31, 61, 26, 0.20);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

/* =====================================================
   RESET — overwrite the original normalize block
   ===================================================== */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend, table, caption,
tbody, tfoot, thead, tr, th, td, article, aside,
canvas, details, embed, figure, figcaption, footer,
header, hgroup, menu, nav, output, ruby, section,
summary, time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  vertical-align: baseline;
}
html { line-height: 1.5; }
ol, ul { list-style: none; }
a img { border: none; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* =====================================================
   BASE TYPOGRAPHY
   ===================================================== */
html {
  font-size: 16px;
  line-height: 1.6;
}
body {
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--primary-bg);
  color: var(--text-primary);
  font-weight: 400;
  font-size: 15px;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.4) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(31, 61, 26, 0.08) 0%, transparent 50%);
  background-attachment: fixed;
}

/* Default link color */
a { color: var(--accent); transition: color .2s ease; }
a:hover { color: var(--accent-light); }

/* =====================================================
   HEADINGS
   ===================================================== */
h1, .h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-transform: none;
  text-align: left;
}
h2, .h2 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  text-transform: none;
  text-align: left;
  margin-bottom: 0.5em;
}
h3, .h3 { font-size: 1.125rem; font-weight: 700; line-height: 1.4; }
h4, .h4 { font-size: 0.95rem; font-weight: 700; line-height: 1.4; text-transform: uppercase; letter-spacing: 0.05em; }

/* =====================================================
   HEADER — sticky white bar with green accents
   ===================================================== */
header.main {
  background: var(--header-bg);
  border: none;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}
header.main .main-section {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 1320px;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
header.main .logo {
  display: inline-flex;
  align-items: center;
  text-align: left;
  flex-shrink: 0;
  gap: 10px;
  text-decoration: none;
}
header.main .logo .logo-mark {
  width: 38px;
  height: 38px;
  margin: 0;
  flex-shrink: 0;
}
header.main .logo .logo-text {
  display: inline-flex;
  align-items: baseline;
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
}
header.main .logo .logo-verdant { color: #2f5320; }
header.main .logo .logo-arcade {
  color: #d97706;
  margin-left: 5px;
}

/* Hide only the checkbox & hamburger label, keep the nav visible (JS writes categories inside it) */
header.main .menuHolder { display: block; }
header.main .menuHolder #navigationTrigger { display: none; }
header.main .menuHolder label[for="navigationTrigger"] { display: none; }
header.main .menuHolder nav.main {
  position: static;
  display: block;
  float: none;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

/* New horizontal nav (the nav is filled by JS) */
header.main .menuHolder nav.main ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
}
header.main .menuHolder nav.main ul li a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  transition: all .2s ease;
  border-bottom: none;
  line-height: 1.2;
}
header.main .menuHolder nav.main ul li a img {
  height: 18px;
  width: auto;
  margin: 0;
  padding: 0;
  display: inline-block;
}
header.main .menuHolder nav.main ul li a:hover {
  background: var(--primary-bg);
  border-color: var(--border);
  color: var(--accent-dark);
}
header.main .menuHolder nav.main ul li a.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
header.main .menuHolder nav.main ul:after { display: none; }

/* Language select — pill style */
header.main .language-select {
  position: static;
  width: auto;
  height: auto;
  border-radius: 999px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--primary-bg-soft);
  overflow: hidden;
  display: inline-block;
}
header.main .language-select .value {
  position: relative;
  padding: 8px 32px 8px 16px;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  color: var(--accent-dark);
  line-height: 1.2;
}
header.main .language-select .value:before {
  right: 14px;
  margin-top: -4px;
  border-top-color: var(--accent-dark);
}
header.main .language-select select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* =====================================================
   CONTENT — sidebar + main grid layout
   ===================================================== */
.content {
  background: transparent;
  margin: 0 auto;
  padding: 32px;
  max-width: 1320px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}
/* On static pages (privacy/service/aboutus) the layout is single-column */
.static .content {
  display: block;
  max-width: 880px;
}
.content .main-section {
  margin: 0;
  max-width: none;
  width: auto;
  padding: 0;
  display: contents;
}

/* =====================================================
   SIDEBAR — sticky category list
   ===================================================== */
.site-sidebar {
  background: var(--sidebar-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 24px 20px;
  position: sticky;
  top: 96px;
}
.site-sidebar h3 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 0 8px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.site-sidebar ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.site-sidebar ul li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  transition: all .2s ease;
  border-bottom: none;
}
.site-sidebar ul li a img {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.site-sidebar ul li a:hover {
  background: var(--primary-bg-soft);
  color: var(--accent-dark);
}
.site-sidebar ul li a.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* =====================================================
   HERO / FEATURED STRIP — appears at top of main column
   ===================================================== */
.hero-strip {
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 100%);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  color: #fff;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.hero-strip::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero-strip::after {
  content: '🎮';
  position: absolute;
  right: 24px;
  bottom: -10px;
  font-size: 140px;
  opacity: 0.18;
  pointer-events: none;
  line-height: 1;
}
.hero-strip h1 {
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.hero-strip p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  max-width: 560px;
  line-height: 1.55;
}

/* =====================================================
   SECTION HEADINGS (rendered by JS as h2.h1 or h2.section-title)
   ===================================================== */
.content h2.h1,
.content h2.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.content h2.h1 a,
.content h2.section-title a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font: inherit;
  text-decoration: none;
}
.content h2.h1 a img,
.content h2.section-title a img {
  height: 26px;
  width: 26px;
}
.content h2.h1::after,
.content h2.section-title::after {
  content: 'See all →';
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: none;
  letter-spacing: 0;
}
.content h2.h1 a::after,
.content h2.section-title a::after { content: none; }

/* If heading has no anchor inside, hide the "See all" arrow */
.content h2.section-title:not(:has(a))::after { content: none; }

/* =====================================================
   GAME GRID — 4 columns on desktop, rounded cards
   ===================================================== */
ul.games {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  min-width: 0;
}
ul.games:before, ul.games:after { display: none; }
ul.games:last-child { margin-bottom: 0; }

ul.games li {
  position: relative;
  box-sizing: border-box;
  float: none;
  margin: 0;
  padding: 0;
  width: auto;
  min-width: 0;            /* prevent CSS Grid from sizing the cell to the <img> natural width */
  min-height: 0;
  overflow: hidden;
}
ul.games li a {
  display: block;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all .25s cubic-bezier(.4, 0, .2, 1);
  height: 100%;
  text-decoration: none;
}
ul.games li a:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-light);
}

/* Game thumbnail — square-ish aspect ratio */
ul.games li .icon {
  position: relative;
  box-sizing: border-box;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;     /* modern replacement for the padding-bottom hack */
  border: none;
  box-shadow: none;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-bg-soft) 0%, var(--primary-bg-deep) 100%);
}
ul.games li .icon .clamp { display: none; }
ul.games li .icon img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .4s ease;
}
ul.games li a:hover .icon img {
  transform: scale(1.08);
}

ul.games li .name-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  padding: 14px 12px;
  min-height: 56px;
}
ul.games li .name {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =====================================================
   BUTTONS — pill style
   ===================================================== */
.btn,
.btn-highlight,
.btn-primary,
.btn-neutral,
.btn-transparent {
  display: inline-block;
  box-sizing: border-box;
  padding: 12px 28px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  box-shadow: none;
  transition: all .2s ease;
  font-family: 'Poppins', sans-serif;
}
.btn { background: var(--card-bg); color: var(--text-primary); }
.btn-highlight { background: var(--highlight); color: #fff; }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-light); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-neutral { background: var(--primary-bg-soft); color: var(--accent-dark); }
.btn-transparent { background: transparent; color: var(--text-primary); border: 1px solid var(--border); }

.btn-container {
  margin: 20px 0 32px;
  text-align: center;
}
.btn-container .btn,
.btn-container .btn-primary {
  padding: 14px 40px;
  font-size: 15px;
}

/* =====================================================
   FOOTER — dark forest green, multi-column
   ===================================================== */
footer.main {
  margin-top: 48px;
  padding: 48px 0 24px;
  background: linear-gradient(180deg, var(--footer-bg) 0%, var(--footer-bg-2) 100%);
  color: rgba(255, 255, 255, 0.88);
}
footer.main a { color: rgba(255, 255, 255, 0.88); text-decoration: none; }
footer.main a:hover { color: #fff; }

footer.main .footer-content {
  position: relative;
  margin: 0 auto;
  max-width: 1320px;
  min-width: 320px;
  padding: 0 32px;
  font-weight: 400;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
}

footer.main .footer-brand .footer-logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
footer.main .footer-brand .footer-logo::before {
  content: '🌿';
  font-size: 1.4rem;
}
footer.main .footer-brand p {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  max-width: 320px;
}

footer.main .footer-content section.tags nav.main {
  background: transparent;
  float: none;
  width: auto;
  min-height: 0;
  margin-top: 0;
  padding: 0;
}
footer.main .footer-content section.tags h4 {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
footer.main .footer-content section.tags nav.main ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
footer.main .footer-content section.tags nav.main ul li {
  padding: 0;
}
footer.main .footer-content section.tags nav.main ul li a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.92);
  border-bottom: none;
  transition: all .2s ease;
}
footer.main .footer-content section.tags nav.main ul li a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
footer.main .footer-content section.tags nav.main ul li a:before { display: none; }
footer.main .footer-content section.tags nav.main ul li a img {
  height: 16px;
  width: 16px;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

footer.main .copyright {
  grid-column: 1 / -1;
  margin: 32px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}
footer.main .copyright a { color: var(--primary-bg); }
footer.main .copyright a:hover { color: #fff; }
footer.main .copyright .consent-box-links span {
  color: rgba(255, 255, 255, 0.4);
  margin: 0 4px;
}

/* =====================================================
   CONSENT BOX — modal overlay
   ===================================================== */
.consent-box-holder {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(31, 61, 26, 0.55);
  backdrop-filter: blur(6px);
}
.consent-box {
  background: var(--card-bg);
  max-width: 460px;
  width: calc(100% - 32px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px;
  font-size: 15px;
  text-align: center;
  border: 1px solid var(--border);
}
.consent-box-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  background: transparent;
  margin-bottom: 20px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-dark);
  gap: 8px;
}
.consent-box-logo::before {
  content: '🌿';
  font-size: 1.8rem;
}
.consent-box-message {
  text-align: left;
  color: var(--text-primary);
  margin-bottom: 24px;
  line-height: 1.6;
}
.consent-box-message strong {
  color: var(--accent-dark);
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}
.consent-box-button {
  display: inline-block;
  padding: 12px 40px;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all .2s ease;
  font-family: 'Poppins', sans-serif;
}
.consent-box-button:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.consent-box-links {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}
.consent-box-links a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.consent-box-links span {
  color: var(--text-muted);
  margin: 0 4px;
}

/* =====================================================
   APP CONTAINER
   ===================================================== */
.app-container {
  width: 100%;
  overflow: hidden;
  min-height: 100vh;
}
#app {
  position: relative;
}

/* =====================================================
   BACK TO TOP BUTTON
   ===================================================== */
.backToTop {
  width: 52px !important;
  height: 52px !important;
  position: fixed;
  bottom: 32px;
  right: 24px;
  cursor: pointer;
  z-index: 50;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
}
.backToTop:hover {
  background: var(--accent-light);
  transform: translateY(-3px);
}
.backToTop img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

/* =====================================================
   LOADING ANIMATION
   ===================================================== */
.dgmlwU[data-v-8e7a8d5a] {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 100001;
  background: rgba(178, 224, 153, 0.95) !important;
  backdrop-filter: blur(4px);
}
.AFSJx div[data-v-8e7a8d5a] {
  background: var(--accent) !important;
}

/* =====================================================
   DETAIL PAGE — game hero + info
   ===================================================== */
.game-detail {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
}
.game-detail .game-frame {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
}
.game-detail .game-frame iframe,
.game-detail .game-frame object,
.game-detail .game-frame embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.game-detail .game-info {
  padding: 24px 28px;
}
.game-detail .game-info h1 {
  font-size: 1.8rem;
  margin-bottom: 12px;
}
.game-detail .game-info .game-description {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
}
.game-detail .game-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.game-detail .game-meta .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-bg-soft);
  color: var(--accent-dark);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.game-detail .play-btn-container {
  margin: 24px 0;
  text-align: center;
}

/* =====================================================
   RESPONSIVE — tablet
   ===================================================== */
@media only screen and (max-width: 1100px) {
  .content {
    grid-template-columns: 220px 1fr;
    gap: 24px;
  }
  ul.games {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* =====================================================
   RESPONSIVE — mobile
   ===================================================== */
@media only screen and (max-width: 750px) {
  body { font-size: 14px; }
  /* prevent anything from forcing horizontal scroll on mobile */
  html, body { overflow-x: hidden; }
  img, video, iframe, svg { max-width: 100%; }

  /* Sidebar is desktop-only */
  .site-sidebar { display: none; }
  .content, .main-section-inner, .game-section { min-width: 0; }

  header.main .main-section {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px;
    gap: 10px;
  }
  header.main .logo { gap: 8px; }
  header.main .logo .logo-mark { width: 30px; height: 30px; }
  header.main .logo .logo-text { font-size: 19px; letter-spacing: -0.03em; }
  header.main .logo .logo-arcade { margin-left: 3px; }

  header.main .menuHolder {
    width: 100%;
    margin: 0;
  }
  header.main .menuHolder nav.main ul {
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    width: 100%;
    padding: 4px 0 8px;
    margin: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  header.main .menuHolder nav.main ul::-webkit-scrollbar { height: 4px; }
  header.main .menuHolder nav.main ul::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }
  header.main .menuHolder nav.main ul li { flex-shrink: 0; }
  header.main .menuHolder nav.main ul li a {
    font-size: 13px;
    padding: 7px 12px;
  }
  header.main .language-select { display: none; }

  .content {
    grid-template-columns: 1fr;
    padding: 16px 14px;
    gap: 18px;
  }
  .site-sidebar {
    position: static;
    order: 2;
    padding: 14px 12px;
    border-radius: var(--radius-md);
  }
  .site-sidebar ul {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    gap: 6px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .site-sidebar ul li { flex-shrink: 0; }
  .site-sidebar ul li a {
    flex-shrink: 0;
    padding: 7px 12px;
    font-size: 13px;
  }
  .site-sidebar h3 { display: none; }

  ul.games {
    grid-template-columns: repeat(2, 1fr) !important;  /* explicit 2-col layout on mobile */
    gap: 12px !important;
  }
  ul.games > li {
    /* let the grid track own the width — previous flex/width 50% clashed with the 3-col track */
    flex: none !important;
    width: auto !important;
    max-width: none !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    overflow: hidden !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  ul.games > li > a {
    display: block !important;
    width: 100% !important;
    overflow: hidden !important;
  }
  ul.games > li .icon {
    /* Drop the padding-bottom hack — aspect-ratio from the desktop rule owns the height now,
       and stacking both made the box ~1.5× width on some items. */
    padding-bottom: 0 !important;
    aspect-ratio: 4 / 3 !important;  /* belt + braces on mobile */
  }
  ul.games > li .icon img {

  }
  ul.games > li .name-container {
    padding: 8px 6px !important;
    height: auto !important;
    min-height: 44px !important;  /* equalize card body even when name is 1 line */
  }
  ul.games > li .name {
    font-size: 12px !important;
    line-height: 1.3 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .hero-strip { padding: 22px 18px; border-radius: var(--radius-md); }
  .hero-strip h1 { font-size: 1.4rem; }
  .hero-strip p { font-size: 13px; }
  .hero-strip::after { font-size: 60px; right: 14px; bottom: -8px; }

  .content h2.h1,
  .content h2.section-title {
    font-size: 1.15rem;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 10px;
  }
  .content h2.h1::after,
  .content h2.section-title::after {
    font-size: 11px;
  }
  .content h2.h1 a img,
  .content h2.section-title a img {
    height: 22px;
    width: 22px;
  }

  .btn-primary {
    font-size: 13px;
    padding: 10px 20px;
  }

  footer.main .footer-content {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 18px;
    text-align: center;
  }
  footer.main .footer-brand p { font-size: 13px; }
  footer.main .tags ul {
    justify-content: center;
    gap: 6px;
  }
  footer.main .tags ul li a {
    font-size: 12px;
    padding: 6px 10px;
  }
  footer.main .copyright { font-size: 12px; }

  .static-card {
    padding: 24px 20px;
    border-radius: var(--radius-md);
  }
  .static-card h1 { font-size: 1.6rem; }
  .static-card h2 { font-size: 1.15rem; }

  .game-detail .game-info { padding: 18px; }
  .game-detail .game-info h1 { font-size: 1.3rem; }

  .backToTop {
    width: 44px !important;
    height: 44px !important;
    bottom: 18px;
    right: 14px;
  }
}

/* =====================================================
   EXTRA SMALL SCREENS — phones under 400px
   ===================================================== */
@media only screen and (max-width: 400px) {
  body { font-size: 13px; }
  header.main .main-section { padding: 10px 12px; gap: 8px; }
  header.main .logo { gap: 7px; }
  header.main .logo .logo-mark { width: 26px; height: 26px; }
  header.main .logo .logo-text { font-size: 17px; }
  .content { padding: 14px 12px; gap: 14px; }
  ul.games { gap: 10px !important; }
  ul.games > li { flex: none !important; width: auto !important; max-width: none !important; }
  ul.games > li .name { font-size: 11px !important; }
  .hero-strip { padding: 18px 14px; }
  .hero-strip h1 { font-size: 1.25rem; }
  .static-card { padding: 20px 16px; }
}

/* =====================================================
   STATIC PAGE TYPOGRAPHY (aboutus, privacy, service)
   ===================================================== */
.static .content {
  background: transparent;
  padding: 0;
}
.static .content .main-section {
  grid-template-columns: 1fr;
  max-width: 880px;
}
.static-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  box-shadow: var(--shadow-sm);
}
.static-card h1 { margin-bottom: 20px; }
.static-card h2 { margin: 28px 0 12px; }
.static-card p {
  margin: 12px 0;
  color: var(--text-secondary);
  line-height: 1.7;
}
.static-card ul {
  padding-left: 24px;
  list-style: disc;
  color: var(--text-secondary);
}
.static-card ul li { padding: 6px 0; }
.static-card a { color: var(--accent); text-decoration: underline; }
