/* ================================================================
   FAMILY FEUD — OVAL / EGG SHAPE BOARD + LOGO TOP
   Image reference: wide oval, logo above outside, fully responsive
   ================================================================ */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  width: 100%; height: 100%;
  min-height: 100vh;
  overflow: hidden;
}

body {
  background: linear-gradient(135deg, #b8d8e8 0%, #7ab0cc 40%, #4a80a8 100%);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ================================================================
   INTRO SCREEN
   ================================================================ */
#introScreen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100vw;
  height: 100vh;
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}

#introScreen #introLogo {
  width: clamp(130px, 18vw, 260px);
  max-width: 90vw;
  margin-top: clamp(16px, 4vh, 36px);
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.4));
}

#introScreen.winner-screen {
  gap: clamp(14px, 2.5vh, 28px);
}

#introScreen.winner-screen #introLogo {
  width: clamp(190px, 16vw, 310px);
  max-width: 42vw;
  margin: 0;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.45));
}

#introScreen.winner-screen .winner {
  max-width: calc(100vw - 64px);
  margin: 0;
  line-height: 1.05;
}

h1#welcomePageInfo {
  font-size: clamp(2.2rem, 8vw, 8rem) !important;
  margin: 0.2em 0 !important;
  color: #23538a;
  font-family: 'Zeyada', cursive;
  font-weight: bold;
  pointer-events: none;
}

h1#counter {
  font-size: clamp(4rem, 14vw, 13rem) !important;
  margin: 0.1em 0 !important;
  color: #23538a;
  font-family: 'Zeyada', cursive;
  font-weight: bold;
  pointer-events: none;
}

.winner {
  display: none;
  font-size: clamp(24px, 5vw, 65px);
  color: #C81717;
  text-shadow: 0 0 15px #fff, 0 0 25px #fff,
               0 0 35px #7d2a2a, 0 0 60px #7d2a2a;
  animation: flash linear 1s infinite;
}

/* ================================================================
   GAME SCREEN — logo + oval board stacked vertically, centered
   ================================================================ */
#gameScreen {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  gap: clamp(2px, 0.8vh, 10px);
  padding: clamp(8px, 1.5vw, 20px) clamp(8px, 1.5vw, 20px) clamp(34px, 5vh, 60px);
}

/* ---- LOGO BAR — outside oval, above it ---- */
#logoBar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: clamp(16px, 4vh, 36px);
}

#logoBar #idcLogo {
  /* Width-based (like the pairing/intro logos) so it reads large on a wide TV; a vh max-height
     cap keeps the oval board on-screen and preserves each language's aspect ratio (PNG vs AR SVG).
     The cap is kept modest so the logo + full board (incl. the bottom team/strike row) fit within a
     TV's visible area even with overscan. */
  width: clamp(140px, 13vw, 220px);
  height: auto;
  max-height: 14vh;
  object-fit: contain;
  filter: drop-shadow(0 3px 12px rgba(0,0,0,0.45));
}

/* ---- BOARD WRAPPER ---- */
#boardWrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 100%;
  max-width: 100vw;
  max-height: 100vh;
  overflow: hidden;
  padding: 0 10px clamp(26px, 4vh, 52px);
}

/* ================================================================
   GAME BOARD — OVAL / DIMBA SHAPE
   wide > tall  →  border-radius makes perfect oval like image
   ================================================================ */

/* LBG / DBG */
.gameBoard .cardHolder > div,
.gameBoard .LBG {
  background: linear-gradient(to bottom,
    #cedbe9 0%, #aac5de 17%, #6199c7 50%,
    #3a84c3 51%, #419ad6 59%, #4bb8f0 71%,
    #3a8bc2 84%, #26558b 100%);
}

.gameBoard .cardHolder > div:empty,
.gameBoard .score,
.gameBoard .button,
.gameBoard .DBG {
  background: linear-gradient(to bottom,
    #7db9e8 0%, #207cca 49%, #2989d8 50%, #1e5799 100%);
}

.gameBoard {
  --board-width: 1200px;
  --board-height: 620px;
  --board-pad-top: 110px;
  --board-pad-bottom: 100px;
  --board-pad-side: 180px;
  --side-score-offset: clamp(92px, 7.2vw, 132px);
  --col-width: min(72%, 1040px);
  --question-width: min(98%, 1040px);
  --question-font-size: clamp(20px, 1.7vw, 32px);
  --question-min-height: clamp(58px, 4vw, 72px);
  --question-gap-bottom: clamp(6px, 0.55vw, 10px);
  --column-gap: clamp(10px, 1vw, 18px);
  --card-height: 46px;
  --card-gap: 4px;
  --answer-stack-offset: 0px;
  --button-bottom: clamp(44px, 4vw, 72px);
  --round-top: clamp(28px, 2.35vw, 44px);
  --top-score-top: clamp(70px, 5vw, 100px);
  --round-font-size: clamp(12px, 1.1vw, 20px);
  --card-points-width: clamp(48px, 4.5vw, 72px);
  --answer-font-size: clamp(14px, 1.25vw, 22px);
  --answer-padding-left: clamp(14px, 1.2vw, 22px);
  --answer-padding-right: clamp(58px, 5vw, 86px);
  --answer-side-padding: clamp(8px, 0.9vw, 14px);
  --answer-number-width: clamp(38px, 3.1vw, 54px);
  --answer-number-height: clamp(30px, 2.4vw, 42px);
  --answer-number-font-size: clamp(16px, 1.5vw, 26px);
  position: relative;
  z-index: 1;
  font-family: helvetica, sans-serif;
  color: white;
  text-shadow: 1px 1px 3px rgba(0,0,0,1);
  text-align: center;

  /* OVAL SHAPE: width much larger than height */
  /* Using viewport units so it scales on every device */
  width: var(--board-width);
  height: var(--board-height);

  /* thick border + perfect oval border-radius */
  border: 5px solid #003c7b;
  border-radius: 50% / 47%;

  background-color: #0c4779;
  background-image:
    radial-gradient(circle, rgba(232,246,255,0.62) 0 7px, rgba(232,246,255,0.26) 8px, transparent 9px),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 38px 38px, 38px 38px, 38px 38px;
  background-position: center center;
  box-shadow: 0 4px 32px 4px rgba(0,0,0,0.55),
              inset 0 0 60px rgba(0,0,0,0.15);

  /* center content */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;

  /* padding keeps content away from curved edges */
  padding: var(--board-pad-top) var(--board-pad-side) var(--board-pad-bottom);
  overflow: hidden;
  flex-shrink: 0;
}

.gameBoard::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 15%, rgba(255,255,255,0.12), transparent 28%),
              radial-gradient(circle at 50% 85%, rgba(255,255,255,0.06), transparent 22%);
  z-index: 0;
}

.gameBoard::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 80px rgba(255,255,255,0.05), 0 0 40px rgba(255,255,255,0.06);
  border-radius: inherit;
  z-index: 2;
}

/* ---- ROUND LABEL (between team scores) ---- */
.gameBoard .roundLabel {
  position: absolute;
  left: 0; right: 0;
  /* top: var(--round-top); */
  top: 20px !important;
  margin: auto;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(180px, 18vw, 260px);
  width: fit-content;
  min-height: clamp(30px, 2.2vw, 40px);
  padding: clamp(3px, 0.4vw, 6px) clamp(6px, 0.8vw, 12px);
  font-size: var(--round-font-size);
  font-weight: bold;
  color: #fff;
  letter-spacing: 1.5px;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.9);
  border: 2px solid rgba(255,255,255,0.88);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(98,175,230,0.96), rgba(20,102,177,0.88));
  box-shadow: 0 7px 18px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.35);
  pointer-events: none;
  z-index: 8;
}

.gameBoard .fastMoneyTimer {
  position: absolute;
  left: calc(50% + clamp(58px, 5vw, 88px));
  top: calc(var(--top-score-top) + clamp(4px, 0.45vw, 8px));
  transform: none;
  min-width: clamp(96px, 7.4vw, 132px);
  min-height: clamp(40px, 3.1vw, 52px);
  padding: 3px 12px;
  border: 2px solid rgba(255,255,255,0.95);
  border-radius: 999px;
  background: linear-gradient(180deg, #f5b942 0%, #c88710 48%, #7f4a07 100%);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35), 
              inset 0 1px 0 rgba(255,255,255,0.35);
  color: #fff;
  font-size: clamp(10px, 0.9vw, 15px);
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9;
  letter-spacing: 0.5px;
  flex-direction: column;
  gap: 1px;
}

.gameBoard .fastMoneyTimer .timerLabel {
  display: block;
  font-size: clamp(8px, 0.7vw, 11px);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.gameBoard .fastMoneyTimer .timerValue {
  display: block;
  font-size: clamp(20px, 1.55vw, 30px);
  line-height: 1;
}

/* ---- SCORE BOXES ---- */
.gameBoard .score {
  position: absolute;
  text-align: center;
  margin: auto;
  font-size: clamp(24px, 2.7vw, 44px);
  height: clamp(54px, 4.6vw, 72px);
  line-height: clamp(54px, 4.6vw, 72px);
  width:  clamp(54px, 4.6vw, 72px);
  border: 2px solid white;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.22), inset 0 1px 24px 1px rgba(0,0,0,0.48);
  transition: outline-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.gameBoard .score.is-active-team {
  outline: clamp(3px, 0.45vw, 5px) solid rgba(255,246,205,0.96);
  outline-offset: clamp(3px, 0.35vw, 5px);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.95),
    0 0 22px rgba(255,231,132,0.9),
    0 8px 22px rgba(0,0,0,0.22),
    inset 0 1px 24px 1px rgba(0,0,0,0.48);
}

/* centre top score */
.gameBoard .score#boardScore {
  height: clamp(58px, 4.4vw, 72px);
  line-height: 1;
  width:  clamp(78px, 5.7vw, 100px);
  font-size: clamp(34px, 3.1vw, 52px);
  left: 0; right: 0;
  /* top: var(--top-score-top); */
  top: 62px;
  margin: auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: clamp(12px, 1.3vw, 18px);
  padding-bottom: clamp(5px, 0.7vw, 10px);
}

/* left team score */
.gameBoard .score#team1 {
  left: var(--side-score-offset);
  top: 0; bottom: 0;
  margin: auto 0;
}

/* right team score */
.gameBoard .score#team2 {
  right: var(--side-score-offset);
  top: 0; bottom: 0;
  margin: auto 0;
}

.gameBoard .teamNameLabel {
  position: absolute;
  top: calc(50% + clamp(54px, 4.8vw, 74px));
  width: clamp(108px, 8.5vw, 152px);
  min-height: clamp(30px, 2.8vw, 42px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  border: 2px solid rgba(255,255,255,0.94);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(161,209,247,0.98) 0%, rgba(74,161,230,0.98) 44%, rgba(28,113,204,0.98) 70%, rgba(21,73,145,0.98) 100%);
  box-shadow: 0 10px 22px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.45);
  color: #fff;
  font-size: clamp(10px, 0.9vw, 14px);
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 6;
}

.gameBoard .teamNameLabel1 {
  left: calc(var(--side-score-offset) + (clamp(54px, 4.6vw, 72px) / 2));
  transform: translateX(-50%);
}

.gameBoard .teamNameLabel2 {
  right: calc(var(--side-score-offset) + (clamp(54px, 4.6vw, 72px) / 2));
  transform: translateX(50%);
}

/* ---- QUESTION BAR ---- */
.gameBoard .questionHolder {
  width: min(90%, var(--question-width), 1120px) !important;
  max-width: 100%;
  margin: 0 auto var(--question-gap-bottom);
  min-height: var(--question-min-height);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--question-font-size);
  color: #003c7b;
  text-shadow: none;
  border: 1px solid #aaa;
  background: linear-gradient(180deg, #e8f4ff 0%, #d0e8ff 100%);
  padding: clamp(10px, 0.8vw, 12px) clamp(16px, 2vw, 28px);
  box-shadow:
              inset 0 2px 12px rgba(0,0,0,0.18),
              0 4px 14px rgba(0,0,0,0.18);
  border-radius: 4px;
  position: relative;
  top: -44px;
  z-index: 4;
  flex: 0 0 auto;
}

.gameBoard .questionHolder span {
  display: block;
  width: 100%;
  max-width: 100%;
  vertical-align: middle;
  line-height: 1.2;
  font-weight: 700;
  color: inherit;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  text-align: center;
}

/* ---- ANSWER GRID ---- */
.gameBoard .colHolder {
  position: relative;
  top: -25px;
  background: transparent;
  padding: 0;
  width: var(--col-width);
  min-width: 640px;
  margin: var(--answer-stack-offset) auto 0;
  border-radius: 2px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--column-gap);
  flex: 0 0 auto;
  align-content: start;
  grid-auto-rows: max-content;
}

.gameBoard.oneColumnAnswers .colHolder {
  grid-template-columns: 1fr;
}

.gameBoard.oneColumnAnswers .colHolder > .col2 {
  display: none;
}

.gameBoard .colHolder > div {
  display: flex;
  flex-direction: column;
  box-shadow: none;
  vertical-align: top;
  min-width: 0;
  align-self: start;
  flex: 1 1 0;
  min-height: 0;
}

/* ---- ANSWER CARDS ---- */
.gameBoard .cardHolder {
  display: flex;
  position: relative;
  vertical-align: top;
  height: var(--card-height);
  margin: 0;
  width: 100%;
  background: rgba(0,0,0,0.72);
  border: 3px solid rgba(0,36,78,0.98);
  border-radius: 0;
  margin-bottom: var(--card-gap);
  overflow: hidden;
  box-shadow: 0 3px 11px rgba(0,0,0,0.36);
  flex-shrink: 0;
}

.gameBoard .colHolder > div .cardHolder:last-child {
  margin-bottom: 0;
}

.gameBoard .cardHolder.empty {
  display: none;
  pointer-events: none;
}

.gameBoard .cardHolder.empty .front {
  opacity: 0.92;
}

.gameBoard .cardHolder:not(.empty) { cursor: pointer; }

.gameBoard .cardHolder b {
  position: absolute;
  right: 0;
  width: var(--card-points-width);
  height: 100%;
  border-left: 2px solid #003c7b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(11px, 1.7vw, 22px);
  z-index: 2;
  padding: 0 6px;
  background: linear-gradient(180deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.08) 45%, rgba(0,0,0,0.05) 100%);
  box-shadow: inset 1px 0 0 rgba(255,255,255,0.25);
}

.gameBoard .cardHolder span {
  margin: 0;
}

.gameBoard .cardHolder > div {
  top: -2px; left: -2px;
  margin: 0; padding: 0;
  position: absolute;
  width: 100%; height: 100%;
  border: 2px solid #003c7b;
  border-radius: 0;
  line-height: var(--card-height);
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.gameBoard .cardHolder .back {
  font-size: var(--answer-font-size);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--answer-padding-right) 0 var(--answer-padding-left);
  overflow: hidden;
  min-height: 100%;
}

.gameBoard .cardHolder .back span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: 100%;
  min-height: 100%;
  line-height: 1.1;
  font-size: var(--answer-font-size);
  font-weight: 700;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-overflow: clip;
  overflow: hidden;
  padding-inline: var(--answer-side-padding);
  transform: translateY(-1px);
}

.gameBoard .cardHolder .front { text-align: center; }

.gameBoard .cardHolder .front span {
  font-size: var(--answer-number-font-size);
  position: absolute;
  border-radius: 50%;
  height: var(--answer-number-height);
  width:  var(--answer-number-width);
  line-height: var(--answer-number-height);
  left: 0; right: 0; top: 0; bottom: 0;
  display: block;
  margin: auto;
  border: 2px solid #003c7b;
  box-shadow: inset 0 1px 6px rgba(0,0,0,0.2);
}

.gameBoard.compactAnswers .questionHolder {
  box-shadow: inset 0 2px 12px rgba(0,0,0,0.18),
              0 3px 14px rgba(0,0,0,0.16);
}

.gameBoard.compactAnswers .btnHolder {
  bottom: var(--button-bottom);
}

.gameBoard.compactAnswers .cardHolder .back span {
  white-space: normal;
  line-height: 1.02;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.gameBoard.compactAnswers .score#team1,
.gameBoard.compactAnswers .score#team2 {
  top: 0;
  bottom: 0;
}

.gameBoard.compactAnswers .teamNameLabel {
  top: calc(50% + clamp(54px, 4.8vw, 74px));
}

/* ---- CONTROL BUTTONS (bottom of oval) ---- */
.gameBoard .btnHolder {
  position: absolute;
  left: 0; right: 0;
  bottom: 23px !important;
  display: flex;
  direction: ltr;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 10px;
  z-index: 10;
}

.gameBoard .btnHolder .miss {
  background-color: red;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(8px, 1vw, 13px);
  font-weight: bold;
  height: clamp(22px, 2.45vw, 34px);
  width: 0;
  opacity: 0;
  overflow: hidden;
  border: 0 solid white;
  box-shadow: none;
  flex-shrink: 0;
  max-width: 0;
  transition: width .18s ease, max-width .18s ease, opacity .18s ease, border-width .18s ease;
}

.gameBoard .btnHolder .miss.is-visible {
  width: clamp(20px, 2vw, 30px);
  max-width: 36px;
  opacity: 1;
  border-width: 2px;
  box-shadow: 0 1px 16px rgba(0,0,0,0.45);
}

.gameBoard .btnHolder .button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(10px, 0.95vw, 14px);
  font-weight: bold;
  height: clamp(24px, 2.45vw, 34px);
  min-width: clamp(92px, 6vw, 132px);
  width: auto;
  border: 2px solid white;
  box-shadow: 0 1px 16px rgba(0,0,0,0.45);
  flex-shrink: 1;
  padding: 0 16px;
  transition: outline-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.gameBoard .btnHolder .button.is-active-team {
  outline: none;
  box-shadow:
    inset 0 0 0 3px rgba(255,246,205,0.96),
    0 0 18px rgba(255,231,132,0.7),
    0 1px 16px rgba(0,0,0,0.45);
}

.gameBoard .btnHolder .button#awardTeam1 { border-radius: 50px 0 0 50px; }
.gameBoard .btnHolder .button#awardTeam2 { border-radius: 0 50px 50px 0; }

/* Team buttons on the board are audience display only — not user-clickable.
   (The host still awards points; that path triggers a synthetic click in JS.) */
.gameBoard .btnHolder #awardTeam1,
.gameBoard .btnHolder #awardTeam2 {
  cursor: default;
  pointer-events: none;
}

.gameBoard .btnHolder #missTeam1_3 { order: 1; }
.gameBoard .btnHolder #missTeam1_2 { order: 2; }
.gameBoard .btnHolder #missTeam1_1 { order: 3; }
.gameBoard .btnHolder #awardTeam1 { order: 4; }
.gameBoard .btnHolder #newQuestion { order: 5; }
.gameBoard .btnHolder #awardTeam2 { order: 6; }
.gameBoard .btnHolder #missTeam2_1 { order: 7; }
.gameBoard .btnHolder #missTeam2_2 { order: 8; }
.gameBoard .btnHolder #missTeam2_3 { order: 9; }

[dir="rtl"] .gameBoard .cardHolder b {
  right: auto;
  left: 0;
  border-left: none;
  border-right: 2px solid #003c7b;
}

[dir="rtl"] .gameBoard .fastMoneyTimer {
  right: clamp(178px, 12.6vw, 250px);
  left: auto;
}

[dir="rtl"] .gameBoard .cardHolder .back {
  text-align: center;
  justify-content: center;
  padding: 0 var(--answer-padding-left) 0 var(--answer-padding-right);
}

[dir="rtl"] .gameBoard .cardHolder .back span {
  direction: rtl;
  text-align: center;
  justify-content: center;
  padding-inline: clamp(10px, 1.2vw, 18px);
}

[dir="rtl"] .gameBoard .teamNameLabel {
  direction: rtl;
}

[dir="rtl"] .gameBoard .btnHolder #missTeam2_3 { order: 1; }
[dir="rtl"] .gameBoard .btnHolder #missTeam2_2 { order: 2; }
[dir="rtl"] .gameBoard .btnHolder #missTeam2_1 { order: 3; }
[dir="rtl"] .gameBoard .btnHolder #awardTeam2 { order: 4; }
[dir="rtl"] .gameBoard .btnHolder #newQuestion { order: 5; }
[dir="rtl"] .gameBoard .btnHolder #awardTeam1 { order: 6; }
[dir="rtl"] .gameBoard .btnHolder #missTeam1_1 { order: 7; }
[dir="rtl"] .gameBoard .btnHolder #missTeam1_2 { order: 8; }
[dir="rtl"] .gameBoard .btnHolder #missTeam1_3 { order: 9; }

[dir="rtl"] .gameBoard .btnHolder .button#awardTeam1 {
  border-radius: 0 50px 50px 0;
}

[dir="rtl"] .gameBoard .btnHolder .button#awardTeam2 {
  border-radius: 50px 0 0 50px;
}

/* ================================================================
   MISC
   ================================================================ */
#firework {
  position: fixed; inset: 0;
  z-index: 100; pointer-events: none;
  visibility: hidden;
}

@keyframes flash         { 0%,100%{opacity:1} 50%{opacity:.1} }
@-webkit-keyframes flash { 0%,100%{opacity:1} 50%{opacity:.1} }
.pulseit { animation: pulse .5s linear infinite; }
@keyframes pulse { 0%{width:200px} 50%{width:340px} 100%{width:200px} }

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

/* Tall desktop / small screen — reduce oval height to fit */
@media screen and (max-height: 700px) {
  .gameBoard {
    --board-width: min(76vw, 1180px);
    --board-height: min(43vw, calc(100vh - 142px), 560px);
    --board-pad-top: clamp(78px, 7vw, 108px);
    --board-pad-bottom: clamp(44px, 3.7vw, 62px);
    --board-pad-side: clamp(126px, 10vw, 190px);
    --side-score-offset: clamp(48px, 4.8vw, 72px);
    --round-top: clamp(18px, 2vw, 28px);
    --top-score-top: clamp(32px, 3.4vw, 48px);
    --question-font-size: clamp(16px, 1.45vw, 24px);
    --question-min-height: clamp(44px, 3.7vw, 58px);
    --card-height: clamp(36px, 4.9vh, 50px);
    --answer-font-size: clamp(11px, 1.15vw, 16px);
  }
  #logoBar #idcLogo { width: auto; height: clamp(56px, 12vh, 104px); max-height: none; }
}

/* Tablet landscape */
@media screen and (max-width: 1024px) {
  .gameBoard {
    --board-width: min(88vw, 920px);
    --board-height: min(49vw, calc(100vh - 162px), 530px);
    --board-pad-top: clamp(84px, 9vw, 116px);
    --board-pad-bottom: clamp(42px, 4.6vw, 64px);
    --board-pad-side: clamp(78px, 9.5vw, 126px);
    --side-score-offset: clamp(30px, 4.5vw, 52px);
    --round-top: clamp(18px, 2.4vw, 28px);
    --top-score-top: clamp(34px, 4.4vw, 48px);
    --question-width: 96%;
    --col-width: 88%;
    --question-font-size: clamp(15px, 2vw, 24px);
    --question-min-height: clamp(44px, 5.5vw, 60px);
    --card-height: clamp(38px, 5.4vw, 54px);
    --answer-font-size: clamp(11px, 1.45vw, 16px);
  }
}

/* Tablet portrait */
@media screen and (max-width: 768px) {
  .gameBoard {
    --board-width: 90vw;
    --board-height: min(54vw, calc(100vh - 150px), 470px);
    --board-pad-top: clamp(62px, 9vw, 82px);
    --board-pad-bottom: clamp(32px, 5vw, 48px);
    --board-pad-side: clamp(42px, 7.2vw, 72px);
    --side-score-offset: clamp(14px, 3.2vw, 26px);
    --round-top: clamp(15px, 2.5vw, 22px);
    --top-score-top: clamp(28px, 5vw, 42px);
    --question-width: 94%;
    --col-width: 84%;
    --question-font-size: clamp(13px, 2.6vw, 19px);
    --question-min-height: clamp(38px, 6.4vw, 50px);
    --card-height: clamp(30px, 5vw, 42px);
    --answer-font-size: clamp(9px, 1.9vw, 13px);
    --answer-number-width: clamp(24px, 4.4vw, 34px);
    --answer-number-height: clamp(20px, 3.6vw, 28px);
    --answer-number-font-size: clamp(11px, 2.2vw, 16px);
  }
  #logoBar #idcLogo { width: clamp(130px, 26vw, 200px); height: auto; max-height: 14vh; }
}

/* Mobile portrait — oval becomes less wide */
@media screen and (max-width: 480px) {
  .gameBoard {
    --board-width: 94vw;
    --board-height: min(68vw, calc(100vh - 126px), 350px);
    --board-pad-top: clamp(50px, 12vw, 66px);
    --board-pad-bottom: clamp(22px, 5.6vw, 34px);
    --board-pad-side: clamp(22px, 6vw, 36px);
    --side-score-offset: clamp(4px, 1.8vw, 10px);
    --round-top: clamp(14px, 3.4vw, 20px);
    --top-score-top: clamp(26px, 6vw, 34px);
    --question-width: 92%;
    --col-width: 80%;
    --question-font-size: clamp(11px, 3vw, 15px);
    --question-min-height: clamp(32px, 8vw, 42px);
    --card-height: clamp(24px, 6vw, 32px);
    --answer-font-size: clamp(7px, 2.4vw, 10px);
    --button-bottom: 0px;
    border-width: 3px;
  }
  #logoBar #idcLogo { width: clamp(120px, 34vw, 170px); height: auto; max-height: 12vh; }
  #gameScreen { gap: clamp(4px, 1vh, 10px); }
  #introScreen.winner-screen #introLogo {
    width: clamp(150px, 36vw, 220px);
    max-width: 70vw;
  }
}

/* Landscape phones */
@media screen and (orientation: landscape) and (max-height: 500px) {
  #gameScreen { flex-direction: row; gap: clamp(8px, 2vw, 20px); padding: 4px 4px clamp(18px, 5vh, 28px); }
  #logoBar { flex-direction: column; }
  #logoBar #idcLogo { width: auto; height: clamp(44px, 22vh, 92px); max-height: none; }
  .gameBoard {
    --board-width: min(78vw, 920px);
    --board-height: min(80vh, 400px);
    --board-pad-top: clamp(70px, 18vh, 88px);
    --board-pad-bottom: clamp(16px, 4vh, 26px);
    --board-pad-side: clamp(58px, 7vw, 90px);
    --round-top: clamp(12px, 3vh, 18px);
    --top-score-top: clamp(34px, 6vh, 44px);
    --question-width: 82%;
    --col-width: 84%;
    --card-height: clamp(24px, 7vh, 36px);
    --answer-font-size: clamp(8px, 2.5vh, 12px);
    --button-bottom: 4px;
  }
}

/* ================================================================
   USER AUTHENTICATION PAGES
   ================================================================ */

body.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top left, rgba(255,255,255,0.12), transparent 28%),
              linear-gradient(135deg, #0f2e53 0%, #1c4a80 42%, #3277b1 100%);
}

.auth-panel {
  width: min(480px, 92vw);
  padding: 36px 32px;
  background: rgba(11, 26, 57, 0.94);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(12px);
}

.auth-panel h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 2.5vw, 2.4rem);
  letter-spacing: 0.02em;
  color: #ffffff;
  text-align: center;
  font-family: 'Oswald', sans-serif;
}

.auth-note {
  color: rgba(255, 255, 255, 0.76);
  margin-bottom: 24px;
  line-height: 1.6;
  text-align: center;
}

.auth-messages {
  margin-bottom: 20px;
  padding: 16px 18px;
  border-radius: 18px;
  line-height: 1.5;
}

.auth-messages p {
  margin: 0;
}

.auth-messages p + p {
  margin-top: 0.65rem;
}

.auth-error {
  background: rgba(229, 63, 72, 0.12);
  border: 1px solid rgba(229, 63, 72, 0.24);
  color: #ffd4d7;
}

.auth-success {
  background: rgba(25, 170, 132, 0.14);
  border: 1px solid rgba(25, 170, 132, 0.28);
  color: #d4f7e9;
}

.auth-messages a {
  color: #c7f6d9;
  text-decoration: underline;
}

.auth-messages a:hover {
  color: #ffffff;
}

.form-group {
  margin-bottom: 18px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #d7e6ff;
}

input[type="text"], input[type="email"], input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-sizing: border-box;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: rgba(133, 197, 255, 0.7);
  box-shadow: 0 0 0 6px rgba(133, 197, 255, 0.12);
}

button {
  width: 100%;
  padding: 14px 16px;
  background: linear-gradient(135deg, #2f68c1 0%, #0a3b82 100%);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 0.25s ease, background 0.25s ease;
}

button:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #4f8de3 0%, #1d5aa6 100%);
}

.auth-footer {
  margin-top: 22px;
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
}

.auth-footer a {
  color: #8fc9ff;
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Auth page styling */
body.auth-page {
  background: linear-gradient(135deg, #eef3fc 0%, #dee9f6 45%, #cddff1 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: auto;
}

body.auth-page.rtl {
  direction: rtl;
}

.auth-panel {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 32px 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 24px 80px rgba(22, 40, 85, 0.16);
  border: 1px solid rgba(221, 226, 241, 0.8);
  backdrop-filter: blur(18px);
}

.auth-language-switcher {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(143, 166, 204, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
}

.auth-language-switcher label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #3b4b67;
}

.auth-language-switcher select {
  border: 1px solid rgba(131, 158, 190, 0.25);
  background: rgba(255, 255, 255, 0.88);
  color: #1f3250;
  border-radius: 999px;
  padding: 10px 14px;
  min-width: 140px;
  font-weight: 600;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.08);
}

.auth-panel h1 {
  margin: 0 0 24px;
  font-size: clamp(1.9rem, 2.7vw, 2.5rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #1a2c4f;
}

.auth-note {
  margin-bottom: 18px;
  color: #5b6b88;
  font-size: 0.96rem;
  line-height: 1.7;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  color: #415073;
  font-size: 0.95rem;
  font-weight: 600;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(131, 158, 190, 0.35);
  background: #fbfdff;
  color: #1f3250;
  font-size: 1rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
  border-color: rgba(66, 116, 202, 0.65);
  box-shadow: 0 0 0 5px rgba(112, 156, 231, 0.16);
}

button {
  width: 100%;
  padding: 14px 18px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #2a70d1 0%, #0861b3 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 14px 28px rgba(18, 52, 113, 0.18);
}

button:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #3b7fdf 0%, #0d5cd0 100%);
}

.auth-messages {
  margin-bottom: 20px;
  padding: 16px 18px;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.auth-error {
  background: rgba(255, 235, 235, 0.95);
  border: 1px solid rgba(242, 153, 153, 0.6);
  color: #8c2323;
}

.auth-success {
  background: rgba(237, 247, 237, 0.95);
  border: 1px solid rgba(145, 199, 140, 0.55);
  color: #266a29;
}

.auth-footer {
  margin-top: 24px;
  text-align: center;
  color: #5f6e8a;
  font-size: 0.95rem;
}

.auth-footer a {
  color: #2a72d1;
  text-decoration: none;
  font-weight: 700;
}

.auth-footer a:hover {
  text-decoration: underline;
}

body.auth-page.rtl .auth-language-switcher {
  justify-content: flex-start;
}

/* Final login language selector override. */
body.auth-page .auth-language-switcher.lang-switcher {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: max-content;
  max-width: 100%;
  gap: 10px;
  margin: 0 0 22px;
  padding: 6px 8px;
  border: 1px solid #d9dde7;
  border-radius: 999px;
  background: #f7f8fb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

body.auth-page .auth-language-switcher.lang-switcher .lang-label {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin: 0;
  padding: 0 0 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #858b9c;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.26em;
  line-height: 1;
  text-transform: uppercase;
}

body.auth-page .auth-language-switcher.lang-switcher .lang-select {
  width: 142px;
  min-width: 142px;
  height: 42px;
  border: 1px solid #e1e5ee;
  border-radius: 999px;
  background-color: #ffffff;
  background-position: right 18px center;
  box-shadow: 0 1px 2px rgba(20, 34, 58, 0.04);
  color: #202433;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 42px;
  padding: 0 42px 0 20px;
  text-align: left;
  text-align-last: left;
}

body.auth-page.rtl .auth-language-switcher.lang-switcher {
  direction: rtl;
}

body.auth-page.rtl .auth-language-switcher.lang-switcher .lang-label {
  padding: 0 8px 0 0;
}

body.auth-page.rtl .auth-language-switcher.lang-switcher .lang-select {
  background-position: left 18px center;
  padding: 0 20px 0 42px;
  text-align: right;
  text-align-last: right;
}

/* Login language selector: compact pill, no full-container background. */
body.auth-page .auth-language-switcher.lang-switcher {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: max-content;
  max-width: 100%;
  gap: 10px;
  margin: 0 0 22px;
  padding: 6px 8px;
  border: 1px solid #d9dde7;
  border-radius: 999px;
  background: #f7f8fb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

body.auth-page .auth-language-switcher.lang-switcher .lang-label {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin: 0;
  padding: 0 0 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #858b9c;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.26em;
  line-height: 1;
  text-transform: uppercase;
}

body.auth-page .auth-language-switcher.lang-switcher .lang-select {
  width: 142px;
  min-width: 142px;
  height: 42px;
  border: 1px solid #e1e5ee;
  border-radius: 999px;
  background-color: #ffffff;
  background-position: right 18px center;
  box-shadow: 0 1px 2px rgba(20, 34, 58, 0.04);
  color: #202433;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 42px;
  padding: 0 42px 0 20px;
  text-align: left;
  text-align-last: left;
}

body.auth-page.rtl .auth-language-switcher.lang-switcher {
  direction: rtl;
}

body.auth-page.rtl .auth-language-switcher.lang-switcher .lang-label {
  padding: 0 8px 0 0;
}

body.auth-page.rtl .auth-language-switcher.lang-switcher .lang-select {
  background-position: left 18px center;
  padding: 0 20px 0 42px;
  text-align: right;
  text-align-last: right;
}

/* Final auth styling aligned with the host control panel */
body.auth-page {
  --auth-gold: #c8960a;
  --auth-gold2: #a87800;
  --auth-blue: #1a6fc4;
  --auth-blue2: #0d4a8a;
  --auth-text: #1a1d2e;
  --auth-muted: rgba(30,35,60,0.58);
  --auth-border: rgba(0,0,0,0.10);
  min-height: 100vh;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  color: var(--auth-text);
  font-family: 'DM Sans', sans-serif;
  background: #f0f2f8;
}

body.auth-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 10% 0%, rgba(26,111,196,0.08) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 100%, rgba(200,150,10,0.06) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(20,138,122,0.04) 0%, transparent 60%),
    linear-gradient(175deg, #eef0f8 0%, #f5f6fc 40%, #eef0f8 100%);
}

body.auth-page::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, transparent 0%, rgba(200,150,10,0.02) 50%, transparent 100%),
    repeating-linear-gradient(0deg, transparent, transparent 80px, rgba(0,0,0,0.008) 80px, rgba(0,0,0,0.008) 81px);
}

body.auth-page.rtl {
  direction: rtl;
  font-family: 'Cairo', 'DM Sans', sans-serif;
}

.auth-page .auth-panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  margin: 0 auto;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.09);
  border-radius: 14px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 2px 16px rgba(0,0,0,0.07), inset 0 1px 0 rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
}

.auth-page .auth-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,150,10,0.18), transparent);
}

.auth-page .auth-language-switcher {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 18px;
  padding: 5px 10px;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 99px;
  background: rgba(0,0,0,0.04);
}

.auth-page .auth-language-switcher label {
  margin: 0;
  color: var(--auth-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.auth-page .auth-language-switcher select {
  min-width: 112px;
  padding: 6px 34px 6px 14px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 999px;
  outline: none;
  color: var(--auth-text);
  background: rgba(255,255,255,0.95);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.auth-page .auth-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.auth-page .auth-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--auth-gold) 0%, var(--auth-gold2) 100%);
  box-shadow: 0 0 22px rgba(245,200,66,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
  font-family: 'Oswald', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  transform: none;
}

.auth-page .auth-header h2 {
  margin: 0;
  color: var(--auth-gold);
  font-family: 'Bebas Neue', cursive;
  font-size: 1.65rem;
  font-weight: 400;
  letter-spacing: 4px;
  line-height: 1;
  text-shadow: 0 1px 4px rgba(200,150,10,0.15);
}

.auth-page .auth-header p,
.auth-page .auth-note {
  margin: 5px 0 0;
  color: var(--auth-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.auth-page .auth-note {
  margin: 0 0 16px;
}

.auth-page .form-group {
  margin-bottom: 14px;
}

.auth-page .form-group label {
  display: block;
  margin: 0 0 6px;
  color: rgba(30,35,60,0.5);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.auth-page input[type="email"],
.auth-page input[type="password"],
.auth-page input[type="text"] {
  width: 100%;
  padding: 8px 11px;
  border: 1.5px solid rgba(0,0,0,0.12);
  border-radius: 8px;
  outline: none;
  color: var(--auth-text);
  background: rgba(255,255,255,0.9);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  transition: border-color .15s, box-shadow .15s, background .15s;
}

.auth-page input[type="email"]:focus,
.auth-page input[type="password"]:focus,
.auth-page input[type="text"]:focus {
  border-color: rgba(200,150,10,0.5);
  background: rgba(255,255,255,1);
  box-shadow: 0 0 0 3px rgba(200,150,10,0.10);
}

.auth-page input::placeholder {
  color: rgba(30,35,60,0.28);
}

.auth-page button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1.5px solid rgba(26,111,196,.5);
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(180deg, var(--auth-blue), var(--auth-blue2));
  box-shadow: 0 2px 12px rgba(26,111,196,.35);
  cursor: pointer;
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  transition: transform .15s, box-shadow .15s, background .15s;
}

.auth-page button:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg,#3b82f6,#1d4ed8);
  box-shadow: 0 5px 18px rgba(59,130,246,.45);
}

.auth-page .auth-messages {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.auth-page .auth-messages p {
  margin: 0;
}

.auth-page .auth-messages p + p {
  margin-top: 6px;
}

.auth-page .auth-error {
  color: #7f1d1d;
  border: 1px solid rgba(192,57,43,0.25);
  background: rgba(192,57,43,0.10);
}

.auth-page .auth-success {
  color: #0d6b5e;
  border: 1px solid rgba(20,138,122,0.25);
  background: rgba(20,138,122,0.10);
}

.auth-page .auth-messages a,
.auth-page .auth-footer a {
  color: var(--auth-blue);
  font-weight: 700;
  text-decoration: none;
}

.auth-page .auth-messages a:hover,
.auth-page .auth-footer a:hover {
  text-decoration: underline;
}

.auth-page .auth-footer {
  margin: 14px 0 0;
  text-align: center;
  color: var(--auth-muted);
  font-size: 12px;
  line-height: 1.4;
}

body.auth-page.rtl .auth-header {
  flex-direction: row-reverse;
  text-align: right;
}

body.auth-page.rtl .auth-logo {
  transform: none;
}

body.auth-page.rtl .auth-language-switcher {
  justify-content: flex-start;
}

body.auth-page.rtl .auth-language-switcher select {
  padding: 6px 14px;
  text-align: right;
}

body.auth-page.rtl .form-group label,
body.auth-page.rtl .auth-note,
body.auth-page.rtl .auth-footer {
  text-align: right;
}

@media screen and (max-width: 480px) {
  body.auth-page {
    padding: 14px;
    align-items: flex-start;
  }

  .auth-page .auth-panel {
    padding: 18px;
  }

  .auth-page .auth-header {
    align-items: flex-start;
  }

  .auth-page .auth-header h2 {
    font-size: 1.42rem;
    letter-spacing: 3px;
  }
}

body.auth-page.rtl .auth-language-switcher select {
  text-align: right;
}

body.auth-page.rtl .form-group label,
body.auth-page.rtl .auth-footer,
body.auth-page.rtl .auth-note {
  text-align: right;
}

.auth-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.auth-logo {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(135deg, #d6b456 0%, #d3920f 100%);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.35rem;
  box-shadow: 0 18px 30px rgba(58, 94, 147, 0.18);
}

.auth-header h2 {
  margin: 0 0 6px;
  font-family: 'Bebas Neue', cursive;
  font-size: clamp(2rem, 3.8vw, 2.6rem);
  letter-spacing: 0.18em;
  color: #1b2b4a;
}

.auth-header p {
  margin: 0;
  color: #5a6a87;
  font-size: 0.98rem;
  line-height: 1.55;
}

.auth-panel {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 36px 34px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 80px rgba(20, 44, 82, 0.14);
  border: 1px solid rgba(224, 232, 247, 0.85);
}

body.auth-page {
  background: radial-gradient(circle at top left, rgba(238, 244, 255, 0.95), rgba(246, 250, 255, 1) 37%), linear-gradient(180deg, #f2f6fb 0%, #f8fbff 100%);
}

.auth-language-switcher,
.lang-switcher {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  margin-bottom: 22px;
  padding: 8px;
  border: 1px solid rgba(190, 205, 227, 0.55);
  border-radius: 999px;
  background: rgba(230, 239, 249, 0.70);
  box-shadow: 0 1px 3px rgba(25, 45, 80, 0.08);
}

.auth-language-switcher .lang-label,
.lang-label {
  display: inline-flex;
  align-items: center;
  padding: 11px 16px;
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: #7a8b9d;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  background: transparent;
  border: none;
}

.auth-language-switcher .lang-select,
.lang-select {
  min-width: 144px;
  border-radius: 999px;
  border: 1px solid rgba(150, 180, 220, 0.40);
  background: #ffffff;
  color: #2d3d4f;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.25 6 6.25 11 1.25' fill='none' stroke='%232d3d4f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
  text-align: center;
  text-align-last: center;
}

.auth-panel button {
  background: linear-gradient(135deg, #2b769f 0%, #115496 100%);
  box-shadow: 0 16px 30px rgba(11, 54, 104, 0.18);
}

.auth-panel button:hover {
  background: linear-gradient(135deg, #3d87c0 0%, #1b62a3 100%);
}

.auth-panel input[type="email"],
.auth-panel input[type="password"],
.auth-panel input[type="text"] {
  border-radius: 16px;
  border: 1px solid rgba(143, 166, 203, 0.45);
  background: #fbfdff;
  color: #1e324c;
}

.auth-panel input[type="email"]:focus,
.auth-panel input[type="password"]:focus,
.auth-panel input[type="text"]:focus {
  border-color: rgba(87, 124, 190, 0.75);
  box-shadow: 0 0 0 6px rgba(110, 151, 215, 0.16);
}

.auth-footer {
  color: #5b6b88;
}

body.auth-page.rtl .auth-header {
  flex-direction: row-reverse;
}

body.auth-page.rtl .auth-logo {
  transform: scaleX(-1);
}

body.auth-page.rtl .auth-language-switcher {
  justify-content: flex-start;
}

body.auth-page .auth-logo {
  width: 96px;
  height: 96px;
  flex: 0 0 96px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 8px 16px rgba(38,50,120,0.22));
  transform: none;
}

body.auth-page .auth-logo img {
  width: 96px;
  height: 96px;
  display: block;
  object-fit: contain;
}

body.auth-page.rtl .auth-logo {
  transform: none;
}

/* Fixed board size and answer layout lock */
.gameBoard {
  width: 1200px;
  height: 620px;
  min-width: 1200px;
  min-height: 620px;
  max-width: 1200px;
  max-height: 620px;
}

.gameBoard .colHolder {
  min-width: 640px;
}
