/* --- Root Variables for Theming (Default: Dark) --- */
:root {
  --bg-color: #0f172a;
  /* slate-900 */
  --card-bg: rgba(30, 41, 59, 0.7);
  /* slate-800 with transparency (Glassmorphism) */
  --text-color: #e2e8f0;
  /* slate-200 */
  --primary-color: #22d3ee;
  /* cyan-400 */
  --secondary-color: #818cf8;
  /* indigo-400 */
  --secondary-text-color: #94a3b8;
  /* slate-400 */
  --border-color: rgba(51, 65, 85, 0.7);
  --success-color: #10b981;
  /* green-500 */
  --error-color: #ef4444;
  /* red-500 */
  --font-family: 'IBM Plex Sans Arabic', sans-serif;
}

/* Light Theme */
.light-theme {
  --bg-color: #f1f5f9;
  /* slate-100 */
  --card-bg: rgba(255, 255, 255, 0.85);
  --text-color: #1e293b;
  /* slate-800 */
  --primary-color: #06b6d4;
  /* cyan-600 */
  --border-color: rgba(203, 213, 225, 0.8);
}

/* Purple Theme */
.purple-theme {
  --bg-color: #1e1b4b;
  /* indigo-950 */
  --card-bg: rgba(49, 46, 129, 0.7);
  /* indigo-900 with transparency */
  --text-color: #e0e7ff;
  /* indigo-100 */
  --primary-color: #c4b5fd;
  /* violet-300 */
  --border-color: rgba(129, 140, 248, 0.5);
}

/* Base Body and Glass Card Styles */
body {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: all 0.5s ease;
}

h1 {
  font-family: 'Cairo', sans-serif;
}

.glass-card {
  background-color: var(--card-bg);
  backdrop-filter: blur(16px);
  /* Stronger blur for premium feel */
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

/* Hero Section Styles */
.hero-section {
  position: relative;
  overflow: hidden;
  padding: 6rem 1rem;
  text-align: center;
}

.hero-bg-blur {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.15) 0%, rgba(15, 23, 42, 0) 70%);
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--text-color) 30%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 5rem;
  }
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--secondary-text-color);
  max-width: 800px;
  margin: 0 auto 3rem auto;
  line-height: 1.8;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  background: var(--primary-color);
  border-radius: 9999px;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.3);
}

.cta-button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.5);
  background: #67e8f9;
  /* lighter cyan */
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 5px;
  border: 2px solid var(--bg-color);
}

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

/* Animated Gradient Text */
.animated-gradient-text {
  background: linear-gradient(90deg,
      var(--primary-color),
      var(--secondary-color),
      var(--primary-color));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-flow 6s ease infinite;
}

@keyframes gradient-flow {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Keyframe Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animation-container {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Navigation Utilities */
.nav-link.active {
  background-color: var(--primary-color);
  color: #0f172a;
  font-weight: 700;
}

/* Arabic Text Alignment */
.text-rtl {
  text-align: right;
}

/* Lecture List Button */
.lecture-list-button {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  width: 100%;
  text-align: right;
  padding: 1.25rem;
  border-radius: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lecture-list-button:hover {
  transform: translateX(-5px);
  /* Move left for RTL feel */
  border-color: var(--primary-color);
  background-color: rgba(34, 211, 238, 0.05);
  /* Slight cyan tint */
}

html[dir="ltr"] .lecture-list-button:hover {
  transform: translateX(5px);
}

.lecture-number {
  color: var(--primary-color);
  font-weight: 800;
  margin-left: 0.5rem;
}

html[dir="ltr"] .lecture-number {
  margin-left: 0;
  margin-right: 0.5rem;
}

/* Footer — full width, subtle dark overlay */
footer {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  margin-top: auto;
  border-top: 1px solid var(--border-color);
}