/* Majhi Naukri - Educational Games - Shared Styles */
/* Brand: #3d85c6 | Mobile-first | Dark mode ready */

:root {
  --brand: #3d85c6;
  --brand-dark: #2d6a9f;
  --brand-light: #5a9fd4;
  --brand-bg: #e8f2fa;
  --success: #27ae60;
  --danger: #e74c3c;
  --warning: #f39c12;
  --text: #1a1a2e;
  --text-muted: #5a6270;
  --bg: #f5f8fc;
  --surface: #ffffff;
  --border: #d4e3f0;
  --shadow: 0 2px 12px rgba(61, 133, 198, 0.12);
  --shadow-lg: 0 8px 32px rgba(61, 133, 198, 0.18);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.25s ease;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Liquid Glass Lite tokens */
  --glass-bg: rgba(255, 255, 255, 0.12);
  --glass-bg-input: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.35);
  --glass-blur: 12px;
  --glass-radius: 14px;
  --glass-shadow: 0 4px 16px rgba(61, 133, 198, 0.12);
  --glass-shadow-hover: 0 8px 28px rgba(61, 133, 198, 0.2);
  --max-w: 720px;
  --nav-bg: #1a2744;
  --topbar-bg: #000000;
  --logo-orange: #e67e22;
}

[data-theme="dark"] {
  --brand-bg: #1a2a3a;
  --text: #e8edf2;
  --text-muted: #9aa8b8;
  --bg: #0f1419;
  --surface: #1a2332;
  --border: #2a3a4e;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-bg-input: rgba(26, 35, 50, 0.75);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  --glass-shadow-hover: 0 8px 28px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* Always reserve space for the vertical scrollbar so content does not
     jump sideways ("shake") when JS-rendered cards/ads lengthen the page. */
  scrollbar-gutter: stable;
}

/* Fallback for browsers without scrollbar-gutter support: keep the
   scrollbar track always present so layout width stays constant. */
@supports not (scrollbar-gutter: stable) {
  html {
    overflow-y: scroll;
  }
}

body {
  font-family: var(--font);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(61, 133, 198, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(61, 133, 198, 0.04) 0%, transparent 50%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

[data-theme="dark"] body {
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(61, 133, 198, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(61, 133, 198, 0.05) 0%, transparent 50%);
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover, a:focus-visible { color: var(--brand-dark); }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--brand);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
}

.skip-link:focus { top: 1rem; }

/* Breadcrumb navigation (matches Majhi Naukri Tools style) */
.mn-breadcrumb-root {
  margin-bottom: 0;
}

.mn-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-muted);
  margin: 0 0 10px;
  padding: 8px 0 10px;
  border-bottom: 1px solid var(--border);
}

.mn-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.mn-breadcrumb a:hover,
.mn-breadcrumb a:focus-visible {
  color: var(--brand);
  text-decoration: none;
}

.mn-breadcrumb__sep {
  margin: 0 6px;
  color: var(--text-muted);
  opacity: 0.55;
}

.mn-breadcrumb__current,
.mn-breadcrumb [aria-current='page'] {
  color: var(--text);
  font-weight: 600;
}

.legal-page .mn-breadcrumb {
  margin-bottom: 0.75rem;
}

.hub-page > .mn-breadcrumb-root .mn-breadcrumb {
  margin-top: 0;
}

@media (max-width: 768px) {
  .mn-breadcrumb--game .mn-breadcrumb__game-title,
  .mn-breadcrumb--game .mn-breadcrumb__sep--before-game {
    display: none;
  }

  .mn-breadcrumb {
    font-size: 0.75rem;
    padding: 6px 0 8px;
    margin-bottom: 8px;
  }
}

/* ── Majhi Naukri 3-tier header ── */
.mn-header {
  position: relative;
  z-index: 200;
}

/* Tier 1 - top utility bar */
.mn-topbar {
  background: var(--topbar-bg);
  color: #fff;
  font-size: 0.75rem;
}

.mn-topbar__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.4rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.mn-topbar__date {
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
}

.mn-topbar__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.mn-topbar__links a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.72rem;
  white-space: nowrap;
}

.mn-topbar__links a:hover,
.mn-topbar__links a:focus-visible {
  color: #fff;
}

/* Tier 2 - branding */
.mn-brandbar {
  background: #fff;
  border-bottom: 1px solid #e8ecf0;
}

[data-theme="dark"] .mn-brandbar {
  background: var(--surface);
  border-bottom-color: var(--border);
}

.mn-brandbar__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.mn-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: inherit;
  text-decoration: none;
}

.mn-logo:hover { opacity: 0.9; }

.mn-logo__img {
  flex-shrink: 0;
  display: block;
  height: 48px;
  width: auto;
  max-width: min(220px, 55vw);
}

.mn-logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.mn-logo__marathi {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mn-logo__blue { color: var(--brand); }
.mn-logo__orange { color: var(--logo-orange); }

.mn-logo__sub {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--text);
  margin-top: 0.1rem;
}

.mn-brandbar__menu {
  display: none;
}

.mn-back-btn.mn-back-btn--mobile {
  display: none;
}

.mn-brandbar__end {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.mn-header-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.mn-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1.15rem;
  border: 1px solid #e0e4e8;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 500;
  color: #2c3e50;
  background: #fff;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.mn-back-btn:hover,
.mn-back-btn:focus-visible {
  border-color: #d0d7de;
  color: #2c3e50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mn-back-btn__brand {
  display: inline;
  white-space: nowrap;
}

.mn-back-btn__majhi {
  color: var(--brand);
  font-weight: 600;
}

.mn-back-btn__naukri {
  color: var(--logo-orange);
  font-weight: 600;
}

[data-theme="dark"] .mn-back-btn {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .mn-back-btn:hover,
[data-theme="dark"] .mn-back-btn:focus-visible {
  color: var(--text);
}

/* Tier 3 - primary navigation */
.mn-nav {
  background: var(--nav-bg);
}

.mn-nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.mn-nav__inner::-webkit-scrollbar {
  height: 4px;
}

.mn-nav__inner::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}

.mn-nav__list {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  width: max-content;
  min-width: 100%;
  flex-shrink: 0;
}

.mn-nav__list > li {
  flex: 0 0 auto;
  flex-shrink: 0;
}

.mn-nav__list::-webkit-scrollbar {
  display: none;
}

.mn-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 0.75rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  transition: background var(--transition), color var(--transition);
  min-height: 44px;
}

.mn-nav__link::after {
  content: "";
  position: absolute;
  bottom: 0.35rem;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--brand-light);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width var(--transition);
  pointer-events: none;
}

.mn-nav__link span {
  flex-shrink: 0;
}

.mn-nav__link:hover,
.mn-nav__link:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.mn-nav__link:hover::after,
.mn-nav__link:focus-visible::after {
  width: 70%;
}

.mn-nav__link--active {
  background: var(--brand) !important;
  color: #fff !important;
}

.mn-nav__link--active::after {
  width: 70%;
  background: rgba(255, 255, 255, 0.85);
}

.mn-nav__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.95;
}

.mn-nav__icon svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
}

.mn-mobile-drawer__icon svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: block;
}

.mn-nav__icon--img,
.mn-mobile-drawer__icon.mn-nav__icon--img {
  display: inline-block;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  object-fit: contain;
  opacity: 1;
  vertical-align: middle;
}

/* Mobile slide-in drawer */
.mn-mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 500;
  pointer-events: none;
  visibility: hidden;
}

.mn-mobile-drawer--open {
  pointer-events: auto;
  visibility: visible;
}

.mn-mobile-drawer__overlay {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.mn-mobile-drawer--open .mn-mobile-drawer__overlay {
  opacity: 1;
}

.mn-mobile-drawer__panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(72vw, 300px);
  display: flex;
  flex-direction: column;
  background: #05162d;
  color: #fff;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
}

.mn-mobile-drawer--open .mn-mobile-drawer__panel {
  transform: translateX(0);
}

.mn-mobile-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.15rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.mn-mobile-drawer__label {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
}

.mn-mobile-drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: none;
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  transition: background var(--transition);
}

.mn-mobile-drawer__close:hover,
.mn-mobile-drawer__close:focus-visible {
  background: rgba(255, 255, 255, 0.1);
}

.mn-mobile-drawer__body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.65rem 0.85rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.mn-mobile-drawer__body::-webkit-scrollbar {
  width: 4px;
}

.mn-mobile-drawer__body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}

.mn-mobile-drawer__nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.mn-mobile-drawer__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.mn-mobile-drawer__link:hover,
.mn-mobile-drawer__link:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: translateX(3px);
}

.mn-mobile-drawer__link--active {
  background: var(--brand) !important;
  color: #fff !important;
}

.mn-mobile-drawer__icon {
  display: inline-flex;
  flex-shrink: 0;
  opacity: 0.95;
}

.mn-mobile-drawer__legal {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.mn-mobile-drawer__legal-title {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.35rem;
}

.mn-mobile-drawer__legal-link {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.88rem;
  padding: 0.15rem 0;
  transition: color var(--transition);
}

.mn-mobile-drawer__legal-link:hover,
.mn-mobile-drawer__legal-link:focus-visible {
  color: #fff;
}

.mn-mobile-drawer__scroll-top {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0.5rem auto 0.85rem;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: #fff;
  color: #05162d;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity var(--transition);
}

.mn-mobile-drawer__scroll-top:hover,
.mn-mobile-drawer__scroll-top:focus-visible {
  opacity: 0.85;
}

body.mn-menu-open {
  overflow: hidden;
}

/* Mobile header */
@media (max-width: 768px) {
  #mn-header-root {
    min-height: var(--mn-header-height, 0px);
  }

  .mn-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    padding-top: env(safe-area-inset-top, 0px);
    overflow: visible;
  }

  .mn-topbar {
    display: none;
  }

  .mn-nav {
    display: none;
  }

  .mn-brandbar {
    border-bottom: 1px solid #e8ecf0;
    overflow: visible;
  }

  .mn-brandbar__inner {
    display: grid;
    grid-template-columns: 38px 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    justify-items: center;
    gap: 0.4rem 0.4rem;
    padding: 0.5rem max(0.65rem, env(safe-area-inset-right, 0px)) 0.55rem max(0.65rem, env(safe-area-inset-left, 0px));
    overflow: visible;
  }

  .mn-brandbar__menu {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #e0e4e8;
    border-radius: 8px;
    background: #f5f6f8;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
  }

  .mn-brandbar__menu:hover,
  .mn-brandbar__menu:focus-visible {
    background: #eef0f3;
    border-color: #d0d7de;
  }

  .mn-brandbar__menu-bar {
    display: block;
    width: 18px;
    height: 2px;
    background: #2c3e50;
    border-radius: 1px;
  }

  .mn-logo {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
  }

  .mn-logo__img {
    height: 36px;
    max-width: min(160px, calc(100vw - 10.5rem));
  }

  .mn-brandbar__end {
    display: flex;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    z-index: 2;
    flex-shrink: 0;
  }

  .mn-header-controls {
    padding: 0.08rem;
    gap: 0.2rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #e8ecf0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    flex-shrink: 0;
  }

  .mn-header-controls .icon-btn {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
    border-radius: 6px;
  }

  [data-theme="dark"] .mn-header-controls {
    background: rgba(26, 35, 50, 0.96);
    border-color: var(--border);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  }

  .mn-brandbar__end > .mn-back-btn {
    display: none;
  }

  .mn-back-btn.mn-back-btn--mobile {
    display: inline-flex;
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
    padding: 0.35rem 0.9rem;
    font-size: 0.76rem;
  }

  .mn-brandbar__inner--no-back {
    grid-template-columns: 34px 1fr auto;
    grid-template-rows: auto;
    gap: 0.25rem;
    padding: 0.35rem max(0.6rem, env(safe-area-inset-right, 0px)) 0.4rem max(0.6rem, env(safe-area-inset-left, 0px));
  }

  .mn-brandbar__inner--no-back .mn-brandbar__menu {
    width: 34px;
    height: 34px;
    border-radius: 7px;
  }

  .mn-brandbar__inner--no-back .mn-brandbar__menu-bar {
    width: 16px;
  }

  .mn-brandbar__inner--no-back .mn-logo__img {
    height: 30px;
    max-width: min(140px, calc(100vw - 9.5rem));
  }

  .mn-brandbar__inner--no-back .mn-header-controls {
    padding: 0.05rem;
    gap: 0.15rem;
    border-radius: 7px;
  }

  .mn-brandbar__inner--no-back .mn-header-controls .icon-btn {
    width: 28px;
    height: 28px;
    font-size: 0.82rem;
    border-radius: 5px;
  }

  .mn-mobile-drawer__scroll-top {
    display: inline-flex;
  }

  [data-theme="dark"] .mn-brandbar__menu {
    background: var(--bg);
    border-color: var(--border);
  }

  [data-theme="dark"] .mn-brandbar__menu-bar {
    background: var(--text);
  }
}

@media (min-width: 769px) {
  .mn-mobile-drawer {
    display: none;
  }

  .mn-nav {
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 1.1rem;
  transition: background var(--transition), border-color var(--transition);
}

.icon-btn:hover, .icon-btn:focus-visible {
  background: var(--brand-bg);
  border-color: var(--brand);
}

.icon-btn[aria-pressed="true"] {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.icon-btn--exit {
  border-color: rgba(231, 76, 60, 0.35);
  color: var(--danger);
  font-size: 0.85rem;
  font-weight: 700;
}

.icon-btn--exit:hover,
.icon-btn--exit:focus-visible {
  background: rgba(231, 76, 60, 0.1);
  border-color: var(--danger);
  color: var(--danger);
}

/* ── Exit confirmation modal ── */
.exit-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 26, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: exitFadeIn 0.18s ease;
}

.exit-modal-overlay[hidden] {
  display: none;
}

@keyframes exitFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.exit-modal {
  background: var(--surface);
  border-radius: 24px;
  padding: 2.25rem 2rem 2rem;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 8px 24px rgba(0,0,0,0.12),
    0 32px 72px rgba(0,0,0,0.22);
  animation: exitSlideUp 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
  position: relative;
  overflow: hidden;
}

/* Subtle top accent line */
.exit-modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--danger), #ff6b6b);
  border-radius: 24px 24px 0 0;
}

@keyframes exitSlideUp {
  from { transform: translateY(24px) scale(0.96); opacity: 0; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

.exit-modal__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

.exit-modal__title {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 0 0.6rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.exit-modal__body {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 1.75rem;
  line-height: 1.6;
  max-width: 260px;
  margin-left: auto;
  margin-right: auto;
}

.exit-modal__actions {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
}

.exit-modal__actions .btn {
  flex: 1;
  max-width: 148px;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
}

.exit-modal__actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.exit-modal__actions .btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Keep playing - outlined blue */
.exit-modal__actions .btn-secondary {
  background: transparent;
  border: 2px solid var(--brand);
  color: var(--brand);
}

.exit-modal__actions .btn-secondary:hover,
.exit-modal__actions .btn-secondary:focus-visible {
  background: var(--brand-bg);
  border-color: var(--brand);
  color: var(--brand);
}

.btn-danger {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(231, 76, 60, 0.35);
}

.btn-danger:hover,
.btn-danger:focus-visible {
  background: linear-gradient(135deg, #ec5f50, #c0392b);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.45);
  color: #fff;
}

body.exit-modal-open {
  overflow: hidden;
}

/* Dark mode adjustments */
[data-theme="dark"] .exit-modal {
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.07),
    0 8px 24px rgba(0,0,0,0.4),
    0 32px 72px rgba(0,0,0,0.5);
}

/* Main layout */
main {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}

/* ── Majhi Naukri footer ── */
.mn-footer-wrap {
  margin-top: auto;
  padding-top: 1.5rem;
}

/* Share card - sits above the black footer on the page background */
.mn-share-card {
  width: calc(100% - 2rem);
  max-width: 320px;
  margin: 0 auto 1.25rem;
  padding: 0.85rem 1.25rem 1rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(61, 133, 198, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
  text-align: center;
  border: 1px solid var(--border);
}

[data-theme="dark"] .mn-share-card {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.mn-share-card__title {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
  font-weight: 500;
}

.mn-share-card__icons {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.mn-share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: transform var(--transition), opacity var(--transition), box-shadow var(--transition);
}

.mn-share-btn:hover,
.mn-share-btn:focus-visible {
  transform: translateY(-2px) scale(1.06);
  opacity: 0.95;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mn-share-btn--fb { background: #1877f2; }
.mn-share-btn--x { background: #000; }
.mn-share-btn--tg { background: #26a5e4; }
.mn-share-btn--wa { background: #25d366; }
.mn-share-btn--copy {
  background: #fff;
  color: #5a6270;
  border: 1px solid #d0d7de;
}

.mn-share-btn--copied {
  background: var(--success) !important;
  color: #fff !important;
  border-color: var(--success) !important;
}

/* Main footer */
.mn-footer {
  background: #0a0c10;
  color: rgba(255, 255, 255, 0.88);
  padding: 1.75rem 1rem 1.5rem;
}

.mn-footer__inner {
  max-width: 1100px;
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .mn-footer__inner {
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    align-items: start;
  }
}

.mn-footer__heading {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.85rem;
}

.mn-footer__heading--center {
  justify-content: center;
}

.mn-footer__disclaimer p {
  font-size: 0.82rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 0.65rem;
}

.mn-footer__link {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.15rem 0;
  font-size: 0.85rem;
  color: var(--brand-light) !important;
  font-weight: 500;
  transition: color var(--transition), transform var(--transition);
}

.mn-footer__link:hover {
  color: #fff !important;
  transform: translateX(2px);
}

.mn-footer__follow-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
}

.mn-footer__follow-text {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.55;
  margin-bottom: 1.1rem;
}

.mn-footer__social {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.mn-social-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.mn-social-btn:hover,
.mn-social-btn:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--brand);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(61, 133, 198, 0.25);
}

.mn-footer__bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.mn-footer__brand-line {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  line-height: 1.4;
}

.mn-footer__product-name {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}

.mn-footer__version {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: rgba(255, 255, 255, 0.42);
}

.mn-footer__credit {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.58);
}

.mn-footer__heart {
  color: #e74c3c;
}

.mn-footer__flag {
  display: inline-block;
  vertical-align: -0.12em;
  width: 1.05em;
  height: auto;
  margin: 0 0.2em 0 0.1em;
  border-radius: 1px;
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.12);
}

.mn-footer__brand-link {
  display: inline;
  text-decoration: none;
  font-weight: 600;
}

.mn-footer__brand-link:hover .mn-logo__blue,
.mn-footer__brand-link:focus-visible .mn-logo__blue {
  color: #7eb8f0;
}

.mn-footer__brand-link:hover .mn-logo__orange,
.mn-footer__brand-link:focus-visible .mn-logo__orange {
  color: #ff9a4d;
}

.mn-footer__brand-link:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.35);
  outline-offset: 2px;
  border-radius: 2px;
}

.mn-footer__tm {
  font-size: 0.62em;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.42);
  margin-left: 0.05em;
}

.mn-footer .mn-logo__blue { color: #5ba3e8; }
.mn-footer .mn-logo__orange { color: var(--logo-orange); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition), color var(--transition), border-color var(--transition), filter var(--transition);
  min-height: 44px;
}

.btn:active { transform: scale(0.97); }

/* Play / Start CTAs - brand blue with subtle glass shine overlay */
.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(61, 133, 198, 0.35);
  border-radius: var(--glass-radius);
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.06) 40%,
    transparent 60%
  );
  pointer-events: none;
  transition: opacity var(--transition);
}

.btn-primary:hover, .btn-primary:focus-visible {
  background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand) 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(61, 133, 198, 0.42);
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.btn-primary:hover::before,
.btn-primary:focus-visible::before {
  opacity: 1;
}

.btn-secondary {
  background: var(--surface);
  color: var(--brand);
  border: 2px solid var(--brand);
}

.btn-secondary:hover, .btn-secondary:focus-visible {
  background: var(--brand-bg);
  color: var(--brand);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover, .btn-danger:focus-visible {
  color: #fff;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  min-height: 36px;
}

.btn-block { width: 100%; }

/* Game shell */
.game-container {
  max-width: var(--max-w);
  margin: 0 auto;
}

/* Wider game area on desktop (at least 800px) */
@media (min-width: 992px) {
  .game-container {
    max-width: 800px;
  }
}

.game-header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.game-header--has-exit {
  position: relative;
  padding-right: 5.75rem;
}

.game-exit-inline {
  position: absolute;
  top: 0.1rem;
  right: 0;
  border-color: rgba(231, 76, 60, 0.35);
  color: var(--danger);
}

.game-exit-inline:hover,
.game-exit-inline:focus-visible {
  background: rgba(231, 76, 60, 0.1);
  border-color: var(--danger);
  color: var(--danger);
}

.game-header h1 {
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  color: var(--brand);
  margin-bottom: 0.25rem;
  font-weight: 800;
}

.game-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Report issue - below game area on all game pages */
.game-report-wrap {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0 0;
  padding: 0 0.25rem;
}

.game-report-issue {
  background: transparent;
  color: #fa6920;
  border: 2px solid #fa6920;
  box-shadow: none;
}

.game-report-issue:hover,
.game-report-issue:focus-visible {
  background: #fa6920;
  color: #fff;
  border-color: #fa6920;
}

[data-theme="dark"] .game-report-issue {
  background: transparent;
  color: #fa6920;
}

[data-theme="dark"] .game-report-issue:hover,
[data-theme="dark"] .game-report-issue:focus-visible {
  background: #fa6920;
  color: #fff;
}

/* On-page SEO content block */
.game-about-seo {
  margin-top: 2.5rem;
  padding: 1.5rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.game-about-seo h2 {
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.game-about-seo h3 {
  font-size: 1rem;
  color: var(--text);
  margin: 1.25rem 0 0.5rem;
  font-weight: 600;
}

.game-about-seo p {
  margin-bottom: 0.85rem;
}

.game-about-seo p:last-of-type {
  margin-bottom: 0;
}

.game-about-seo ul {
  margin: 0.35rem 0 1rem 1.35rem;
  padding: 0;
}

.game-about-seo li {
  margin-bottom: 0.45rem;
}

.game-about-seo__meta {
  font-size: 0.82rem;
  margin-top: 0.75rem;
}

.game-about-seo__cta a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}

.game-about-seo__cta a:hover {
  text-decoration: underline;
}

/* Wrong-answer review */
.wrong-review {
  text-align: left;
  margin: 1rem 0 1.25rem;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.wrong-review__title {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.wrong-review__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.wrong-review__item {
  padding: 0.75rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--danger);
}

.wrong-review__q {
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 0.4rem;
  line-height: 1.45;
  white-space: pre-line;
}

.wrong-review__wrong {
  font-size: 0.82rem;
  color: var(--danger);
  margin-bottom: 0.2rem;
}

.wrong-review__wrong span { font-weight: 600; }

.wrong-review__right {
  font-size: 0.82rem;
  color: var(--success);
  margin-bottom: 0.2rem;
}

.wrong-review__right span { font-weight: 600; }

.wrong-review__exp {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.5;
}

/* In-page ad after related games (desktop 728x90 / mobile responsive) */
.mn-inpage-ad {
  width: 100%;
  text-align: center;
  /* Generous spacing keeps the ad clearly separated from clickable
     content above/below (AdSense accidental-click policy). */
  margin: 32px auto;
  padding: 8px 0;
  clear: both;
}

@media (max-width: 991px) {
  .mn-inpage-ad {
    margin: 24px auto;
  }
}

.mn-inpage-ad--desktop {
  display: none;
}

.mn-inpage-ad--mobile {
  display: block;
}

@media (min-width: 992px) {
  .mn-inpage-ad--desktop {
    display: block;
  }
  .mn-inpage-ad--mobile {
    display: none;
  }
}

/* "Advertisement" label shown above ad units */
.mn-ad-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.7;
  text-align: center;
}

/* Dev-only placeholder (shown instead of a real ad on localhost) */
.mn-ad-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  margin: 0 auto;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm, 8px);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* Related games */
.related-games {
  margin-top: 1.75rem;
  padding: 1.15rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.related-games__title {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.85rem;
  font-weight: 700;
}

.related-games__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.related-games__card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--card-accent, var(--brand));
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.related-games__card:hover,
.related-games__card:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(61, 133, 198, 0.35);
  color: inherit;
}

.related-games__icon {
  font-size: 1.35rem;
  line-height: 1;
}

.related-games__name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.related-games__desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

@media (min-width: 600px) {
  .related-games__grid { grid-template-columns: repeat(3, 1fr); }
}

/* Sudoku */
.sudoku-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 0;
  max-width: min(100%, 360px);
  margin: 0 auto;
  border: 2px solid var(--text);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.sudoku-cell {
  aspect-ratio: 1;
  width: 100%;
  text-align: center;
  font-size: clamp(0.85rem, 3.5vw, 1.15rem);
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 0;
  font-family: var(--font);
}

.sudoku-cell--fixed {
  background: var(--brand-bg);
  color: var(--brand-dark);
  font-weight: 800;
}

.sudoku-cell--box-right {
  border-right: 2px solid var(--text-muted);
}

.sudoku-cell--box-bottom {
  border-bottom: 2px solid var(--text-muted);
}

.sudoku-cell--error {
  background: #fde8e8;
  color: var(--danger);
}

[data-theme="dark"] .sudoku-cell--error {
  background: #3a1f1f;
}

.sudoku-cell:focus {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
  z-index: 1;
}

.flag-display {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  margin: 0.5rem 0 1rem;
  padding: 0.75rem;
  background: var(--brand-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.flag-display__img {
  display: block;
  max-width: min(280px, 90%);
  width: auto;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.difficulty-picker {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.difficulty-btn {
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--glass-radius);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  min-height: 48px;
  min-width: 96px;
  transition:
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition),
    transform var(--transition),
    color var(--transition);
}

.difficulty-btn.active,
.difficulty-btn[aria-pressed="true"] {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand-bg) 85%, var(--surface));
  color: var(--brand-dark);
  box-shadow: 0 4px 14px rgba(61, 133, 198, 0.2);
}

/* Difficulty level indicators */
.difficulty-btn[data-level="easy"] .difficulty-btn__label::before,
.difficulty-btn[data-level="easy"]:not(:has(.difficulty-btn__label))::before { content: "🟢 "; }
.difficulty-btn[data-level="medium"] .difficulty-btn__label::before,
.difficulty-btn[data-level="medium"]:not(:has(.difficulty-btn__label))::before { content: "🟡 "; }
.difficulty-btn[data-level="hard"] .difficulty-btn__label::before,
.difficulty-btn[data-level="hard"]:not(:has(.difficulty-btn__label))::before { content: "🔴 "; }

/* Stacked label + description (Easy / Medium / Hard pills) */
.difficulty-btn:has(.difficulty-btn__desc) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.5rem 0.55rem;
  min-height: 58px;
  text-align: center;
}

.difficulty-btn__label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1.3;
}

.difficulty-btn__desc {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-muted);
}

.difficulty-btn.active .difficulty-btn__desc,
.difficulty-btn[aria-pressed="true"] .difficulty-btn__desc {
  color: color-mix(in srgb, var(--brand-dark) 70%, var(--text-muted));
}

@media (max-width: 420px) {
  .difficulty-picker:has(.difficulty-btn__desc) {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }

  .difficulty-picker:has(.difficulty-btn__desc) .difficulty-btn {
    flex: none;
    width: 100%;
    min-width: 0;
  }
}

/* Crossword */
.crossword-grid {
  display: grid;
  gap: 0;
  max-width: min(100%, 320px);
  margin: 0 auto 1rem;
  border: 2px solid var(--text-muted);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.crossword-cell {
  aspect-ratio: 1;
  width: 100%;
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
  border: 1px solid var(--border);
  font-size: clamp(0.8rem, 3vw, 1rem);
}

.crossword-cell--block {
  background: var(--text);
  border-color: var(--text);
}

.crossword-cell--right { background: #e8f8ef; }
.crossword-cell--wrong { background: #fde8e8; color: var(--danger); }

#clue-list { margin: 0; padding-left: 1.25rem; font-size: 0.9rem; color: var(--text-muted); }
#clue-list li { margin-bottom: 0.35rem; }

/* Word search */
.wordsearch-grid, #wordsearch-grid {
  display: grid;
  gap: 2px;
  max-width: min(100%, 360px);
  margin: 0 auto 1rem;
  user-select: none;
}

.ws-cell {
  aspect-ratio: 1;
  font-size: clamp(0.65rem, 2.8vw, 0.85rem);
  font-weight: 700;
  padding: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.ws-cell--active { background: var(--brand-bg); color: var(--brand-dark); }
.ws-cell--found { background: #d4edda; color: #155724; text-decoration: line-through; }

.ws-word-list, #word-list {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  justify-content: center; list-style: none; padding: 0; margin: 0 0 1rem;
}

.ws-word-list li, #word-list li {
  padding: 0.25rem 0.6rem;
  background: var(--brand-bg);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.ws-word--found { opacity: 0.45; text-decoration: line-through; }

/* Jumbled words */
.jumble-chip {
  display: inline-block;
  margin: 0.2rem;
  padding: 0.4rem 0.75rem;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
}

.jumble-chip--picked { border-color: var(--brand); background: var(--brand-bg); }
.jumble-placeholder { color: var(--text-muted); font-style: italic; }
#word-bank, #answer-line { text-align: center; margin: 0.75rem 0; min-height: 2.5rem; }

/* Hangman */
.hangman-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0.5rem;
}

.hangman-svg {
  width: min(200px, 55vw);
  height: auto;
  color: var(--text);
}

.hangman-svg .hangman__part--visible { opacity: 1; }
.hangman-svg circle,
.hangman-svg line:not(.hangman__gallows) {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.hangman-svg .hangman__head.hangman__part--visible,
.hangman-svg .hangman__body.hangman__part--visible,
.hangman-svg .hangman__arm-l.hangman__part--visible,
.hangman-svg .hangman__arm-r.hangman__part--visible,
.hangman-svg .hangman__leg-l.hangman__part--visible,
.hangman-svg .hangman__leg-r.hangman__part--visible {
  opacity: 1;
}

.hangman-lives {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--danger);
  margin: 0.35rem 0 0;
}

.hangman-word, #hangman-word {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  margin: 1rem 0;
}

.hangman-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2.5rem;
  padding: 0 0.25rem;
  border-bottom: 3px solid var(--brand);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--brand-dark);
  text-transform: uppercase;
}

.hangman-letter--revealed { color: var(--brand-dark); }
.hangman-letter--failed { color: var(--danger); border-bottom-color: var(--danger); }

.hangman-hint {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.hangman-keyboard, #keyboard {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  max-width: 380px;
  margin: 0 auto;
}

.hangman-key {
  width: 2.15rem;
  height: 2.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.hangman-key:hover:not(:disabled) {
  border-color: var(--brand);
  background: var(--brand-bg);
}

.hangman-key:disabled { cursor: default; }
.hangman-key--correct:disabled { background: #d4edda; border-color: var(--success); color: #155724; opacity: 1; }
.hangman-key--wrong:disabled { background: #f8d7da; border-color: var(--danger); color: #721c24; opacity: 1; }

#scramble-text {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-align: center;
  color: var(--brand);
  margin: 1rem 0;
}

/* 2048 */
.tile-grid {
  display: inline-block;
  background: #bbada0;
  border-radius: var(--radius);
  padding: 0.5rem;
  margin: 0 auto;
}

.tile-row { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
.tile-row:last-child { margin-bottom: 0; }

.tile-cell {
  width: 4.25rem;
  height: 4.25rem;
  background: rgba(238, 228, 218, 0.35);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 800;
  color: #776e65;
}

.tile-2 { background: #eee4da; }
.tile-4 { background: #ede0c8; }
.tile-8 { background: #f2b179; color: #fff; }
.tile-16 { background: #f59563; color: #fff; }
.tile-32 { background: #f67c5f; color: #fff; }
.tile-64 { background: #f65e3b; color: #fff; }
.tile-128 { background: #edcf72; color: #fff; font-size: 1.1rem; }
.tile-256 { background: #edcc61; color: #fff; font-size: 1.1rem; }
.tile-512 { background: #edc850; color: #fff; font-size: 1.1rem; }
.tile-1024 { background: #edc53f; color: #fff; font-size: 0.95rem; }
.tile-2048, .tile-super { background: #edc22e; color: #fff; font-size: 0.95rem; }

#game-root:has(.tile-grid) { text-align: center; }

/* Tower of Hanoi */
.hanoi-board {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1rem auto;
  max-width: 420px;
}

.hanoi-peg {
  flex: 1;
  min-height: 200px;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  border-bottom: 4px solid var(--brand-dark);
  padding-bottom: 0.25rem;
  cursor: pointer;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: background var(--transition);
}

.hanoi-peg:hover { background: var(--brand-bg); }

.hanoi-disk {
  height: 1.25rem;
  border-radius: 999px;
  margin: 0.15rem 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.hanoi-disk:hover { transform: scaleY(1.08); }

.pattern-dot:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Memory match - legacy rules removed; see brain-games.css (.brain-game .memory-board) */

/* Stats bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--border) 80%, var(--brand) 20%);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.5rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(61, 133, 198, 0.08);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(61, 133, 198, 0.12);
  border-color: color-mix(in srgb, var(--brand) 30%, var(--border));
}

.stat-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand);
}

.stat-value--danger { color: var(--danger); }
.stat-value--success { color: var(--success); }

/* Game card */
.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 2px 10px rgba(61, 133, 198, 0.09);
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.game-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(61, 133, 198, 0.14);
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
}

.game-card h2 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

/* Question / options */
.question-text {
  font-size: clamp(1rem, 3.5vw, 1.2rem);
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.options-grid {
  display: grid;
  gap: 0.6rem;
}

.option-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.85rem 1rem;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  min-height: 48px;
}

.option-btn:hover:not(:disabled) {
  border-color: var(--brand);
  background: var(--brand-bg);
  transform: translateX(2px);
}

.option-btn.correct {
  border-color: var(--success);
  background: rgba(39, 174, 96, 0.15);
}

.option-btn.incorrect {
  border-color: var(--danger);
  background: rgba(231, 76, 60, 0.12);
}

.option-btn:disabled { cursor: default; opacity: 0.85; }

/* Input */
.game-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1.1rem;
  background: var(--surface);
  color: var(--text);
  min-height: 48px;
}

.game-input:focus {
  outline: none;
  border-color: var(--brand);
}

/* Feedback */
.feedback {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.feedback--success {
  background: rgba(39, 174, 96, 0.12);
  border: 1px solid var(--success);
  color: var(--success);
}

.feedback--error {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid var(--danger);
  color: var(--danger);
}

.feedback--info {
  background: var(--brand-bg);
  border: 1px solid var(--brand-light);
  color: var(--brand-dark);
}

/* Level / difficulty selector */
.difficulty-select {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.difficulty-btn {
  flex: 1;
  min-width: 96px;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--glass-radius);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  transition:
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition),
    transform var(--transition),
    color var(--transition);
  min-height: 48px;
}

.difficulty-btn:hover {
  border-color: color-mix(in srgb, var(--brand) 50%, var(--border));
  background: color-mix(in srgb, var(--brand-bg) 70%, var(--surface));
  color: var(--brand-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(61, 133, 198, 0.15);
}

.difficulty-btn.active,
.difficulty-btn[aria-pressed="true"] {
  border-color: var(--brand);
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand-light) 30%, var(--surface)) 0%, color-mix(in srgb, var(--brand) 18%, var(--surface)) 100%);
  color: var(--brand-dark);
  box-shadow: 0 4px 16px rgba(61, 133, 198, 0.22);
  transform: translateY(-1px);
}

/* Per-level hover glow */
.difficulty-btn[data-level="easy"]:hover,
.difficulty-btn[data-level="easy"].active {
  border-color: color-mix(in srgb, #27ae60 45%, var(--border));
  box-shadow: 0 4px 14px rgba(39, 174, 96, 0.18);
}

.difficulty-btn[data-level="medium"]:hover,
.difficulty-btn[data-level="medium"].active {
  border-color: color-mix(in srgb, #f39c12 45%, var(--border));
  box-shadow: 0 4px 14px rgba(243, 156, 18, 0.18);
}

.difficulty-btn[data-level="hard"]:hover,
.difficulty-btn[data-level="hard"].active {
  border-color: color-mix(in srgb, #e74c3c 45%, var(--border));
  box-shadow: 0 4px 14px rgba(231, 76, 60, 0.18);
}

/* Game actions */
.game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Start / end screens */
.screen-overlay {
  text-align: center;
  padding: 2rem 1rem;
}

.screen-overlay h2 {
  font-size: 1.5rem;
  color: var(--brand);
  margin-bottom: 0.5rem;
}

.screen-overlay p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.final-score {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--brand);
  margin: 0.5rem 0;
}

/* Progress bar */
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-bar__fill {
  height: 100%;
  background: var(--brand);
  border-radius: 3px;
  transition: width 0.3s linear;
}

/* Timer ring (optional visual) */
.timer-urgent .stat-value { color: var(--danger); animation: pulse 0.8s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ── Liquid Glass Lite - backdrop-filter (selective, ~12 elements) ── */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .difficulty-btn,
  .difficulty-select .difficulty-btn {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}

/* Fallback when backdrop-filter unsupported (low-end Android) */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .difficulty-btn {
    background: var(--surface);
  }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .btn:hover,
  .btn:focus-visible,
  .game-category-card:hover,
  .mini-game-card:hover,
  .stat-card:hover,
  .game-card:hover,
  .difficulty-btn:hover {
    transform: none !important;
  }
}

/* Visually hidden */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive */
@media (min-width: 768px) {
  main { padding: 1.5rem; }
  .game-card { padding: 1.5rem; }
  .stats-bar { gap: 0.75rem; }
  .stat-card { padding: 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
