/* ══════════════════════════════════════════════════════════
   BATTLE TEST — ikki o'quvchi bellashuvi
   Zamonaviy, 3D porlaydigan, o'yin-ta'lim uslubidagi dizayn.
══════════════════════════════════════════════════════════ */

#battleOverlay:empty { display: none; }

/* ── Oddiy Test (yarim ekran) — Battle Test bilan bir xil qorong'i/oltin
   uslub, lekin to'liq ekranni egallamaydi, faqat chap panel ichida. ── */
.chat-section.quiz-wide #messagesList {
  background: radial-gradient(ellipse at 50% 0%, #1a1024 0%, #0b0710 60%, #050308 100%) !important;
}
/* Test boshlanishidan (mavzu so'ralayotgan bosqichdan) boshlab hamma
   chat xabari ham shu qorong'i/oltin uslubda ko'rinsin — faqat savol
   kartalari emas. */
.chat-section.quiz-wide .msg.bot {
  background: linear-gradient(160deg, rgba(255,255,255,0.07), rgba(255,255,255,0.01)) !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  color: #fff !important;
}
.chat-section.quiz-wide .msg.user {
  background: rgba(244,216,120,0.16) !important;
  border: 1px solid rgba(244,216,120,0.45) !important;
  color: #f4d878 !important;
}
.msg.bot.quiz-battle-card,
.quiz-battle-card {
  background: linear-gradient(160deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 18px;
  padding: 18px 16px;
  box-shadow: 0 16px 40px -10px rgba(0,0,0,0.7), inset 0 1px 1px rgba(255,255,255,0.08);
  color: #fff;
  animation: battleCardIn 0.35s ease;
}
.quiz-battle-card p { color: #fff; }
.quiz-battle-opt {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  padding: 10px 12px;
  margin: 5px 0;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.quiz-battle-opt:hover { background: rgba(255,255,255,0.12); }
.quiz-battle-opt.selected {
  background: rgba(244,216,120,0.2);
  border-color: #f4d878;
  color: #f4d878;
  font-weight: 600;
}
.quiz-battle-nav-row { display: flex; gap: 8px; margin-top: 12px; }
.quiz-battle-nav-row .battle-btn { padding: 10px 14px; font-size: 13.5px; }

.battle-root {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(ellipse at 50% 0%, #1a1024 0%, #0b0710 60%, #050308 100%);
  color: #fff;
  font-family: 'Inter', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 24px;
  box-sizing: border-box;
}

.battle-card {
  width: 100%;
  max-width: 560px;
  background: linear-gradient(160deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: 0 20px 60px -10px rgba(0,0,0,0.7), inset 0 1px 1px rgba(255,255,255,0.08);
  text-align: center;
  animation: battleCardIn 0.35s ease;
}

@keyframes battleCardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.battle-title {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 6px 0;
  background: linear-gradient(135deg, #f4d878, #dc2626 65%, #f4d878);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.5px;
}

.battle-sub {
  font-size: 13.5px;
  color: rgba(255,255,255,0.65);
  margin: 0 0 22px 0;
  line-height: 1.5;
}

.battle-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  font-size: 15px;
  margin-bottom: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.battle-textarea {
  resize: vertical;
  font-family: 'Inter', sans-serif;
  min-height: 80px;
}
.battle-input:focus, .battle-textarea:focus {
  border-color: #f4d878;
  box-shadow: 0 0 0 3px rgba(244,216,120,0.18);
}

.battle-gender-toggle {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 4px;
}

.battle-gender-btn {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.battle-gender-btn.active {
  background: rgba(244,216,120,0.18);
  border-color: #f4d878;
  color: #f4d878;
}

.battle-select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  font-size: 15px;
  margin-bottom: 16px;
  outline: none;
}
.battle-select option { background: #1a1024; color: #fff; }

/* ── 3D porlaydigan tugma — battle rejimidagi barcha asosiy tugmalar ── */
.battle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  padding: 14px 20px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.25);
  color: #241a0c;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.35), rgba(255,255,255,0) 45%),
    linear-gradient(135deg, #f4d878 0%, #d4af37 55%, #a9820c 100%);
  box-shadow:
    0 8px 18px -4px rgba(212,175,55,0.55),
    inset 0 2px 2px rgba(255,255,255,0.6),
    inset 0 -4px 8px rgba(120,90,10,0.5);
  transition: transform 0.18s cubic-bezier(.34,1.56,.64,1), box-shadow 0.2s ease;
}
.battle-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 22px -4px rgba(212,175,55,0.7), inset 0 2px 2px rgba(255,255,255,0.7), inset 0 -4px 8px rgba(120,90,10,0.5); }
.battle-btn:active { transform: translateY(0) scale(0.97); }
.battle-btn:disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.4); transform: none; }

.battle-btn.ghost {
  color: #fff;
  background: rgba(255,255,255,0.06);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.12), inset 0 -2px 4px rgba(0,0,0,0.3);
}
.battle-btn.ghost:hover { background: rgba(255,255,255,0.12); }

.battle-btn.danger {
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #991b1b);
  box-shadow: 0 8px 18px -4px rgba(239,68,68,0.55), inset 0 2px 2px rgba(255,255,255,0.3), inset 0 -4px 8px rgba(80,10,10,0.5);
}

/* "O'tgan mavzuni takrorlash" (PZ_RESUME) tugmasi — allaqachon pul
   to'langan, tayyor taqdimotga qaytish imkonini beradi, shuning uchun
   boshqa barcha tugmalardan ANIQ FARQLANIB, kattaroq va ko'zga
   tashlanib turishi kerak (o'quvchi uni bexosdan yo'qotib qo'ymasin). */
.battle-btn.pz-resume-btn {
  padding: 20px 24px;
  font-size: 19px;
  font-weight: 800;
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,0.5);
  box-shadow:
    0 12px 26px -4px rgba(212,175,55,0.75),
    inset 0 2px 2px rgba(255,255,255,0.7),
    inset 0 -4px 8px rgba(120,90,10,0.5);
  animation: pzResumePulse 2.2s ease-in-out infinite;
}
@keyframes pzResumePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}
.battle-btn.pz-resume-btn:hover { animation-play-state: paused; }

.battle-rules {
  text-align: left;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
  font-size: 13.5px;
  line-height: 1.75;
  color: rgba(255,255,255,0.85);
  max-height: 74vh;
  overflow-y: auto;
}
.battle-rules b { color: #f4d878; }

.battle-close-x {
  position: absolute;
  top: 18px;
  right: 22px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 22px;
  cursor: pointer;
}
.battle-close-x:hover { color: #fff; }

/* ── ARENA: 3 ustunli maydon ── */
.battle-arena-root {
  width: 100%;
  max-width: 1500px;
  display: grid;
  grid-template-columns: 1fr minmax(290px, 320px) 1fr;
  gap: 14px;
  align-items: start;
}

.battle-topbar {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10001;
}
.battle-icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(20,14,26,0.85);
  color: #fff;
  font-size: 17px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.battle-icon-btn.muted { opacity: 0.5; }

.battle-player-col {
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  padding: 16px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
}
.battle-player-col.p1 { border-top: 3px solid #3b82f6; }
.battle-player-col.p2 { border-top: 3px solid #ec4899; }

.battle-player-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.battle-player-name { font-weight: 700; font-size: 15px; }
.battle-player-score {
  font-size: 18px;
  font-weight: 800;
  color: #f4d878;
  text-shadow: 0 0 10px rgba(244,216,120,0.5);
}

.battle-battery {
  width: 100%;
  height: 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid rgba(255,255,255,0.15);
}
.battle-battery-fill {
  height: 100%;
  width: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #22c55e, #86efac);
  transition: width linear, background-color 0.3s ease;
}
.battle-battery-fill.warn { background: linear-gradient(90deg, #f59e0b, #fde68a); }
.battle-battery-fill.danger { background: linear-gradient(90deg, #ef4444, #fca5a5); }

.battle-question-text {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.4;
}

.battle-opt-btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease, border-color 0.2s ease;
}
.battle-opt-btn:hover:not(:disabled) { background: rgba(255,255,255,0.12); transform: translateX(2px); }
.battle-opt-btn:disabled { cursor: not-allowed; }
.battle-opt-btn.correct { background: rgba(34,197,94,0.35) !important; border-color: #22c55e !important; }
.battle-opt-btn.wrong   { background: rgba(239,68,68,0.35) !important; border-color: #ef4444 !important; }

.battle-flag-btn {
  margin-top: auto;
  padding-top: 10px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
}
.battle-flag-btn.on { color: #ef4444; font-weight: 700; }

/* FINAL savol banneri — 3D, rangli, zo'r effekt */
.battle-final-banner {
  text-align: center;
  margin: 0 0 8px 0;
  padding: 8px 10px;
  border-radius: 14px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
  color: #fff5d0;
  border: 3px solid #ffe08a;
  background: linear-gradient(135deg, #ff5b5b 0%, #ef4444 35%, #7f1d1d 75%, #4c0f0f 100%);
  /* qatlamlangan soyalar — matnga 3D chuqurlik beradi */
  text-shadow:
    0 1px 0 #ffdca0,
    0 2px 0 #ffb84d,
    0 3px 0 #e08b1a,
    0 4px 0 #a5590a,
    0 5px 6px rgba(0,0,0,0.6),
    0 0 24px rgba(255,255,255,0.5);
  box-shadow:
    0 10px 0 -2px #7f1d1d,
    0 12px 20px rgba(0,0,0,0.55),
    0 0 34px rgba(239,68,68,0.85),
    inset 0 2px 2px rgba(255,255,255,0.4);
  transform: perspective(400px) rotateX(4deg);
}

.battle-status-msg {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  min-height: 18px;
}
.battle-status-msg.ok { color: #22c55e; }
.battle-status-msg.no { color: #ef4444; }

/* ── Markaz — Navoiy & 3D Ferrari Raceway ── */
.battle-center-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.battle-navoiy-frame {
  position: relative;
  width: 100%;
  max-width: 220px;
  height: 95px;
  border-radius: 14px;
  overflow: hidden;
  background: #111;
  border: 1px solid rgba(244,216,120,0.35);
  box-shadow: 0 0 20px rgba(244,216,120,0.15);
}
.battle-navoiy-frame video { width: 100%; height: 100%; object-fit: cover; }
.battle-navoiy-frame video[id^="battleNavoiyVideo"] {
  position: absolute;
  inset: 0;
  transition: opacity 0.35s ease-in-out;
}

.battle-speech {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(244,216,120,0.25);
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 12px;
  text-align: center;
  min-height: 32px;
  color: #f4d878;
}

.battle-progress {
  font-size: 11.5px;
  color: rgba(255,255,255,0.5);
  text-align: center;
  margin-top: 2px;
}

/* ══════════════════════════════════════════════════════════
   🏎️ ARGON 3D FERRARI RACEWAY
   ══════════════════════════════════════════════════════════ */
.ferrari-raceway {
  width: 100%;
  height: 350px;
  background: #090c15;
  border-radius: 18px;
  border: 1.5px solid rgba(244,216,120,0.3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.7), 0 0 24px rgba(59,130,246,0.18);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.ferrari-hud {
  padding: 6px 10px;
  background: rgba(10,12,20,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  z-index: 10;
}
.hud-p1 { color: #f87171; display: flex; align-items: center; gap: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 95px; }
.hud-p2 { color: #38bdf8; display: flex; align-items: center; gap: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 95px; }
.hud-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.hud-dot.p1-dot { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.hud-dot.p2-dot { background: #06b6d4; box-shadow: 0 0 6px #06b6d4; }
.hud-status {
  color: #f4d878;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 9.5px;
  font-weight: 800;
  text-align: center;
  flex: 1;
}

.ferrari-viewport {
  flex: 1;
  position: relative;
  perspective: 550px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 12%, #182238 0%, #080a11 75%);
}

.ferrari-track-surface {
  position: absolute;
  inset: -35px 8px -35px 8px;
  transform: rotateX(28deg);
  transform-origin: 50% 85%;
  background:
    linear-gradient(90deg,
      rgba(239,68,68,0.22) 0%,
      transparent 7%,
      transparent 93%,
      rgba(6,182,212,0.22) 100%),
    repeating-linear-gradient(180deg,
      rgba(255,255,255,0.025) 0px,
      rgba(255,255,255,0.025) 30px,
      transparent 30px,
      transparent 60px);
  border-left: 2px dashed rgba(239,68,68,0.65);
  border-right: 2px dashed rgba(6,182,212,0.65);
  box-shadow: inset 0 0 35px rgba(0,0,0,0.8);
}

.ferrari-track-divider {
  position: absolute;
  top: -120px;
  bottom: -120px;
  left: 50%;
  width: 4px;
  transform: translateX(-50%);
  background: repeating-linear-gradient(
    180deg,
    #f4d878 0px,
    #f4d878 22px,
    transparent 22px,
    transparent 44px
  );
  animation: roadScrollAnim 0.5s linear infinite;
  opacity: 0.85;
}

.ferrari-track-surface.boost-fast .ferrari-track-divider {
  animation-duration: 0.18s !important;
}

@keyframes roadScrollAnim {
  0%   { transform: translateX(-50%) translateY(0); }
  100% { transform: translateX(-50%) translateY(44px); }
}

.ferrari-finish-banner {
  position: absolute;
  top: 18px;
  left: 12px;
  right: 12px;
  height: 14px;
  background: repeating-linear-gradient(
    90deg,
    #ffffff 0px, #ffffff 10px,
    #111111 10px, #111111 20px
  );
  border-radius: 3px;
  box-shadow: 0 0 15px rgba(255,255,255,0.45);
  opacity: 0.85;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.ferrari-finish-text {
  background: #000;
  color: #f4d878;
  font-size: 8px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 2px;
  letter-spacing: 2px;
}

/* CAR SLOTS */
.ferrari-slot {
  position: absolute;
  bottom: 25px;
  width: 80px;
  height: 140px;
  transition: bottom 0.85s cubic-bezier(0.22, 1, 0.36, 1), transform 0.4s ease;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ferrari-slot.lane-p1 { left: 24px; }
.ferrari-slot.lane-p2 { right: 24px; }

.ferrari-slot.nitro-active {
  animation: nitroSurgeAnim 0.35s ease infinite alternate;
}
@keyframes nitroSurgeAnim {
  0%   { transform: translateY(-4px) scale(1.03); }
  100% { transform: translateY(0px) scale(1); }
}

.ferrari-slot.skid-active {
  animation: carSkidAnim 0.5s ease-in-out;
}
@keyframes carSkidAnim {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(-8deg) translateX(-4px); }
  50%  { transform: rotate(7deg) translateX(4px); }
  75%  { transform: rotate(-4deg); }
  100% { transform: rotate(0deg); }
}

.ferrari-slot.winner-drift {
  animation: winnerDriftAnim 1.6s ease-out forwards;
}
@keyframes winnerDriftAnim {
  0%   { transform: translateY(0) rotate(0deg) scale(1); }
  40%  { transform: translateY(-30px) rotate(-22deg) scale(1.08); }
  80%  { transform: translateY(-40px) rotate(15deg) scale(1.05); }
  100% { transform: translateY(-35px) rotate(0deg) scale(1.06); }
}

.ferrari-car-label {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 6px;
  margin-bottom: 2px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  white-space: nowrap;
  max-width: 75px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lane-p1 .ferrari-car-label { background: rgba(220,38,38,0.88); color: #fff; }
.lane-p2 .ferrari-car-label { background: rgba(2,132,199,0.88); color: #fff; }

.ferrari-svg {
  width: 70px;
  height: 120px;
}
.lane-p1 .ferrari-svg {
  filter: drop-shadow(0 4px 12px rgba(220,38,38,0.55)) drop-shadow(0 10px 16px rgba(0,0,0,0.85));
}
.lane-p2 .ferrari-svg {
  filter: drop-shadow(0 4px 12px rgba(6,182,212,0.55)) drop-shadow(0 10px 16px rgba(0,0,0,0.85));
}

/* NITRO EXHAUST FLAMES */
.nitro-flames {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 32px;
  display: flex;
  justify-content: space-between;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.nitro-active .nitro-flames,
.winner-drift .nitro-flames {
  opacity: 1;
}

.flame-jet {
  width: 12px;
  height: 32px;
  background: radial-gradient(ellipse at 50% 10%, #fff 10%, #fef08a 30%, #ea580c 70%, transparent 95%);
  border-radius: 50% 50% 70% 70% / 30% 30% 80% 80%;
  filter: drop-shadow(0 0 8px #f97316) drop-shadow(0 0 14px #ef4444);
  animation: flameFlickerAnim 0.1s infinite alternate;
}
.lane-p2 .flame-jet {
  background: radial-gradient(ellipse at 50% 10%, #fff 10%, #67e8f9 35%, #0284c7 75%, transparent 95%);
  filter: drop-shadow(0 0 8px #38bdf8) drop-shadow(0 0 14px #06b6d4);
}

@keyframes flameFlickerAnim {
  0%   { transform: scaleY(0.85) scaleX(0.9); opacity: 0.9; }
  100% { transform: scaleY(1.35) scaleX(1.12); opacity: 1; }
}

.smoke-puff {
  position: absolute;
  bottom: -10px;
  width: 16px;
  height: 16px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  filter: blur(4px);
  opacity: 0;
  pointer-events: none;
}
.nitro-active .smoke-puff,
.winner-drift .smoke-puff {
  animation: smokeDriftAnim 0.6s infinite;
}
@keyframes smokeDriftAnim {
  0%   { transform: translateY(0) scale(0.6); opacity: 0.6; }
  100% { transform: translateY(24px) scale(2.2); opacity: 0; }
}

/* ── Moslashtirish (final) ── */
.battle-match-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.battle-match-left { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,0.06); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.battle-match-select { flex: 1; min-width: 0; padding: 7px 8px; border-radius: 8px; background: rgba(255,255,255,0.06); color: #fff; border: 1px solid rgba(255,255,255,0.18); font-size: 12.5px; }
.battle-match-select option { background: #1a1024; }

/* ── G'alaba ekrani ── */
.battle-victory-title {
  font-size: 30px;
  font-weight: 900;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #f4d878, #fff, #f4d878);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 30px rgba(244,216,120,0.5);
}
.battle-victory-video {
  width: 100%;
  max-width: 420px;
  border-radius: 16px;
  margin: 14px 0;
  box-shadow: 0 0 40px rgba(244,216,120,0.35);
}
.battle-score-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 14px 0;
}
.battle-score-box {
  padding: 12px 20px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  min-width: 120px;
}
.battle-score-box .name { font-size: 13px; color: rgba(255,255,255,0.7); margin-bottom: 4px; }
.battle-score-box .pts  { font-size: 22px; font-weight: 800; color: #f4d878; }
.battle-score-box.winner { border-color: #f4d878; box-shadow: 0 0 20px rgba(244,216,120,0.4); }

.battle-winner-reveal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.battle-winner-name-pop {
  animation: battleWinnerPop 0.6s cubic-bezier(.34,1.56,.64,1);
}
.battle-winner-name-box {
  margin-top: 18px;
  padding: 16px 32px;
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
  text-align: center;
  font-size: 26px;
  font-weight: 900;
  color: #241a0c;
  border-radius: 18px;
  border: 3px solid #ffe9a8;
  background: linear-gradient(135deg, #f4d878 0%, #d4af37 55%, #a9820c 100%);
  box-shadow: 0 10px 24px -4px rgba(212,175,55,0.6), inset 0 2px 2px rgba(255,255,255,0.6);
}
@keyframes battleWinnerPop {
  0%   { transform: scale(0.2); opacity: 0; }
  60%  { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); }
}

.battle-challenge-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0;
}
.battle-challenge-item {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  font-size: 12.5px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}
.battle-challenge-item:hover { background: rgba(244,216,120,0.15); border-color: #f4d878; }

.battle-challenge-picked {
  font-size: 16px;
  font-weight: 700;
  color: #f4d878;
  background: rgba(244,216,120,0.1);
  border: 1px solid rgba(244,216,120,0.35);
  border-radius: 14px;
  padding: 16px;
  margin: 14px 0;
}

.battle-review-box {
  text-align: left;
  max-height: 30vh;
  overflow-y: auto;
  margin: 14px 0;
  padding-right: 4px;
}
.battle-review-item {
  font-size: 12.5px;
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 6px;
  background: rgba(255,255,255,0.05);
}

@media (max-width: 980px) {
  .battle-arena-root { grid-template-columns: 1fr; }
  .battle-center-col { order: -1; }
  .battle-navoiy-frame { aspect-ratio: 16/7; }
}

/* 3-2-1 sanoq — Battle Test "Boshlash" bosilgach, arena render qilinishidan
   oldin ko'rsatiladigan yengil (faqat CSS, video/audio fayllarsiz) sanoq. */
.battle-countdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 10070;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
}
.battle-countdown-num {
  font-size: 140px;
  font-weight: 800;
  color: #f4d878;
  text-shadow: 0 0 30px rgba(244,216,120,0.6);
}
.battle-countdown-num.pop {
  animation: battleCountdownPop 0.6s ease-out;
}
@keyframes battleCountdownPop {
  0%   { transform: scale(0.4); opacity: 0; }
  30%  { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 0.85; }
}


/* ══════════════════════════════════════════════════════════
   🎛️ BATTLE MODE SWITCHER (Ferrari vs Arqon)
   ══════════════════════════════════════════════════════════ */
.battle-mode-switcher {
  display: flex;
  gap: 8px;
  background: rgba(0,0,0,0.4);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(244,216,120,0.25);
  margin-bottom: 6px;
  width: 100%;
  box-sizing: border-box;
}
.battle-mode-tab {
  flex: 1;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.65);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.battle-mode-tab:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}
.battle-mode-tab.active {
  background: linear-gradient(135deg, #f4d878, #eab308);
  color: #111;
  box-shadow: 0 2px 10px rgba(244,216,120,0.4);
  font-weight: 800;
}

/* ══════════════════════════════════════════════════════════
   🪢 MILLIY ARQON TORTISH (Tug-of-War Arena)
   ══════════════════════════════════════════════════════════ */
.arqon-arena {
  width: 100%;
  height: 350px;
  background: #0d121f;
  border-radius: 18px;
  border: 1.5px solid rgba(244,216,120,0.35);
  box-shadow: 0 8px 32px rgba(0,0,0,0.8), 0 0 24px rgba(59,130,246,0.18);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.arqon-hud {
  padding: 6px 10px;
  background: rgba(10,14,24,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  z-index: 10;
}
.arqon-hud .hud-p1 { color: #38bdf8; display: flex; align-items: center; gap: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 95px; }
.arqon-hud .hud-p2 { color: #f87171; display: flex; align-items: center; gap: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 95px; }
.arqon-hud .hud-dot.p1-dot { background: #0284c7; box-shadow: 0 0 6px #38bdf8; }
.arqon-hud .hud-dot.p2-dot { background: #dc2626; box-shadow: 0 0 6px #f87171; }
.arqon-hud .hud-status {
  color: #f4d878;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 9.5px;
  font-weight: 800;
  text-align: center;
  flex: 1;
}

.arqon-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #1a233a 0%, #080b12 85%);
}

.arqon-floor {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 110px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(15,23,42,0.95) 100%);
  border-top: 1.5px solid rgba(255,255,255,0.12);
}

.arqon-center-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  border-left: 2px dashed rgba(244,216,120,0.65);
  z-index: 3;
}

.arqon-zone-left {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 48px;
  border-left: 2px dashed rgba(56,189,248,0.5);
}
.arqon-zone-right {
  position: absolute;
  top: 8px;
  bottom: 8px;
  right: 48px;
  border-left: 2px dashed rgba(239,68,68,0.5);
}

.arqon-stage {
  position: absolute;
  inset: 0;
  transition: transform 0.65s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 5;
}

.arqon-rope {
  position: absolute;
  top: 154px;
  left: -60px;
  right: -60px;
  height: 8px;
  background: repeating-linear-gradient(
    -45deg,
    #d97706 0px, #d97706 5px,
    #78350f 5px, #78350f 10px,
    #f59e0b 10px, #f59e0b 13px
  );
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.8), inset 0 1px 1px rgba(255,255,255,0.3);
  z-index: 6;
}

.arqon-ribbon {
  position: absolute;
  top: 154px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 32px;
  background: #ef4444;
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 50% 75%, 0% 100%);
  box-shadow: 0 0 10px rgba(239,68,68,0.9);
  z-index: 8;
  animation: arqonRibbonFlutter 0.8s ease-in-out infinite alternate;
}
@keyframes arqonRibbonFlutter {
  0%   { transform: translateX(-50%) rotate(-6deg); }
  100% { transform: translateX(-50%) rotate(6deg); }
}

.team-group {
  position: absolute;
  top: 60px;
  height: 200px;
  display: flex;
  align-items: flex-end;
  z-index: 7;
}
.team-blue {
  right: 50%;
  margin-right: 14px;
}
.team-red {
  left: 50%;
  margin-left: 14px;
}

.pull-anim-blue {
  animation: pullLeftAnim 0.35s ease infinite alternate;
}
.pull-anim-red {
  animation: pullRightAnim 0.35s ease infinite alternate;
}

@keyframes pullLeftAnim {
  0%   { transform: translateX(0) rotate(0deg); }
  100% { transform: translateX(-10px) rotate(-3deg); }
}
@keyframes pullRightAnim {
  0%   { transform: translateX(0) rotate(0deg); }
  100% { transform: translateX(10px) rotate(3deg); }
}

.slip-left {
  animation: slipLeftAnim 0.5s ease-in-out;
}
@keyframes slipLeftAnim {
  0%   { transform: translateX(0); }
  35%  { transform: translateX(12px) rotate(4deg); }
  100% { transform: translateX(0); }
}
.slip-right {
  animation: slipRightAnim 0.5s ease-in-out;
}
@keyframes slipRightAnim {
  0%   { transform: translateX(0); }
  35%  { transform: translateX(-12px) rotate(-4deg); }
  100% { transform: translateX(0); }
}
