/* ==============================================================================
   منصة الأستاذ محمد الحلواني (القيصر) - نظام التصميم الشامل والهوية الملكية
   Imperial Emerald Castle & Royal Gold LMS Design System v3.0
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900;1000&family=Tajawal:wght@400;500;700;800;900&display=swap');

:root {
  /* Brand Palettes */
  --bg: #02120c;
  --bg-deep: #010a06;
  --card: rgba(4, 28, 19, 0.88);
  --card-glass: rgba(3, 22, 15, 0.82);
  --card-solid: #031c12;
  --card2: rgba(6, 38, 26, 0.7);
  --border: rgba(197, 160, 89, 0.28);
  --border-hover: rgba(255, 215, 0, 0.5);
  --border-gold: #c5a059;

  /* Gold Gradients & Tones */
  --gold-primary: #c5a059;
  --gold-bright: #ffd700;
  --gold-light: #fce881;
  --gold-dark: #8a6b28;
  --gold-gradient: linear-gradient(135deg, #c5a059 0%, #ffd700 50%, #9a7833 100%);
  --gold-gradient-hover: linear-gradient(135deg, #ffe066 0%, #d4af37 50%, #b8860b 100%);
  --gold-glow: rgba(212, 175, 55, 0.12);

  /* Emerald Tones */
  --emerald-deep: #02140d;
  --emerald-primary: #064e3b;
  --emerald-light: #047857;
  --emerald-bright: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.15);

  /* Typography */
  --text: #ffffff;
  --text-cream: #f4ede2;
  --text-muted: #a3b8aa;
  --text-dim: #6b8273;

  /* Status Colors */
  --green: #10b981;
  --green-bg: rgba(16, 185, 129, 0.12);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.12);
  --blue: #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.12);
  --orange: #f59e0b;
  --orange-bg: rgba(245, 158, 11, 0.12);

  /* Radius & Shadows */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-castle: 0 16px 40px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 25px rgba(6, 78, 59, 0.35);
  --shadow-gold: 0 8px 24px rgba(197, 160, 89, 0.22);
}

/* Base Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-deep);
}

body {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  background-color: var(--bg);
  color: var(--text-cream);
  direction: rtl;
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
}

/* Background Atmosphere Orbs */
.bg-ambient-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.orb-1 {
  width: 550px;
  height: 550px;
  top: -100px;
  right: -100px;
  background: radial-gradient(circle, #047857 0%, transparent 70%);
}

.orb-2 {
  width: 500px;
  height: 500px;
  bottom: -50px;
  left: -50px;
  background: radial-gradient(circle, #c5a059 0%, transparent 70%);
  animation-duration: 24s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 30px) scale(1.1); }
}

/* --------------------------------------------------------------------------
   Layout Structure (App Shell)
   -------------------------------------------------------------------------- */
.app-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Sidebar */
.app-sidebar {
  width: 280px;
  background: rgba(3, 18, 12, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
}

.sidebar-brand-crest {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: radial-gradient(circle, rgba(197, 160, 89, 0.25) 0%, rgba(3, 28, 19, 0.9) 100%);
  border: 1.5px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-gold);
  flex-shrink: 0;
}

.sidebar-brand-crest img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.sidebar-brand-title {
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.3;
}

.sidebar-brand-sub {
  font-size: 11.5px;
  color: var(--gold-light);
  font-weight: 700;
}

/* User Card in Sidebar */
.sidebar-user-card {
  margin: 16px;
  padding: 14px;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--emerald-primary);
  border: 1.5px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--gold-bright);
}

.sidebar-user-name {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 145px;
}

.sidebar-user-badge {
  font-size: 11px;
  color: var(--gold-light);
  font-weight: 700;
}

/* Nav Menu */
.sidebar-nav {
  padding: 10px 14px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-dim);
  padding: 12px 10px 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-link-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
  text-align: right;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav-link-btn:hover {
  background: rgba(197, 160, 89, 0.1);
  color: var(--text-cream);
  border-color: rgba(197, 160, 89, 0.25);
  transform: translateX(-4px);
}

.nav-link-btn.active {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.8) 0%, rgba(3, 28, 19, 0.95) 100%);
  color: var(--gold-bright);
  border-color: var(--gold-primary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.nav-icon {
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Main Content Area */
.app-main {
  flex: 1;
  margin-right: 280px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin 0.3s;
}

@media (max-width: 992px) {
  .app-sidebar {
    transform: translateX(100%);
  }
  .app-sidebar.open {
    transform: translateX(0);
  }
  .app-main {
    margin-right: 0;
  }
}

/* Top Navigation Bar */
.top-navbar {
  height: 72px;
  padding: 0 28px;
  background: rgba(3, 18, 12, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 900;
}

.top-nav-left, .top-nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.burger-btn {
  display: none;
  background: rgba(197, 160, 89, 0.15);
  border: 1px solid var(--border);
  color: var(--gold-light);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 20px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

@media (max-width: 992px) {
  .burger-btn {
    display: flex;
  }
}

/* Wallet Badge Pill */
.wallet-pill {
  background: rgba(4, 28, 19, 0.95);
  border: 1.5px solid var(--gold-primary);
  border-radius: 9999px;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-gold);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
}

.wallet-amt {
  color: var(--gold-bright);
  font-weight: 900;
}

/* Content Container */
.content-wrapper {
  padding: 32px 28px;
  max-width: 1360px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
}

@media (max-width: 768px) {
  .content-wrapper {
    padding: 20px 16px;
  }
}

/* Page Header */
.page-header-box {
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.page-title {
  font-size: 26px;
  font-weight: 900;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Cards & Glassmorphism
   -------------------------------------------------------------------------- */
.glass-card {
  background: var(--card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-castle);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-castle), var(--shadow-glow);
}

.card-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(197, 160, 89, 0.18);
}

.card-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   Buttons & Interactive Elements
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gold-gradient);
  color: #02120c;
  border-color: var(--gold-light);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.btn-primary:hover {
  background: var(--gold-gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(197, 160, 89, 0.35);
}

/* Gold Sweep Light Animation */
.btn-primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(90deg, transparent 30%, rgba(255, 255, 255, 0.4) 50%, transparent 70%);
  transform: translateX(-150%) rotate(25deg);
  pointer-events: none;
  transition: transform 0.65s ease;
}

.btn-primary:hover::after {
  transform: translateX(150%) rotate(25deg);
}

.btn-emerald {
  background: linear-gradient(135deg, #059669 0%, #064e3b 100%);
  color: #ffffff;
  border-color: rgba(16, 185, 129, 0.4);
}

.btn-emerald:hover {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.btn-ghost {
  background: rgba(197, 160, 89, 0.08);
  border-color: var(--border);
  color: var(--gold-light);
}

.btn-ghost:hover {
  background: rgba(197, 160, 89, 0.18);
  border-color: var(--gold-primary);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.btn-danger:hover {
  background: #ef4444;
  color: #ffffff;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12.5px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}

/* --------------------------------------------------------------------------
   Forms & Inputs
   -------------------------------------------------------------------------- */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-cream);
  margin-bottom: 8px;
}

.input-wrap {
  position: relative;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(3, 20, 14, 0.95);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 14.5px;
  outline: none;
  transition: all 0.25s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.input-has-icon {
  padding-right: 44px;
}

.input-icon-left {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 17px;
  color: var(--gold-light);
  pointer-events: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold-bright);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(197, 160, 89, 0.25);
}

.form-input::placeholder, .form-textarea::placeholder {
  color: rgba(163, 184, 170, 0.5);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

/* --------------------------------------------------------------------------
   Badges & Pills
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 800;
}

.badge-gold {
  background: rgba(197, 160, 89, 0.15);
  color: var(--gold-light);
  border: 1px solid rgba(197, 160, 89, 0.35);
}

.badge-green {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-red {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-orange {
  background: var(--orange-bg);
  color: var(--orange);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* --------------------------------------------------------------------------
   Course Catalog Cards
   -------------------------------------------------------------------------- */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 24px;
}

.course-card {
  background: var(--card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-castle);
  position: relative;
}

.course-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-castle), var(--shadow-glow);
}

.course-thumb-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  position: relative;
  background-color: #042216;
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-thumb-box::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(2, 18, 12, 0.95) 100%);
}

.course-badge-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

.course-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.course-title {
  font-size: 17px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 8px;
}

.course-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

.course-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid rgba(197, 160, 89, 0.15);
  margin-top: auto;
}

.course-price-wrap {
  display: flex;
  flex-direction: column;
}

.course-price-current {
  font-size: 20px;
  font-weight: 900;
  color: var(--gold-bright);
}

.course-price-old {
  font-size: 11.5px;
  color: var(--text-dim);
  text-decoration: line-through;
}

/* Progress bar inside enrolled cards */
.course-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 9999px;
  overflow: hidden;
  margin: 10px 0 6px;
  border: 1px solid rgba(197, 160, 89, 0.2);
}

.course-progress-fill {
  height: 100%;
  background: var(--gold-gradient);
  border-radius: 9999px;
  transition: width 0.5s ease;
}

/* --------------------------------------------------------------------------
   Interactive Classroom & Curriculum Player
   -------------------------------------------------------------------------- */
.classroom-modal {
  position: fixed;
  inset: 0;
  background: rgba(1, 10, 6, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 2000;
  display: none;
  flex-direction: column;
  animation: fadeIn 0.3s ease;
}

.classroom-topbar {
  padding: 16px 24px;
  background: rgba(3, 18, 12, 0.95);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.classroom-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

@media (max-width: 900px) {
  .classroom-body {
    flex-direction: column;
    overflow-y: auto;
  }
}

.classroom-stage {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.video-player-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 0 1.5px var(--border);
}

.video-player-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Floating Anti-Leak Watermark */
.castle-anti-leak-watermark {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 50;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.7);
  pointer-events: none;
  user-select: none;
  font-family: monospace;
  font-weight: 700;
  transition: all 1s ease-in-out;
}

/* Curriculum Drawer / Lesson List */
.classroom-drawer {
  width: 380px;
  background: rgba(3, 20, 14, 0.92);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

@media (max-width: 900px) {
  .classroom-drawer {
    width: 100%;
    border-right: none;
    border-top: 1px solid var(--border);
  }
}

.drawer-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 900;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lessons-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lesson-item-card {
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--card2);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.lesson-item-card:hover:not(.locked) {
  background: rgba(197, 160, 89, 0.12);
  border-color: var(--gold-primary);
  transform: translateX(-3px);
}

.lesson-item-card.active {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.9) 0%, rgba(3, 28, 19, 0.98) 100%);
  border-color: var(--gold-bright);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.lesson-item-card.locked {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.6);
}

.lesson-status-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.lesson-card-details {
  flex: 1;
}

.lesson-card-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}

.lesson-card-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Tabs under Video */
.classroom-tabs-nav {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.classroom-tab-btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.classroom-tab-btn.active {
  background: rgba(197, 160, 89, 0.15);
  border-color: var(--gold-primary);
  color: var(--gold-light);
}

.tab-pane {
  display: none;
  padding: 20px 0;
  animation: fadeIn 0.25s ease;
}

.tab-pane.active {
  display: block;
}

/* --------------------------------------------------------------------------
   Quiz Engine Styles
   -------------------------------------------------------------------------- */
.quiz-container-box {
  background: var(--card2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.quiz-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.quiz-timer-badge {
  background: rgba(239, 68, 68, 0.15);
  border: 1.5px solid var(--red);
  color: #ff7676;
  padding: 6px 16px;
  border-radius: 9999px;
  font-weight: 900;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.question-block {
  margin-bottom: 24px;
  padding: 20px;
  background: rgba(2, 18, 12, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.question-text {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.5;
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-opt-label {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--card2);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s;
}

.quiz-opt-label:hover {
  border-color: var(--gold-primary);
  background: rgba(197, 160, 89, 0.1);
}

.quiz-opt-label input[type="radio"] {
  accent-color: var(--gold-primary);
  width: 18px;
  height: 18px;
}

/* --------------------------------------------------------------------------
   Tables & Data Presentation
   -------------------------------------------------------------------------- */
.data-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.platform-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 13.5px;
}

.platform-table th {
  padding: 14px 16px;
  background: rgba(3, 22, 15, 0.95);
  color: var(--gold-light);
  font-weight: 900;
  border-bottom: 1.5px solid var(--border);
}

.platform-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(197, 160, 89, 0.12);
  color: var(--text-cream);
  font-weight: 600;
}

.platform-table tr:hover td {
  background: rgba(197, 160, 89, 0.05);
}

/* --------------------------------------------------------------------------
   Modal Shells & Overlays
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(1, 10, 6, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 2500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease;
}

.modal-box {
  background: linear-gradient(155deg, rgba(4, 28, 19, 0.98) 0%, rgba(2, 17, 11, 0.99) 100%);
  border: 1.5px solid var(--gold-primary);
  border-radius: var(--radius-xl);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 215, 0, 0.3);
  position: relative;
  animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--gold-light);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close-btn:hover {
  color: var(--gold-bright);
}

@keyframes modalPop {
  0% { opacity: 0; transform: scale(0.92) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Notification Toast */
.notif-toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: var(--card-solid);
  border: 1.5px solid var(--gold-primary);
  color: #ffffff;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  display: none;
  z-index: 9999;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
