/* ========================================================
   QUIZ HUNTER - CBT BEBEK & FIREBASE EXTENSION CSS
   ======================================================== */
.hidden {
  display: none !important;
}

.btn-game-primary {
  background: linear-gradient(180deg, #ffb703 0%, #fb8500 100%);
  color: #ffffff;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 900;
  padding: 16px 28px;
  border-radius: 50px;
  border: none;
  box-shadow: 0 8px 0 #c85a00, 0 14px 25px rgba(251, 133, 0, 0.45);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  font-family: inherit;
}
.btn-game-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 0 #c85a00, 0 16px 28px rgba(251, 133, 0, 0.55);
}
.btn-game-primary:active {
  transform: translateY(6px);
  box-shadow: 0 2px 0 #c85a00, 0 6px 12px rgba(251, 133, 0, 0.35);
}

.btn-game-secondary {
  background: linear-gradient(180deg, #ffffff 0%, #caf0f8 100%);
  color: #03045e;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 800;
  padding: 13px 22px;
  border-radius: 50px;
  border: 2px solid #90e0ef;
  box-shadow: 0 6px 0 #0077b6, 0 10px 20px rgba(0, 119, 182, 0.3);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  font-family: inherit;
}
.btn-game-secondary:hover {
  transform: translateY(-2px);
  background: #ffffff;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.form-group label {
  font-weight: 800;
  font-size: 0.95rem;
  color: #03045e;
}
.form-input, .form-select {
  padding: 10px 14px;
  border-radius: 12px;
  border: 2px solid #cbd5e1;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  outline: none;
  background: #ffffff;
  color: #1e293b;
  transition: border-color 0.15s ease;
}
.form-input:focus, .form-select:focus {
  border-color: #0077b6;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.alert-error {
  background: #fff1f2;
  border: 1.5px solid #f43f5e;
  color: #9f1239;
  border-radius: 14px;
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.45;
}

/* ========================================================
   MODAL POPUPS (TUTORIAL, PENGATURAN, MODE GURU)
   ======================================================== */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 4, 94, 0.72);
  backdrop-filter: blur(6px);
  z-index: 20;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-card {
  background: #ffffff;
  color: #0f172a;
  border-radius: 28px;
  width: 100%;
  max-width: 760px;
  max-height: min(94%, 90vh);
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  border: 3px solid #caf0f8;
  overflow: hidden;
  animation: popIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-header {
  padding: 10px 18px;
  background: linear-gradient(135deg, #0077b6 0%, #023e8a 100%);
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 1.45rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-close-modal {
  background: rgba(255, 255, 255, 0.25);
  border: none;
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.3rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.45);
}

.modal-body {
  padding: 14px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #0f172a;
}

/* Tutorial Steps Card */
.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.tutorial-step-card {
  background: #f8fdff;
  border: 2px solid #caf0f8;
  border-radius: 20px;
  padding: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.step-number {
  background: #0077b6;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-icon {
  font-size: 2.4rem;
}

.step-desc {
  font-size: 0.95rem;
  font-weight: 700;
  color: #03045e;
  line-height: 1.4;
}

/* ========================================================
   MODE GURU (TEACHER PANEL)
   ======================================================== */
.teacher-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 2px solid #e2e8f0;
}

.toolbar-left, .toolbar-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-teacher-act {
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  padding: 8px 16px;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  color: #1e293b;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-teacher-act:hover {
  background: #e2e8f0;
}

.btn-teacher-primary {
  background: #0077b6;
  color: #ffffff;
  border-color: #0077b6;
}

.btn-teacher-primary:hover {
  background: #023e8a;
}

.teacher-q-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.cloud-package-item {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #0f172a;
}

.q-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.q-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 1.05rem;
  color: #03045e;
}

.q-num {
  background: #0077b6;
  color: #fff;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 900;
}

.badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 12px;
}

.badge-multi {
  background: #d8f3dc;
  color: #1b4332;
  border: 1px solid #52b788;
}

.badge-sequence {
  background: #ffe5d9;
  color: #9d0208;
  border: 1px solid #fb8500;
}

.q-time {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 700;
}

.q-card-actions {
  display: flex;
  gap: 6px;
}

.btn-icon {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.btn-icon:hover {
  background: #f1f5f9;
}

.q-card-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-opt {
  font-size: 0.82rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 10px;
}

.opt-correct {
  background: #d8f3dc;
  color: #2d6a4f;
  border: 1px solid #74c69d;
}

.opt-wrong {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.opt-order {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
}

/* Editor Form Soal */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-group label {
  font-weight: 800;
  font-size: 0.95rem;
  color: #03045e;
}

.form-input, .form-select {
  padding: 10px 14px;
  border-radius: 12px;
  border: 2px solid #cbd5e1;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
}

.form-input:focus, .form-select:focus {
  border-color: #0077b6;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.option-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fdff;
  border: 1.5px solid #caf0f8;
  padding: 10px;
  border-radius: 12px;
  margin-bottom: 8px;
}

.opt-text-input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  font-family: inherit;
  font-size: 0.95rem;
}

.btn-remove-opt {
  background: #fee2e2;
  color: #ef233c;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

/* ========================================================
   LAYAR HASIL RAPOR (RESULT SCREEN)
   ======================================================== */
.result-card {
  background: #ffffff;
  border-radius: 32px;
  padding: 36px 42px;
  text-align: center;
  max-width: 580px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  border: 3.5px solid #ffea00;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.result-header h1 {
  font-size: 2.2rem;
  font-weight: 900;
  color: #03045e;
}

.result-stars {
  font-size: 2.8rem;
  margin: 10px 0;
}

.result-score-highlight {
  background: linear-gradient(135deg, #caf0f8 0%, #90e0ef 100%);
  border-radius: 20px;
  padding: 16px;
  margin: 14px 0;
}

.res-score-lbl {
  font-size: 0.9rem;
  font-weight: 800;
  color: #0077b6;
  text-transform: uppercase;
}

.res-score-num {
  font-size: 3.2rem;
  font-weight: 900;
  color: #03045e;
}

.result-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.stat-item {
  background: #f8fdff;
  border: 1.5px solid #caf0f8;
  border-radius: 14px;
  padding: 10px;
}

.stat-item .stat-lbl {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 700;
}

.stat-item .stat-val {
  font-size: 1.25rem;
  font-weight: 900;
  color: #03045e;
  margin-top: 3px;
}

.result-predikat {
  font-size: 1.15rem;
  font-weight: 800;
  color: #2a9d8f;
  margin-bottom: 22px;
}

.result-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
}

/* ========================================================
   ANIMASI KEYFRAMES
   ======================================================== */
@keyframes floatSoft {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

@keyframes pulseScale {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

@keyframes popIn {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ========================================================
   RESPONSIVE OPTIMIZATION
   ======================================================== */
@media (max-width: 900px) {
  .hud-top-bar {
    grid-template-columns: 160px 1fr 160px;
    gap: 8px;
  }
  .hud-question-title {
    font-size: 1.05rem;
  }
  .sb-btn-arrow {
    width: 60px;
    height: 60px;
    font-size: 1.6rem;
  }
  .sb-btn-cast {
    height: 64px;
    padding: 0 28px;
    font-size: 1.3rem;
  }
}


/* ========================================================
   PORTAL GURU & RUANG UJIAN SISWA (FIREBASE CBT EXTENSION)
   ======================================================== */

/* Badge Ruang Ujian di HUD (Kini Menjadi Pill Modern Bebas Overflow) */
.hud-room-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: calc(100% - 240px);
}

.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
}

.hud-pill.pill-school {
  background: rgba(255, 255, 255, 0.95);
  color: #03045e;
  border: 1.5px solid #0077b6;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-pill.pill-code {
  background: #fff3cd;
  color: #854d0e;
  border: 1.5px solid #fb8500;
}

.hud-pill.pill-code .pill-val {
  color: #d9480f;
  font-size: 0.94rem;
  letter-spacing: 0.5px;
}

.hud-pill.pill-student {
  background: #d8f3dc;
  color: #1b4332;
  border: 1.5px solid #2a9d8f;
}

.hud-pill.pill-student .pill-val {
  color: #15803d;
  font-size: 0.92rem;
}

.hud-pill.pill-offline {
  background: rgba(255, 255, 255, 0.92);
  color: #03045e;
  border: 1.5px solid #64748b;
}

/* Banner Pengiriman Nilai di Layar Hasil */
.result-exam-badge {
  background: #d8f3dc;
  border: 2px solid #52b788;
  border-radius: 16px;
  padding: 10px 16px;
  margin-bottom: 14px;
  text-align: center;
}

/* Alert Error Box */
.alert-error {
  background: #fff1f2;
  border: 1.5px solid #f43f5e;
  color: #9f1239;
  border-radius: 14px;
  padding: 12px 18px;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.45;
  margin: 12px 0 16px 0;
  text-align: center;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  animation: popIn 0.2s ease-out;
}

/* Tombol WhatsApp Pendaftaran Akun Guru */
.btn-wa-register {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #25D366;
  color: #ffffff;
  padding: 10px 22px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
  transition: all 0.15s ease;
}

.btn-wa-register:hover {
  background-color: #1eb956;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.5);
}

/* Auth Tabs Navigation */
.auth-tabs-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.auth-tab-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 800;
  font-family: inherit;
  font-size: 0.95rem;
  border: 2px solid #cbd5e1;
  background: #f8fdff;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.auth-tab-btn.tab-active {
  background: #0077b6;
  color: #ffffff;
  border-color: #0077b6;
  box-shadow: 0 4px 12px rgba(0, 119, 182, 0.3);
}

/* Dashboard Guru Modal */
.modal-dashboard-card {
  max-width: 980px;
  height: 90vh;
  display: flex;
  flex-direction: column;
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
}

.dash-header-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-teacher-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #caf0f8;
}

.online-indicator {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.78rem;
  color: #d8f3dc;
}

.btn-logout {
  background: rgba(239, 35, 60, 0.25);
  border: 1.5px solid #ef233c;
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-logout:hover {
  background: #ef233c;
}

/* Dashboard Nav Tabs */
.dash-navbar {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 8px 18px;
  border-bottom: 2px solid #e2e8f0;
  overflow-x: auto;
}

.teacher-nav-btn {
  padding: 9px 18px;
  border-radius: 12px;
  border: none;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  background: transparent;
  color: #475569;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.teacher-nav-btn:hover {
  background: #e2e8f0;
}

.teacher-nav-btn.nav-active {
  background: #0077b6;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 119, 182, 0.25);
}

.dash-body {
  flex: 1;
  padding: 20px 24px;
  overflow-y: auto;
}

.panel-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
}

.panel-header-bar h3 {
  color: #03045e;
  font-size: 1.25rem;
  font-weight: 900;
}

.panel-header-bar p {
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 700;
  margin-top: 2px;
}

/* Grid Ruang Ujian */
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.room-card {
  background: #ffffff;
  border: 2px solid #caf0f8;
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.room-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 119, 182, 0.15);
}

.room-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.room-badge-code {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fb8500;
  background: #fff3b0;
  padding: 3px 12px;
  border-radius: 10px;
  border: 1.5px solid #ffb703;
}

.badge-status-active {
  background: #d8f3dc;
  color: #1b4332;
  font-weight: 800;
}

.badge-status-waiting {
  background: #fef3c7;
  color: #92400e;
  font-weight: 800;
}

.badge-status-finished {
  background: #fee2e2;
  color: #991b1b;
  font-weight: 800;
}

.room-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: #03045e;
  margin-bottom: 6px;
}

.room-meta {
  font-size: 0.85rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 4px;
}

.room-timer-meta {
  font-size: 0.8rem;
  color: #0077b6;
  font-weight: 800;
  margin-bottom: 12px;
}

.room-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1.5px solid #f1f5f9;
}

.btn-room-act {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: #f8fdff;
  color: #03045e;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-room-act:hover {
  background: #e2e8f0;
}

.btn-monitor {
  background: #0077b6;
  color: #ffffff;
  border-color: #0077b6;
}

.btn-monitor:hover {
  background: #023e8a;
}

/* Banner Monitor Ruang Terpilih */
.monitor-room-banner {
  background: linear-gradient(135deg, #0077b6 0%, #023e8a 100%);
  color: #ffffff;
  border-radius: 18px;
  padding: 16px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  box-shadow: 0 6px 18px rgba(0, 119, 182, 0.25);
}

.mon-code-tag {
  font-size: 0.85rem;
  font-weight: 900;
  color: #ffea00;
  letter-spacing: 1px;
}

#mon-room-code {
  font-size: 1.4rem;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.25);
  padding: 2px 10px;
  border-radius: 8px;
  margin-left: 4px;
}

.mon-actions-right {
  display: flex;
  gap: 8px;
}

.btn-excel {
  background: #2a9d8f;
  color: #ffffff;
  border: none;
}

.btn-excel:hover {
  background: #1b4332;
}

.btn-print {
  background: #ffffff;
  color: #03045e;
  border: none;
}

.btn-print:hover {
  background: #caf0f8;
}

.mon-room-select-wrap {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mon-select-lbl {
  font-weight: 800;
  font-size: 0.88rem;
  color: #caf0f8;
}

.mon-select-dropdown {
  padding: 6px 14px;
  border-radius: 10px;
  border: 1.5px solid #90e0ef;
  font-weight: 700;
  color: #03045e;
  background: #ffffff;
  cursor: pointer;
  max-width: 320px;
}

.btn-live-lb {
  background: linear-gradient(135deg, #ff7b00 0%, #ff0077 100%);
  color: #ffffff;
  border: none;
  font-weight: 900;
  padding: 8px 16px;
  box-shadow: 0 4px 14px rgba(255, 0, 119, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-live-lb:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 0, 119, 0.6);
}

.fish-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
}

.fish-stat-ok {
  background: #d8f3dc;
  color: #1b4332;
  border: 1px solid #52b788;
}

.fish-stat-bad {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #ef233c;
}

/* ========================================================
   MODAL 8: LIVE LEADERBOARD SMARTBOARD (FULLSCREEN ESPORTS)
   ======================================================== */
#modal-live-leaderboard {
  background: radial-gradient(ellipse at 50% 10%, #0a2540 0%, #020b18 100%);
  color: #ffffff;
}

.leaderboard-fullscreen-wrap {
  width: 100vw;
  height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 16px 28px;
  overflow-y: auto;
  gap: 14px;
}

/* Header Bar */
.lb-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 12px;
  flex-wrap: wrap;
  gap: 12px;
}

.lb-header-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lb-live-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 35, 60, 0.25);
  border: 1.5px solid #ef233c;
  color: #ffccd5;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 999px;
  width: fit-content;
}

.lb-live-dot {
  width: 10px;
  height: 10px;
  background: #ef233c;
  border-radius: 50%;
  box-shadow: 0 0 10px #ef233c;
  animation: pulseScale 0.8s infinite alternate;
}

.lb-main-title {
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.lb-badges-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lb-badge-pill {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
  color: #caf0f8;
}

.lb-code-highlight {
  background: #fff3cd;
  color: #854d0e;
  border: 2px solid #fb8500;
  font-size: 0.95rem;
  box-shadow: 0 0 16px rgba(251, 133, 0, 0.4);
}

.lb-code-highlight strong {
  color: #d9480f;
  font-size: 1.25rem;
  letter-spacing: 1.5px;
  margin-left: 4px;
}

.lb-header-actions {
  display: flex;
  gap: 10px;
}

.btn-lb-act {
  background: rgba(255, 255, 255, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-lb-act:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn-lb-close {
  background: rgba(239, 35, 60, 0.35);
  border-color: #ef233c;
}

.btn-lb-close:hover {
  background: #ef233c;
}

/* PODIUM SECTION */
.lb-podium-container {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 18px;
  padding: 8px 0 0;
  margin-bottom: 6px;
}

.podium-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 28%;
  max-width: 320px;
  position: relative;
}

.podium-avatar {
  font-size: 2.4rem;
  margin-bottom: 2px;
}

.podium-crown {
  font-size: 2.2rem;
  animation: floatBounce 2s infinite ease-in-out;
  margin-bottom: -6px;
}

.podium-rank-tag {
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  margin-bottom: 6px;
}

.podium-rank-tag.tag-gold {
  background: linear-gradient(135deg, #ffd700 0%, #ff8800 100%);
  color: #000;
  font-size: 0.9rem;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.6);
}

.podium-name {
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffffff;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.podium-name.name-gold {
  font-size: 1.45rem;
  color: #fff3b0;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
}

.podium-score {
  font-size: 1.35rem;
  font-weight: 900;
  color: #90e0ef;
  margin: 3px 0;
}

.podium-score.score-gold {
  font-size: 1.85rem;
  color: #ffd700;
  text-shadow: 0 0 14px rgba(255, 215, 0, 0.8);
}

.podium-fish {
  font-size: 0.82rem;
  font-weight: 800;
  color: #caf0f8;
  margin-bottom: 10px;
  background: rgba(0, 0, 0, 0.3);
  padding: 3px 10px;
  border-radius: 8px;
}

.podium-fish.fish-gold {
  font-size: 0.9rem;
  color: #ffffff;
  background: rgba(255, 183, 3, 0.25);
  border: 1px solid rgba(255, 183, 3, 0.4);
}

/* Stand / Pedestal */
.podium-pedestal {
  width: 100%;
  border-radius: 16px 16px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 3px 8px rgba(255, 255, 255, 0.25), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.pedestal-1 {
  height: 130px;
  background: linear-gradient(180deg, #ffd700 0%, #b8860b 100%);
  border: 2px solid #fff3b0;
}

.pedestal-2 {
  height: 95px;
  background: linear-gradient(180deg, #e0e0e0 0%, #757575 100%);
  border: 2px solid #ffffff;
}

.pedestal-3 {
  height: 70px;
  background: linear-gradient(180deg, #cd7f32 0%, #8c4a16 100%);
  border: 2px solid #e09f67;
}

.pedestal-num {
  font-size: 2.8rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}

/* ROSTER RANK 4+ */
.lb-roster-container {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lb-roster-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

.lb-roster-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #90e0ef;
}

.lb-live-ticker {
  font-size: 0.82rem;
  color: #fca311;
  font-weight: 700;
}

.lb-roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 6px;
}

.lb-roster-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.lb-roster-card:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

.lb-card-rank {
  font-size: 1.15rem;
  font-weight: 900;
  color: #90e0ef;
  min-width: 34px;
  text-align: center;
}

.lb-card-info {
  flex: 1;
  overflow: hidden;
}

.lb-card-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-card-badges {
  display: flex;
  gap: 5px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.lb-mini-pill {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
}

.pill-green { background: #1b4332; color: #74c69d; }
.pill-red { background: #590d22; color: #ff758f; }
.pill-blue { background: #032b43; color: #90e0ef; }
.pill-orange { background: #4a2800; color: #ffb703; }

.lb-tag-finish {
  background: #14532d;
  color: #86efac;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
}

.lb-tag-play {
  background: #0c4a6e;
  color: #7dd3fc;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
}

.lb-card-score {
  font-size: 1.25rem;
  font-weight: 900;
  color: #ffd700;
  text-align: right;
  min-width: 60px;
}

.lb-empty-roster {
  grid-column: 1 / -1;
  text-align: center;
  padding: 24px;
  color: #94a3b8;
  font-size: 0.95rem;
}

/* Row Kartu Statistik Monitor */
.mon-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.mon-stat-card {
  background: #ffffff;
  border: 2px solid #caf0f8;
  border-radius: 16px;
  padding: 12px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.mon-stat-lbl {
  font-size: 0.82rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
}

.mon-stat-num {
  font-size: 1.9rem;
  font-weight: 900;
  color: #03045e;
  margin-top: 2px;
}

/* Tabel Monitoring Real-time */
.table-container {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.mon-table {
  width: 100%;
  border-collapse: collapse;
  font-family: inherit;
  font-size: 0.95rem;
}

.mon-table th {
  background: #f1f5f9;
  padding: 12px 14px;
  text-align: left;
  font-weight: 800;
  color: #03045e;
  border-bottom: 2px solid #cbd5e1;
}

.mon-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
}

.mon-table tr:hover {
  background: #f8fdff;
}

/* Cetak Rapor Lembar Hasil Siap Print */
.modal-print-card {
  max-width: 820px;
  height: 92vh;
}

.print-sheet-body {
  background: #e2e8f0;
  padding: 20px;
  display: flex;
  justify-content: center;
}

.print-paper {
  background: #ffffff;
  color: #000000;
  width: 100%;
  max-width: 720px;
  padding: 35px 40px;
  font-family: 'Times New Roman', Times, serif;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  border-radius: 4px;
}

.print-header {
  text-align: center;
  border-bottom: 3px double #000000;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.print-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  text-align: left;
  font-size: 0.95rem;
  margin-top: 10px;
  line-height: 1.5;
}

.print-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 0.95rem;
}

.print-table th, .print-table td {
  border: 1px solid #000000;
  padding: 6px 10px;
}

.print-table th {
  background: #f0f0f0;
}

.print-footer-signature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 35px;
  text-align: center;
  font-size: 0.95rem;
}

/* Print CSS Rule */
@media print {
  body * {
    visibility: hidden;
  }
  #modal-print-report,
  #modal-print-report .print-paper,
  #modal-print-report .print-paper * {
    visibility: visible;
  }
  #modal-print-report {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: auto;
    background: transparent;
    padding: 0;
  }
  .modal-print-card {
    border: none;
    box-shadow: none;
    height: auto;
    max-width: 100%;
  }
  .no-print {
    display: none !important;
  }
  .print-paper {
    box-shadow: none;
    padding: 0;
    width: 100%;
  }
}

/* Game Compatibility Badges & Filter Bar */
.btn-pkg-filter {
  transition: all 0.15s ease;
  font-family: inherit;
}
.btn-pkg-filter:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.cloud-package-item {
  transition: all 0.15s ease;
}
.cloud-package-item:hover {
  border-color: #93c5fd !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08) !important;
}


/* ========================================================
   CBT MODALS MOBILE & TABLET OPTIMIZATIONS
   ======================================================== */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 8px !important;
  }
  .modal-card {
    width: 96vw !important;
    max-width: 96vw !important;
    max-height: 94vh !important;
    max-height: 94dvh !important;
    border-radius: 18px !important;
  }
  .modal-header {
    padding: 12px 16px !important;
  }
  .modal-header h2 {
    font-size: clamp(1rem, 3.8vw, 1.25rem) !important;
  }
  .modal-body {
    padding: 14px !important;
    gap: 12px !important;
  }
  .form-group label {
    font-size: 0.82rem !important;
  }
  .form-input {
    padding: 10px 14px !important;
    font-size: 0.95rem !important;
  }
  .cbt-nav-tabs {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .cbt-tab-btn {
    padding: 8px 12px !important;
    font-size: 0.82rem !important;
    flex: 1 1 calc(50% - 6px) !important;
  }
  .lb-header-bar {
    padding: 10px 14px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }
  .lb-header-actions {
    width: 100% !important;
    justify-content: flex-end !important;
  }
  .lb-podium-container {
    gap: 8px !important;
  }
  .podium-col {
    width: 32% !important;
  }
  .podium-name {
    font-size: 0.85rem !important;
  }
  .podium-score {
    font-size: 0.95rem !important;
  }
  .podium-fish {
    font-size: 0.68rem !important;
  }
}


/* ========================================================
   MODAL COMPACT & ZERO-SCROLL GUARANTEE (NO SCROLL UP/DOWN)
   ======================================================== */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 6px;
    overflow: hidden;
}

.modal-overlay.hidden,
.hidden {
    display: none !important;
}

.modal-card-student {
    width: min(94%, 470px) !important;
    max-height: 92% !important;
    border-radius: 18px !important;
    overflow: hidden !important;
}

.demo-spotlight-box {
    background: #0b2545;
    border: 2px solid #ffb703;
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(11, 37, 69, 0.25);
}

.demo-spotlight-title {
    color: #ffffff;
    font-size: clamp(0.84rem, 1.5vw, 0.96rem);
    font-weight: 900;
    line-height: 1.25;
}

.demo-spotlight-sub {
    color: #e2e8f0;
    font-size: clamp(0.7rem, 1.15vw, 0.78rem);
    font-weight: 700;
    line-height: 1.25;
    margin-top: 2px;
}

.btn-demo-hero {
    width: 100%;
    background: #ffb703;
    color: #03045e;
    font-family: 'Nunito', sans-serif;
    font-size: clamp(0.9rem, 1.6vw, 1.02rem);
    font-weight: 900;
    letter-spacing: 0.4px;
    padding: 9px 14px;
    border-radius: 10px;
    border: none;
    box-shadow: 0 4px 0 #b45309;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.btn-demo-hero:hover {
    background: #ffc933;
    transform: translateY(-1px);
}

.btn-demo-hero:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #b45309;
}

.modal-divider-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.8px;
    margin: 2px 0;
}

.modal-divider-label::before,
.modal-divider-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #cbd5e1;
}

.student-join-row {
    display: grid;
    grid-template-columns: 0.9fr 1.25fr;
    gap: 8px;
    align-items: end;
}

.btn-exam-submit {
    width: 100%;
    background: #006494;
    color: #ffffff;
    font-family: 'Nunito', sans-serif;
    font-size: 0.92rem;
    font-weight: 800;
    padding: 8px 14px;
    border-radius: 10px;
    border: none;
    box-shadow: 0 3px 0 #023e8a;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.btn-exam-submit:hover {
    background: #0077b6;
    transform: translateY(-1px);
}

.btn-exam-submit:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #023e8a;
}

.modal-card-student .modal-header {
    padding: 8px 16px !important;
    min-height: 38px !important;
}

.modal-card-student .modal-header h2 {
    font-size: clamp(0.95rem, 1.8vw, 1.15rem) !important;
    margin: 0 !important;
    gap: 8px !important;
}

.modal-card-student .btn-close-modal {
    width: 28px !important;
    height: 28px !important;
    font-size: 1rem !important;
}

.modal-no-scroll {
    padding: 10px 18px !important;
    gap: 6px !important;
    overflow: hidden !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
.modal-no-scroll::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.modal-sub-hint {
    font-size: clamp(0.74rem, 1.3vw, 0.84rem) !important;
    font-weight: 700 !important;
    color: #03045e !important;
    margin: 0 0 4px 0 !important;
    line-height: 1.25 !important;
    text-align: center !important;
}

.form-group-compact {
    text-align: left !important;
    margin-bottom: 4px !important;
}

.form-group-compact label {
    font-weight: 900 !important;
    color: #0077b6 !important;
    font-size: 0.74rem !important;
    margin-bottom: 2px !important;
    display: block !important;
    letter-spacing: 0.5px !important;
}

.form-input-code {
    text-transform: uppercase !important;
    font-size: 1.15rem !important;
    font-weight: 900 !important;
    letter-spacing: 3px !important;
    text-align: center !important;
    color: #b45309 !important;
    border: 2px solid #0077b6 !important;
    border-radius: 10px !important;
    padding: 5px 10px !important;
    height: 38px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.form-input-name {
    font-size: 0.9rem !important;
    font-weight: 800 !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    padding: 5px 12px !important;
    height: 36px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.modal-actions-compact {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    margin-top: 4px !important;
}

.btn-join-primary {
    width: 100% !important;
    font-size: 0.96rem !important;
    padding: 7px 14px !important;
    border-radius: 10px !important;
    height: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
}

.btn-join-secondary {
    width: 100% !important;
    font-size: 0.85rem !important;
    padding: 5px 12px !important;
    border-radius: 10px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
}
