/* presentation.css — "Taqdimot" split-screen player uslubi */

.pres-spinner {
  width: 44px; height: 44px; margin: 22px auto 4px;
  border: 4px solid rgba(210,172,71,0.25);
  border-top-color: #AE8625;
  border-radius: 50%;
  animation: pres-spin 0.9s linear infinite;
}
@keyframes pres-spin { to { transform: rotate(360deg); } }

.pres-player-root {
  position: fixed; inset: 0; z-index: 10001; /* test-mode-banner (9999) dan yuqorida bo'lishi shart */
  display: flex;
  background: radial-gradient(circle at 50% 0%, #161616, #050505 75%);
  font-family: 'Inter', sans-serif;
  padding-bottom: 86px; /* pastdagi boshqaruv paneli uchun joy */
  box-sizing: border-box;
  overflow: hidden;
}

/* "Aurum" uslubidagi oltin low-poly chekka bezaklari — chap va o'ng
   qirralar bo'ylab diagonal chiziqlar orqali arzon, yengil taqlid */
.pres-player-root::before,
.pres-player-root::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 42px;
  background:
    repeating-linear-gradient(135deg, rgba(210,172,71,0.85) 0 2px, transparent 2px 30px),
    repeating-linear-gradient(45deg, rgba(210,172,71,0.45) 0 1.5px, transparent 1.5px 30px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}
.pres-player-root::before { left: 0; }
.pres-player-root::after { right: 0; }
.pres-player-left, .pres-player-right, .pres-controls-bar { position: relative; z-index: 1; }

.pres-player-left {
  flex: 0 0 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px;
  border-right: 1px solid rgba(210,172,71,0.25);
  position: relative;
}

.pres-avatar-video {
  width: 100%; height: 78%;
  max-width: 640px;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 0 2px rgba(210,172,71,0.4);
  object-fit: cover;
}

/* Pleyer ichidagi Navoiy videosi — ikkita video (idle/talking2) doim ishlab
   turadi, faqat opacity bilan bir-biriga crossfade qilinadi, shu bilan
   gapirish holatlari orasida qorayish/sakrash bo'lmaydi. */
.pres-avatar-video-wrap {
  position: relative;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 0 2px rgba(210,172,71,0.4);
}
.pres-avatar-video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.35s ease-in-out;
}


.pres-player-right {
  flex: 0 0 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: 20px 32px;
  gap: 16px;
  position: relative;
  overflow-y: auto;
}

.pres-controls-bar {
  position: fixed;
  left: 0; right: 0; bottom: 34px; /* test-mode-banner balandligidan yuqorida */
  z-index: 10002;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
}
.pres-controls-bar .battle-btn { min-width: 140px; }

.pres-slide-progress {
  position: absolute; top: 18px; right: 24px;
  color: rgba(255,255,255,0.6);
  font-size: 13px; letter-spacing: 0.05em;
}

/* Fan dizayni (tema) tanlanganda #presPlayerRoot'ga inline style bilan
   qo'yiladigan CSS o'zgaruvchilar — tanlanmasa standart oltin rang
   ishlatiladi (fallback qiymatlar). renderPresThemeScreen() / PRES_SUBJECTS
   (static/js/presentation.js) qarang. */
:root {
  --pres-accent-a: #D2AC47;
  --pres-accent-b: #F7EF8A;
  --pres-accent-c: #AE8625;
  --pres-accent-border: rgba(210,172,71,0.35);
  --pres-accent-border-strong: rgba(210,172,71,0.55);
  --pres-accent-bg: rgba(210,172,71,0.1);
}

.pres-slide-title {
  color: #fff;
  font-family: 'Playfair Display', 'Inter', serif;
  font-size: clamp(24px, 5.4vh, 62px);
  font-weight: 700;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  margin: 0;
  background: linear-gradient(135deg, var(--pres-accent-a) 5%, var(--pres-accent-b) 45%, var(--pres-accent-c) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pres-slide-narration {
  max-width: 94%;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--pres-accent-border);
  border-radius: 14px;
  padding: 16px 24px;
  color: var(--pres-accent-b);
  font-size: clamp(18px, 3.4vh, 30px);
  line-height: 1.5;
  text-align: center;
  margin: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.pres-slide-image-wrap {
  /* Qat'iy aspect-ratio (16/9) qutini rasmning haqiqiy nisbatiga
     qaramasdan cho'zar/torraytirar edi — "cover" bilan bu chekkalarni
     kesib tashlardi. Endi qutining balandligi ANIQLANMAYDI — rasmning
     o'zi qanday chiqqan bo'lsa (uning tabiiy balandligi), quti ham
     shunga moslashadi (rasm hech qachon kesilmaydi), faqat eni
     matn qutisi (.pres-slide-narration) bilan bir xil (94%) qilib
     cheklanadi va balandligi ekrandan chiqib ketmasligi uchun
     max-height bilan yuqori chegara qo'yiladi. */
  width: 100%; max-width: 94%;
  max-height: 78vh;
  flex: 0 1 auto;
  display: flex; align-items: center; justify-content: center;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(210,172,71,0.25);
}

/* Rasmning HAQIQIY ko'rsatilgan o'lchamiga mos ("contain" bilan torayishi
   mumkin bo'lgan) ichki konteyner — QR-kod tugmalari shu konteynerga
   nisbatan foizli (x_pct/y_pct) joylashtiriladi, shuning uchun rasm
   qanday kichraysa ham tugma aynan QR belgisi ustida qoladi. */
.pres-slide-image-inner {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.pres-qr-btn {
  position: absolute;
  width: 34px; height: 34px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #f4d878;
  color: #1e1e24;
  border: 2px solid #1e1e24;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.45);
  z-index: 3;
  animation: presQrPulse 1.8s ease-in-out infinite;
}
.pres-qr-btn:hover { filter: brightness(1.1); }

/* QR bosilganda ochiladigan yon panel — slaydning O'NG tarafidagi BO'SH
   joyda (rasm bilan ekran cheti orasida), taqdimotdan chiqib ketmasdan. */
.pres-qr-panel {
  position: fixed;
  top: 80px; right: 14px;
  width: min(30vw, 380px);
  min-width: 260px;
  background: #101014;
  border: 1px solid rgba(244,216,120,0.35);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  z-index: 2147483100;
  display: none;
  flex-direction: column;
}
.pres-qr-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.pres-qr-panel-title {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.pres-qr-panel-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pres-qr-panel-hint {
  color: rgba(255,255,255,0.75);
  font-size: 12.5px;
  line-height: 1.45;
  margin: 0;
}
.pres-qr-panel-link {
  display: block;
  text-align: center;
  color: #101014;
  background: #f4d878;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pres-qr-panel-link:hover { filter: brightness(1.08); }
.pres-qr-panel-close {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 13px;
  cursor: pointer;
}
@media (max-width: 900px) {
  .pres-qr-panel { left: 14px; right: 14px; width: auto; }
}

/* ══════════════════════════════════════════════════════════
   BOSHLANG'ICH "MUSTAHKAMLASH O'YINI" (harf/tezkor hisob) —
   sinf birgalikda, katta ekranda o'ynaydigan interaktiv slayd.
   ══════════════════════════════════════════════════════════ */
/* Elektron doskada (65") ham aniq ko'rinishi uchun — o'yin quti
   ANCHA KATTA (avval 640px bilan cheklangan edi, katta ekranda
   kichkina bo'lib qolardi). */
.pres-game-wrap{
  width:100%; max-width:min(96vw, 1100px);
  max-height: min(88dvh, 88vh);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(244,216,120,0.45) rgba(255,255,255,0.06);
  display:flex; flex-direction:column; align-items:center; gap:clamp(8px,1.6vh,14px);
  padding:clamp(12px,2.2vh,22px) 26px clamp(14px,2.4vh,26px);
  border-radius:32px;
  background: radial-gradient(circle at 50% -10%, rgba(244,216,120,0.14), rgba(255,255,255,0.03) 65%);
  border:1px solid rgba(244,216,120,0.28);
  box-shadow: 0 14px 34px rgba(0,0,0,0.28);
}
.pres-game-wrap::-webkit-scrollbar{ width:8px; }
.pres-game-wrap::-webkit-scrollbar-track{ background: rgba(255,255,255,0.05); border-radius:8px; }
.pres-game-wrap::-webkit-scrollbar-thumb{ background: rgba(244,216,120,0.45); border-radius:8px; }
.pres-game-wrap::-webkit-scrollbar-thumb:hover{ background: rgba(244,216,120,0.7); }
.pg-hero{ display:flex; align-items:center; gap:18px; }
.pg-badge{
  font-weight:800; font-size:clamp(36px,6vw,64px); line-height:1;
  color:#1e1e24;
  background: linear-gradient(160deg, #F4D878, #E0932A);
  width:1.4em; text-align:center; border-radius:22px;
  padding:0.1em 0 0.16em;
  box-shadow: 0 8px 0 #B96F1E;
  transform: rotate(-3deg);
}
.pg-title{ font-size:clamp(17px,2.4vw,26px); font-weight:700; color:#f4f0ff; margin:0; text-align:left; max-width:40ch; }

.pg-scoreboard{
  display:flex; align-items:center; gap:12px;
  background: rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.14);
  border-radius:999px; padding:clamp(6px,1.2vh,9px) 22px;
  font-weight:800; font-size:clamp(15px,1.8vw,20px); color:#f4f0ff;
}
.pg-dots{ display:flex; gap:6px; }
.pg-dots span{ width:11px; height:11px; border-radius:50%; background: rgba(255,255,255,0.22); display:inline-block; }
.pg-dots span.pg-done{ background:#4CD68A; }
.pg-dots span.pg-miss{ background:#F0555B; }

.pg-card{
  width:100%; display:flex; flex-direction:column; align-items:center; gap:14px;
}
.pg-question{ font-size:clamp(17px,2.2vw,24px); color:#e5e0f7; text-align:center; margin:0; }
.pg-question b{ color:#F4D878; }

.pg-stage{
  width:min(26vw, 190px); aspect-ratio:1;
  border-radius:30px;
  background: rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.14);
  display:flex; align-items:center; justify-content:center;
  font-size:min(14vw, 100px);
  transition: transform .18s ease;
}
.pg-stage.pg-pulse{ animation: pgPop .4s ease; }
@keyframes pgPop{ 0%{transform:scale(1);} 40%{transform:scale(1.12);} 100%{transform:scale(1);} }

.pg-word{ font-size:clamp(24px,3.2vw,36px); font-weight:800; color:#fff; letter-spacing:0.01em; }
.pg-word .pg-hl{ color:#F4D878; }

.pg-answers{ display:flex; gap:18px; width:100%; max-width:620px; }
.pg-answer-btn{
  flex:1; font-size:clamp(17px,2.2vw,24px); font-weight:700;
  padding:clamp(12px,2vh,22px) 14px; border-radius:22px; border:none; cursor:pointer;
  color:#fff; display:flex; flex-direction:column; align-items:center; gap:5px;
  transition: transform .12s ease, filter .12s ease;
}
.pg-answer-btn:active{ transform: translateY(3px); }
.pg-answer-btn:disabled{ opacity:0.55; cursor:default; }
.pg-answer-btn.pg-yes{ background: linear-gradient(160deg, #57C994, #2C9367); box-shadow:0 6px 0 #2C9367; }
.pg-answer-btn.pg-no{ background: linear-gradient(160deg, #F5767B, #D33E45); box-shadow:0 6px 0 #D33E45; }
.pg-answer-btn .pg-sub{ font-size:clamp(12px,1.3vw,15px); font-weight:600; opacity:0.85; }

.pg-feedback{ min-height:32px; font-size:clamp(16px,2vw,22px); font-weight:700; text-align:center; }
.pg-feedback.pg-good{ color:#4CD68A; }
.pg-feedback.pg-bad{ color:#F5767B; }

.pg-end{ text-align:center; }
.pg-end-emoji{ font-size:clamp(56px,7vw,88px); margin-bottom:10px; }
.pg-end h3{ font-size:clamp(24px,3.4vw,36px); margin:0 0 10px; color:#fff; }
.pg-end p{ color:#cfc6ea; margin:0 0 24px; font-size:clamp(15px,1.8vw,19px); }
.pg-restart-btn{
  font-size:clamp(16px,2vw,20px); font-weight:700; color:#1e1e24;
  background: linear-gradient(160deg, #F4D878, #E0932A);
  border:none; border-radius:16px; padding:16px 30px; cursor:pointer;
  box-shadow:0 6px 0 #B96F1E;
}
.pg-restart-btn:active{ transform: translateY(3px); box-shadow:0 2px 0 #B96F1E; }

/* DIQQAT: z-index .pres-duel-overlay (2147483200) dan BALAND bo'lishi
   shart — aks holda konfeti "Takrorlash"/"Jamoa duelli" oynasi ORQASIDA
   chizilib, umuman ko'rinmay qolardi (ovoz chiqsa ham, effekt ko'rinmasdi). */
canvas.pg-confetti{ position:fixed; inset:0; pointer-events:none; z-index:2147483300; }

@keyframes presQrPulse {
  0%, 100% { box-shadow: 0 2px 10px rgba(0,0,0,0.45), 0 0 0 0 rgba(244,216,120,0.55); }
  50% { box-shadow: 0 2px 10px rgba(0,0,0,0.45), 0 0 0 8px rgba(244,216,120,0); }
}

.pres-slide-image {
  /* "cover" endi ishlatilmaydi — u chekkalarni kesib tashlardi.
     Endi rasm o'z tabiiy nisbatida, HECH QISMI kesilmasdan ko'rsatiladi:
     eni qutining to'liq eniga (max-width:100%) cho'ziladi, balandligi
     esa shunga mos avtomatik hisoblanadi — faqat juda baland rasmlarda
     max-height chegara qo'yib, ortiqcha balandlik eniga qarab kamayadi
     ("contain" mantig'i, lekin aspect-ratio qutisiz — bo'sh joy faqat
     rasm juda tik bo'lgandagina, ehtiyot chorasi sifatida paydo bo'ladi). */
  display: block;
  width: auto; height: auto;
  max-width: 100%; max-height: 78vh;
  object-fit: contain;
  cursor: zoom-in;
}

/* Rasm bosilganda kattalashtirilgan holat — ekran markazida, deyarli
   to'liq ekranda, qorong'u fon (backdrop) ustida. Yana bir marta
   bosilsa (yoki fon bosilsa) .pres-zoomed olib tashlanadi, rasm
   avtomatik o'z joyiga (oddiy oqim ichidagi holatiga) qaytadi. */
.pres-slide-image.pres-zoomed {
  /* DIQQAT: avval "width:auto;height:auto" + faqat max-width/max-height
     ishlatilgan edi — bu rasmni HECH QACHON o'z tabiiy (kichik)
     o'lchamidan KATTA qilib bo'lmasdi (faqat kichraytirar edi, agar
     kerak bo'lsa), shuning uchun "kattalashtirish" deyarli sezilmasdi.
     Endi rasmga ANIQ (96vw x 96vh) quti beriladi va object-fit:contain
     shu quti ICHIDA (hech qismi kesilmasdan, aspekt nisbati saqlanib)
     imkon qadar KATTA qilib joylashtiradi — shu bilan ekran deyarli
     to'liq egallanadi. */
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 96vw; height: 96vh;
  object-fit: contain;
  z-index: 10005;
  cursor: zoom-out;
  border-radius: 10px;
  box-shadow: 0 20px 70px rgba(0,0,0,0.65);
}
.pres-image-zoom-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.82);
  z-index: 10004;
  cursor: zoom-out;
}

/* "Yangi bilim" rasmi (infografika) uchun kichkina "qayta yaratish"
   tugmasi — rasmda matn xatosi ko'rinsa, ustoz shu yerdan bosib yangi
   variant so'rashi mumkin. */
#presRegenBtn, #presRegenBookBtn {
  background: rgba(255,255,255,0.08);
  color: #F7EF8A;
  border: 1px solid rgba(210,172,71,0.4);
  border-radius: 10px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  margin: 0;
}
#presRegenBtn:hover, #presRegenBookBtn:hover { background: rgba(255,255,255,0.16); }
#presRegenBtn:disabled, #presRegenBookBtn:disabled { opacity: 0.5; cursor: not-allowed; }
#presRegenRow { flex-wrap: wrap; }
.pres-regen-hint {
  margin: 0;
  font-size: 11.5px;
  color: rgba(255,255,255,0.45);
  text-align: center;
}

/* "Yangi bilim" slaydida rasm TEPADA (sarlavhadan keyin), matn esa
   pastda va ixchamroq bo'lsin — .pres-player-right flex-column bo'lgani
   uchun DOM tartibini o'zgartirmasdan, "order" bilan qayta joylashtiramiz. */
.pres-yb-slide #presSlideTitle { order: 0; font-size: clamp(32px, 4.2vh, 52px); margin: 0 0 4px 0; }
.pres-yb-slide #presTopicLabel { order: 1; font-size: clamp(20px, 2.6vh, 28px); margin: 0 0 8px 0; }
.pres-yb-slide #presImageWrap {
  order: 2;
  width: 100%;
  max-width: none;
  max-height: 88vh;
}
.pres-yb-slide #presImageWrap .pres-slide-image { max-height: 88vh; }
/* Matn (narratsiya) rasm ostida, ixcham va kichikroq shriftda —
   ustoz sinfda tushuntirayotganda o'ziga eslatma/qo'llanma sifatida
   o'qib turishi uchun (o'quvchiga emas, ustozga mo'ljallangan, shuning
   uchun katta bo'lishi shart emas). */
.pres-yb-slide #presSpeech {
  order: 3;
  font-size: clamp(12px, 1.7vh, 15px);
  padding: 8px 16px;
  margin-top: 8px;
  max-width: 94%;
  opacity: 0.85;
}
.pres-yb-slide #presRegenWrap { order: 4; }



/* To'liq ekran tugmasi — pastda burchakda, kichkina */
.pres-fullscreen-btn {
  position: absolute; top: 16px; right: 66px; z-index: 5;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(210,172,71,0.4);
  background: rgba(255,255,255,0.08);
  color: #F7EF8A;
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.pres-fullscreen-btn:hover { background: rgba(255,255,255,0.16); }

.pres-slide-subtitle,
.pres-notebook-note,
.pres-closing-label {
  background: linear-gradient(135deg, var(--pres-accent-a) 5%, var(--pres-accent-b) 45%, var(--pres-accent-c) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.45));
}

/* Taqdimotning birinchi (sana + mavzu) beti — ekranni to'ldirib turadigan
   kattaroq shrift, playPresSlide() birinchi slaydga o'tganda bu klass
   olib tashlanadi (oddiy slayd sarlavhasi o'lchamiga qaytadi). */
.pres-cover-mode .pres-slide-title {
  font-size: clamp(40px, 10vh, 96px);
}
.pres-cover-mode .pres-slide-subtitle {
  font-size: clamp(24px, 5.2vh, 56px);
}
/* Sana/mavzu matni tepada emas, panelning o'rtasida bo'lsin. */
.pres-player-right.pres-cover-mode {
  justify-content: center;
}

.pres-slide-subtitle {
  font-size: clamp(16px, 2.9vh, 32px);
  font-weight: 700;
  text-align: center;
  margin: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.pres-notebook-note {
  font-size: clamp(15px, 2.4vh, 24px);
  font-weight: 700;
  text-align: center;
  margin: 4px 0 0 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.pres-fact-box {
  max-width: 92%;
  width: 100%;
  border-radius: 16px;
  padding: 10px 18px;
  margin: 6px 0 0 0;
  background: rgba(244,216,120,0.1);
  border: 1px solid rgba(244,216,120,0.35);
  color: #f4f0ff;
  font-size: clamp(12.5px, 1.8vh, 14.5px);
  line-height: 1.5;
  text-align: center;
  white-space: pre-line;
}

.pres-closing-box {
  max-width: 92%;
  width: 100%;
  border-radius: 14px;
  padding: 10px 20px;
  text-align: center;
  box-shadow: 0 6px 18px -6px rgba(0,0,0,0.5);
  overflow-wrap: break-word;
  word-break: break-word;
}
.pres-closing-box.konspekt {
  background: var(--pres-accent-bg);
  border: 1.5px solid var(--pres-accent-border-strong);
}
.pres-closing-box.homework {
  background: var(--pres-accent-bg);
  border: 1.5px solid var(--pres-accent-border-strong);
}
.pres-closing-box.amaliy {
  background: rgba(56,189,248, 0.1);
  border: 1.5px solid rgba(56,189,248, 0.5);
}
.pres-closing-box.amaliy p:not(.pres-closing-label) {
  font-size: clamp(14px, 2.3vh, 22px);
}
.pres-mini-note {
  font-size: clamp(12px, 1.8vh, 17px);
  font-style: italic;
  opacity: 0.8;
  margin: 8px 0 0 0;
  overflow-wrap: break-word;
  word-break: break-word;
}
.pres-closing-box.amaliy .pres-mini-note {
  color: #38bdf8;
}
.pres-closing-box.homework .pres-mini-note {
  color: var(--pres-accent-b);
}
.pres-closing-label {
  font-weight: 800;
  font-size: clamp(12px, 1.9vh, 19px);
  letter-spacing: 0.05em;
  margin: 0 0 4px 0;
  text-transform: uppercase;
}
.pres-closing-box p:not(.pres-closing-label) {
  color: #fff;
  font-size: clamp(16px, 2.9vh, 30px);
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
}
.pres-closing-box.homework p:not(.pres-closing-label) {
  font-size: clamp(15px, 2.5vh, 26px);
}

/* Matn bo'sh joyga sig'ish holatiga qarab moslashtiriladi — Navoiy paneli
   yonida bo'lganda joy tor bo'lsa kichrayadi (quyida); bo'sh joy ko'p
   bo'lsa esa matn shrifti to'g'ridan-to'g'ri JS orqali (fitPresRightColumn(),
   inline style bilan) proporsional kattalashtiriladi. */
.pres-player-right.pres-fit-tight .pres-slide-narration,
.pres-player-right.pres-fit-tight .pres-closing-box p:not(.pres-closing-label) {
  font-size: clamp(13px, 2.1vh, 20px) !important;
}
.pres-player-right.pres-fit-tighter .pres-slide-narration,
.pres-player-right.pres-fit-tighter .pres-closing-box p:not(.pres-closing-label) {
  font-size: clamp(11px, 1.7vh, 16px) !important;
  line-height: 1.3 !important;
}

/* Boshlash slaydidagi "bugun o'rganadigan yangi narsalar" — tagma-tag
   (vertikal), har biri o'z rangli ramkasida, mobil ekranga ham sig'adi. */
.pres-newthings-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 92%;
}
.pres-newthings-item {
  border-radius: 14px;
  padding: 12px 20px;
  text-align: center;
  box-shadow: 0 6px 18px -6px rgba(0,0,0,0.5);
}
.pres-newthings-item:nth-child(3n+1) {
  background: rgba(210,172,71, 0.12);
  border: 1.5px solid rgba(210,172,71, 0.55);
}
.pres-newthings-item:nth-child(3n+2) {
  background: rgba(56,189,248, 0.12);
  border: 1.5px solid rgba(56,189,248, 0.55);
}
.pres-newthings-item:nth-child(3n+3) {
  background: rgba(74,222,128, 0.12);
  border: 1.5px solid rgba(74,222,128, 0.55);
}
.pres-newthings-name {
  margin: 0;
  font-weight: 800;
  font-size: clamp(15px, 2.6vh, 24px);
  color: #fff;
}
.pres-newthings-desc {
  margin: 4px 0 0 0;
  font-size: clamp(13px, 2vh, 18px);
  color: rgba(255,255,255,0.85);
}

/* "Yangi bilim" slaydidagi diagramma — ketma-ket qadamlar, orasida o'q
   belgisi bilan (jarayon/algoritm/tsikl kabi mavzularda AI shakllantiradi). */
.pres-yb-diagram{
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 94%;
}
.pres-yb-step{
  background: rgba(210,172,71, 0.12);
  border: 1.5px solid rgba(210,172,71, 0.5);
  border-radius: 10px;
  padding: 8px 16px;
  color: #fff;
  font-weight: 700;
  font-size: clamp(13px, 2.2vh, 20px);
  white-space: nowrap;
}
.pres-yb-arrow{
  color: #D2AC47;
  font-size: clamp(16px, 2.6vh, 24px);
  font-weight: 700;
}

/* "Boshqa fanga integratsiya" (ko'k) va "Hayotga bog'lash" (yashil)
   slaydlari — oddiy tushuntirish matnidan rang bilan ajratiladi. */
.pres-slide-narration.pres-integratsiya {
  background: rgba(56,189,248, 0.1);
  border-color: rgba(56,189,248, 0.5);
  color: #bfe8ff;
}
.pres-slide-narration.pres-hayot {
  background: rgba(74,222,128, 0.1);
  border-color: rgba(74,222,128, 0.5);
  color: #c9f5d6;
}

.pres-closing-actions {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  padding-bottom: 4px;
}
.pres-closing-source {
  color: rgba(255,255,255,0.65);
  font-size: 12px;
  text-align: center;
  margin: 0;
}
.pres-export-status {
  color: #f4d878;
  font-size: 12.5px;
  text-align: center;
  margin: 8px 0 0 0;
  min-height: 16px;
}
.pres-closing-btns {
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.pres-closing-btns .battle-btn {
  width: auto;
  flex: 1 1 160px;
  max-width: 220px;
  padding: 9px 14px;
  font-size: 12.5px;
}

.pres-edit-toolbar {
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0 0;
}
.pres-edit-toolbar .battle-btn {
  width: auto;
  flex: 0 0 auto;
  padding: 8px 14px;
  font-size: 12.5px;
}
.pres-editable {
  outline: 2px dashed rgba(210,172,71,0.7) !important;
  outline-offset: 4px;
  border-radius: 6px;
  cursor: text;
}

.battle-btn.teal {
  color: #06281f;
  background: linear-gradient(135deg, #7ef2d6, #2dd4bf 55%, #0f8a77 100%);
  box-shadow: 0 8px 18px -4px rgba(45,212,191,0.55), inset 0 2px 2px rgba(255,255,255,0.5), inset 0 -4px 8px rgba(6,60,50,0.5);
}

/* Ustoz rejimi — Navoiy panelini vaqtincha yashirib, slaydni to'liq kengaytiradi */
.pres-halfscreen .pres-player-left { display: none; }
.pres-halfscreen .pres-player-right { flex: 1 1 100%; }

@media (max-width: 820px) {
  .pres-fullscreen-btn { top: 16px; right: 56px; }
  .pres-player-root { flex-direction: column; }
  .pres-player-left { flex: 0 0 auto; border-right: none; border-bottom: 1px solid rgba(210,172,71,0.25); padding: 14px; }
  .pres-avatar-video { max-width: 180px; height: auto; }
  .pres-avatar-video-wrap { max-width: 180px; }
  .pres-player-root { padding-bottom: 70px; }
  .pres-controls-bar { bottom: 8px; gap: 8px; }
  .pres-controls-bar .battle-btn { min-width: 90px; font-size: 12px; padding: 0 10px; }
  .pres-slide-narration { max-width: 94%; font-size: clamp(14px, 3vh, 18px); padding: 10px 14px; }
  .pres-player-right { padding: 16px; }
  .pres-player-root::before, .pres-player-root::after { width: 18px; opacity: 0.4; }
}

/* "🎨 Fan dizayni" tanlash ekrani — har bir fan uchun rang+ikonka
   ko'rsatiladigan tugmachalar grid'i. */
.pres-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 640px;
  margin: 4px 0;
}
.pres-theme-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 2px solid rgba(210,172,71,0.4);
  border-radius: 14px;
  padding: 12px 8px;
  cursor: pointer;
  color: #fff;
  font-family: 'Inter', sans-serif;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.pres-theme-swatch:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px -4px rgba(0,0,0,0.5);
}
.pres-theme-icon { font-size: 26px; }
.pres-theme-name { font-size: 11.5px; font-weight: 600; text-align: center; line-height: 1.25; }

@media (max-width: 820px) {
  .pres-theme-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
}

/* Boshlang'ich sinf (1-4) uchun quvnoqroq/yumaloqroq ko'rinish —
   yuqori sinf (5-11) uchun standart, jiddiyroq ko'rinish saqlanadi. */
.pres-age-boshlangich .pres-slide-narration,
.pres-age-boshlangich .pres-closing-box,
.pres-age-boshlangich .pres-slide-image-wrap {
  border-radius: 26px;
}
.pres-age-boshlangich .pres-theme-swatch,
.pres-age-boshlangich #presRegenBtn,
.pres-age-boshlangich #presRegenBookBtn,
.pres-age-boshlangich .battle-btn {
  border-radius: 20px;
}
.pres-age-boshlangich .pres-slide-title {
  animation: presTitleBounce 0.5s ease;
}
@keyframes presTitleBounce {
  0% { transform: scale(0.85); opacity: 0; }
  60% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); }
}

/* ══════════════════════════════════════════════════════════
   5-11-SINF "🎮 JAMOA DUELLI" — o'tgan darsni 2 jamoa bo'lib
   takrorlaydigan tezkor o'yin (Ustoz boshlash rejimi, dars oxirida).
   ══════════════════════════════════════════════════════════ */
.pres-duel-overlay{
  position: fixed; inset: 0;
  background: rgba(8,6,18,0.88);
  z-index: 2147483200;
  display: flex; align-items: center; justify-content: center;
  padding: 10px;
}
/* Elektron doskada (65") aniq ko'rinishi uchun — deyarli TO'LIQ EKRAN
   (avval 680px bilan cheklangan edi, katta ekranda kichkina/yo'qolib
   qolardi). Ichidagi .pres-game-wrap ham shu kattalikka mos kengayadi. */
/* Balandlikni QOTIRIB qo'yish o'rniga (avval "height" bilan) — endi
   FAQAT "max-height" beriladi, quti tarkibiga qarab o'zi kichraydi va
   ekranga (65" doskaning har xil o'lchamlariga ham) avtomatik moslashadi;
   katta bo'lgandagina, oxirgi chora sifatida, ichida skroll chiqadi. */
.duel-box{
  position: relative;
  width: min(97vw, 1500px);
  max-height: min(94dvh, 94vh, 980px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: linear-gradient(165deg, #241a44, #17122c);
  border: 1px solid rgba(244,216,120,0.3);
  border-radius: 30px;
  padding: clamp(14px,2.5vh,26px) clamp(18px,3vw,32px) clamp(12px,2vh,22px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(8px,1.6vh,12px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
  text-align: center;
}
/* Zamonaviy, ingichka skroll — brauzerning standart qalin/kulrang
   skrollbari o'rniga, taqdimot uslubiga mos oltin rangli. */
.duel-box, .pres-player-right {
  scrollbar-width: thin;
  scrollbar-color: rgba(244,216,120,0.45) rgba(255,255,255,0.06);
}
.duel-box::-webkit-scrollbar, .pres-player-right::-webkit-scrollbar { width: 8px; }
.duel-box::-webkit-scrollbar-track, .pres-player-right::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05); border-radius: 8px;
}
.duel-box::-webkit-scrollbar-thumb, .pres-player-right::-webkit-scrollbar-thumb {
  background: rgba(244,216,120,0.45); border-radius: 8px;
}
.duel-box::-webkit-scrollbar-thumb:hover, .pres-player-right::-webkit-scrollbar-thumb:hover {
  background: rgba(244,216,120,0.7);
}
.duel-close{
  position: absolute; top: 12px; right: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #fff; border: 1px solid rgba(255,255,255,0.2);
  font-size: 17px; cursor: pointer;
}
.duel-loading-text{ color: #cfc6ea; margin: 8px 0 0; font-size: clamp(15px,1.8vw,19px); }
.duel-topic{ color: #F4D878; font-weight: 700; font-size: clamp(16px,1.8vw,20px); margin: 4px 0 0; }

.duel-scoreboard{ display: flex; align-items: center; gap: 20px; width: 100%; justify-content: center; max-width: 700px; }
.duel-score{
  flex: 1; max-width: 300px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: clamp(8px,1.4vh,16px) 14px;
  border-radius: 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: #e5e0f7; font-weight: 700; font-size: clamp(15px,1.6vw,19px);
  transition: all .2s ease;
}
.duel-score span{ font-size: clamp(28px,3.6vw,42px); font-weight: 800; color: #fff; }
.duel-score.duel-active{
  background: rgba(244,216,120,0.14);
  border-color: rgba(244,216,120,0.55);
  box-shadow: 0 0 0 3px rgba(244,216,120,0.15);
}
.duel-vs{ font-weight: 800; color: #8b7fb0; font-size: clamp(14px,1.4vw,18px); }

.duel-turn{ color: #F4D878; font-weight: 700; font-size: clamp(15px,1.8vw,20px); margin: 0; }
.duel-question{ color: #fff; font-size: clamp(20px,2.8vw,32px); font-weight: 700; margin: 0; line-height: 1.4; max-width: 900px; }

/* 2 ustunli grid — 4 ta variantni tik ustma-ust stack qilish o'rniga
   yonma-yon joylashtirib, balandlikni deyarli 2 barobar tejaydi (shu
   sabab avval ekrandan chiqib ketardi). Variant matni uzun bo'lsa
   (masalan kod parchasi) avtomatik bitta ustunga tushadi. */
.duel-options{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 10px; width: 100%; max-width: 1000px;
}
.duel-opt{
  display: flex; align-items: center; gap: 12px;
  text-align: left;
  padding: clamp(8px,1.4vh,12px) 18px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  color: #f0ecff;
  font-size: clamp(15px,1.8vw,20px); font-weight: 600;
  cursor: pointer;
  transition: transform .1s ease, filter .1s ease;
}
.duel-opt:hover:not(:disabled){ background: rgba(255,255,255,0.09); }
.duel-opt:active:not(:disabled){ transform: translateY(2px); }
.duel-opt:disabled{ cursor: default; }
.duel-opt-letter{
  flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(15px,1.6vw,18px); font-weight: 800;
}
.duel-opt.duel-correct{ background: rgba(76,214,138,0.22); border-color: #4CD68A; }
.duel-opt.duel-correct .duel-opt-letter{ background: #4CD68A; color: #10331f; }
.duel-opt.duel-wrong{ background: rgba(245,118,123,0.22); border-color: #F5767B; }
.duel-opt.duel-wrong .duel-opt-letter{ background: #F5767B; color: #3d0f11; }

.duel-feedback{ min-height: 30px; font-size: clamp(16px,2vw,21px); font-weight: 700; margin: 0; }
.duel-feedback.duel-good{ color: #4CD68A; }
.duel-feedback.duel-bad{ color: #F5767B; }

.duel-end{ gap: 12px; padding-top: 40px; }
.duel-end-emoji{ font-size: clamp(56px,7vw,88px); }
.duel-end h3{ color: #fff; margin: 0; font-size: clamp(26px,3.4vw,38px); }
.duel-end p{ color: #cfc6ea; margin: 0 0 16px; font-weight: 700; font-size: clamp(16px,1.8vw,21px); }
/* ══════════════════════════════════════════════════════════
   JONLI NAVOIY AI (GEMINI 3.8 LIVE) TAQDIMOT ELEMENTLARI
   ══════════════════════════════════════════════════════════ */
.pres-live-btn-main {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  border: 1px solid #34d399 !important;
  box-shadow: 0 4px 18px rgba(16,185,129,0.45) !important;
  letter-spacing: 0.3px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pres-live-btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(16,185,129,0.65) !important;
}

.pres-live-status-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 280px;
  margin-top: 10px;
  z-index: 10;
}

.pres-live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.55);
  color: #6ee7b7;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
  margin-bottom: 8px;
  text-align: center;
  animation: presLivePulse 2.5s infinite;
  transition: all 0.2s ease;
}

@keyframes presLivePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45); }
  50% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
}

.pres-live-camera-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.pres-camera-book {
  position: relative !important;
  width: 140px !important;
  height: 180px !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  border: 2px solid rgba(212, 175, 55, 0.85) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.9), 0 0 16px rgba(212, 175, 55, 0.35) !important;
  background: #000 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pres-camera-book video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  background: #000 !important;
  transform: scaleX(-1);
}

.pres-camera-book .live-camera-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 5px 8px;
  background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0));
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
}

.pres-cam-toggle-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  color: #e2e8f0;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pres-cam-toggle-btn:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

.pres-live-floating-status {
  position: absolute;
  top: 16px;
  left: 20px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(10, 22, 40, 0.92);
  border: 1px solid rgba(52, 211, 153, 0.6);
  color: #34d399;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 24px;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
  animation: presLivePulse 2.5s infinite;
}
