html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin: 0;
  padding: 0;
  padding-bottom: 80px;
  font-family: 'Noto Sans', 'Noto Sans Arabic', sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #f1f5f9;
  min-height: 100vh;
}

/* Arabic Font Support */
[lang="ar"], [dir="rtl"] {
  font-family: 'Noto Sans Arabic', 'Noto Sans', sans-serif;
}

/* Dark Theme - Now Default */
.navbar {
  background: rgba(30, 41, 59, 0.95) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

.navbar-brand,
.nav-link {
  color: #f1f5f9 !important;
  transition: color 0.3s;
}

.nav-link:hover {
  color: #60a5fa !important;
}

.card {
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  color: #f1f5f9;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.4);
}

.card-header {
  background: rgba(59, 130, 246, 0.15);
  border-bottom: 1px solid rgba(59, 130, 246, 0.3);
  font-weight: 600;
  color: #f1f5f9;
}

.table {
  background-color: rgba(30, 41, 59, 0.6);
  color: #f1f5f9;
  border-radius: 8px;
  overflow: hidden;
}

.table thead th {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(59, 130, 246, 0.2);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  color: #f1f5f9;
}

.table tbody tr {
  border-color: rgba(59, 130, 246, 0.15);
  transition: background-color 0.2s;
}

.table-hover tbody tr:hover {
  background-color: rgba(59, 130, 246, 0.15);
}

.form-control,
.form-select {
  background-color: rgba(30, 41, 59, 0.7);
  color: #f1f5f9;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  transition: all 0.3s;
}

.form-control:focus,
.form-select:focus {
  background-color: rgba(30, 41, 59, 0.9);
  color: #f1f5f9;
  border-color: #60a5fa;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.3);
}

.form-control::placeholder {
  color: rgba(241, 245, 249, 0.5);
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s;
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s;
}

.btn-success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-outline-primary {
  color: #818cf8;
  border-color: #818cf8;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s;
}

.btn-outline-primary:hover {
  background-color: #818cf8;
  border-color: #818cf8;
  color: #1a1f3a;
}

.badge {
  border-radius: 6px;
  padding: 0.35em 0.65em;
  font-weight: 500;
}

.footer {
  background: rgba(26, 31, 58, 0.95);
  border-top: 1px solid rgba(99, 102, 241, 0.2);
  color: #e9ecef;
  padding: 1rem 0;
  margin-top: auto;
}

/* Stats Cards */
.stats-card {
  border-radius: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.stats-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

body.dark-theme .stats-card:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* Buttons */
.btn-watch {
  transition: all 0.3s;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Table Responsive */
.table-responsive {
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.15) !important;
}

/* Footer */
.footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: rgba(30, 41, 59, 0.95);
  border-top: 1px solid rgba(59, 130, 246, 0.15);
  color: #94a3b8;
  padding: 12px 0;
  font-size: 0.875rem;
  z-index: 1000;
}

/* RTL Support */
[dir="rtl"] .me-1, [dir="rtl"] .me-2 {
  margin-right: 0 !important;
  margin-left: 0.25rem !important;
}

[dir="rtl"] .ms-auto {
  margin-left: 0 !important;
  margin-right: auto !important;
}

/* Badge Styling */
.badge {
  padding: 0.35em 0.65em;
  font-size: 0.85em;
}

/* Card Shadows */
.shadow-sm {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

body.dark-theme .shadow-sm {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3) !important;
}

/* Smooth Transitions */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}