/* ==========================================================================
   PREMIUM DESIGN SYSTEM & VARIABLES (NEXUS-7 × Coursera Redesign)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Premium Dark Theme Palette */
  --bg-main: #060913;          /* Very deep dark obsidian */
  --bg-card: rgba(16, 23, 42, 0.65); /* Translucent dark slate */
  --bg-card-hover: rgba(22, 32, 59, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(217, 119, 6, 0.3);
  
  --text-main: #f8fafc;        /* High-contrast white slate */
  --text-muted: #94a3b8;       /* Medium slate text */
  --text-dark: #475569;        /* Low-contrast slate */
  
  /* Brand Core Colors */
  --primary: #d97706;          /* Crucible Gold (Amber 600) */
  --primary-hover: #f59e0b;    /* Bright Amber 500 */
  --primary-glow: rgba(217, 119, 6, 0.35);
  --primary-light: rgba(217, 119, 6, 0.12);
  
  --secondary: #2563eb;        /* Classic Coursera Blue */
  --secondary-hover: #3b82f6;
  
  --success: #10b981;          /* Emerald Green */
  --error: #ef4444;            /* Crimson Red */
  
  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Dimensions */
  --header-height: 76px;
  --max-width: 1240px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  
  /* Transitions & Animation Dynamics */
  --transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 36px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px rgba(217, 119, 6, 0.15);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* Premium radial ambient glows */
  background-image: 
    radial-gradient(circle at 5vw 15vh, rgba(217, 119, 6, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 85vw 85vh, rgba(37, 99, 235, 0.03) 0%, transparent 45%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

button, input, select {
  font-family: inherit;
  font-size: inherit;
  background: none;
  border: none;
  color: inherit;
  outline: none;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-dark);
}

/* ==========================================================================
   LAYOUT UTILITIES
   ========================================================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  width: 100%;
}

.section-padding {
  padding: 100px 0;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; margin-bottom: 16px; }
h3 { font-size: 1.75rem; }

.text-gradient {
  background: linear-gradient(135deg, var(--text-main) 20%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--bg-main);
  border: 1px solid var(--primary);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(217, 119, 6, 0.4);
}

.btn-secondary {
  border: 1px solid var(--border-color);
  background-color: rgba(255, 255, 255, 0.01);
}
.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

/* ==========================================================================
   HEADER / NAVIGATION
   ========================================================================== */
.header {
  height: var(--header-height);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(6, 9, 19, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.75px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-main);
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.nav-menu-wrapper {
  display: flex;
  align-items: center;
  gap: 40px;
}

/* Explore Dropdown Styling */
.dropdown-wrapper {
  position: relative;
}

.explore-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}
.explore-btn:hover {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: var(--primary);
  color: var(--primary);
}

.explore-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 300px;
  background-color: #0b111e;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-lg);
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
}
.dropdown-wrapper:hover .explore-dropdown {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}
.dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--primary);
}

.dropdown-icon {
  font-size: 1.25rem;
}

.dropdown-item-info h4 {
  font-size: 0.9rem;
  font-weight: 700;
}
.dropdown-item-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}
.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

/* ==========================================================================
   PAGES DISPLAY & ANIMATION
   ========================================================================== */
.page {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.page.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   PAGE: HOME / HERO
   ========================================================================== */
.hero {
  padding: 80px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 64px;
  align-items: center;
}

.hero-content h1 {
  margin-bottom: 24px;
  font-size: 4rem;
  line-height: 1.1;
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 600px;
}

.search-box {
  display: flex;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 6px;
  border-radius: var(--radius-sm);
  max-width: 520px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
  transition: var(--transition);
}
.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.search-box input {
  flex-grow: 1;
  padding: 12px 18px;
  color: var(--text-main);
  font-size: 0.95rem;
}
.search-box input::placeholder {
  color: var(--text-dark);
}

.search-box button {
  background-color: var(--primary);
  color: var(--bg-main);
  padding: 0 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
}
.search-box button:hover {
  background-color: var(--primary-hover);
}

/* Partners Banner */
.partners-banner {
  background-color: rgba(16, 23, 42, 0.2);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 30px 0;
  text-align: center;
}

.partners-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 64px;
}

.partner-logo {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--text-dark);
  font-size: 1.15rem;
  letter-spacing: 2px;
}

/* Category grid (WOW Upgrade) */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 36px 28px;
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.category-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: transparent;
  transition: var(--transition);
}
.category-card:hover {
  border-color: var(--primary);
  background-color: var(--bg-card-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.category-card:hover::before {
  background-color: var(--primary);
}

.category-icon {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.category-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

/* ==========================================================================
   COURSE CARDS & GRID
   ========================================================================== */
.courses-section {
  background-color: rgba(6, 9, 19, 0.4);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 48px;
}

.section-header-left h2 {
  margin-bottom: 12px;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 32px;
}

.course-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.course-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.course-thumb {
  height: 190px;
  background: linear-gradient(135deg, #1e293b 0%, #0b0f19 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-color);
}

.course-thumb-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 80% 20%, rgba(217, 119, 6, 0.18) 0%, transparent 65%);
}

.course-code-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  background-color: rgba(6, 9, 19, 0.85);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  border: 1px solid var(--border-hover);
}

.course-thumb-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  padding: 0 24px;
  text-align: center;
  color: var(--text-main);
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.course-info {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.course-category {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.75px;
}

.course-info h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  line-height: 1.3;
}

.course-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 4.2em;
}

.course-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}

.course-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.course-meta-item svg {
  width: 15px;
  height: 15px;
  stroke: var(--text-dark);
}

.course-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.course-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 0.95rem;
}
.course-rating svg {
  color: #fbbf24;
  fill: #fbbf24;
  width: 15px;
  height: 15px;
}

.course-enrollment {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ==========================================================================
   EXPLORER PAGE (Filters)
   ========================================================================== */
.explorer-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 48px;
  margin-top: 40px;
}

.filter-sidebar {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  height: fit-content;
  position: sticky;
  top: 110px;
}

.filter-group {
  margin-bottom: 32px;
}

.filter-group h4 {
  font-size: 1.05rem;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.filter-option:hover {
  color: var(--text-main);
}

.filter-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ==========================================================================
   COURSE DETAIL PAGE (Redesign with Sticky Info)
   ========================================================================== */
.course-detail-header {
  background: linear-gradient(135deg, #060913 0%, #151d30 100%);
  border-bottom: 1px solid var(--border-color);
  padding: 70px 0;
  position: relative;
  overflow: hidden;
}

.detail-header-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 64px;
  align-items: flex-start;
}

.course-breadcrumbs {
  font-size: 0.85rem;
  color: var(--text-dark);
  margin-bottom: 24px;
}

.detail-header-content h1 {
  font-size: 3rem;
  margin-bottom: 20px;
}

.instructor-line {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 1rem;
  margin-bottom: 30px;
}

.instructor-avatar {
  width: 40px;
  height: 40px;
  background-color: var(--primary-light);
  border: 1px solid var(--border-hover);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
}

.detail-stats-row {
  display: flex;
  gap: 28px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Sticky Enrollment Box UI */
.enroll-card-wrapper {
  position: relative;
  width: 100%;
}

.enroll-card-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 36px;
  box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--primary);
  position: sticky;
  top: 110px; /* Floats beautifully when scrolling */
  z-index: 10;
}

.enroll-price {
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 12px;
  font-family: var(--font-heading);
}

.enroll-benefits {
  margin: 28px 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.enroll-benefits li {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.enroll-benefits li svg {
  color: var(--success);
  width: 16px;
  height: 16px;
}

/* Tab Panels */
.course-detail-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 64px;
  margin-top: 20px;
}

.tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 36px;
  gap: 32px;
}

.tab-btn {
  padding: 18px 0;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
}
.tab-btn:hover, .tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
}

/* Syllabus Accordions */
.syllabus-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.syllabus-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-card);
  overflow: hidden;
  transition: var(--transition);
}

.syllabus-header {
  padding: 22px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
}
.syllabus-header:hover {
  background-color: var(--bg-card-hover);
}

.syllabus-title-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.week-badge {
  background-color: var(--primary-light);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 800;
}

.syllabus-content {
  padding: 0 28px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  color: var(--text-muted);
  font-size: 0.95rem;
  background-color: rgba(6, 9, 19, 0.2);
}

.syllabus-item.open .syllabus-content {
  max-height: 220px;
  padding: 24px 28px;
  border-top: 1px solid var(--border-color);
}

.syllabus-item.open .chevron-icon {
  transform: rotate(180deg);
}

/* ==========================================================================
   STUDENT DASHBOARD
   ========================================================================== */
.dashboard-header {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 48px 0;
}

.dashboard-courses {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 48px;
}

.dashboard-course-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 30px;
  display: grid;
  grid-template-columns: 200px 1fr 200px;
  gap: 32px;
  align-items: center;
  transition: var(--transition);
}
.dashboard-course-card:hover {
  border-color: var(--primary);
}

.dashboard-course-thumb {
  height: 120px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #1e293b 0%, #060913 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1px solid var(--border-color);
}

.dashboard-course-code {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: rgba(6, 9, 19, 0.85);
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--primary);
}

.dashboard-course-thumb span {
  font-size: 1.15rem;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.progress-container {
  margin-top: 18px;
}

.progress-bar-bg {
  height: 8px;
  background-color: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--primary);
  border-radius: 4px;
  width: 0%;
  transition: width 0.7s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ==========================================================================
   COURSE PLAYER UI (Premium Video Portal Redesign)
   ========================================================================== */
.player-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  height: calc(100vh - var(--header-height));
  overflow: hidden;
}

.player-main {
  padding: 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.video-container {
  width: 100%;
  aspect-ratio: 16/9;
  background-color: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
  margin-bottom: 28px;
}

.video-mock {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle, #162037 0%, #040712 100%);
  position: relative;
}

.video-play-btn {
  width: 84px;
  height: 84px;
  background-color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--bg-main);
  box-shadow: 0 8px 30px rgba(217, 119, 6, 0.4);
  transition: var(--transition);
}
.video-play-btn:hover {
  transform: scale(1.1);
  background-color: var(--primary-hover);
  box-shadow: 0 12px 40px rgba(217, 119, 6, 0.6);
}

.video-play-btn svg {
  width: 32px;
  height: 32px;
  fill: var(--bg-main);
  margin-left: 4px;
}

/* Custom Controller Bar (Coursera-like styling) */
.video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));
  padding: 20px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.85rem;
}

.video-btn-icon {
  width: 20px;
  height: 20px;
  cursor: pointer;
  color: var(--text-main);
  transition: var(--transition);
}
.video-btn-icon:hover {
  color: var(--primary);
}

.video-progress-bar {
  flex-grow: 1;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
}
.video-progress-bar:hover {
  height: 8px;
}

.video-progress-fill {
  height: 100%;
  background-color: var(--primary);
  width: 0%;
  border-radius: 3px;
}

/* Speed Dropdown UI */
.speed-selector-wrapper {
  position: relative;
}

.speed-btn {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}

.speed-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background-color: #0b111e;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 0;
  display: none;
  min-width: 80px;
  z-index: 10;
}
.speed-dropdown.open {
  display: block;
}

.speed-option {
  padding: 8px 12px;
  text-align: center;
  cursor: pointer;
}
.speed-option:hover {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--primary);
}

.player-sidebar {
  border-left: 1px solid var(--border-color);
  background-color: var(--bg-card);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 28px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-lecture-list {
  list-style: none;
}

.sidebar-lecture-item {
  padding: 20px 28px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  gap: 16px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
}
.sidebar-lecture-item:hover {
  background-color: var(--bg-card-hover);
}
.sidebar-lecture-item.active {
  background-color: rgba(217, 119, 6, 0.06);
  border-left: 4px solid var(--primary);
  color: var(--primary);
}

.lecture-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--success);
  transition: var(--transition);
}
.lecture-checkbox.completed {
  border-color: var(--success);
  background-color: rgba(16, 185, 129, 0.12);
}

/* ==========================================================================
   TOAST NOTIFICATION SYSTEM
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}

.toast {
  background-color: #0b111e;
  border: 1px solid var(--border-color);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 16px 24px;
  color: var(--text-main);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 320px;
  transform: translateX(120%);
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.toast.show {
  transform: translateX(0);
}

.toast-success {
  border-left-color: var(--success);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background-color: #03050a;
  border-top: 1px solid var(--border-color);
  padding: 80px 0 30px 0;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 64px;
}

.footer-col h4 {
  font-size: 1.05rem;
  margin-bottom: 24px;
  color: var(--text-main);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 14px;
}

.footer-links a {
  color: var(--text-muted);
}
.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-dark);
  font-size: 0.85rem;
}

.footer-bottom-links {
  display: flex;
  gap: 32px;
}

/* ==========================================================================
   OBSIDIAN MOC INTEGRATION STYLES
   ========================================================================== */
.obsidian-vault {
  background-color: #121622;  /* Match deep dark theme with slate tones */
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 40px;
  font-family: var(--font-body);
  color: #c9d1d9;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.obsidian-vault::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, #a855f7 100%);
}

.obsidian-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
  letter-spacing: -0.5px;
}

.obsidian-properties {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 32px;
  font-size: 0.9rem;
}

.properties-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-dark);
  margin-bottom: 14px;
  letter-spacing: 1px;
}

.properties-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  row-gap: 12px;
}

.property-label {
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.property-value {
  color: var(--text-main);
}

.property-tag {
  display: inline-block;
  background-color: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-right: 8px;
  font-weight: 700;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.obsidian-callout {
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--text-dark);
  background-color: rgba(255, 255, 255, 0.01);
  padding: 22px 26px;
  border-radius: 8px;
  margin: 28px 0;
  font-size: 0.95rem;
}

.callout-title {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.callout-warning {
  border-left-color: var(--primary);
  background-color: var(--primary-light);
}
.callout-warning .callout-title {
  color: var(--primary-hover);
}

.callout-important {
  border-left-color: #a855f7;
  background-color: rgba(168, 85, 247, 0.05);
}
.callout-important .callout-title {
  color: #c084fc;
}

.callout-note {
  border-left-color: #3b82f6;
  background-color: rgba(59, 130, 246, 0.05);
}
.callout-note .callout-title {
  color: #60a5fa;
}

.wiki-link {
  color: #a855f7;
  font-weight: 700;
  cursor: pointer;
  border-bottom: 1px dashed rgba(168, 85, 247, 0.4);
  transition: var(--transition);
  padding: 1px 4px;
  border-radius: 4px;
}
.wiki-link:hover {
  color: #c084fc;
  border-bottom-color: #c084fc;
  background-color: rgba(168, 85, 247, 0.1);
}

.obsidian-section {
  margin: 48px 0;
}

.obsidian-section h2 {
  font-size: 1.5rem;
  color: #ffffff;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.obsidian-pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.obsidian-pillar-card {
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 28px;
  transition: var(--transition);
}
.obsidian-pillar-card:hover {
  border-color: #a855f7;
  background-color: rgba(255, 255, 255, 0.02);
  transform: translateY(-2px);
}

.obsidian-pillar-card h3 {
  font-size: 1.15rem;
  color: #ffffff;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.obsidian-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.obsidian-links-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}
.obsidian-links-list li::before {
  content: "📄";
  font-size: 0.95rem;
}

/* Wiki-link Detail Modal */
.wiki-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(3, 5, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.wiki-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.wiki-modal-box {
  background-color: #0b111e;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  width: 90%;
  max-width: 600px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border-top: 4px solid #a855f7;
}
.wiki-modal.open .wiki-modal-box {
  transform: scale(1);
}

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

.wiki-modal-close {
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  transition: var(--transition);
}
.wiki-modal-close:hover {
  color: #ffffff;
}

/* ==========================================================================
   RESPONSIVE DESIGN (WOW Mobile-first Redesign)
   ========================================================================== */
.mobile-nav-bar {
  display: none; /* Hidden on desktop */
}

.drag-indicator {
  display: none; /* Hidden on desktop */
}

@media (max-width: 992px) {
  .hero-grid, .detail-header-grid, .course-detail-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .explorer-layout {
    grid-template-columns: 1fr;
  }
  .dashboard-course-card {
    grid-template-columns: 120px 1fr;
  }
  .dashboard-course-card > *:last-child {
    grid-column: span 2;
    margin-top: 12px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .enroll-card-box {
    position: static;
  }
}

@media (max-width: 768px) {
  /* Headings size down */
  h1 { font-size: 2.3rem !important; }
  h2 { font-size: 1.8rem !important; }
  
  /* Hide desktop header navigations */
  .nav-menu-wrapper {
    display: none !important;
  }
  .header-actions {
    display: none !important;
  }

  /* Add padding to prevent bottom bar overlap */
  .page {
    padding-bottom: 96px !important;
  }

  /* Bottom Tab Bar (iOS Style) */
  .mobile-nav-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 68px;
    background-color: rgba(6, 9, 19, 0.85);
    border-top: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    flex-grow: 1;
    height: 100%;
  }

  .mobile-nav-item svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    transition: var(--transition);
  }

  .mobile-nav-item.active {
    color: var(--primary);
  }
  
  .mobile-nav-item.active svg {
    stroke: var(--primary);
    transform: translateY(-2px);
  }

  /* Horizontal Scrollable Containers (Touch Carousels) */
  .categories-grid, #featured-courses-container {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    gap: 16px !important;
    padding-bottom: 16px !important;
    margin-left: -32px !important;
    margin-right: -32px !important;
    padding-left: 32px !important;
    padding-right: 32px !important;
    scrollbar-width: none !important; /* Firefox */
  }
  .categories-grid::-webkit-scrollbar, #featured-courses-container::-webkit-scrollbar {
    display: none !important; /* Chrome/Safari */
  }

  .category-card, #featured-courses-container .course-card {
    flex: 0 0 270px !important;
    scroll-snap-align: start !important;
  }

  /* iOS style Bottom Sheet for Wiki Modals */
  .wiki-modal {
    align-items: flex-end; /* Align box at bottom of screen */
  }

  .wiki-modal-box {
    width: 100% !important;
    border-radius: 24px 24px 0 0 !important;
    max-height: 85% !important;
    overflow-y: auto !important;
    padding: 24px 24px 50px 24px !important;
    transform: translateY(100%) !important;
    transition: transform 0.38s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    border-top: 4px solid var(--primary) !important;
  }
  
  .wiki-modal.open .wiki-modal-box {
    transform: translateY(0) !important;
  }

  .drag-indicator {
    display: block;
    width: 44px;
    height: 5px;
    background-color: var(--text-dark);
    border-radius: 3px;
    margin: 0 auto 16px auto;
  }

  /* Relocate Toast notifications to Top on mobile */
  .toast-container {
    bottom: auto !important;
    top: 20px !important;
    right: 20px !important;
    width: calc(100% - 40px) !important;
  }
  
  .toast {
    min-width: auto !important;
    width: 100% !important;
    transform: translateY(-120%) !important;
  }
  
  .toast.show {
    transform: translateY(0) !important;
  }

  /* Mobile Course Player layout */
  .player-layout {
    grid-template-columns: 1fr !important;
    height: auto !important;
    overflow: visible !important;
  }

  .player-main {
    padding: 16px !important;
  }

  .video-container {
    position: sticky !important;
    top: 0 !important;
    z-index: 500 !important;
    border-radius: 0 !important;
    margin-left: -16px !important;
    margin-right: -16px !important;
    width: calc(100% + 32px) !important;
    margin-bottom: 16px !important;
  }

  .player-sidebar {
    border-left: none !important;
    border-top: 1px solid var(--border-color) !important;
    height: auto !important;
    overflow: visible !important;
    background-color: var(--bg-main) !important;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}
