/* === 1. MOD FOKUS KUIZ SAHAJA (/?role=play — TIADA TAB/MENU LAIN) === */
body.quiz-only-mode .topbar,
body.quiz-only-mode .panel:not(#tab-kuiz),
body.quiz-only-mode #svPodiumCard,
body.quiz-only-mode #svQuizOpenTabWrap {
  display: none !important;
}
body.quiz-only-mode .container {
  max-width: 780px !important;
  padding-top: 26px !important;
}
body.quiz-only-mode #tab-kuiz .grid-2 {
  grid-template-columns: 1fr !important;
}
.sv-quiz-focus-bar {
  display: none;
  justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 18px; margin-bottom: 18px; border-radius: 14px;
  background: linear-gradient(135deg, var(--emerald-950), var(--emerald-900));
  border: 1px solid var(--gold-400); color: #F8EAC4;
}
body.quiz-only-mode .sv-quiz-focus-bar { display: flex !important; }

/* === 2. JALUR PINTASAN SKOR & SERI LANGSUNG (LIVE OVERTAKE TICKER) === */
.sv-live-ticker {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%) translateY(-130%);
  z-index: 100005; min-width: min(92vw, 440px); max-width: 640px;
  padding: 13px 20px; border-radius: 14px; text-align: center;
  font-weight: 700; font-size: 0.94rem; letter-spacing: 0.01em;
  background: linear-gradient(135deg, #062119 0%, #0E3D2E 100%);
  color: #FFF6DC; border: 1.5px solid #E3C26F;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
  opacity: 0; pointer-events: none;
}
.sv-live-ticker.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.sv-live-ticker.type-overtake { border-color: #4ADE80; background: linear-gradient(135deg, #06291C, #0F4D36); }
.sv-live-ticker.type-leader { border-color: #FACC15; background: linear-gradient(135deg, #2D2006, #573B08); color: #FFF8DB; }
.sv-live-ticker.type-tie { border-color: #F59E0B; background: linear-gradient(135deg, #2B1805, #4E2C0A); }

/* === 3. PROJEKTOR PENTAS JUARA GEMPAK & MERIAH === */
.sv-proj-meta {
  display: none; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  max-width: 960px; width: 100%; margin: 0 auto 22px; padding: 14px 20px;
  border-radius: 14px; background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(227, 194, 111, 0.35);
}
#svPodiumCard.sv-proj-active .sv-proj-meta,
#svPodiumCard:fullscreen .sv-proj-meta { display: flex; }

#svConfettiCanvas {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  pointer-events: none; z-index: 100004; display: none;
}
#svPodiumCard.sv-proj-active,
#svPodiumCard:fullscreen,
#svPodiumCard:-webkit-full-screen {
  background:
    radial-gradient(circle at 20% 15%, rgba(227, 194, 111, 0.20) 0%, transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(34, 197, 94, 0.14) 0%, transparent 45%),
    linear-gradient(155deg, #03150F 0%, #082B20 55%, #041912 100%) !important;
}
#svPodiumCard.sv-proj-active .podium,
#svPodiumCard:fullscreen .podium {
  gap: 22px; margin: 22px 0 30px;
}
#svPodiumCard.sv-proj-active .pod-1,
#svPodiumCard:fullscreen .pod-1 {
  min-height: 215px;
  background: linear-gradient(180deg, rgba(227, 194, 111, 0.28) 0%, rgba(10, 48, 37, 0.92) 100%) !important;
  border-top: 5px solid #FACC15 !important;
  box-shadow: 0 0 38px rgba(227, 194, 111, 0.32);
  transform: scale(1.06);
}
#svPodiumCard.sv-proj-active .pod-2,
#svPodiumCard:fullscreen .pod-2 {
  min-height: 168px; border-top: 5px solid #E2E8F0 !important;
}
#svPodiumCard.sv-proj-active .pod-3,
#svPodiumCard:fullscreen .pod-3 {
  min-height: 140px; border-top: 5px solid #D97706 !important;
}
.sv-proj-badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: rgba(227, 194, 111, 0.2); border: 1px solid #E3C26F;
  color: #F8EAC4; font-family: 'JetBrains Mono', monospace; font-size: 0.95rem; font-weight: 700;
}

/* === 4. PETA PEMIKIRAN i-THINK LEBIH BESAR, MENARIK & TRANSISI MORPH === */
@media (min-width: 1100px) {
  body.sv-ithink-wide .container { max-width: 1400px !important; }
}
#tab-ithink .split-side {
  grid-template-columns: 270px 1fr !important; gap: 24px !important;
}
@media (max-width: 960px) {
  #tab-ithink .split-side { grid-template-columns: 1fr !important; }
}
#ithinkCanvas.imap-board {
  min-height: 360px; padding: 34px 26px !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(194, 150, 59, 0.10) 0%, transparent 65%),
    var(--surface) !important;
  border: 1.5px solid var(--border-gold) !important;
  border-radius: 18px !important;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.28s ease, transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), filter 0.28s ease;
}
#ithinkCanvas.imap-morph-out {
  opacity: 0; transform: scale(0.95) translateY(8px); filter: blur(4px);
}
#ithinkCanvas.imap-morph-in {
  animation: svMorphIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes svMorphIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); filter: blur(4px); }
  to { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}
#ithinkCanvas .imap-node {
  padding: 15px 18px !important; font-size: 0.95rem !important;
  border-radius: 14px !important;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}
#ithinkCanvas .imap-node:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 24px rgba(10, 48, 37, 0.16);
}
#ithinkCanvas .imap-hub {
  font-size: 1.12rem !important;
  box-shadow: 0 10px 26px rgba(5, 29, 22, 0.28);
}
#ithinkCanvas .imap-circle-wrap { max-width: 680px !important; padding: 32px !important; }
#ithinkCanvas .imap-circle-core { width: 142px !important; height: 142px !important; font-size: 1.1rem !important; }
#ithinkCanvas .imap-brace { max-width: 780px !important; }
#ithinkCanvas .imap-bubble { width: 205px !important; min-height: 126px !important; }

.sv-ithink-box {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px;
}
@media (max-width: 720px) { .sv-ithink-box { grid-template-columns: 1fr; } }
.sv-ithink-pill {
  padding: 12px 14px; border-radius: 11px;
  background: var(--surface-alt); border-left: 3px solid var(--gold-500);
  font-size: 0.88rem; line-height: 1.55;
}
.sv-ithink-pill.ref { border-left-color: var(--ok); }

/* === v16: MOD FOKUS KUIZ SEMATA-MATA SELEPAS KLIK MULA KUIZ === */
body.sv-quiz-active .topbar,
body.sv-quiz-active .panel:not(#tab-kuiz),
body.sv-quiz-active #tab-kuiz .section-head,
body.sv-quiz-active #svQuizSetupBox,
body.sv-quiz-active #svPodiumCard,
body.sv-quiz-active .sv-quiz-focus-bar {
  display: none !important;
}
body.sv-quiz-active .container {
  max-width: 780px !important;
  padding-top: 28px !important;
}
body.sv-quiz-active #tab-kuiz .grid-2 {
  grid-template-columns: 1fr !important;
}
body.sv-quiz-active #quizPlayArea {
  border-top: 0 !important;
  padding-top: 4px !important;
}
body.sv-quiz-active #quizPlayArea h4 {
  font-size: clamp(1.18rem, 2.2vw, 1.48rem);
  line-height: 1.42;
}

/* Selepas siap jawab: pastikan Pentas Juara sentiasa kelihatan (termasuk mod QR) */
body.sv-quiz-done #svPodiumCard {
  display: block !important;
  border-color: var(--gold-400) !important;
  box-shadow: 0 18px 46px rgba(5, 29, 22, 0.22);
}

/* === v16: NAMA PEMENANG PODIUM LEBIH BESAR & FON MENARIK === */
#podiumArea .pod-col {
  width: clamp(128px, 28%, 195px) !important;
  padding: 16px 12px !important;
}
#podiumArea .pod-col > div:nth-child(2) {
  font-family: 'Fraunces', Georgia, serif !important;
  font-weight: 700 !important;
  font-size: clamp(1.06rem, 1.8vw, 1.32rem) !important;
  line-height: 1.24 !important;
  color: #FFF8E6 !important;
  letter-spacing: -0.01em;
  margin: 8px 0 6px !important;
  word-break: break-word;
}
#podiumArea .pod-1 > div:nth-child(2) {
  font-size: clamp(1.25rem, 2.2vw, 1.62rem) !important;
  color: #FFE999 !important;
  text-shadow: 0 2px 14px rgba(250, 204, 21, 0.35);
}
#podiumArea .pod-1 .pod-rank {
  font-size: 1.65rem !important;
  color: #FACC15 !important;
}
#svPodiumCard.sv-proj-active #podiumArea .pod-1 > div:nth-child(2),
#svPodiumCard:fullscreen #podiumArea .pod-1 > div:nth-child(2) {
  font-size: clamp(1.55rem, 2.9vw, 2.25rem) !important;
}
#svPodiumCard.sv-proj-active #podiumArea .pod-2 > div:nth-child(2),
#svPodiumCard.sv-proj-active #podiumArea .pod-3 > div:nth-child(2),
#svPodiumCard:fullscreen #podiumArea .pod-2 > div:nth-child(2),
#svPodiumCard:fullscreen #podiumArea .pod-3 > div:nth-child(2) {
  font-size: clamp(1.22rem, 2.1vw, 1.65rem) !important;
}

/* === v17: TERUS MASUK PAPARAN PENUH PODIUM & LEADERBOARD SELEPAS SIAP JAWAB === */
body.sv-quiz-done #tab-kuiz .grid-2 {
  grid-template-columns: 1fr !important;
}
body.sv-quiz-done #tab-kuiz .grid-2 > .card:first-child {
  display: none !important;
}
body.sv-quiz-done #svPodiumCard {
  display: block !important;
  max-width: 920px;
  margin: 0 auto;
}
.sv-finish-banner {
  display: none;
  justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px; margin-bottom: 18px; border-radius: 12px;
  background: linear-gradient(135deg, var(--emerald-950), var(--emerald-900));
  border: 1px solid var(--gold-400); color: #FBF7EC;
}
body.sv-quiz-done .sv-finish-banner { display: flex !important; }
