/* ========================================
   EXOT Exam Management System - Styles
   Light Blue Cloud Theme
======================================== */

/* CSS Variables - Light Blue Theme */
:root {
  --primary: #0ea5e9;
  --primary-light: #38bdf8;
  --primary-dark: #0284c7;
  --secondary: #06b6d4;
  --accent: #f59e0b;
  --danger: #ef4444;
  --success: #10b981;

  --bg-light: #f0f9ff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-glass: rgba(224, 242, 254, 0.5);

  --text-primary: #0c4a6e;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --border-color: rgba(14, 165, 233, 0.2);
  --shadow: 0 10px 40px -10px rgba(14, 165, 233, 0.2);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 50%, #e0f7fa 100%);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Cloud-like Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(14, 165, 233, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(56, 189, 248, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  color: var(--text-secondary);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.header {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(240, 249, 255, 0.9);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: white;
}

/* Navigation */
.nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav-link {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.85rem;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  background: var(--bg-glass);
  color: var(--primary);
}

.nav-link.active {
  background: var(--primary);
  color: white;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.card:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

.card-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.card-subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5);
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--primary);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #059669);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
  transform: translateY(-2px);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #dc2626);
  color: white;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}

/* Form Elements */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25rem;
  padding-right: 3rem;
}

/* Grid */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Table */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: white;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  background: var(--bg-glass);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table tr:hover {
  background: var(--bg-glass);
}

.table tr:last-child td {
  border-bottom: none;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.badge-info {
  background: rgba(14, 165, 233, 0.15);
  color: var(--primary);
}

/* QR Code Container */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: white;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-color);
  max-width: 280px;
  margin: 0 auto;
}

.qr-info {
  text-align: center;
}

.qr-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.qr-class {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Stats Cards */
.stat-card {
  text-align: center;
  padding: 1.25rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

/* Alert */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #065f46;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #92400e;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #991b1b;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: var(--transition);
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--danger);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 0.6rem 1.25rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: var(--transition);
  font-size: 0.9rem;
}

.tab-btn.active {
  background: var(--primary);
  color: white;
}

.tab-btn:hover:not(.active) {
  background: var(--bg-glass);
  color: var(--primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Bulk Textarea */
.bulk-textarea {
  width: 100%;
  min-height: 200px;
  padding: 1rem;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  resize: vertical;
}

.bulk-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-glass);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.3s;
}

/* Floating Login Button - Bottom Left */
.floating-auth {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 999;
}

.floating-auth .btn {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Role Badge */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Subject Cards */
.subject-card {
  border-left: 4px solid;
  cursor: pointer;
}

.subject-card.english {
  border-left-color: #3b82f6;
}

.subject-card.arabic {
  border-left-color: #10b981;
}

.subject-card.alquran {
  border-left-color: #f59e0b;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.4s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .nav {
    justify-content: center;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  .nav-link {
    white-space: nowrap;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .card {
    padding: 1.25rem;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .floating-auth {
    bottom: 1rem;
    left: 1rem;
  }

  /* Responsive Tables */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table th,
  .table td {
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  /* Adjust Modal for Mobile */
  .modal {
    width: 95%;
    padding: 1rem;
    margin: 1rem;
  }

  /* Typography Adjustments */
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .btn {
    width: 100%;
    /* Full width buttons on very small screens */
    margin-bottom: 0.5rem;
  }

  .btn-sm {
    width: auto;
    display: inline-flex;
  }

  .logo {
    font-size: 1.25rem;
  }

  .logo-icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
}

/* Print Styles */
@media print {
  body {
    background: white !important;
  }

  body::before {
    display: none;
  }

  .header,
  .nav,
  .btn,
  .floating-auth,
  .no-print {
    display: none !important;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .print-only {
    display: block !important;
  }
}

/* Print QR Cards - 4 per page */
.print-qr-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding: 20px;
}

.print-qr-card {
  border: 2px solid #333;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  page-break-inside: avoid;
  background: white;
}

.print-qr-card img {
  width: 120px;
  height: 120px;
}

.print-qr-card h4 {
  font-size: 14px;
  margin: 8px 0 4px 0;
}

.print-qr-card p {
  font-size: 12px;
  color: #666;
  margin: 0;
}

/* Dark Mode Theme */
body.dark-mode {
  --primary: #38bdf8;
  --primary-light: #7dd3fc;
  --primary-dark: #0ea5e9;
  --secondary: #22d3ee;

  --bg-light: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.95);
  --bg-glass: rgba(51, 65, 85, 0.5);

  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --border-color: rgba(56, 189, 248, 0.2);
  --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);

  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  color: var(--text-primary);
}

body.dark-mode::before {
  background:
    radial-gradient(ellipse at 20% 30%, rgba(56, 189, 248, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(34, 211, 238, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(125, 211, 252, 0.05) 0%, transparent 60%);
}

body.dark-mode .header {
  background: rgba(15, 23, 42, 0.95);
}

body.dark-mode .form-input,
body.dark-mode .form-select,
body.dark-mode .bulk-textarea {
  background: #1e293b;
  color: var(--text-primary);
  border-color: var(--border-color);
}

body.dark-mode .form-input::placeholder {
  color: var(--text-muted);
}

body.dark-mode .table-container {
  background: #1e293b;
}

body.dark-mode .table th {
  background: rgba(51, 65, 85, 0.8);
}

body.dark-mode .table tr:hover {
  background: rgba(51, 65, 85, 0.5);
}

body.dark-mode .modal {
  background: #1e293b;
}

body.dark-mode .qr-container {
  background: #1e293b;
}

body.dark-mode .stat-value {
  color: var(--primary);
}

/* Settings Toggle Button */
.settings-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  display: flex;
  gap: 0.5rem;
}

.settings-toggle .btn {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.2rem;
}

/* Activity Log Styles */
.activity-log {
  max-height: 400px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-time {
  color: var(--text-muted);
  white-space: nowrap;
  font-size: 0.75rem;
}

.activity-user {
  font-weight: 600;
  color: var(--primary);
}

.activity-action {
  color: var(--text-secondary);
}

/* Chart Container */
.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
}

/* Ranking Styles */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
}

.rank-1 {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
}

.rank-2 {
  background: linear-gradient(135deg, #9ca3af, #6b7280);
  color: white;
}

.rank-3 {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: white;
}

.rank-other {
  background: var(--bg-glass);
  color: var(--text-secondary);
}

/* Keyboard Shortcut Hints */
.kbd {
  display: inline-block;
  padding: 0.2rem 0.4rem;
  font-size: 0.7rem;
  font-family: 'Consolas', monospace;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  margin-left: 0.5rem;
}

/* PWA Install Banner */
.pwa-install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.pwa-install-banner.show {
  transform: translateY(0);
}

.pwa-install-banner .btn {
  background: white;
  color: var(--primary);
}

/* Responsive adjustments for dark mode toggle */
@media (max-width: 640px) {
  .settings-toggle {
    bottom: 1rem;
    right: 1rem;
  }

  .settings-toggle .btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

/* Sync Indicator */
.sync-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 0.75rem;
  cursor: help;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  animation: pulse 2s infinite;
}

.sync-indicator.online .sync-dot {
  background: #10b981;
}

.sync-indicator.offline .sync-dot {
  background: #ef4444;
}

.sync-indicator.syncing .sync-dot {
  background: #f59e0b;
  animation: blink 0.5s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 350px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  animation: slideIn 0.3s ease-out;
}

.toast.success {
  border-left: 4px solid var(--success);
}

.toast.error {
  border-left: 4px solid var(--danger);
}

.toast.warning {
  border-left: 4px solid var(--accent);
}

.toast.info {
  border-left: 4px solid var(--primary);
}

.toast-icon {
  font-size: 1.25rem;
}

.toast-message {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0;
  line-height: 1;
}

.toast-close:hover {
  color: var(--text-primary);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Bulk Score Input Enhancement */
.bulk-score-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.bulk-score-row:last-child {
  border-bottom: none;
}

.bulk-score-name {
  flex: 1;
  font-weight: 500;
}

.bulk-score-input {
  width: 70px;
  text-align: center;
}

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn.loading::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 0.5rem;
}

/* Footer Credit */
.footer-credit {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  color: var(--text-muted);
  z-index: 998;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.footer-credit a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.footer-credit a:hover {
  color: var(--primary-dark);
}

body.dark-mode .footer-credit {
  background: rgba(30, 41, 59, 0.95);
}

@media print {
  .footer-credit {
    display: none !important;
  }
}

/* ========================================
   Landing Page Styles
======================================== */

.landing-page {
  overflow-x: hidden;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  overflow: hidden;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: float 20s infinite ease-in-out;
}

.blob-1 {
  top: -10%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: rgba(14, 165, 233, 0.2);
}

.blob-2 {
  bottom: -10%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: rgba(16, 185, 129, 0.2);
  animation-delay: -5s;
}

.blob-3 {
  top: 40%;
  left: 40%;
  width: 400px;
  height: 400px;
  background: rgba(245, 158, 11, 0.15);
  animation-delay: -10s;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0);
  }

  33% {
    transform: translate(30px, -50px);
  }

  66% {
    transform: translate(-20px, 20px);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text {
  text-align: left;
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(14, 165, 233, 0.1);
  color: var(--primary);
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 500px;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.hero-stat-item strong {
  display: block;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.hero-stat-item span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Login Card in Hero */
.hero-login-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
  padding: 2.5rem;
  border-radius: 24px;
  width: 100%;
  max-width: 420px;
  margin-left: auto;
}

/* Features Section */
.features-section {
  padding: 6rem 1rem;
  background: white;
  text-align: center;
}

.section-title {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.section-subtitle {
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 4rem;
  font-size: 1.1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  padding: 2rem;
  border-radius: 20px;
  background: var(--bg-light);
  border: 1px solid transparent;
  transition: all 0.3s ease;
  text-align: center;
}

.feature-card:hover {
  transform: translateY(-5px);
  background: white;
  border-color: var(--border-color);
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: white;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

/* Subjects Section */
.subjects-section {
  padding: 6rem 1rem;
  background: var(--bg-light);
}

.subjects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.subject-item {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.subject-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: var(--border-color);
}

.subject-item.english::before {
  background: #3b82f6;
}

.subject-item.arabic::before {
  background: #10b981;
}

.subject-item.alquran::before {
  background: #f59e0b;
}

.subject-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.subject-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: var(--bg-light);
  border-radius: 50%;
}

/* Info Section */
.info-section {
  padding: 6rem 1rem;
  background: white;
}

.info-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 4rem;
}

.info-image img {
  border-radius: 20px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 400px;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: white;
  padding: 4rem 1rem 1rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.footer-links a {
  display: block;
  color: #94a3b8;
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 1.5rem;
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-text {
    text-align: center;
  }

  .hero-description {
    margin: 0 auto 2rem;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-login-card {
    margin: 0 auto;
  }

  .subjects-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .info-container {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.5rem;
  }
}