/* ========================================
   LMS Platform - Modern Theme System
   Dark/Light Mode with CSS Variables
   ======================================== */

/* ========== ROOT VARIABLES (Dark Mode - Default) ========== */
:root {
  color-scheme: dark;

  /* Background Colors */
  --bg-primary: #0a0f1a;
  --bg-secondary: #111827;
  --bg-surface: #1f2937;
  --bg-surface-hover: #283548;
  --bg-card: rgba(31, 41, 55, 0.95);
  --bg-overlay: rgba(0, 0, 0, 0.5);

  /* Text Colors */
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --text-inverse: #111827;

  /* Accent Colors */
  --accent-primary: #06b6d4;
  --accent-primary-hover: #0891b2;
  --accent-secondary: #8b5cf6;
  --accent-secondary-hover: #7c3aed;
  --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));

  /* Status Colors */
  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-light: rgba(239, 68, 68, 0.15);
  --info: #3b82f6;
  --info-light: rgba(59, 130, 246, 0.15);

  /* Border Colors */
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-light: rgba(255, 255, 255, 0.12);
  --border-focus: var(--accent-primary);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 30px rgba(6, 182, 212, 0.2);
  --shadow-glow-accent: 0 0 40px rgba(139, 92, 246, 0.15);

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-8: 48px;
  --space-10: 64px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* Z-Index */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 300;
  --z-tooltip: 400;
}

/* ========== LIGHT MODE ========== */
[data-theme="light"],
html[data-bs-theme="light"] {
  color-scheme: light;

  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f3f4f6;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f9fafb;
  --bg-card: rgba(255, 255, 255, 0.98);
  --bg-overlay: rgba(0, 0, 0, 0.3);

  /* Text Colors */
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --text-inverse: #f9fafb;

  /* Accent Colors (slightly darker for light mode) */
  --accent-primary: #0891b2;
  --accent-primary-hover: #0e7490;
  --accent-secondary: #7c3aed;
  --accent-secondary-hover: #6d28d9;

  /* Border Colors */
  --border-color: rgba(0, 0, 0, 0.08);
  --border-color-light: rgba(0, 0, 0, 0.05);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 30px rgba(8, 145, 178, 0.15);
  --shadow-glow-accent: 0 0 40px rgba(124, 58, 237, 0.1);
}

/* ========== BASE STYLES ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

/* Background Gradient Orbs (Dark Mode Only) */
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.4;
  transition: opacity var(--transition-slow);
}

body::before {
  width: 500px;
  height: 500px;
  background: var(--accent-primary);
  top: -200px;
  left: -200px;
  animation: drift 20s ease-in-out infinite;
}

body::after {
  width: 400px;
  height: 400px;
  background: var(--accent-secondary);
  right: -150px;
  top: 150px;
  animation: drift 25s ease-in-out infinite reverse;
}

[data-theme="light"] body::before,
[data-theme="light"] body::after,
html[data-bs-theme="light"] body::before,
html[data-bs-theme="light"] body::after {
  opacity: 0.15;
}

/* ========== NAVBAR ========== */
.navbar {
  background: rgba(10, 15, 26, 0.85) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-normal);
  padding: var(--space-3) 0;
}

[data-theme="light"] .navbar,
html[data-bs-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.9) !important;
}

.navbar.nav-scrolled {
  background: rgba(10, 15, 26, 0.95) !important;
  box-shadow: var(--shadow-md);
}

[data-theme="light"] .navbar.nav-scrolled,
html[data-bs-theme="light"] .navbar.nav-scrolled {
  background: rgba(255, 255, 255, 0.98) !important;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--text-primary) !important;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.navbar-brand i {
  color: var(--accent-primary);
  font-size: 1.5rem;
}

.nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  padding: var(--space-2) var(--space-4) !important;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--text-primary) !important;
  background: var(--bg-surface);
}

.nav-link.active {
  color: var(--accent-primary) !important;
}

/* Theme Toggle Button */
.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1.2rem;
}

.theme-toggle:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent-primary);
  transform: scale(1.05);
}

.theme-toggle .bi-sun {
  display: none;
}

.theme-toggle .bi-moon-stars {
  display: inline-block;
}

[data-theme="light"] .theme-toggle .bi-sun,
html[data-bs-theme="light"] .theme-toggle .bi-sun {
  display: inline-block;
}

[data-theme="light"] .theme-toggle .bi-moon-stars,
html[data-bs-theme="light"] .theme-toggle .bi-moon-stars {
  display: none;
}

/* ========== MAIN CONTENT ========== */
main {
  flex: 1;
  animation: fadeUp 0.5s ease both;
}

/* ========== FOOTER ========== */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: var(--space-8) 0 var(--space-5);
  margin-top: auto;
}

footer h5,
footer h6 {
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

footer a:hover {
  color: var(--accent-primary);
}

footer .social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: all var(--transition-fast);
}

footer .social-icons a:hover {
  background: var(--accent-primary);
  color: var(--text-inverse);
  transform: translateY(-3px);
}

/* ========== BUTTONS ========== */
.btn {
  font-weight: 600;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

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

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

.btn-primary {
  background: var(--accent-gradient);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover,
.btn-primary:focus {
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
  background: var(--accent-gradient);
}

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

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-color-light);
  color: var(--text-primary);
}

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

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

.btn-warning {
  background: var(--warning);
  border: none;
  color: var(--text-inverse);
}

.btn-outline-primary {
  background: transparent;
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
}

.btn-outline-primary:hover {
  background: var(--accent-primary);
  color: white;
}

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

.btn-outline-secondary:hover {
  background: var(--bg-surface);
  border-color: var(--border-color-light);
  color: var(--text-primary);
}

.btn-outline-danger {
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
}

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

.btn-light {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.btn-light:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Gradient Button */
.btn-gradient {
  background: var(--accent-gradient);
  border: none;
  color: white;
  font-weight: 600;
  box-shadow: var(--shadow-glow);
}

.btn-gradient:hover {
  box-shadow: var(--shadow-glow), var(--shadow-md);
}

/* Glow Button */
.btn-glow {
  position: relative;
  overflow: hidden;
}

.btn-glow::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: var(--accent-gradient);
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn-glow:hover::before {
  opacity: 1;
  filter: blur(8px);
}

/* ========== CARDS ========== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-color-light);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-4) var(--space-5);
}

.card-body {
  padding: var(--space-5);
}

.card-footer {
  background: transparent;
  border-top: 1px solid var(--border-color);
  padding: var(--space-4) var(--space-5);
}

.card-title {
  color: var(--text-primary);
  font-weight: 600;
}

.card-text {
  color: var(--text-secondary);
}

/* Course Card */
.card-course {
  position: relative;
  overflow: hidden;
}

.card-course::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(300px 150px at 10% 0%, rgba(6, 182, 212, 0.1), transparent),
              radial-gradient(300px 150px at 90% 0%, rgba(139, 92, 246, 0.08), transparent);
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
}

.card-course:hover::before {
  opacity: 1;
}

.card-course:hover {
  border-color: var(--accent-primary);
}

/* Stat Card */
.card-stat {
  text-align: center;
  padding: var(--space-5);
}

.card-stat .stat-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto var(--space-4);
  background: var(--accent-gradient);
  color: white;
}

.card-stat .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.card-stat .stat-label {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ========== FORMS ========== */
.form-control,
.form-select {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: var(--space-3) var(--space-4);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast), transform var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
  background: var(--bg-surface);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
  color: var(--text-primary);
}

.form-control:hover,
.form-select:hover {
  border-color: var(--border-color-light);
  background: var(--bg-surface-hover);
}

.form-control:focus-visible,
.form-select:focus-visible {
  outline: none;
}

.form-control:focus {
  transform: translateY(-1px);
}

.form-control::placeholder {
  color: var(--text-muted);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

input[type="file"].form-control {
  padding: var(--space-2) var(--space-4);
  cursor: pointer;
}

input[type="file"].form-control::file-selector-button {
  margin-right: var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-primary);
  padding: var(--space-2) var(--space-4);
  transition: border-color var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

input[type="file"].form-control::file-selector-button:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-color-light);
}

input[type="file"].form-control::file-selector-button:active {
  transform: translateY(1px);
}

.form-label {
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: var(--space-2);
}

.form-check-input {
  background-color: var(--bg-surface);
  border-color: var(--border-color);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}

.form-check-input:checked {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.form-check-input:hover {
  border-color: var(--border-color-light);
}

.form-check-label {
  color: var(--text-secondary);
}

.input-group-text {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  transition: border-color var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
}

.input-group:focus-within .input-group-text {
  border-color: var(--accent-primary);
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

.input-group:focus-within .form-control,
.input-group:focus-within .form-select {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.12);
}

/* Floating labels */
.form-floating > .form-control,
.form-floating > .form-select {
  height: calc(3.5rem + 2px);
  padding: 1.25rem var(--space-4) 0.75rem;
}

.form-floating > label {
  color: var(--text-muted);
  padding: 1rem var(--space-4);
  transition: color var(--transition-fast), opacity var(--transition-fast), transform var(--transition-fast);
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select:focus ~ label,
.form-floating > .form-select:not([value=""]) ~ label {
  color: var(--accent-primary);
  opacity: 0.9;
}

.form-floating > .form-control:focus,
.form-floating > .form-select:focus {
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.18);
}

/* ========== TABLES ========== */
.table {
  color: var(--text-primary);
  --bs-table-bg: transparent;
}

.table > :not(caption) > * > * {
  background: transparent;
  border-bottom-color: var(--border-color);
  padding: var(--space-4);
}

.table > thead {
  border-bottom: 2px solid var(--border-color);
}

.table > thead th {
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.table-hover > tbody > tr:hover > * {
  background: var(--bg-surface-hover);
}

.table-light {
  --bs-table-bg: var(--bg-surface);
  --bs-table-color: var(--text-primary);
}

/* ========== BADGES ========== */
.badge {
  font-weight: 600;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}

.badge.bg-primary {
  background: var(--accent-gradient) !important;
}

.badge.bg-success {
  background: var(--success) !important;
}

.badge.bg-warning {
  background: var(--warning) !important;
  color: var(--text-inverse);
}

.badge.bg-danger {
  background: var(--danger) !important;
}

.badge.bg-info {
  background: var(--info) !important;
}

.badge.bg-secondary {
  background: var(--bg-surface) !important;
  color: var(--text-secondary);
}

/* ========== ALERTS ========== */
.alert {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: var(--space-4);
}

.alert-success {
  background: var(--success-light);
  border-color: var(--success);
  border-left-width: 4px;
}

.alert-warning {
  background: var(--warning-light);
  border-color: var(--warning);
  border-left-width: 4px;
}

.alert-danger,
.alert-error {
  background: var(--danger-light);
  border-color: var(--danger);
  border-left-width: 4px;
}

.alert-info {
  background: var(--info-light);
  border-color: var(--info);
  border-left-width: 4px;
}

/* ========== PROGRESS ========== */
.progress {
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  height: 8px;
  overflow: hidden;
}

.progress-bar {
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

/* ========== LIST GROUPS ========== */
.list-group-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: var(--space-4);
  transition: all var(--transition-fast);
}

.list-group-item:first-child {
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
}

.list-group-item:last-child {
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

.list-group-item-action:hover,
.list-group-item-action:focus {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.list-group-item.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.list-group-flush .list-group-item {
  border-left: 0;
  border-right: 0;
  border-radius: 0;
}

/* ========== DROPDOWNS ========== */
.dropdown-menu {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: var(--space-2);
  animation: dropdownIn 0.2s ease;
}

.dropdown-item {
  color: var(--text-primary);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.dropdown-item.text-danger:hover {
  background: var(--danger-light);
  color: var(--danger);
}

.dropdown-divider {
  border-color: var(--border-color);
  margin: var(--space-2) 0;
}

/* ========== MODALS ========== */
.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-5);
}

.modal-body {
  padding: var(--space-5);
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  padding: var(--space-4) var(--space-5);
}

.modal-title {
  color: var(--text-primary);
  font-weight: 600;
}

.btn-close {
  filter: invert(1);
  opacity: 0.6;
}

[data-theme="light"] .btn-close,
html[data-bs-theme="light"] .btn-close {
  filter: none;
}

/* ========== PAGINATION ========== */
.pagination {
  gap: var(--space-1);
}

.page-link {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4);
  transition: all var(--transition-fast);
}

.page-link:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.page-item.active .page-link {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

.page-item.disabled .page-link {
  background: var(--bg-surface);
  border-color: var(--border-color);
  color: var(--text-muted);
  opacity: 0.5;
}

/* ========== BREADCRUMB ========== */
.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: var(--space-4);
}

.breadcrumb-item {
  color: var(--text-muted);
}

.breadcrumb-item a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: var(--accent-primary);
}

.breadcrumb-item.active {
  color: var(--text-primary);
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--text-muted);
}

/* ========== AVATARS ========== */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  color: white;
  font-weight: 600;
  object-fit: cover;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
}

.avatar-md {
  width: 48px;
  height: 48px;
  font-size: 1rem;
}

.avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 1.25rem;
}

.avatar-xl {
  width: 96px;
  height: 96px;
  font-size: 2rem;
}

/* ========== SECTION HEADERS ========== */
.section-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.page-header {
  margin-bottom: var(--space-6);
}

.page-header h1,
.page-header h2 {
  font-weight: 700;
  color: var(--text-primary);
}

.page-header p {
  color: var(--text-secondary);
  margin-top: var(--space-2);
}

/* ========== HERO SECTION ========== */
.hero-section {
  background: var(--accent-gradient);
  position: relative;
  overflow: hidden;
  padding: var(--space-10) 0;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-section h1 {
  color: white;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
}

.hero-section p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
}

/* ========== STATS SECTION ========== */
.stats-section {
  background: var(--bg-secondary);
  padding: var(--space-6) 0;
}

.stat-item {
  text-align: center;
  padding: var(--space-4);
}

.stat-item .stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-item .stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ========== FEATURE CARDS ========== */
.feature-card {
  text-align: center;
  padding: var(--space-6);
}

.feature-card .feature-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto var(--space-4);
  background: var(--accent-gradient);
  color: white;
  box-shadow: var(--shadow-glow);
}

.feature-card h5 {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.feature-card p {
  color: var(--text-secondary);
  margin: 0;
}

/* ========== TEXT UTILITIES ========== */
.text-primary {
  color: var(--accent-primary) !important;
}

.text-secondary {
  color: var(--text-secondary) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.text-success {
  color: var(--success) !important;
}

.text-warning {
  color: var(--warning) !important;
}

.text-danger {
  color: var(--danger) !important;
}

.text-info {
  color: var(--info) !important;
}

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== BACKGROUND UTILITIES ========== */
.bg-primary {
  background: var(--accent-gradient) !important;
}

.bg-surface {
  background: var(--bg-surface) !important;
}

.bg-success {
  background: var(--success) !important;
}

.bg-warning {
  background: var(--warning) !important;
}

.bg-danger {
  background: var(--danger) !important;
}

.bg-info {
  background: var(--info) !important;
}

/* ========== LINK STYLES ========== */
a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-secondary);
}

.link-light {
  color: var(--text-primary);
}

.link-light:hover {
  color: var(--accent-primary);
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-surface-hover);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* ========== ANIMATIONS ========== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes drift {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(20px, 20px);
  }
}

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

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Glow Effect */
.glow {
  box-shadow: var(--shadow-glow);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-top: var(--space-3);
  }

  .nav-link {
    padding: var(--space-3) var(--space-4) !important;
  }
}

@media (max-width: 767.98px) {
  body::before,
  body::after {
    width: 300px;
    height: 300px;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  .stat-item .stat-number {
    font-size: 2rem;
  }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  body::before,
  body::after {
    animation: none;
  }
}

/* ========== PRINT STYLES ========== */
@media print {
  body::before,
  body::after {
    display: none;
  }

  .navbar,
  footer,
  .btn,
  .theme-toggle {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .card {
    border: 1px solid #ddd;
    box-shadow: none;
  }
}
