[data-theme="light"],
[data-theme="light"] :root {
  --accent:           #1ea85e;
  --accent-2:         #178a4d;
  --bg:               #f0f2f5;
  --text:             #1a1d23;
  --card-bg:          #ffffff;
  --card-border:      #d4d9e4;
  --surface:          #1ea85e;
  --surface-contrast: #ffffff;
  --text-secondary:   #5a6272;
  --brand-green:      #1ea85e;
  --brand-yellow:     #1b7a46;   /* used for nav-current / hover — keep readable */
  --heading-color:    #1a1d23;
  --shadow:           0 2px 12px rgba(0,0,0,.08);
  --shadow-hover:     0 8px 28px rgba(0,0,0,.14);
}

/* ── 2. Base — html/body/a ───────────────────────────────── */
[data-theme="light"] {
  background: #f0f2f5;
  color: #1a1d23;
}
[data-theme="light"] body {
  background: #f0f2f5 !important;
  color: #1a1d23 !important;
}
[data-theme="light"] a {
  color: inherit;
}
[data-theme="light"] a:hover {
  color: #1ea85e !important;
}


[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6 {
  color: #1a1d23 !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: #1a1d23 !important;
}
/* .heading-font carries the same gradient risk */
[data-theme="light"] .heading-font,
[data-theme="light"] .heading-font a {
  color: #1a1d23 !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: #1a1d23 !important;
}
/* howto h3 underline bar — keep it green */
[data-theme="light"] .howto-section h3::after {
  background: #1ea85e;
}

/* ── 4. Header ───────────────────────────────────────────── */
[data-theme="light"] header.site-header {
  background: rgba(255,255,255,.80) !important;
  border-bottom-color: #e0e4ed !important;
  box-shadow: 0 1px 8px rgba(0,0,0,.08) !important;
}
/* Nav text — make readable on white header */
[data-theme="light"] header.site-header a {
  color: #374151 !important;
}
[data-theme="light"] header.site-header a:hover {
  color: #1ea85e !important;
}
[data-theme="light"] header.site-header .nav-current {
  color: #1ea85e !important;
  font-weight: 700;
}

/* ── 5. Brand / logo title ───────────────────────────────── */
[data-theme="light"] .brand-title,
[data-theme="light"] .site-title {
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: #1ea85e !important;
  color: #1ea85e !important;
}
[data-theme="light"] .gradient-text.brand-title {
  -webkit-text-fill-color: #1ea85e !important;
  color: #1ea85e !important;
}

/* ── 6. Generic .card ────────────────────────────────────── */
[data-theme="light"] .card {
  background: #ffffff !important;
  border: 1px solid #dde1ea !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.06) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
/* game-card specific border reset */
[data-theme="light"] #game-card {
  border: 1px solid #dde1ea !important;
  box-shadow: 0 3px 14px rgba(0,0,0,.07) !important;
  background: #ffffff !important;
}
/* Remove iframe's own border-radius to eliminate dark corner bleed */
[data-theme="light"] .resp-iframe > iframe,
[data-theme="light"] #game-frame {
  border-radius: 0 !important;
}

/* ── 7. Buttons ──────────────────────────────────────────── */
[data-theme="light"] .btn {
  color: #374151;
}
[data-theme="light"] .soft-surface {
  background: rgba(30,168,94,.10) !important;
}
/* Override --surface-contrast (#0A0A0F on dark) so hover text is white */
[data-theme="light"] {
  --surface-contrast: #ffffff;
}
[data-theme="light"] .btn.soft-surface:hover,
[data-theme="light"] #controls-actions a.btn:hover,
[data-theme="light"] #controls-actions button.btn:hover {
  background: #1ea85e !important;
  color: #ffffff !important;
  border-color: #178a4d !important;
}
[data-theme="light"] #controls-actions a.btn:hover span,
[data-theme="light"] #controls-actions a.btn:hover svg,
[data-theme="light"] #controls-actions button.btn:hover span,
[data-theme="light"] #controls-actions button.btn:hover svg {
  color: #ffffff !important;
}
[data-theme="light"] #controls-actions .btn {
  border-color: #dde1ea !important;
  color: #374151 !important;
  background: rgba(30,168,94,.07) !important;
}

/* ── 8. Footer ───────────────────────────────────────────── */
[data-theme="light"] footer {
  background: #ffffff !important;
  border-top-color: #e0e4ed !important;
}
[data-theme="light"] .footer-border {
  border-color: #e0e4ed !important;
}
[data-theme="light"] footer p,
[data-theme="light"] footer span,
[data-theme="light"] footer a {
  color: #4b5563 !important;
}
[data-theme="light"] .text-gray-400 { color: #6b7280 !important; }
[data-theme="light"] .text-gray-300 { color: #6b7280 !important; }

/* ── 9. Language tabs (footer) ───────────────────────────── */
[data-theme="light"] .lang-tab-link {
  background: #f4f6f8 !important;
  border-color: #d4d9e4 !important;
  color: #374151 !important;
}
[data-theme="light"] .lang-tab-active {
  background: rgba(30,168,94,.1) !important;
  border-color: rgba(30,168,94,.35) !important;
  color: #1ea85e !important;
}
[data-theme="light"] .lang-tab-inactive:hover {
  background: rgba(30,168,94,.06) !important;
  color: #1a1d23 !important;
}

/* ── 10. Language dropdown (header) ─────────────────────── */
[data-theme="light"] .lang-btn {
  background: #fff !important;
  border-color: #d4d9e4 !important;
  color: #1a1d23 !important;
}
[data-theme="light"] .lang-dropdown {
  background: #fff !important;
  border-color: #d4d9e4 !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.12) !important;
}
[data-theme="light"] .lang-option {
  color: #1a1d23 !important;
  border-bottom-color: rgba(0,0,0,.06) !important;
}
[data-theme="light"] .lang-option:hover {
  background: rgba(30,168,94,.07) !important;
}
[data-theme="light"] .lang-option.active {
  background: rgba(30,168,94,.12) !important;
}
[data-theme="light"] .lang-option.active::after {
  color: #1ea85e !important;
}

/* ── 11. Main sections — text & bg ───────────────────────── */
[data-theme="light"] main {
  color: #1a1d23;
}
[data-theme="light"] p,
[data-theme="light"] li {
  color: inherit;
}
/* Tailwind text-gray-300 / text-gray-200 used throughout articles */
[data-theme="light"] .text-gray-300,
[data-theme="light"] .text-gray-200 {
  color: #4b5563 !important;
}
[data-theme="light"] #avg-rating,
[data-theme="light"] #played-text {
  color: #6b7280 !important;
}
/* about-section card paragraphs */
[data-theme="light"] .about-section .card p,
[data-theme="light"] .about-section .card li {
  color: #374151 !important;
}

/* ── 11b. bg-gray-800 utility override (game rules box) ─── */
/* The "Wordle Infinite Game Rules" block uses class="bg-gray-800"
   and an inline style border-color:#3BD380. Both need overriding. */
[data-theme="light"] .bg-gray-800 {
  background-color: #f0f5ff !important;   /* very light blue-grey, airy */
}
[data-theme="light"] .bg-gray-800 h3,
[data-theme="light"] .bg-gray-800 h3.text-gray-200 {
  color: #1a1d23 !important;
  -webkit-text-fill-color: #1a1d23 !important;
}
[data-theme="light"] .bg-gray-800 ul,
[data-theme="light"] .bg-gray-800 li,
[data-theme="light"] .bg-gray-800 p,
[data-theme="light"] .bg-gray-800 .text-gray-300,
[data-theme="light"] .bg-gray-800 .text-gray-200 {
  color: #374151 !important;
}
/* Override the inline border-color:#3BD380 → subtle blue-grey */
[data-theme="light"] .bg-gray-800.border,
[data-theme="light"] .bg-gray-800[style*="border-color"] {
  border-color: #c2d0e8 !important;
}

/* ── 12. How-to / features / about sections ──────────────── */
[data-theme="light"] .about-section .card,
[data-theme="light"] .faq-section .card,
[data-theme="light"] .features-section .card,
[data-theme="light"] .howto-section .card {
  background: #ffffff !important;
  border-color: #d4d9e4 !important;
}
[data-theme="light"] .feature-card .icon-wrap,
[data-theme="light"] .development-section .icon-wrap,
[data-theme="light"] .music-section .icon-wrap,
[data-theme="light"] .strategies-section .icon-wrap {
  background: rgba(30,168,94,.12) !important;
  border-color: rgba(30,168,94,.25) !important;
  color: #1ea85e !important;
}
[data-theme="light"] .step-dot {
  background: #1ea85e !important;
  border-color: #178a4d !important;
  color: #ffffff !important;
}
[data-theme="light"] .howto-section .howto-divider {
  background: #e0e4ed !important;
}

/* ── 13. FAQ section ─────────────────────────────────────── */
[data-theme="light"] .faq-section details summary::before {
  border-color: #6b7280;
}
[data-theme="light"] .faq-section h3 {
  color: #1a1d23 !important;
  -webkit-text-fill-color: #1a1d23 !important;
}
[data-theme="light"] .faq-section p,
[data-theme="light"] .faq-section a {
  color: #4b5563 !important;
}
[data-theme="light"] .faq-section a:hover {
  color: #1ea85e !important;
}

/* ── 14. Similar-games section heading ───────────────────── */
[data-theme="light"] .GAME-newgames {
  border-top-color: #d4d9e4 !important;
}
[data-theme="light"] .GAME-newgames-heading,
[data-theme="light"] #word-games-similar-heading {
  color: #1a1d23 !important;
  background: none !important;
  -webkit-text-fill-color: #1a1d23 !important;
}

/* ── 15. GAMES cards ─────────────────────────────────────── */
[data-theme="light"] .GAMES-card {
  background: #ffffff !important;
  border-color: #d4d9e4 !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.08) !important;
}
[data-theme="light"] .GAMES-card:hover {
  box-shadow: 0 10px 28px rgba(0,0,0,.14) !important;
}
[data-theme="light"] .GAMES-card-inner {
  background: #edf0f4 !important;
}
[data-theme="light"] .GAMES-card-name {
  background: #ffffff !important;
  border-top-color: #e0e4ed !important;
  color: #1a1d23 !important;
}
[data-theme="light"] .GAMES-card:hover .GAMES-card-name {
  color: #1ea85e !important;
}
[data-theme="light"] .GAMES-card-play {
  background: rgba(30,168,94,.12) !important;
  border-color: rgba(30,168,94,.35) !important;
  color: #1a1d23 !important;
}
[data-theme="light"] .GAMES-card:hover .GAMES-card-play {
  background: #1ea85e !important;
  color: #ffffff !important;
  border-color: #178a4d !important;
}
[data-theme="light"] .GAMES-intro {
  background: #ffffff !important;
  border-color: #d4d9e4 !important;
  color: #4b5563 !important;
}
[data-theme="light"] .GAMES-heading {
  color: #1a1d23 !important;
  -webkit-text-fill-color: #1a1d23 !important;
  background: none !important;
}
[data-theme="light"] .GAMES-empty {
  color: #6b7280 !important;
}

/* ── 16. GAME single-page player ─────────────────────────── */
[data-theme="light"] .GAME-player-wrap {
  background: #e8ecf0 !important;
  border-color: #d4d9e4 !important;
  box-shadow: 0 3px 14px rgba(0,0,0,.08) !important;
}
[data-theme="light"] .GAME-player-inner {
  background: #dde2ea !important;
}
[data-theme="light"] .GAME-toolbar {
  background: #ffffff !important;
  border-top-color: #e0e4ed !important;
}
[data-theme="light"] .GAME-toolbar-title {
  color: #1a1d23 !important;
}
[data-theme="light"] .GAME-toolbar-btn {
  background: rgba(30,168,94,.1) !important;
  border-color: rgba(30,168,94,.3) !important;
  color: #374151 !important;
}
[data-theme="light"] .GAME-toolbar-btn:hover {
  background: #1ea85e !important;
  color: #ffffff !important;
  border-color: #178a4d !important;
}
[data-theme="light"] .GAME-tap-hint-inner {
  background: #ffffff !important;
  border-color: #d4d9e4 !important;
  color: #6b7280 !important;
}
[data-theme="light"] .GAME-breadcrumb {
  color: #6b7280 !important;
}
[data-theme="light"] .GAME-breadcrumb a {
  color: #1ea85e !important;
}
[data-theme="light"] .GAME-breadcrumb .current {
  color: #1a1d23 !important;
}

/* ── 17. GAME article / content ──────────────────────────── */
[data-theme="light"] .GAME-article {
  background: #ffffff !important;
  border-color: #d4d9e4 !important;
  box-shadow: 0 2px 12px rgba(0,0,0,.06) !important;
}
[data-theme="light"] .GAME-article h1,
[data-theme="light"] .GAME-article h2,
[data-theme="light"] .GAME-article h3 {
  color: #1a1d23 !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: #1a1d23 !important;
  border-bottom-color: #e0e4ed;
}
[data-theme="light"] .GAME-article p,
[data-theme="light"] .GAME-article li {
  color: #4b5563 !important;
}
[data-theme="light"] .GAME-intro-title {
  color: #1a1d23 !important;
  -webkit-text-fill-color: #1a1d23 !important;
  background: none !important;
}
[data-theme="light"] .GAME-intro {
  color: #4b5563 !important;
}

/* ── 18. GAME steps ──────────────────────────────────────── */
[data-theme="light"] .GAME-step {
  background: rgba(30,168,94,.05) !important;
  border-left-color: #1ea85e !important;
}
[data-theme="light"] .GAME-step-num {
  background: #1ea85e !important;
  color: #ffffff !important;
}
[data-theme="light"] .GAME-step-body-content,
[data-theme="light"] .GAME-step-body-content p {
  color: #4b5563 !important;
}

/* ── 19. GAME controls block ─────────────────────────────── */
[data-theme="light"] .GAME-control-block {
  background: #f4f6f8 !important;
  border-color: #d4d9e4 !important;
}
[data-theme="light"] .GAME-control-title {
  color: #1a1d23 !important;
}
[data-theme="light"] .GAME-control-row {
  color: #4b5563 !important;
}

/* ── 20. GAME FAQ ────────────────────────────────────────── */
[data-theme="light"] .GAME-faq-item {
  background: #ffffff !important;
  border-color: #d4d9e4 !important;
}
[data-theme="light"] .GAME-faq-q {
  color: #1a1d23 !important;
  background: rgba(0,0,0,.02) !important;
}
[data-theme="light"] .GAME-faq-q::after {
  border-top-color: #6b7280 !important;
}
[data-theme="light"] .GAME-faq-a-inner {
  color: #4b5563 !important;
}

/* ── 21. Float nav (game page) ───────────────────────────── */
[data-theme="light"] .GAME-float-nav-toc-btn {
  background: #ffffff !important;
  border-color: #d4d9e4 !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.1) !important;
}
[data-theme="light"] .GAME-float-nav-toc-btn span {
  background: #374151 !important;
}
[data-theme="light"] .GAME-float-nav-toc-dropdown {
  background: #ffffff !important;
  border-color: #d4d9e4 !important;
  box-shadow: 0 6px 24px rgba(0,0,0,.12) !important;
}
[data-theme="light"] .GAME-float-nav-toc-dropdown a {
  color: #1a1d23 !important;
}
[data-theme="light"] .GAME-float-nav-toc-dropdown a:hover {
  background: rgba(0,0,0,.04) !important;
  color: #1a1d23 !important;
}
[data-theme="light"] .GAME-float-nav-top {
  background: rgba(0,0,0,.08) !important;
  border-color: rgba(0,0,0,.12) !important;
  color: #374151 !important;
}

/* ── 22. Back-to-top / TOC toggle ────────────────────────── */
[data-theme="light"] #back-to-top {
  background: #ffffff !important;
  border-color: #d4d9e4 !important;
  color: #374151 !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.1) !important;
}
[data-theme="light"] #back-to-top svg path {
  fill: #374151 !important;
}
[data-theme="light"] .toc-toggle {
  background: #ffffff !important;
  border-color: #d4d9e4 !important;
  color: #374151 !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.1) !important;
}
[data-theme="light"] .float-bmc {
  background: #ffffff !important;
  border-color: #d4d9e4 !important;
}
[data-theme="light"] .html-toc-pop {
  background: #ffffff !important;
  border-color: #d4d9e4 !important;
  box-shadow: 0 10px 32px rgba(0,0,0,.14) !important;
}
[data-theme="light"] .toc-link {
  color: #1a1d23 !important;
}
[data-theme="light"] .toc-dot {
  background: #374151 !important;
}
[data-theme="light"] .toc-header {
  color: #374151 !important;
}
[data-theme="light"] .html-toc-backdrop {
  background: rgba(0,0,0,.35) !important;
}

/* ── 23. Share pop ───────────────────────────────────────── */
[data-theme="light"] .share-pop {
  background: #ffffff !important;
  border: 1px solid #d4d9e4 !important;
  box-shadow: 0 6px 20px rgba(0,0,0,.12) !important;
}

/* ── 24. Toast / dialog ──────────────────────────────────── */
[data-theme="light"] .toast {
  background: rgba(20,20,30,.82) !important;
  color: #fff !important;
}
[data-theme="light"] .toast-success {
  background: rgba(22,163,74,.92) !important;
}
[data-theme="light"] .toast-error {
  background: rgba(220,38,38,.95) !important;
}

/* ── 25. Screenshots ─────────────────────────────────────── */
[data-theme="light"] .screenshot-img {
  border-color: rgba(30,168,94,.25) !important;
  box-shadow: 0 2px 8px rgba(30,168,94,.1) !important;
}
[data-theme="light"] .screenshot-img:hover {
  border-color: rgba(30,168,94,.4) !important;
  box-shadow: 0 6px 16px rgba(30,168,94,.18) !important;
}

/* ── 26. Comments ────────────────────────────────────────── */
[data-theme="light"] .comments,
[data-theme="light"] .comments * {
  color: #1a1d23 !important;
  --text-color:           #1a1d23;
  --description-color:    #5a6272;
  --primary-color:        #1ea85e;
  --secondary-color:      #f0f2f5;
  --comment-bg:           #f0f2f5;
  --border-sidebar-color: #d4d9e4;
  --admin-bg:             rgba(30,168,94,.08);
  --admin-border:         #1ea85e;
  --search-bg:            #ffffff;
  --url-hover-bg:         #e8ecf0;
  --border-foot-color:    #d4d9e4;
  --hover-bg:             #e8ecf0;
  --shadow:               0 2px 10px rgba(0,0,0,.07);
  --shadow-hover:         0 8px 24px rgba(0,0,0,.12);
  --star-color:           #1ea85e;
}
[data-theme="light"] .comments {
  background: transparent !important;
  border-color: #d4d9e4 !important;
}
[data-theme="light"] .comments h2,
[data-theme="light"] .comments__subtitle {
  color: #1a1d23 !important;
  -webkit-text-fill-color: #1a1d23 !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
}
[data-theme="light"] .comments a {
  color: #1a1d23 !important;
}
[data-theme="light"] .comments__author {
  color: #1ea85e !important;
}
[data-theme="light"] .comments__item {
  background-color: #ffffff !important;
  border-color: #d4d9e4 !important;
  box-shadow: 0 1px 6px rgba(0,0,0,.06) !important;
}
[data-theme="light"] .comments__avatar {
  background: #e8ecf0 !important;
  border-color: #d4d9e4 !important;
  color: #374151 !important;
}
[data-theme="light"] .comments__date {
  color: #5a6272 !important;
}
[data-theme="light"] .comments__text {
  color: #1a1d23 !important;
}
[data-theme="light"] .comments__form-label {
  color: #374151 !important;
}
[data-theme="light"] .comments__vote-btn {
  background-color: #f0f2f5 !important;
  color: #374151 !important;
}
[data-theme="light"] .comments__vote-btn:hover {
  background-color: rgba(30,168,94,.1) !important;
  color: #1ea85e !important;
}
[data-theme="light"] .comments__form-input {
  background: #ffffff !important;
  border-color: #d4d9e4 !important;
  color: #1a1d23 !important;
}
[data-theme="light"] .comments__form-input::placeholder {
  color: #8a94a6 !important;
}
[data-theme="light"] .comments__form-input:focus {
  border-color: #1ea85e !important;
  box-shadow: 0 0 0 2px rgba(30,168,94,.2) !important;
}
[data-theme="light"] .comments__form-cancel {
  color: #374151 !important;
  border-color: #c4cad6 !important;
}
[data-theme="light"] .comments__form-cancel:hover {
  background-color: rgba(0,0,0,.05) !important;
}
[data-theme="light"] .comments__admin-reply {
  background-color: rgba(30,168,94,.07) !important;
  border-left-color: #1ea85e !important;
}
[data-theme="light"] .comments__admin-name {
  color: #1ea85e !important;
}
[data-theme="light"] .comments__reply-btn {
  background-color: rgba(30,168,94,.08) !important;
  color: #1ea85e !important;
}
[data-theme="light"] .comments__reply-btn:hover {
  background-color: rgba(30,168,94,.16) !important;
}
[data-theme="light"] .comments__page-btn {
  background-color: #f0f2f5 !important;
  border-color: #d4d9e4 !important;
  color: #374151 !important;
}
[data-theme="light"] .comments__page-btn:hover {
  background-color: rgba(30,168,94,.1) !important;
  border-color: #1ea85e !important;
  color: #1ea85e !important;
}
[data-theme="light"] .comments__page-btn--active {
  color: #ffffff !important;
}
[data-theme="light"] .comments__under-review {
  background: #1ea85e !important;
  color: #fff !important;
}

/* ── 27. Ads close btn ───────────────────────────────────── */
[data-theme="light"] .ads-sky-close {
  background: rgba(255,255,255,.82) !important;
  border-color: #d4d9e4 !important;
  color: #374151 !important;
}
[data-theme="light"] .ads-sky-close:hover {
  background: #ffffff !important;
  border-color: #bbc1cd !important;
  color: #1a1d23 !important;
}

/* ── 28-ext. Global border cleanup: no black lines in light ── */
/* Any element that inherits --card-border gets the right grey */
[data-theme="light"] [style*="border"] {
  /* Can't override inline styles universally; handled per-component above */
}
/* Specific elements known to carry dark borders */
[data-theme="light"] .GAME-newgames {
  border-top: 1px solid #dde1ea !important;
}
[data-theme="light"] .about-section,
[data-theme="light"] .features-section,
[data-theme="light"] .howto-section {
  border-color: #dde1ea !important;
}
/* Step images (step1-4) border */
[data-theme="light"] .howto-section .step-img,
[data-theme="light"] .howto-section .grid > article picture,
[data-theme="light"] .howto-section .grid > article > img,
[data-theme="light"] .about-section picture,
[data-theme="light"] .about-section img {
  border-color: #d4d9e4 !important;
  box-shadow: 0 4px 12px rgba(0,0,0,.08) !important;
}
[data-theme="light"] .howto-section .howto-divider {
  background: #e2e6ee !important;
  height: 1px;
}
[data-theme="light"] .GAME-control-block {
  border: 1px solid #dde1ea !important;
}
[data-theme="light"] .GAME-faq-item {
  border: 1px solid #dde1ea !important;
}
[data-theme="light"] #game-frame-wrap {
  border-radius: 0.375rem;
  overflow: hidden !important;
  background: #ffffff !important;
}
[data-theme="light"] .resp-iframe > iframe {
  border-radius: 0 !important;   /* parent clips; iframe self-radius creates gaps */
}
/* Footer border between sections */
[data-theme="light"] .border-t,
[data-theme="light"] [class*="border-t"] {
  border-top-color: #e2e6ee !important;
}
[data-theme="light"] .border-b,
[data-theme="light"] [class*="border-b"] {
  border-bottom-color: #e2e6ee !important;
}

/* ── 28. Smooth transitions ──────────────────────────────── */
[data-theme="light"] body,
[data-theme="light"] header,
[data-theme="light"] footer,
[data-theme="light"] .card,
[data-theme="light"] .GAMES-card,
[data-theme="light"] .GAME-article,
[data-theme="light"] .GAME-toolbar,
[data-theme="light"] .comments__item {
  transition: background 0.25s ease, color 0.25s ease,
              border-color 0.25s ease, box-shadow 0.25s ease;
}

/* ── 29. Expanded / fullscreen game controls bar ─────────── */
[data-theme="light"] #game-controls {
  background: #ffffff !important;
  border-top-color: #e2e6ee !important;
  color: #1a1d23 !important;
}
[data-theme="light"] #game-controls h1,
[data-theme="light"] #game-controls h1 a,
[data-theme="light"] #game-controls .mobile-domain-label {
  color: #1a1d23 !important;
  -webkit-text-fill-color: #1a1d23 !important;
  background: none !important;
}
[data-theme="light"] #game-controls .text-gray-100,
[data-theme="light"] #game-controls .text-gray-200,
[data-theme="light"] #game-controls .text-gray-300 {
  color: #374151 !important;
}
[data-theme="light"] #game-controls .btn {
  background: rgba(30,168,94,.07) !important;
  border-color: #dde1ea !important;
  color: #374151 !important;
}
[data-theme="light"] #game-controls .btn:hover {
  background: #1ea85e !important;
  color: #ffffff !important;
  border-color: #178a4d !important;
}
[data-theme="light"] #game-controls .soft-surface {
  background: rgba(30,168,94,.07) !important;
}
/* Bookmark button "(Unlimited)" text */
[data-theme="light"] #bookmark-btn {
  color: #6b7280 !important;
}
[data-theme="light"] #bookmark-btn:hover {
  color: #1ea85e !important;
}


/* ============================================================
   THEME TOGGLE SWITCH (merged from theme-toggle.css)
   ============================================================ */
/* ==========================================================
   Theme-toggle switch — pill style
   ========================================================== */

/* ── Wrapper ──────────────────────────────────────────────── */
.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

/* ── Hidden checkbox (real control) ─────────────────────── */
.theme-toggle__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* ── Pill track ─────────────────────────────────────────── */
.theme-toggle__track {
  display: flex;
  align-items: center;
  width: 52px;
  height: 28px;
  border-radius: 9999px;
  padding: 3px;
  cursor: pointer;
  box-sizing: border-box;
  position: relative;
  user-select: none;
  /* dark default */
  background: #3a3f4b;
  border: 1.5px solid rgba(255,255,255,.1);
  transition: background 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,.3) inset;
}

.theme-toggle__track:hover {
  box-shadow: 0 0 0 3px rgba(30,168,94,.25);
}

.theme-toggle__input:focus-visible + .theme-toggle__track {
  outline: 2px solid #1ea85e;
  outline-offset: 2px;
}

/* ── Thumb ──────────────────────────────────────────────── */
.theme-toggle__thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 5px rgba(0,0,0,.3);
  position: absolute;
  left: 3px;
  transition: transform 0.28s cubic-bezier(.4,0,.2,1),
              background 0.28s ease,
              box-shadow 0.28s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ── Icons inside thumb ─────────────────────────────────── */
.theme-toggle__icon {
  position: absolute;
  width: 12px;
  height: 12px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
/* Moon — visible in dark mode (default) */
.theme-toggle__icon--moon {
  opacity: 1;
  transform: scale(1);
  color: #3a3f4b;
}
/* Sun — visible in light mode */
.theme-toggle__icon--sun {
  opacity: 0;
  transform: scale(0.5) rotate(-45deg);
  color: #f59e0b;
}

/* ── LIGHT STATE (checked) ──────────────────────────────── */
.theme-toggle__input:checked + .theme-toggle__track {
  background: #d0f0e2;
  border-color: rgba(30,168,94,.4);
  box-shadow: 0 1px 4px rgba(30,168,94,.15) inset;
}

.theme-toggle__input:checked + .theme-toggle__track .theme-toggle__thumb {
  transform: translateX(24px);
  background: #1ea85e;
  box-shadow: 0 1px 6px rgba(30,168,94,.5);
}

.theme-toggle__input:checked + .theme-toggle__track .theme-toggle__icon--moon {
  opacity: 0;
  transform: scale(0.5) rotate(45deg);
}

.theme-toggle__input:checked + .theme-toggle__track .theme-toggle__icon--sun {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  color: #ffffff;
}

/* ── Tooltip label ──────────────────────────────────────── */
.theme-toggle__label {
  display: none; /* hidden by default — show via media if desired */
}


/* ============================================================
   MOBILE HAMBURGER NAV (merged from nav-mobile.css)
   ============================================================ */
/* =============================================================
   Mobile hamburger nav — pure CSS using :has() selector
   Reliable on all modern mobile browsers (2022+).
   ============================================================= */

/* ── Always hide the raw checkbox ─────────────────────────── */
.nav-toggle-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
  margin: 0;
  padding: 0;
}

/* ── Hide hamburger label on desktop ──────────────────────── */
.nav-toggle-label {
  display: none;
}

/* ══════════════════════════════════════════════════════════
   MOBILE  ≤ 640px
   ══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {

  /* ─────────────────────────────────────────────────────────
     1. HAMBURGER BUTTON (label)
     ───────────────────────────────────────────────────────── */
  .nav-toggle-label {
    display: inline-block;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    cursor: pointer;
    background: transparent;
    border: 0;
    padding: 0;
    position: relative;
    /* Order: theme-toggle on left, hamburger on right */
    order: 99;
    -webkit-tap-highlight-color: transparent;
  }

  /* Three bars: ::before draws top+middle (using box-shadow),
     ::after draws bottom bar.
     Both are absolutely positioned within the 40x40 label. */
  .nav-toggle-label::before,
  .nav-toggle-label::after {
    content: '';
    position: absolute;
    left: 50%;
    width: 22px;
    height: 2.5px;
    border-radius: 2px;
    background: var(--text);
    transform: translateX(-50%);
    transition: transform 0.25s ease, top 0.25s ease,
                box-shadow 0.2s ease, background 0.2s ease;
  }
  .nav-toggle-label::before {
    top: 12px;                                  /* top bar */
    box-shadow: 0 7px 0 var(--text);            /* middle bar via shadow */
  }
  .nav-toggle-label::after {
    top: 26px;                                  /* bottom bar */
  }

  /* When checked — animate to X */
  html:has(.nav-toggle-input:checked) .nav-toggle-label::before {
    top: 19px;                                  /* center vertically */
    box-shadow: none;                           /* hide middle bar */
    transform: translateX(-50%) rotate(45deg);
  }
  html:has(.nav-toggle-input:checked) .nav-toggle-label::after {
    top: 19px;                                  /* center vertically */
    transform: translateX(-50%) rotate(-45deg);
  }

  /* ─────────────────────────────────────────────────────────
     2. THEME TOGGLE — keep on left side
     ───────────────────────────────────────────────────────── */
  .site-header .theme-toggle {
    order: 1;
    flex-shrink: 0;
  }

  /* ─────────────────────────────────────────────────────────
     3. NAV — closed by default, hidden completely
     ───────────────────────────────────────────────────────── */
  .site-header nav {
    display: none;
  }

  /* ─────────────────────────────────────────────────────────
     4. NAV OPEN — fixed full-width panel below header
        :has() walks up from the checked checkbox, lets us
        scope styles to the entire document regardless of
        where the nav lives in the DOM.
     ───────────────────────────────────────────────────────── */
  html:has(.nav-toggle-input:checked) .site-header nav {
    display: block;
    position: fixed;
    top: 52px;     /* directly below header */
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    z-index: 9999;
    background: var(--card-bg);
    border-bottom: 1px solid var(--card-border);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    animation: navFadeIn 0.18s ease both;
  }

  @keyframes navFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  /* Lock body scroll when menu open (optional, comfy UX) */
  html:has(.nav-toggle-input:checked) {
    overflow: hidden;
  }

  /* ─────────────────────────────────────────────────────────
     5. NAV LINKS in dropdown
     ───────────────────────────────────────────────────────── */
  html:has(.nav-toggle-input:checked) .site-header nav a {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--card-border);
    transition: background 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
  }
  html:has(.nav-toggle-input:checked) .site-header nav a:last-child {
    border-bottom: 0;
  }
  html:has(.nav-toggle-input:checked) .site-header nav a:hover,
  html:has(.nav-toggle-input:checked) .site-header nav a:active {
    background: rgba(59, 211, 128, 0.08);
    color: #1ea85e;
    padding-left: 28px;
  }
  html:has(.nav-toggle-input:checked) .site-header nav a.nav-current {
    color: #1ea85e;
    background: rgba(59, 211, 128, 0.06);
    font-weight: 700;
  }
  html:has(.nav-toggle-input:checked) .site-header nav a.nav-current::before {
    content: '•';
    margin-right: 8px;
    color: #1ea85e;
  }

  /* ─────────────────────────────────────────────────────────
     6. LIGHT THEME OVERRIDES
        NOTE: [data-theme="light"] sits on <html>, so we cannot
        nest it before another `html`. Use html[data-theme="..."]
        as the root selector instead.
     ───────────────────────────────────────────────────────── */
  html[data-theme="light"] .nav-toggle-label::before,
  html[data-theme="light"] .nav-toggle-label::after {
    background: #374151;
  }
  html[data-theme="light"] .nav-toggle-label::before {
    box-shadow: 0 7px 0 #374151;
  }
  html[data-theme="light"]:has(.nav-toggle-input:checked) .nav-toggle-label::before {
    box-shadow: none;
  }
  html[data-theme="light"]:has(.nav-toggle-input:checked) .site-header nav {
    background: #ffffff;
    border-bottom-color: #dde1ea;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
  }
  html[data-theme="light"]:has(.nav-toggle-input:checked) .site-header nav a {
    color: #374151;
    border-bottom-color: #edf0f4;
  }
  html[data-theme="light"]:has(.nav-toggle-input:checked) .site-header nav a:hover,
  html[data-theme="light"]:has(.nav-toggle-input:checked) .site-header nav a:active {
    background: rgba(30, 168, 94, 0.07);
    color: #1ea85e;
  }
  html[data-theme="light"]:has(.nav-toggle-input:checked) .site-header nav a.nav-current {
    color: #1ea85e;
    background: rgba(30, 168, 94, 0.06);
  }
}

/* ══════════════════════════════════════════════════════════
   Fallback for browsers WITHOUT :has() support
   (very old: pre-2022 mobile browsers)
   ══════════════════════════════════════════════════════════ */
@supports not selector(:has(*)) {
  @media (max-width: 640px) {
    /* Fallback: rely on ~ sibling selector within parent.
       Show nav as full-width below header.                 */
    .nav-toggle-input:checked ~ nav,
    .nav-toggle-input:checked ~ * nav {
      display: block !important;
      position: fixed !important;
      top: 52px !important;
      left: 0 !important;
      right: 0 !important;
      width: 100% !important;
      z-index: 9999 !important;
      background: var(--card-bg);
      border-bottom: 1px solid var(--card-border);
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    }
  }
}

/* ── About Us / Guide page feature titles & subheadings ───── */
[data-theme="light"] .feature-title {
  color: #1a1d23 !important;
}
[data-theme="light"] .card h3 {
  color: #1a1d23 !important;
}
