@import url('https://fonts.googleapis.com/css2?family=League+Spartan:wght@600;700;800;900&family=Montserrat:wght@700;800;900&display=swap');

/* Local leaderboard lines (finish modal) */
.lbLines {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.35;
  color: rgba(255, 255, 255, .78);
}

.lbLines .lbRow {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: baseline;
}

.lbLines .lbLabel {
  color: rgba(255, 255, 255, .62);
  font-weight: 700;
  letter-spacing: .02em;
}

.lbLines .lbVal {
  color: rgba(255, 255, 255, .92);
  font-weight: 900;
}

/* Stats modal */
.statsMeta {
  text-align: center;
  margin-top: 2px;
  margin-bottom: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, .62);
  font-weight: 800;
  letter-spacing: .02em;
}


/* Stats grid (uses finish-modal style) */
.statsGrid {
  width: min(720px, 100%);
  display: grid;
  gap: 18px 26px;
  margin-top: 10px;
  justify-items: center;
  align-items: start;
}

.statsGrid.cols4 {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.statsGrid.cols3 {
  grid-template-columns: repeat(3, minmax(140px, 1fr));
}

.statsGrid.cols2 {
  grid-template-columns: repeat(2, minmax(150px, 1fr));
}

.statTile {
  text-align: center;
}

.statValue {
  font-family: var(--yearfont);
  font-weight: 900;
  font-size: 46px;
  letter-spacing: .4px;
  line-height: 1;
  color: rgba(255, 255, 255, .96);
  text-shadow: 0 14px 40px rgba(0, 0, 0, .42);
}

.statValue.small {
  font-size: 34px;
}

.statLabel {
  margin-top: 10px;
  font-family: var(--display);
  font-weight: 900;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .72);
}

/* Stats modal spacing: reduce TOP dead-space (not bottom) */
#statsModal {
  padding: 10px 18px 18px;
}

#statsModal .modalHead {
  padding: 2px 2px 8px;
  justify-content: flex-end;
}

#statsModal .modalBody {
  padding: 0 6px 10px;
}

#statsModal .bigWin {
  padding: 0;
  gap: 12px;
}

#statsModal .statsMeta {
  margin-top: 2px;
  margin-bottom: 0;
}

#statsModal .statsGrid {
  margin-top: 0;
  padding-bottom: 2px;
}

/* Finish modal: remove small corner label + trophy icon (requested) */
#finishModal .modalHead h3 {
  display: none;
}

#finishModal .trophy {
  display: none;
}

/* Keep close button on the right even when the small title is hidden */
#finishModal .modalHead {
  justify-content: flex-end;
}

/* Cards result modal: remove small label + icon (Stats are shown instead in tension) */
#cardsModal .modalHead h3 {
  display: none;
}

#cardsModal .trophy {
  display: none;
}

/* Keep close button on the right even when the small title is hidden */
#cardsModal .modalHead {
  justify-content: flex-end;
}

@media (max-width: 760px) {
  .statsGrid.cols4 {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .statsGrid.cols3 {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

/* Wrong answer feedback (only when a definite valid answer is typed) */
.answerRow.wrong {
  animation: c90shake .16s ease-in-out;
}

.answerRow.wrong .answer {
  border-color: rgba(255, 90, 108, .85) !important;
  background: rgba(255, 90, 108, .08) !important;
  box-shadow: 0 0 0 5px rgba(255, 90, 108, .18) !important;
}

@keyframes c90shake {
  0% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-5px);
  }

  40% {
    transform: translateX(4px);
  }

  60% {
    transform: translateX(-3px);
  }

  80% {
    transform: translateX(2px);
  }

  100% {
    transform: translateX(0);
  }
}


/* Hide the default browser scrollbar on home (scroll still works) */
html,
body {
  -ms-overflow-style: none;
  /* IE/Edge (legacy) */
  scrollbar-width: none;
  /* Firefox */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
}


/* ===== Sidebar polish (v5) ===== */
.sidebarFooter {
  background: transparent !important;
}

.sidebarFooter::before,
.sidebarFooter::after {
  content: none !important;
}

/* ===== Combined from index.html ===== */

:root {
  color-scheme: dark;
  --bg0: #060a12;
  --bg1: #0b1020;

  --text: #e9eefc;
  --muted: #aab6d6;

  --gold: #d6b35b;
  --aqua: #3fbad0;
  --blueDot: #4aa7ff;

  --shadow: 0 22px 80px rgba(0, 0, 0, .55);
  --r2: 26px;

  --display: "League Spartan", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  --yearfont: "Montserrat", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  --body: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;

  /* accent (changes by submode) */
  --accentSolid: #3fbad0;
  --accent: rgba(63, 186, 208, .72);
  --accentGlow: rgba(63, 186, 208, .18);

  /* competition dot */
  --dotSolid: var(--gold);
  --dotDark: #8c6e28;

  /* Glass effect surface (used in daily cards) */
  --surface2: rgba(255, 255, 255, 0.05);
}

.seoBlock {
  width: 100%;
  margin: 16px 0 0 0;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
  color: rgba(255, 255, 255, .70);
}

.seoBlock[lang] {
  display: none;
}

html[lang="es"] .seoBlock[lang="es"] {
  display: block;
}

html[lang="en"] .seoBlock[lang="en"] {
  display: block;
}


/* ===== Small i18n helpers (for short UI text blocks) ===== */
.i18nText[lang] {
  display: none;
}

html[lang="es"] .i18nText[lang="es"] {
  display: inline;
}

html[lang="en"] .i18nText[lang="en"] {
  display: inline;
}

/* ===== Home: NEW mode strip (above Daily Challenge) ===== */
.newModeStrip {
  grid-column: 1 / -1;
  border-radius: 16px;
  border: 1px solid rgba(214, 179, 91, .35);
  background:
    radial-gradient(900px 120px at 20% 50%, rgba(214, 179, 91, .18), rgba(255, 255, 255, .02)),
    radial-gradient(700px 120px at 90% 50%, rgba(63, 186, 208, .16), rgba(255, 255, 255, .02));
  box-shadow: 0 14px 50px rgba(0, 0, 0, .30);
  padding: 10px 14px 10px 18px;
  margin: 8px 6px 0;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.newModeStrip .stripIcon {
  font-size: 16px;
  line-height: 1;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .35));
}

.newModeStrip .stripText {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: .7px;
  text-transform: uppercase;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 10px 22px rgba(0, 0, 0, .45);
}

.newModeStrip::before {
  content: "";
  display: none;
}

.newModeStrip::after {
  content: "";
  position: absolute;
  inset: -40px -120px;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .14), transparent);
  opacity: .22;
  transform: translateX(-60%);
  animation: newStripShine 3.2s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: screen;
}

.newModeStrip>* {
  position: relative;
  z-index: 1;
}

@keyframes newStripShine {
  0% {
    transform: translateX(-60%);
  }

  55% {
    transform: translateX(60%);
  }

  100% {
    transform: translateX(60%);
  }
}

.newModeStrip .stripText b {
  color: var(--gold);
}

/* ===== Setup: NEW badge above the Tension pill ===== */
.seg button.hasNewBadge {
  position: relative;
  overflow: visible;
}

.seg button.hasNewBadge::before {
  content: attr(data-badge);
  position: absolute;
  left: 50%;
  top: -12px;
  transform: translateX(-50%);
  padding: 3px 10px 4px;
  border-radius: 999px;
  border: 1px solid rgba(214, 179, 91, .45);
  background: #060a12;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .30);
  color: rgba(255, 255, 255, .92);
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: .9px;
  font-size: 10px;
  text-transform: uppercase;
  opacity: .72;
  pointer-events: none;
}

.seoLead {
  margin: 0 0 10px 0;
  line-height: 1.35;
  font-weight: 700;
}

.seoLead:last-child {
  margin-bottom: 0;
}

.seoLead b {
  color: rgba(255, 255, 255, .90);
}




body[data-submode="tension"] {
  --accentSolid: #ff5a6c;
  --accent: rgba(255, 90, 108, .78);
  --accentGlow: rgba(255, 90, 108, .20);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--body);
  color: var(--text);
  background: linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow: hidden;
  position: relative;
}

/* Richer background (no purple) + mobile-safe (fixed layer) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(1100px 700px at 20% 15%, rgba(63, 186, 208, .18), transparent 55%),
    radial-gradient(900px 650px at 85% 25%, rgba(214, 179, 91, .14), transparent 55%),
    radial-gradient(900px 700px at 70% 95%, rgba(74, 167, 255, .12), transparent 55%);
}

/* ===== Header ===== */
.siteHeader {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .01));
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 50;
}

.logoBtn {
  display: flex;
  align-items: center;
  gap: 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 6px 6px;
}

.logoText {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: 1.5px;
  font-size: 34px;
  color: var(--gold);
  text-transform: uppercase;
  transform: skewX(-8deg);
  text-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  user-select: none;
}

.headerActions {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.iconBtn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .90);
  cursor: pointer;
  display: grid;
  place-items: center;
  user-select: none;
  font-family: var(--display);
  font-weight: 900;
}

.iconBtn.socialBtn {
  text-decoration: none;
}

.iconBtn.socialBtn svg {
  width: 20px;
  height: 20px;
  display: block;
  color: rgba(255, 255, 255, .92);
}

.iconBtn.socialBtn:hover {
  background: rgba(255, 255, 255, .075);
  border-color: rgba(255, 255, 255, .18);
}

.iconBtn:hover {
  background: rgba(255, 255, 255, .08);
}

.langWrap {
  position: relative;
}

.langBtn {
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
}

.langMenu {
  position: absolute;
  top: 52px;
  right: 0;
  width: 170px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(14, 18, 28, .88);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  padding: 8px;
  display: none;
  z-index: 60;
}

.langMenu.show {
  display: block;
}

.langItem {
  width: 100%;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .90);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: .2px;
  margin-bottom: 8px;
}

.langItem:last-child {
  margin-bottom: 0;
}

.langItem:hover {
  background: rgba(255, 255, 255, .07);
}

.langLeft {
  display: flex;
  align-items: center;
  gap: 10px;
}

.flag {
  font-size: 18px;
}

.check {
  opacity: .85;
}

.accentLine {
  height: 2px;
  background: linear-gradient(90deg, rgba(63, 186, 208, .95), rgba(214, 179, 91, .95));
}

/* ===== App layout ===== */
.app {
  height: calc(100% - 74px);
  display: grid;
  grid-template-columns: 250px 1fr;
}

body[data-view="home"] .app {
  grid-template-columns: 1fr;
}

/* Sidebar (only in setup/game) */
.sidebar {
  border-right: 1px solid rgba(255, 255, 255, .08);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .025), rgba(255, 255, 255, .01));
  min-height: 0;
  overflow: hidden;
}

body[data-view="home"] .sidebar {
  display: none;
}

.modes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  padding-right: 0;
  padding-top: 12px;
  /* Fix clipping of first item hover keyframe */
  padding-bottom: 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.modes::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.mode {
  border: 1px solid rgba(255, 255, 255, .09);
  background: rgba(255, 255, 255, .02);
  border-radius: 16px;
  padding: 12px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform .08s ease, background .2s ease, border-color .2s ease;
  user-select: none;
  min-height: 48px;
}

.mode:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, .035);
  border-color: rgba(255, 255, 255, .13);
}

.mode.active {
  border-color: rgba(63, 186, 208, .45);
  background: rgba(63, 186, 208, .09);
}

.mode .label {
  font-weight: 750;
  letter-spacing: .1px;
}

.tagSoon {
  font-size: 11px;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  color: rgba(255, 255, 255, .62);
  background: rgba(255, 255, 255, .03);
  white-space: nowrap;
}

.tagNew {
  font-size: 11px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(74, 167, 255, .55);
  color: rgba(255, 255, 255, .95);
  background: linear-gradient(180deg, rgba(74, 167, 255, .22), rgba(63, 186, 208, .12));
  box-shadow: 0 14px 34px rgba(74, 167, 255, .14), inset 0 0 0 1px rgba(255, 255, 255, .06);
  white-space: nowrap;
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: .25px;
  text-transform: uppercase;
}

.sidebarFooter {
  margin-top: auto;
  position: sticky;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  padding-bottom: 6px;
  border-top: 1px solid rgba(255, 255, 255, .10);
  background: transparent;
  backdrop-filter: none;
}

.sbBtn {
  width: 100%;
  height: 46px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .90);
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: .15px;
}

.sbBtn:hover {
  background: rgba(255, 255, 255, .06);
}

.sbBtn:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.sbBtn:disabled:hover {
  background: rgba(255, 255, 255, .04);
}

.sbIcon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .04);
  font-weight: 900;
  flex: 0 0 auto;
}

.sbIcon svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Main */
.main {
  height: 100%;
  overflow: auto;
  padding: 18px 16px 32px;
}

/* Hide the big white scrollbar in game views (training/tension/yby) */
body[data-view="game"] .main {
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* old Edge */
}

body[data-view="game"] .main::-webkit-scrollbar {
  width: 0;
  height: 0;
}


/* HOME: hide scrollbar in the scrolling main container (scroll still works) */
body[data-view="home"] .main {
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* old Edge */
}

body[data-view="home"] .main::-webkit-scrollbar {
  width: 0;
  height: 0;
}




/* HOME: centered content (no ad rails) */
.homeGrid {
  width: 100%;
  margin: 0 auto;
}

/* Keep class for future, but hide placeholders for now */
.adSpace {
  display: none !important;
}

.homeContent {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 6px 6px 0;
}

.homeHeader {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 10px 6px 6px;
  text-align: center;
}

.homeTitle {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: .2px;
  font-size: 26px;
  color: rgba(255, 255, 255, .92);
}

.homeSubtitle {
  margin: 0;
  color: rgba(255, 255, 255, .65);
  max-width: 720px;
  line-height: 1.55;
}

.cards {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 6px;
}

.cards .seoBlock {
  grid-column: 1 / -1;
}


/* Home cards: cleaner glass look */
#viewHome .gameCard,
#viewHome .dailyCard {
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);

  background: rgba(255, 255, 255, .07);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

#viewHome .gameCard {
  background: rgba(255, 255, 255, .032);
  border-color: rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  backdrop-filter: blur(10px) saturate(1.15);
  box-shadow: 0 18px 70px rgba(0, 0, 0, .30);
  transition: transform .12s ease, background .2s ease, border-color .2s ease;
}

#viewHome .gameCard:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, .042);
  border-color: rgba(255, 255, 255, .16);
}

#viewHome .cardBottom {
  background: rgba(0, 0, 0, .10);
}

#viewHome .cardArt {
  background: radial-gradient(520px 300px at 30% 25%, rgba(63, 186, 208, .18), rgba(0, 0, 0, .16));
  border-color: rgba(255, 255, 255, .10);
}

/* ===== Daily Challenge (Home) ===== */
.dailyCard {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .10);
  background:
    radial-gradient(900px 260px at 18% 30%, rgba(214, 179, 91, .18), rgba(255, 255, 255, .03)),
    radial-gradient(700px 240px at 86% 30%, rgba(63, 186, 208, .14), rgba(255, 255, 255, .02));
  box-shadow: 0 18px 70px rgba(0, 0, 0, .35);
  min-height: 150px;
  /* ~half of a gameCard */
  padding: 16px 16px 14px;
  cursor: default;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dailyCard:hover {
  background:
    radial-gradient(900px 260px at 18% 30%, rgba(214, 179, 91, .18), rgba(255, 255, 255, .03)),
    radial-gradient(700px 240px at 86% 30%, rgba(63, 186, 208, .14), rgba(255, 255, 255, .02));
}

.dailyCard:focus {
  outline: 2px solid rgba(214, 179, 91, .35);
  outline-offset: 2px;
}

.dailyCard::before {
  content: "";
  position: absolute;
  inset: -1px;
  background:
    radial-gradient(520px 260px at 20% 20%, rgba(214, 179, 91, .25), transparent 60%),
    radial-gradient(520px 260px at 85% 20%, rgba(63, 186, 208, .20), transparent 60%);
  filter: blur(14px);
  opacity: .55;
  pointer-events: none;
}

/* Daily Row (Split Layout) */
.dailyRow {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 600px) {
  .dailyRow {
    flex-direction: row;
  }
}

.dailyCard {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dailyCard.rookie {
  background:
    radial-gradient(circle at top right, rgba(45, 212, 191, 0.15), transparent 60%),
    linear-gradient(145deg, rgba(20, 184, 166, 0.12) 0%, rgba(13, 148, 136, 0.05) 100%),
    var(--surface2);
  border: 1px solid rgba(45, 212, 191, 0.35);
  box-shadow: 0 4px 20px rgba(20, 184, 166, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.dailyCard.rookie:hover {
  border-color: rgba(45, 212, 191, 0.6);
  box-shadow: 0 12px 30px rgba(20, 184, 166, 0.25);
  transform: translateY(-4px);
}

.dailyCard.rookie .dailyEyebrow {
  color: #5eead4;
  text-shadow: 0 0 10px rgba(45, 212, 191, 0.4);
}

.dailyCard.rookie .dailyBtn {
  background: #0d9488;
  color: #fff;
  border: 1px solid rgba(94, 234, 212, 0.3);
}

.dailyCard.rookie .dailyBtn:hover {
  background: #14b8a6;
  box-shadow: 0 0 15px rgba(20, 184, 166, 0.4);
  transform: translateY(-2px);
}

.dailyCard.pro {
  background:
    radial-gradient(circle at top right, rgba(192, 132, 252, 0.15), transparent 60%),
    linear-gradient(145deg, rgba(147, 51, 234, 0.12) 0%, rgba(126, 34, 206, 0.05) 100%),
    var(--surface2);
  border: 1px solid rgba(192, 132, 252, 0.35);
  box-shadow: 0 4px 20px rgba(147, 51, 234, 0.15);
  box-shadow: 0 4px 20px rgba(147, 51, 234, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Completed State - Dim content but keep badge vivid */
.dailyCard.completed .dailyBody,
.dailyCard.completed .dailyCta,
.dailyCard.completed .dailyMeta {
  opacity: 0.5;
  pointer-events: none;
}

.dailyCard.completed {
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

/* Ensure badge stays vivid */
.dailyCard.completed .streakBadge {
  opacity: 1 !important;
}

.dailyCard.pro:hover {
  border-color: rgba(192, 132, 252, 0.6);
  box-shadow: 0 12px 30px rgba(147, 51, 234, 0.25);
  transform: translateY(-4px);
}

/* --- DAILY ARCADE MODE --- */

/* Hide standard mode indicators */
body[data-daily="1"] .modePill,
body[data-daily="1"] .catMeta {
  display: none !important;
}

/* ROOKIE TIMER (Tension HUD) */
body[data-daily-type="rookie"] .tensionHud {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
  /* FIXED: Removed scale causing overlap */
  margin-bottom: 20px;
  margin-top: 10px;
  /* Added spacing */
  /* Layout Structure Change */
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 5px !important;
  width: 100% !important;
}

/* Hide the "Time" label */
body[data-daily-type="rookie"] #cdLabel {
  display: none !important;
}

/* Center countdown and ensure NO background */
body[data-daily-type="rookie"] .countdown {
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
  background: transparent !important;
  /* Fix for dark strip */
  box-shadow: none !important;
  border: none !important;
}

body[data-daily-type="rookie"] .tensionHud .time {
  color: #5eead4 !important;
  /* Green again */
  text-shadow: 0 0 10px rgba(45, 212, 191, 0.4);
  font-size: 56px !important;
  font-family: var(--display);
}

body[data-daily-type="rookie"] .tFill {
  background: #2dd4bf !important;
  /* Green Bar */
  box-shadow: 0 0 10px #2dd4bf;
}

body[data-daily-type="rookie"] .tBar {
  width: 100% !important;
  max-width: 720px !important;
  /* Adjusted to 720px */
  height: 20px !important;
  /* Kept exaggerated height */
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 999px;
  margin: 10px auto 0 !important;
  /* Center and space */
}

/* PRO TIMER (YBY Arcade) */
body[data-daily-type="pro"] .cardTop.centered {
  flex-direction: column;
  gap: 0;
}

body[data-daily-type="pro"] .dailyArcade .countdown {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-daily-type="pro"] .dailyArcade .countdown .time {
  color: #e879f9 !important;
  text-shadow: 0 0 10px rgba(216, 180, 254, 0.4);
  font-size: 56px !important;
  /* Huge Arcade Size */
  font-family: var(--display);
}

body[data-daily-type="pro"] .dailyArcade {
  margin-bottom: 10px;
}


/* Arcade Glow for Title */
body[data-daily-type="rookie"] .catName {
  color: rgba(255, 255, 255, .92) !important;
  text-shadow: none !important;
}


body[data-daily-type="pro"] .catName {
  color: rgba(255, 255, 255, .92) !important;
  text-shadow: none !important;
}

/* Arcade Glow for Year (YBY Mode) */
body[data-daily-type="rookie"] .year {
  color: #5eead4 !important;
  text-shadow: none !important;
}

body[data-daily-type="pro"] #yearPill {
  display: none !important;
}

body[data-daily-type="pro"] .year {
  color: rgba(255, 255, 255, .92) !important;
  text-shadow: none !important;
}

/* REFINEMENTS FOR ARCADE UI */
/* Removed redundant block */

/* PRO PROGRESS BAR */
body[data-daily-type="pro"] {
  --highlight: #d946ef !important;
}

body[data-daily-type="pro"] .tFill {
  background: #d946ef !important;
  box-shadow: 0 0 20px #d946ef;
}

.dailyCard.pro .dailyEyebrow {
  color: #e879f9;
  text-shadow: 0 0 10px rgba(232, 121, 249, 0.4);
}

.dailyCard.pro .dailyBtn {
  background: #7e22ce;
  color: #fff;
  border: 1px solid rgba(232, 121, 249, 0.3);
}

.dailyCard.pro .dailyBtn:hover {
  background: #9333ea;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
  transform: translateY(-2px);
}

.dailyHead {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dailyEyebrow {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  font-size: 13px;
  color: rgba(255, 255, 255, .78);
}

.streakBadge {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .30);
  user-select: none;
}

/* Daily Countdown (YBY - Daily Challenge only) */
.dailyArcade {
  width: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-direction: column;
  margin: 10px 0 6px;
}

body[data-daily="1"] #dailyArcade {
  display: flex;
}

body[data-daily="1"] #viewYBY .timer {
  display: none;
}

/* Bigger, arcade-like timer (no label) */
.dailyArcade .countdown {
  padding: 10px 16px;
  text-transform: none;
  font-size: 0;
  /* hide inherited small caps sizing */
}

.dailyArcade .countdown .time {
  font-size: 22px;
  min-width: 120px;
  text-align: center;
  letter-spacing: .6px;
}

.streakBadge .flame {
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .35));
}

.streakBadge .streakNum {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 900;
  font-size: 16px;
  color: rgba(255, 255, 255, .95);
  transform: translateY(6px);
  text-shadow: 0 10px 22px rgba(0, 0, 0, .55);
}

.dailyBody {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.dailyLeft {
  min-width: 240px;
  flex: 1 1 auto;
}

.dailyCta {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: .2px;
  text-transform: uppercase;
  font-size: 34px;
  line-height: 1.05;
  color: rgba(255, 255, 255, .95);
  text-shadow: 0 14px 40px rgba(0, 0, 0, .45);
}

.dailyMeta {
  margin-top: 8px;
  color: rgba(255, 255, 255, .68);
  line-height: 1.45;
  font-weight: 700;
}

.dailyStatus {
  margin-top: 8px;
  color: rgba(255, 255, 255, .80);
  font-weight: 900;
  letter-spacing: .2px;
}

.dailyRight {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

.dailyBtn {
  height: 52px;
  padding: 0 18px;
  border-radius: 18px;
  border: 1px solid rgba(214, 179, 91, .35);
  background: rgba(214, 179, 91, .16);
  color: rgba(255, 255, 255, .95);
  cursor: pointer;
  font-weight: 900;
  font-family: var(--display);
  letter-spacing: .2px;
  text-transform: uppercase;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .28);
}

.dailyBtn:hover {
  background: rgba(214, 179, 91, .20);
}


.gameCard {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .03);
  box-shadow: 0 18px 70px rgba(0, 0, 0, .35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 260px;
}

.cardTop {
  padding: 14px 14px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cardTopRight {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cardName {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: .6px;
  text-transform: uppercase;
  font-size: 16px;
  color: rgba(255, 255, 255, .92);
}

.miniDot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: linear-gradient(180deg, var(--gold), #8c6e28);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .25);
  flex: 0 0 auto;
}

.miniDot.blue {
  background: linear-gradient(180deg, var(--blueDot), #1d5ea1);
}

.miniDot.gray {
  background: linear-gradient(180deg, #c7ceda, #5f6b7d);
}

.customFlag {
  width: 17px;
  height: 12px;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  flex: 0 0 auto;
}

.cardArt {
  flex: 1;
  margin: 0 14px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: radial-gradient(520px 300px at 30% 25%, rgba(63, 186, 208, .16), rgba(0, 0, 0, .18));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.artSvg {
  width: 100%;
  height: 100%;
  max-height: 150px;
}

/* Make preview art pop a bit more in the setup screen */
.setupArt .artSvg {
  filter: saturate(1.25) contrast(1.08);
}

.cardBottom {
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.playBtn {
  height: 46px;
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .92);
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: .2px;
  cursor: pointer;
  font-size: 14px;
}

.playBtn:hover {
  background: rgba(255, 255, 255, .09);
}

/* SETUP/GAME: centered content (no ad rail) */
.gameGrid {
  width: 100%;
  margin: 0 auto;
}

.content {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
}

/* Category banner */
.catBanner {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0 10px;
}

.catPill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .30);
  backdrop-filter: blur(10px);
  min-width: 360px;
  justify-content: center;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 52%),
    linear-gradient(180deg, var(--dotSolid), var(--dotDark));
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .25);
}

.catName {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: 3px;
  font-size: 14px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .92);
  white-space: nowrap;
}

.catMeta {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: .2px;
  font-size: 12px;
  color: rgba(255, 255, 255, .70);
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, .12);
  margin-left: 10px;
  white-space: nowrap;
}

/* Setup panel */
.setupCard {
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .03);
  box-shadow: 0 18px 70px rgba(0, 0, 0, .35);
  overflow: hidden;
}

.setupInner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0;
}

.setupLeft {
  padding: 18px;
  border-right: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .14);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
}

.setupArt {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1.2 / 1;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: radial-gradient(520px 300px at 30% 25%, rgba(63, 186, 208, .16), rgba(0, 0, 0, .14));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.setupArt .artSvg {
  max-height: 210px;
}

.setupRight {
  padding: 18px;
}

.setupTitle {
  margin: 0 0 10px 0;
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: .2px;
  font-size: 24px;
  /* bigger as requested */
}

.setupText {
  margin: 0 0 16px 0;
  color: rgba(255, 255, 255, .68);
  line-height: 1.55;
  font-size: 14px;
}

.segLabel {
  margin: 14px 0 8px;
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: .15px;
  color: rgba(255, 255, 255, .85);
  text-transform: uppercase;
  font-size: 12px;
}

.seg {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.seg button {
  height: 46px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .90);
  cursor: pointer;
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: .2px;
  font-size: 14px;
}

.seg button:hover {
  background: rgba(255, 255, 255, .08);
}

.seg button.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accentSolid) 14%, rgba(255, 255, 255, .04));
  box-shadow: 0 0 0 6px var(--accentGlow);
  color: rgba(255, 255, 255, .95);
}

.startRow {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.startBtn {
  height: 54px;
  padding: 0 18px;
  border-radius: 18px;
  border: 1px solid rgba(214, 179, 91, .40);
  background: rgba(214, 179, 91, .16);
  color: rgba(255, 255, 255, .95);
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: .2px;
  cursor: pointer;
  flex: 1;
  font-size: 16px;
}

.startBtn:hover {
  background: rgba(214, 179, 91, .20);
}

/* GAME (centered) */
.centerTop {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(214, 179, 91, .28);
  background: rgba(214, 179, 91, .08);
  color: rgba(255, 255, 255, .90);
  font-size: 12px;
  letter-spacing: .35px;
  text-transform: uppercase;
  font-family: var(--yearfont);
  font-weight: 900;
}

.year {
  font-family: var(--yearfont);
  font-size: clamp(72px, 10vw, 96px);
  font-weight: 900;
  line-height: .95;
  letter-spacing: 1px;
  margin: 0;
  text-align: center;
  text-shadow: 0 10px 40px rgba(0, 0, 0, .35);
}

.timer {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .045);
  color: rgba(255, 255, 255, .90);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
  backdrop-filter: blur(10px);
  font-family: var(--display);
  font-weight: 900;
}

.timer .label {
  color: rgba(255, 255, 255, .70);
  font-size: 12px;
  letter-spacing: .2px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
}

.timer .time {
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  letter-spacing: .2px;
  font-size: 14px;
  color: rgba(255, 255, 255, .95);
  min-width: 92px;
  text-align: right;
  font-family: var(--display);
}

.icon {
  width: 16px;
  height: 16px;
  opacity: .85;
  display: inline-block;
}

/* Bigger bubbles (input + progress) */
.answerRow {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.answer {
  flex: 1;
  height: 64px;
  border-radius: 22px;
  border: 2px solid var(--accent);
  background: rgba(6, 10, 18, .45);
  color: var(--text);
  font-size: 20px;
  padding: 0 18px;
  outline: none;
  box-shadow: 0 0 0 7px var(--accentGlow), 0 20px 54px rgba(0, 0, 0, .32);
  transition: border-color .08s ease, box-shadow .08s ease;
}

.answer::placeholder {
  color: rgba(255, 255, 255, .40);
}

.answer:focus {
  border-color: color-mix(in srgb, var(--accentSolid) 70%, rgba(255, 255, 255, .2));
  box-shadow: 0 0 0 8px var(--accentGlow), 0 22px 64px rgba(0, 0, 0, .38);
}

.answer.ok {
  border-color: rgba(39, 192, 125, .78);
  box-shadow: 0 0 0 8px rgba(39, 192, 125, .16), 0 22px 64px rgba(0, 0, 0, .38);
}

.progressCard {
  margin-top: 14px;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  border: 1px solid rgba(255, 255, 255, .09);
  background: rgba(255, 255, 255, .03);
  border-radius: var(--r2);
  padding: 14px 14px 14px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .32);
  backdrop-filter: blur(10px);
}

.progressMeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, .75);
  font-size: 15px;
  letter-spacing: .2px;
  margin-bottom: 10px;
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
}

.bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .10);
}

.fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(63, 186, 208, .95), rgba(214, 179, 91, .95));
  transition: width .12s ease;
}

/* "Recent" embedded */
.recent {
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recentHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, .70);
  font-family: var(--display);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .2px;
  text-transform: uppercase;
}

.recentList {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: none;
  overflow: hidden;
  padding-right: 0;
}

.recentRow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .12);
}

.yrBadge {
  width: 52px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(214, 179, 91, .28);
  background: rgba(214, 179, 91, .10);
  color: rgba(255, 255, 255, .92);
  font-family: var(--display);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
  font-size: 12px;
}

.recentTxt {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.recentTxt b {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: .15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
}

.recentTxt span {
  color: rgba(255, 255, 255, .55);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Cards modes */
.cardsShell {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}

.modePill {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: .35px;
  text-transform: uppercase;
  font-size: 12px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accentSolid) 35%, rgba(255, 255, 255, .10));
  background: color-mix(in srgb, var(--accentSolid) 16%, rgba(255, 255, 255, .03));
  color: rgba(255, 255, 255, .92);
}

.tensionHud {
  width: min(980px, 96%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.countdown {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accentSolid) 45%, rgba(255, 255, 255, .10));
  background: rgba(255, 255, 255, .055);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
  backdrop-filter: blur(10px);
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: .2px;
  text-transform: uppercase;
  font-size: 12px;
}

.countdown .time {
  font-variant-numeric: tabular-nums;
  min-width: 78px;
  text-align: right;
  font-size: 14px;
}

.tBar {
  width: min(640px, 96%);
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .20);
}

.tFill {
  height: 100%;
  width: 100%;
  background: rgba(39, 192, 125, 1);
  /* green early */
  transition: width .05s linear, background-color .08s linear;
}

.cardsArea {
  width: 100%;
  height: auto;
  min-height: unset;
  max-height: unset;
  border: 1px solid rgba(255, 255, 255, .09);
  background: rgba(255, 255, 255, .03);
  border-radius: var(--r2);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .32);
  backdrop-filter: blur(10px);
  padding: 12px;
  overflow: visible;
  margin-top: 6px;
}

/* Cards view: make tiles more square without scrolling */
#viewCards .cardsArea {
  width: 100%;
  height: auto;
  min-height: unset;
  max-height: unset;
}

.cardsArea {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.cardsArea::-webkit-scrollbar {
  width: 0;
  height: 0;
}


.cardsGrid {
  --cols: 9;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  /* height is defined by square cards (aspect-ratio), not by fixed rows */
  align-content: start;
  contain: layout paint;
}

.cardsGrid.large {
  --cols: 5;
}

.cardsGrid.compact {
  --cols: 12;
  gap: 5px;
}

.flip {
  position: relative;
  width: 100%;
  aspect-ratio: 10 / 9;
  perspective: 1100px;
  perspective-origin: 50% 45%;
}

.flip.clickable {
  cursor: pointer;
  touch-action: manipulation;
}

.flip.clickable:not(.revealed):hover .flipInner {
  transform: translateY(-1px) rotateX(6deg) rotateY(-6deg);
}

.flip.clickable:not(.revealed):active .flipInner {
  transform: translateY(0px) rotateX(0deg) rotateY(0deg);
}

@media (prefers-reduced-motion: reduce) {
  .flipInner {
    transition: none !important;
  }

  .flip.clickable:not(.revealed):hover .flipInner {
    transform: none !important;
  }
}

.flipInner {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  transform-style: preserve-3d;
  transform: translateZ(0);
  transition: transform .42s cubic-bezier(.16, 1, .3, 1);
  will-change: transform;
}

.flip.revealed .flipInner {
  transform: rotateY(180deg) translateZ(1px);
}

.face {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(0, 0, 0, .18);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
  overflow: hidden;
  text-align: center;
  padding: 6px 6px;
}

.front {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: .8px;
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 10px 25px rgba(0, 0, 0, .35);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.back {
  transform: rotateY(180deg);
  border-color: color-mix(in srgb, var(--accentSolid) 35%, rgba(255, 255, 255, .12));
  background: linear-gradient(135deg,
      color-mix(in srgb, var(--accentSolid) 28%, rgba(0, 0, 0, .16)),
      rgba(0, 0, 0, .20));
  font-family: var(--display);
  font-weight: 900;
  font-size: 11px;
  letter-spacing: .15px;
  color: rgba(255, 255, 255, .95);
  line-height: 1.05;
}


/* Tension timeout coloring */
.flip.timeoutMissed {
  --accentSolid: rgba(255, 80, 80, 1);
}

.flip.timeoutCorrect {
  --accentSolid: rgba(214, 179, 91, 1);
}

.flip.timeoutMissed .face.front {
  border-color: rgba(255, 80, 80, .35);
  background: linear-gradient(135deg, rgba(255, 80, 80, .14), rgba(0, 0, 0, .22));
}

.flip.timeoutCorrect .face.front {
  border-color: rgba(214, 179, 91, .35);
  background: linear-gradient(135deg, rgba(214, 179, 91, .14), rgba(0, 0, 0, .22));
}

/* Overlays */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .58);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 300;
}

.overlay.show {
  display: flex;
}

.modal {
  width: min(760px, 100%);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(14, 18, 28, .80);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.modal.celebrate::before,
.modal.celebrate::after {
  content: "";
  position: absolute;
  inset: -120px;
  background:
    radial-gradient(circle at 20% 30%, rgba(214, 179, 91, .22), transparent 40%),
    radial-gradient(circle at 70% 20%, rgba(63, 186, 208, .20), transparent 42%),
    radial-gradient(circle at 80% 80%, rgba(255, 90, 108, .16), transparent 46%);
  filter: blur(10px);
  opacity: .9;
  pointer-events: none;
  animation: floatGlow 4.2s ease-in-out infinite;
}

.modal.celebrate::after {
  inset: -200px;
  opacity: .55;
  animation-duration: 6.2s;
}

@keyframes floatGlow {

  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }

  50% {
    transform: translate3d(0, -10px, 0) rotate(4deg);
  }
}

.confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: .9;
}

.confetti i {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 18px;
  border-radius: 3px;
  background: rgba(214, 179, 91, 1);
  animation: fall 1.8s linear infinite;
}

.confetti i:nth-child(3n) {
  background: rgba(63, 186, 208, 1);
}

.confetti i:nth-child(4n) {
  background: rgba(255, 90, 108, 1);
}

@keyframes fall {
  to {
    transform: translateY(820px) rotate(240deg);
    opacity: 0.9;
  }
}

.modalHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 6px 10px;
  position: relative;
  z-index: 2;
}

.modalHead h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: .2px;
  font-weight: 900;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .92);
}

.closeX {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .88);
  cursor: pointer;
  font-family: var(--display);
  font-weight: 900;
  position: relative;
  z-index: 2;
}

.modalBody {
  padding: 6px;
  color: rgba(255, 255, 255, .82);
  line-height: 1.55;
  position: relative;
  z-index: 2;
}

.modalBody p {
  margin: 10px 0;
}

.bigWin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 6px 4px 0;
}

.trophy {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  border: 1px solid rgba(214, 179, 91, .32);
  background: rgba(214, 179, 91, .14);
  display: grid;
  place-items: center;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .35);
  animation: pop 0.9s cubic-bezier(.2, .9, .2, 1) both;
}

@keyframes pop {
  0% {
    transform: scale(.75);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.bigTitle {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: 34px;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .95);
  text-shadow: 0 14px 40px rgba(0, 0, 0, .45);
}

.bigTime {
  font-family: var(--yearfont);
  font-weight: 900;
  font-size: 42px;
  letter-spacing: .6px;
  color: rgba(255, 255, 255, .96);
}

.subText {
  color: rgba(255, 255, 255, .75);
  margin: 0;
  max-width: 520px;
}

.btnRow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  justify-content: center;
}

.btn {
  height: 46px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .90);
  cursor: pointer;
  font-weight: 900;
  font-family: var(--display);
  letter-spacing: .2px;
}

.btn:hover {
  background: rgba(255, 255, 255, .08);
}

.btn.gold {
  border-color: rgba(214, 179, 91, .35);
  background: rgba(214, 179, 91, .16);
  color: rgba(255, 255, 255, .95);
}

.btn.gold:hover {
  background: rgba(214, 179, 91, .20);
}

/* ===== Responsive ===== */

/* Desktop zoom / narrow windows: keep the desktop structure (ChatGPT-style).
       If it doesn't fit, allow horizontal scrolling instead of collapsing. */
@media (hover: hover) and (pointer: fine) {
  body {
    overflow-y: hidden;
    overflow-x: auto;
  }

  body:not([data-view="home"]) .app {
    grid-template-columns: clamp(220px, 22vw, 250px) 1fr;
    min-width: 1040px;
  }

  body:not([data-view="home"]) .gameGrid {
    grid-template-columns: minmax(0, 1fr);
  }

  body:not([data-view="home"]) .main {
    overflow-y: auto;
    overflow-x: visible;
  }

  body:not([data-view="home"]) .adSpace {
    display: none !important;
  }
}

@media (max-width: 1180px) and (hover: none) {
  body {
    overflow: auto;
  }

  .homeGrid {
    grid-template-columns: 1fr;
  }

  .gameGrid {
    grid-template-columns: 1fr;
  }

  .adSpace {
    display: none;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .app {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100% - 74px);
    grid-template-rows: auto 1fr;
  }

  .main {
    height: auto;
    overflow: visible;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    padding: 12px 12px;
  }

  .modes {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }

  .mode {
    width: calc(50% - 5px);
  }

  .cardsArea {
    height: auto;
    min-height: unset;
    max-height: unset;
  }

  .setupInner {
    grid-template-columns: 1fr;
  }

  .setupLeft {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }

  .catPill {
    min-width: unset;
    width: min(980px, 96%);
  }
}

@media (max-width: 540px) {
  .sidebar {
    display: none !important;
  }

  .app {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100% - 74px);
    grid-template-rows: auto 1fr;
  }

  .main {
    height: auto;
    overflow: visible;
  }

  .siteHeader {
    height: 64px;
    padding: 0 12px;
  }

  .logoText {
    font-size: 26px;
  }

  .iconBtn {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .headerActions {
    gap: 8px;
  }

  .socialBtn {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .socialBtn svg {
    width: 18px;
    height: 18px;
  }

  .logoText {
    font-size: 24px;
  }

  .main {
    padding: 14px 10px 24px;
  }

  .mode {
    width: 100%;
  }

  .cardName {
    font-size: 15px;
  }

  .playBtn {
    height: 48px;
  }

  .timer {
    padding: 10px 12px;
  }

  .timer .label {
    font-size: 11px;
  }

  .timer .time {
    min-width: 86px;
  }

  .answer {
    height: 66px;
    font-size: 20px;
  }

  .progressCard {
    padding: 14px;
  }

  .recentList {
    max-height: 190px;
  }

  .cardsArea {
    height: auto;
    min-height: unset;
    padding: 10px;
  }

  .cardsGrid {
    gap: 8px;
  }

  .front {
    font-size: 12px;
  }

  .back {
    font-size: 11px;
  }
}

/* Restore Glass Effect (Modern Simple) */
#viewHome .gameCard {
  -webkit-backdrop-filter: blur(20px) saturate(1.8) !important;
  backdrop-filter: blur(20px) saturate(1.8) !important;
  background: rgba(255, 255, 255, .05) !important;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.36) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}