/* ==========================================================================
   APLIKASI UJIAN ONLINE SEKOLAH (CBT EXAM PORTAL)
   Modern, Elegant, High-Performance, Mobile & Desktop Responsive
   ========================================================================== */

:root {
  --primary: #1e40af;         /* Royal Blue */
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-subtle: #dbeafe;
  --secondary: #0f172a;       /* Slate 900 */
  --accent: #0ea5e9;          /* Sky Blue */
  --success: #10b981;         /* Emerald Green */
  --success-light: #ecfdf5;
  --warning: #f59e0b;         /* Amber */
  --warning-light: #fffbeb;
  --danger: #ef4444;          /* Red */
  --danger-light: #fef2f2;
  --surface: #ffffff;
  --surface-alt: #f8fafc;     /* Slate 50 */
  --border: #e2e8f0;          /* Slate 200 */
  --border-focus: #3b82f6;
  --text-main: #0f172a;
  --text-muted: #64748b;      /* Slate 500 */
  --text-light: #94a3b8;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: var(--surface-alt);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* User Selection & Anti-Cheat Styles */
body.exam-mode {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  overflow-x: hidden;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--secondary);
  line-height: 1.25;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

/* Base Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Navbar / App Header */
.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(8px);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
  padding: 0 1.25rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.brand-logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.35rem;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(30, 64, 175, 0.25);
  flex-shrink: 0;
  overflow: hidden;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-info h1 {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--secondary);
  line-height: 1.2;
}

.brand-info p {
  font-size: 0.775rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Header Action Pills & Timer */
.exam-timer-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--primary-light);
  border: 1px solid var(--primary-subtle);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.timer-icon {
  font-size: 1.1rem;
  color: var(--primary);
}

.timer-countdown {
  font-family: 'JetBrains Mono', monospace, monospace;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  color: var(--primary);
}

.timer-warning {
  background: var(--warning-light) !important;
  border-color: #fde68a !important;
  animation: pulseWarning 1.5s infinite;
}
.timer-warning .timer-countdown, .timer-warning .timer-icon {
  color: #b45309 !important;
}

.timer-danger {
  background: var(--danger-light) !important;
  border-color: #fecaca !important;
  animation: pulseDanger 1s infinite;
}
.timer-danger .timer-countdown, .timer-danger .timer-icon {
  color: var(--danger) !important;
}

@keyframes pulseWarning {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.02); }
}

@keyframes pulseDanger {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); box-shadow: 0 0 15px rgba(239, 68, 68, 0.4); }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 16px rgba(30, 64, 175, 0.35);
  color: #ffffff;
}

.btn-secondary {
  background: var(--surface);
  color: var(--secondary);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--surface-alt);
  border-color: #cbd5e1;
}

.btn-warning {
  background: #f59e0b;
  color: white;
}

.btn-warning:hover {
  background: #d97706;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #059669;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-outline-danger {
  background: transparent;
  color: var(--danger);
  border-color: #fca5a5;
}

.btn-outline-danger:hover {
  background: var(--danger-light);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

/* Card Components */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
}

/* Hero & Student Login Section */
.hero-wrapper {
  min-height: calc(100vh - 4.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  background: radial-gradient(circle at 10% 20%, rgba(239, 246, 255, 0.8) 0%, rgba(248, 250, 252, 1) 90%);
}

.login-card {
  width: 100%;
  max-width: 500px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(226, 232, 240, 0.8);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--primary), var(--accent), #38bdf8);
}

.login-header {
  padding: 2.25rem 2rem 1.5rem;
  text-align: center;
}

.login-logo-circle {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.25rem;
  border-radius: 20px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
  overflow: hidden;
}

.login-logo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 0.35rem;
}

.login-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Form Groups & Inputs */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 0.45rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-light);
  font-size: 1rem;
  pointer-events: none;
  transition: var(--transition);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-main);
  background-color: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.form-control.no-icon {
  padding-left: 1rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-control:focus + .input-icon {
  color: var(--primary);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.1em;
  padding-right: 2.75rem;
}

/* ==========================================================================
   CBT EXAM INTERFACE (TAMPILAN UJIAN UTAMA)
   ========================================================================== */

.cbt-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  padding: 1.5rem 1.25rem 2.5rem;
  max-width: 1380px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
}

@media (max-width: 992px) {
  .cbt-layout {
    grid-template-columns: 1fr;
    padding: 1rem 0.75rem;
    gap: 1rem;
  }
}

/* Main Question Area */
.question-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.question-panel-header {
  padding: 1rem 1.5rem;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.question-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 700;
}

.font-size-adjuster {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--surface-alt);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.font-size-btn {
  background: transparent;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: var(--transition);
}

.font-size-btn.active, .font-size-btn:hover {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.question-body {
  padding: 2rem 2rem;
  flex: 1;
  overflow-y: auto;
}

@media (max-width: 640px) {
  .question-body {
    padding: 1.25rem 1rem;
  }
}

.question-text {
  font-size: 1.075rem;
  font-weight: 500;
  line-height: 1.75;
  color: var(--secondary);
  margin-bottom: 1.75rem;
  word-break: break-word;
}

.question-text img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 1rem 0;
  border: 1px solid var(--border);
}

/* Question Option List */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.option-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.option-item:hover {
  border-color: #93c5fd;
  background: #f8fafc;
  transform: translateY(-1px);
}

.option-item.selected {
  border-color: var(--primary);
  background: #eff6ff;
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.12);
}

.option-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-alt);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.option-item.selected .option-badge {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.option-content {
  flex: 1;
  font-size: 0.975rem;
  line-height: 1.6;
  color: var(--text-main);
  padding-top: 0.25rem;
}

/* CBT Bottom Action Bar */
.question-footer-bar {
  padding: 1.25rem 1.5rem;
  background: #ffffff;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.ragu-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  color: #b45309;
  font-weight: 600;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.ragu-btn:hover {
  background: #fef3c7;
}

.ragu-btn.active {
  background: #f59e0b;
  border-color: #d97706;
  color: #ffffff;
}

/* Sidebar: Navigation Numbers & Student Profile */
.cbt-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.student-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.student-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
}

.student-meta h4 {
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.student-meta p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Number Grid Navigation */
.nav-numbers-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.nav-numbers-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-numbers-body {
  padding: 1.25rem;
  max-height: 420px;
  overflow-y: auto;
}

.numbers-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.625rem;
}

.number-btn {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--secondary);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.number-btn:hover {
  border-color: #93c5fd;
  transform: scale(1.05);
}

.number-btn.current {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.4);
}

.number-btn.answered {
  background: #10b981;
  border-color: #059669;
  color: #ffffff;
}

.number-btn.doubtful {
  background: #f59e0b;
  border-color: #d97706;
  color: #ffffff;
}

/* Legend Status */
.nav-legend {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0.875rem 1rem;
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.legend-dot.answered { background: #10b981; }
.legend-dot.doubtful { background: #f59e0b; }
.legend-dot.unanswered { background: var(--surface-alt); border: 1px solid var(--border); }

/* Floating Toggle on Mobile */
.mobile-nav-toggle {
  display: none;
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 50;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-full);
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
}

@media (max-width: 992px) {
  .mobile-nav-toggle {
    display: inline-flex;
  }
  .cbt-sidebar.mobile-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 100;
    padding: 1.5rem 1rem;
    display: none;
    align-items: center;
    justify-content: center;
  }
  .cbt-sidebar.mobile-modal.open {
    display: flex;
  }
  .cbt-sidebar.mobile-modal > div {
    width: 100%;
    max-width: 420px;
  }
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Violation / Anti-Cheat Toast */
.violation-banner {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: #b91c1c;
  color: white;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.violation-banner.show {
  transform: translateX(-50%) translateY(0);
}

/* Kiosk Embed Container for Google Form Fallback */
.kiosk-frame-wrapper {
  width: 100%;
  height: calc(100vh - 4.5rem);
  background: #f8fafc;
  position: relative;
  overflow: hidden;
}

.kiosk-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
}

.watermark-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-25deg);
  font-size: 3rem;
  font-weight: 800;
  color: rgba(100, 116, 139, 0.07);
  pointer-events: none;
  white-space: nowrap;
  z-index: 30;
  user-select: none;
}

/* Admin Dashboard Specific */
.admin-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  padding: 1.5rem 1.25rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 900px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

.admin-sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.admin-nav-item:hover, .admin-nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* Badge pills */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
}

.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-primary { background: #dbeafe; color: #1e40af; }
.badge-gray { background: #f1f5f9; color: #475569; }

/* Code Snippet Box */
.code-box {
  background: #0f172a;
  color: #f8fafc;
  padding: 1rem;
  border-radius: var(--radius-md);
  font-family: 'JetBrains Mono', monospace, monospace;
  font-size: 0.825rem;
  position: relative;
  overflow-x: auto;
  max-height: 280px;
}

/* ==========================================================================
   SOAL BERGAMBAR & DIAGRAM (QUESTION IMAGE STYLING)
   ========================================================================== */

.question-image-box {
  margin: 1.25rem 0;
  text-align: center;
  background: var(--surface-alt);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: inline-block;
  width: 100%;
}

.question-img {
  max-width: 100%;
  max-height: 380px;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-sm);
  background: #ffffff;
}

.question-img:hover {
  transform: scale(1.01);
  box-shadow: var(--shadow-md);
}

.image-caption-hint {
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.question-help-box {
  background: #eff6ff;
  border-left: 4px solid var(--primary);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  color: #1e40af;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.5;
}

.img-error-badge {
  padding: 0.75rem;
  background: var(--danger-light);
  color: var(--danger);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Option Images */
.option-image-box {
  margin-bottom: 0.5rem;
}

.option-img {
  max-width: 220px;
  max-height: 140px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: zoom-in;
  background: #ffffff;
}

/* Lightbox Modal (Zoom Fullscreen) */
.image-lightbox {
  background: rgba(15, 23, 42, 0.9) !important;
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.lightbox-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  padding-bottom: 0.5rem;
}

/* Class Pill Tags */
.class-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  border: 1.5px solid var(--border);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--secondary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: var(--transition);
}

.class-pill:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.class-del-btn {
  background: #fee2e2;
  color: #ef4444;
  border: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: var(--transition);
}

.class-del-btn:hover {
  background: #ef4444;
  color: #ffffff;
  transform: scale(1.1);
}
