:root {
  --bg-dark: #0b0f19;
  --bg-card: rgba(22, 30, 49, 0.75);
  --bg-card-hover: rgba(30, 41, 67, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(99, 102, 241, 0.3);
  
  --primary: #6366f1;
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --secondary: rgba(255, 255, 255, 0.06);
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --accent: #38bdf8;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --backdrop-blur: blur(16px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  padding: 24px;
  position: relative;
  overflow-x: hidden;
}

/* Ambient Animated Background Orbs */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.35;
  pointer-events: none;
}
.orb-1 {
  width: 450px;
  height: 450px;
  background: #6366f1;
  top: -100px;
  left: -100px;
}
.orb-2 {
  width: 400px;
  height: 400px;
  background: #ec4899;
  bottom: -100px;
  right: -50px;
}
.orb-3 {
  width: 350px;
  height: 350px;
  background: #0ea5e9;
  top: 40%;
  left: 45%;
}

.app-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  flex-shrink: 0;
}

.brand h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.author-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.76rem;
  font-weight: 500;
}

.login-author-tag {
  color: #a5b4fc !important;
  font-size: 0.9rem !important;
  font-weight: 500;
  margin-top: 4px;
}

.app-footer {
  text-align: center;
  padding: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--border-color);
  color: var(--text-dim);
  font-size: 0.85rem;
}

.app-footer strong {
  color: var(--text-main);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.date-filter-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.date-filter-wrapper select {
  font-family: 'Inter', sans-serif;
  background: transparent;
  color: #fff;
  border: none;
  font-size: 0.85rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
}

.date-filter-wrapper select option {
  background: #111827;
  color: #fff;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  white-space: nowrap;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--success);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-btn {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  color: #fff;
  background: var(--primary-gradient);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.tab-content {
  display: none;
  flex-direction: column;
  gap: 24px;
}

.tab-content.active {
  display: flex;
}

/* Metrics Cards Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.metric-card {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-highlight);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.card-attempts .card-icon { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.card-accuracy .card-icon { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.card-users .card-icon { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.card-questions .card-icon { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.card-content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.card-content h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.card-trend, .card-subtext {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-trend { color: var(--success); }

/* Dashboard Panels */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.panel {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.panel-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-header h3 i {
  color: var(--primary);
}

.panel-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Select Dropdown */
.select-wrapper {
  width: 100%;
  max-width: 380px;
}

.select-wrapper select {
  font-family: 'Inter', sans-serif;
  background: #111827;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  outline: none;
  width: 100%;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.select-wrapper select:focus {
  border-color: var(--primary);
}

/* Question Banner */
.question-stats-banner {
  display: flex;
  gap: 16px;
  background: rgba(0, 0, 0, 0.25);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.mb-3 { margin-bottom: 16px; }

.q-stat {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.q-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.q-val {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.text-success { color: var(--success); }
.text-accent { color: var(--accent); }
.text-warning { color: var(--warning); }
.text-center { text-align: center; }

/* Chart Container */
.chart-container {
  position: relative;
  height: 320px;
  width: 100%;
}
.side-chart { height: 380px; }

/* Table Section */
.panel-full { margin-top: 8px; }
.table-header { align-items: center; }

.table-controls {
  display: flex;
  gap: 12px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-box i {
  position: absolute;
  left: 14px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.search-box input {
  font-family: 'Inter', sans-serif;
  background: #111827;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 9px 14px 9px 38px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  width: 260px;
  outline: none;
}

.search-box input:focus { border-color: var(--primary); }

.table-controls select {
  font-family: 'Inter', sans-serif;
  background: #111827;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 9px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  outline: none;
}

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  max-height: 420px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

th {
  background: #111827;
  color: var(--text-muted);
  font-weight: 600;
  padding: 14px 18px;
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--border-color);
}

td {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  white-space: nowrap;
  max-width: 350px;
  overflow: hidden;
  text-overflow: ellipsis;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* View Mode Toggle */
.view-toggle {
  display: flex;
  background: #111827;
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.toggle-btn:hover {
  color: var(--text-main);
}

.toggle-btn.active {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

/* Accordion Table Styling */
.accordion-header {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.accordion-header:hover {
  background: rgba(99, 102, 241, 0.1) !important;
}

.accordion-header.active-expanded {
  background: rgba(99, 102, 241, 0.14) !important;
}

.accordion-chevron {
  color: var(--accent);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  font-size: 0.85rem;
}

.accordion-chevron.rotated {
  transform: rotate(90deg);
  color: #a855f7;
}

.accordion-content {
  display: none;
}

.accordion-content.show {
  display: table-row;
}

.accordion-content > td {
  padding: 0 16px 16px 40px !important;
  background: rgba(11, 15, 25, 0.6) !important;
  border-bottom: 1px solid rgba(99, 102, 241, 0.2) !important;
}

/* Nested Sub-Table */
.nested-table-wrapper {
  margin-top: 8px;
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.nested-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.nested-table th {
  background: rgba(30, 41, 67, 0.95);
  color: var(--text-muted);
  font-weight: 600;
  padding: 9px 14px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: static;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nested-table td {
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-main);
}

.nested-table tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}

/* Admin Login Overlay */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(11, 15, 25, 0.92);
  backdrop-filter: blur(20px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  padding: 36px 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.login-header {
  text-align: center;
}

.login-icon {
  width: 60px;
  height: 60px;
  background: var(--primary-gradient);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
  margin: 0 auto 16px auto;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.login-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.login-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

.input-group input {
  font-family: 'Inter', sans-serif;
  background: #111827;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  outline: none;
}

.input-group input:focus {
  border-color: var(--primary);
}

.login-error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  text-align: center;
}

.login-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.4;
  margin-top: 4px;
}

/* Modal Overlay & Card */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-card {
  background: #111827;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 800px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

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

.modal-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.btn-close:hover { color: white; background: rgba(255, 255, 255, 0.1); }

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

/* Mobile Responsive Breakpoints */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body {
    padding: 14px;
  }

  .app-container {
    gap: 16px;
  }

  /* Header mobile layout */
  .navbar {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 16px;
  }

  .brand {
    justify-content: flex-start;
  }

  .brand h1 {
    font-size: 1.3rem;
  }

  .header-actions {
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
  }

  .date-filter-wrapper,
  .status-indicator {
    flex: 1;
    justify-content: center;
    min-width: 140px;
  }

  .header-actions .btn {
    flex: 1;
    min-width: 130px;
  }

  /* Panel Mobile Layout */
  .panel {
    padding: 16px;
  }

  .panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .select-wrapper {
    max-width: 100%;
  }

  .question-stats-banner {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px;
  }

  .q-stat {
    min-width: 30%;
    align-items: center;
  }

  /* Table Controls Mobile */
  .table-controls {
    flex-direction: column;
    width: 100%;
  }

  .search-box input {
    width: 100%;
  }

  .table-controls select {
    width: 100%;
  }

  /* Modals Mobile */
  .login-card {
    padding: 24px 20px;
  }

  .modal-overlay {
    padding: 12px;
  }

  .modal-card {
    max-height: 90vh;
  }

  .modal-header, .modal-body {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .brand-subtitle {
    font-size: 0.78rem;
  }

  .card-content h2 {
    font-size: 1.5rem;
  }

  .chart-container {
    height: 250px;
  }

  .side-chart {
    height: 280px;
  }
}

/* Export Dropdown Menu */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: rgba(17, 24, 39, 0.96);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  min-width: 240px;
  z-index: 1000;
  overflow: hidden;
  padding: 6px 0;
}

.dropdown-menu.show {
  display: block;
  animation: dropdownFade 0.2s ease;
}

@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s ease, color 0.15s ease;
}

.dropdown-item:hover {
  background: rgba(99, 102, 241, 0.2);
  color: #a855f7;
}

.dropdown-item i {
  color: var(--accent);
  width: 16px;
  text-align: center;
}

/* Firebase Data Loading Overlay */
.data-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(11, 15, 25, 0.95);
  backdrop-filter: blur(20px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.data-loading-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: loaderPulse 2s infinite ease-in-out;
}

@keyframes loaderPulse {
  0%, 100% { box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7); }
  50% { box-shadow: 0 20px 50px rgba(99, 102, 241, 0.25); }
}

.spinner-container {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--primary);
  border-right-color: var(--accent);
  animation: spinRing 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

@keyframes spinRing {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spinner-center-icon {
  font-size: 1.8rem;
  color: var(--accent);
  animation: iconPulse 1.5s ease-in-out infinite alternate;
}

@keyframes iconPulse {
  from { transform: scale(0.9); opacity: 0.8; }
  to { transform: scale(1.1); opacity: 1; }
}

.loader-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.loader-status {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  min-height: 24px;
}

.loader-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

.loader-progress-fill {
  height: 100%;
  width: 15%;
  background: var(--primary-gradient);
  border-radius: 10px;
  transition: width 0.4s ease;
}
