/* Theme: Dark - Comprehensive Dark Mode */
:root {
  --brand: #667eea;
  --brand-light: #8ba3f9;
  --brand-dark: #4c5fd5;
  --brand-contrast: #fff;
  --bg: #0f1419;
  --bg-secondary: #1a1f2e;
  --bg-tertiary: #252b3b;
  --muted: #8b949e;
  --card: #1a1f2e;
  --card-hover: #252b3b;
  --text: #e6edf3;
  --text-secondary: #8b949e;
  --border: rgba(255, 255, 255, 0.1);
  --accent: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  /* hero specific overrides */
  --hero-overlay: linear-gradient(180deg, rgba(0,0,0,0.4), rgba(0,0,0,0.8));
  --hero-content-color: var(--text);
  /* footer - dark theme */
  --footer-bg: linear-gradient(135deg, #0f1419 0%, #1a1f2e 100%);
  --footer-text: #e6edf3;
  --footer-title: #fff;
  --footer-muted: #8b949e;
  --footer-link: #8b949e;
  --footer-link-hover: #fff;
  --footer-border: rgba(255, 255, 255, 0.08);
  --footer-social-bg: rgba(255, 255, 255, 0.08);
  --footer-social-color: #cbd5e0;
  --footer-disclaimer: #64748b;
  --footer-brand-gradient: linear-gradient(135deg, #fff 0%, #e2e8f0 100%);
}

/* ============================================
   BASE & BODY
   ============================================ */
body {
  background: var(--bg) !important;
  color: var(--text) !important;
}

/* ============================================
   NAVBAR - Dark Theme
   ============================================ */
.navbar-modern {
  background: rgba(15, 20, 25, 0.95) !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3) !important;
}

.navbar-brand-modern {
  color: var(--text) !important;
}

.navbar-brand-modern:hover {
  color: var(--brand-light) !important;
}

.navbar-toggler-modern span {
  background: var(--text) !important;
}

.nav-link-modern {
  color: var(--text-secondary) !important;
}

.nav-link-modern:hover,
.nav-link-modern.active {
  color: var(--brand-light) !important;
  background: rgba(102, 126, 234, 0.15) !important;
}

.nav-search-btn,
.theme-toggle-btn {
  color: var(--text-secondary) !important;
}

.nav-search-btn:hover,
.theme-toggle-btn:hover {
  background: rgba(102, 126, 234, 0.15) !important;
  color: var(--brand-light) !important;
}

.nav-profile-btn {
  color: var(--text) !important;
}

.nav-profile-btn:hover {
  background: rgba(102, 126, 234, 0.15) !important;
  color: var(--brand-light) !important;
}

/* Dropdown Menus */
.dropdown-menu,
.profile-dropdown-menu,
.theme-dropdown-menu {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-lg) !important;
}

.dropdown-item {
  color: var(--text) !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: rgba(102, 126, 234, 0.15) !important;
  color: var(--brand-light) !important;
}

.dropdown-item.active {
  background: var(--brand) !important;
  color: #fff !important;
}

.dropdown-divider {
  border-color: var(--border) !important;
}

/* Search Form */
.search-input-group {
  background: var(--card) !important;
  box-shadow: var(--shadow-lg) !important;
}

.nav-search-input {
  background: var(--bg-secondary) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

.nav-search-input:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2) !important;
}

.nav-search-input::placeholder {
  color: var(--muted) !important;
}

/* ============================================
   CARDS & CONTAINERS
   ============================================ */
.card {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow) !important;
  color: var(--text) !important;
}

.card:hover {
  background: var(--card-hover) !important;
}

.card-header,
.card-footer {
  background: var(--bg-secondary) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

.card-title,
.card-text {
  color: var(--text) !important;
}

/* ============================================
   FORMS
   ============================================ */
.form-control,
.form-select {
  background: var(--bg-secondary) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
}

.form-control:focus,
.form-select:focus {
  background: var(--bg-tertiary) !important;
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2) !important;
  color: var(--text) !important;
}

.form-control::placeholder {
  color: var(--muted) !important;
}

.form-label {
  color: var(--text) !important;
}

.input-group-text {
  background: var(--bg-tertiary) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
  background: var(--accent) !important;
  border: none !important;
  color: #fff !important;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-tertiary) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

.btn-secondary:hover {
  background: var(--card-hover) !important;
  border-color: var(--brand) !important;
}

.btn-outline-primary {
  border-color: var(--brand) !important;
  color: var(--brand-light) !important;
}

.btn-outline-primary:hover {
  background: var(--brand) !important;
  color: #fff !important;
}

.btn-outline-secondary {
  border-color: var(--border) !important;
  color: var(--text) !important;
}

.btn-outline-secondary:hover {
  background: var(--bg-tertiary) !important;
  border-color: var(--text-secondary) !important;
}

.btn-light {
  background: var(--bg-tertiary) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

.btn-dark {
  background: var(--bg) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

/* ============================================
   BADGES & PILLS
   ============================================ */
.badge {
  background: rgba(102, 126, 234, 0.2) !important;
  color: var(--brand-light) !important;
}

.badge.bg-primary {
  background: var(--brand) !important;
  color: #fff !important;
}

.badge.bg-secondary {
  background: var(--bg-tertiary) !important;
  color: var(--text) !important;
}

.badge.bg-success {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #34d399 !important;
}

.badge.bg-warning {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #fbbf24 !important;
}

.badge.bg-danger {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #f87171 !important;
}

/* ============================================
   TABLES
   ============================================ */
.table {
  color: var(--text) !important;
}

.table thead th {
  background: var(--bg-secondary) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

.table tbody td {
  border-color: var(--border) !important;
}

.table-striped tbody tr:nth-of-type(odd) {
  background: rgba(255, 255, 255, 0.02) !important;
}

.table-hover tbody tr:hover {
  background: rgba(102, 126, 234, 0.1) !important;
}

/* ============================================
   MODALS
   ============================================ */
.modal-content {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

.modal-header,
.modal-footer {
  border-color: var(--border) !important;
}

.modal-title {
  color: var(--text) !important;
}

.btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
  border: 1px solid var(--border) !important;
}

.alert-primary {
  background: rgba(102, 126, 234, 0.15) !important;
  color: var(--brand-light) !important;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
}

.alert-info {
  background: rgba(59, 130, 246, 0.15) !important;
  color: #60a5fa !important;
}

/* ============================================
   LINKS
   ============================================ */
a {
  color: var(--brand-light);
}

a:hover {
  color: var(--brand);
}

/* ============================================
   TEXT UTILITIES
   ============================================ */
.text-dark {
  color: var(--text) !important;
}

.text-muted {
  color: var(--muted) !important;
}

.text-secondary {
  color: var(--text-secondary) !important;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text) !important;
}

p {
  color: var(--text);
}

/* ============================================
   BACKGROUND UTILITIES
   ============================================ */
.bg-white {
  background: var(--card) !important;
}

.bg-light {
  background: var(--bg-secondary) !important;
}

.bg-dark {
  background: var(--bg) !important;
}

/* ============================================
   BORDERS
   ============================================ */
.border {
  border-color: var(--border) !important;
}

.border-top,
.border-bottom,
.border-start,
.border-end {
  border-color: var(--border) !important;
}

hr {
  border-color: var(--border);
  opacity: 0.5;
}

/* ============================================
   LIST GROUPS
   ============================================ */
.list-group-item {
  background: var(--card) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

.list-group-item:hover {
  background: var(--card-hover) !important;
}

.list-group-item.active {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff !important;
}

/* ============================================
   ACCORDION
   ============================================ */
.accordion-item {
  background: var(--card) !important;
  border-color: var(--border) !important;
}

.accordion-button {
  background: var(--card) !important;
  color: var(--text) !important;
}

.accordion-button:not(.collapsed) {
  background: var(--bg-secondary) !important;
  color: var(--brand-light) !important;
}

.accordion-button::after {
  filter: invert(1);
}

.accordion-body {
  background: var(--card) !important;
  color: var(--text) !important;
}

/* ============================================
   PAGINATION
   ============================================ */
.page-link {
  background: var(--card) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

.page-link:hover {
  background: var(--card-hover) !important;
  color: var(--brand-light) !important;
}

.page-item.active .page-link {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff !important;
}

.page-item.disabled .page-link {
  background: var(--bg-secondary) !important;
  color: var(--muted) !important;
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumb {
  background: var(--bg-secondary) !important;
}

.breadcrumb-item a {
  color: var(--brand-light) !important;
}

.breadcrumb-item.active {
  color: var(--muted) !important;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--muted) !important;
}

/* ============================================
   PROGRESS BARS
   ============================================ */
.progress {
  background: var(--bg-tertiary) !important;
}

.progress-bar {
  background: var(--accent) !important;
}

/* ============================================
   SPINNERS
   ============================================ */
.spinner-border,
.spinner-grow {
  color: var(--brand) !important;
}

/* ============================================
   TOOLTIPS & POPOVERS
   ============================================ */
.tooltip-inner {
  background: var(--card) !important;
  color: var(--text) !important;
}

.popover {
  background: var(--card) !important;
  border-color: var(--border) !important;
}

.popover-header {
  background: var(--bg-secondary) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

.popover-body {
  color: var(--text) !important;
}

/* ============================================
   FOOTER - Already dark, ensure consistency
   ============================================ */
.footer-modern {
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-secondary) 100%) !important;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* ============================================
   COURSE & LEARN PAGE SPECIFIC
   ============================================ */
.course-card,
.course-item {
  background: var(--card) !important;
  border-color: var(--border) !important;
}

.course-card:hover,
.course-item:hover {
  background: var(--card-hover) !important;
}

.sidebar-section {
  background: var(--card) !important;
  border-color: var(--border) !important;
}

.chapter-item,
.lesson-item {
  background: var(--card) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

.chapter-item:hover,
.lesson-item:hover {
  background: var(--card-hover) !important;
}

/* ============================================
   BLOG PAGE SPECIFIC
   ============================================ */
.blog-card,
.blog-item {
  background: var(--card) !important;
  border-color: var(--border) !important;
}

.post-content {
  color: var(--text) !important;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  color: var(--text) !important;
}

.post-content code {
  background: var(--bg-tertiary) !important;
  color: var(--brand-light) !important;
}

.post-content pre {
  background: var(--bg-secondary) !important;
  border-color: var(--border) !important;
}

.post-content blockquote {
  border-left-color: var(--brand) !important;
  background: var(--bg-secondary) !important;
  color: var(--text-secondary) !important;
}

/* ============================================
   HERO SECTIONS
   ============================================ */
.hero-section,
.modern-hero {
  background: var(--bg-secondary) !important;
}

.hero-card {
  background: var(--card) !important;
}

/* ============================================
   SELECTION
   ============================================ */
::selection {
  background: var(--brand);
  color: #fff;
}

/* ============================================
   CODE HIGHLIGHTING
   ============================================ */
code {
  background: var(--bg-tertiary);
  color: var(--brand-light);
  padding: 2px 6px;
  border-radius: 4px;
}

pre code {
  background: transparent;
  padding: 0;
}

/* ============================================
   ABOUT PAGE - Dark Theme
   ============================================ */
.about-section-modern {
  background: var(--card) !important;
  box-shadow: var(--shadow) !important;
}

.about-section-modern h2,
.about-section-modern h3 {
  color: var(--text) !important;
}

.about-section-modern p {
  color: var(--text-secondary) !important;
}

.card-skill-modern {
  background: var(--bg-secondary) !important;
  border-left-color: var(--brand) !important;
}

.card-skill-modern h5 {
  color: var(--text) !important;
}

.skill-badge-modern {
  background: var(--bg-tertiary) !important;
  color: var(--brand-light) !important;
  border-color: var(--border) !important;
}

.skill-badge-modern:hover {
  background: var(--brand) !important;
  color: #fff !important;
}

.card-cert-modern {
  background: var(--bg-secondary) !important;
  border-color: var(--border) !important;
}

.card-cert-modern li {
  color: var(--text-secondary) !important;
  border-bottom-color: var(--border) !important;
}

.timeline-item-modern {
  background: var(--bg-secondary) !important;
  border-left-color: var(--brand) !important;
}

.timeline-item-modern strong {
  color: var(--text) !important;
}

.timeline-item-modern small {
  color: var(--brand-light) !important;
}

.timeline-item-modern p {
  color: var(--text-secondary) !important;
}

/* ============================================
   CONTACT PAGE - Dark Theme
   ============================================ */
.contact-card-modern {
  background: var(--card) !important;
  box-shadow: var(--shadow) !important;
}

.contact-card-modern h3 {
  color: var(--text) !important;
}

.contact-card-modern .form-label {
  color: var(--text) !important;
}

.contact-card-modern .form-control {
  background: var(--bg-secondary) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

.contact-card-modern .form-control:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2) !important;
}

.contact-info-box-modern {
  background: var(--card) !important;
  box-shadow: var(--shadow) !important;
}

.contact-info-box-modern h4 {
  color: var(--text) !important;
}

.info-item-modern {
  border-bottom-color: var(--border) !important;
}

.info-item-modern strong {
  color: var(--text) !important;
}

.info-item-modern div {
  color: var(--text-secondary) !important;
}

/* ============================================
   LEARN/COURSES PAGE - Dark Theme
   ============================================ */
.learn-search-input {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

.learn-search-input::placeholder {
  color: rgba(255, 255, 255, 0.7) !important;
}

.learn-search-suggestions {
  background: var(--card) !important;
  box-shadow: var(--shadow-lg) !important;
}

.learn-search-suggestions a {
  color: var(--text) !important;
  border-bottom-color: var(--border) !important;
}

.learn-search-suggestions a:hover {
  background: var(--bg-secondary) !important;
}

/* Courses Section */
.courses-section-modern {
  background: transparent !important;
}

.section-title-modern {
  color: var(--text) !important;
}

.section-description-modern {
  color: var(--text-secondary) !important;
}

/* Course Cards */
.course-card-modern {
  background: var(--card) !important;
  box-shadow: var(--shadow) !important;
}

.course-card-modern:hover {
  box-shadow: var(--shadow-lg) !important;
}

.course-card-body {
  background: var(--card) !important;
}

.course-title {
  color: var(--text) !important;
}

.course-summary {
  color: var(--text-secondary) !important;
}

.course-meta {
  border-top-color: var(--border) !important;
}

.course-enrollments,
.course-level {
  color: var(--text-secondary) !important;
}

.tag-modern {
  background: var(--bg-tertiary) !important;
  color: var(--text-secondary) !important;
}

/* Progress Container */
.progress-container-modern {
  background: var(--card) !important;
  box-shadow: var(--shadow) !important;
}

.progress-title {
  color: var(--text) !important;
}

.progress-text {
  color: var(--text-secondary) !important;
}

.progress-bar-modern {
  background: var(--bg-tertiary) !important;
}

/* Chapter Cards */
.chapter-card-modern {
  background: var(--card) !important;
  box-shadow: var(--shadow) !important;
}

.chapter-card-modern:hover {
  box-shadow: var(--shadow-lg) !important;
}

.chapter-title {
  color: var(--text) !important;
}

.chapter-summary {
  color: var(--text-secondary) !important;
}

/* Content Area */
.content-area-modern {
  background: var(--card) !important;
  box-shadow: var(--shadow) !important;
}

.post-content {
  color: var(--text) !important;
}

/* TOC Box */
.toc-box-modern {
  background: var(--bg-secondary) !important;
  border-left-color: var(--brand) !important;
}

.toc-box-modern strong {
  color: var(--text) !important;
}

.toc-box-modern a {
  color: var(--text-secondary) !important;
}

.toc-box-modern a:hover {
  color: var(--brand-light) !important;
}

/* Lesson Sidebar */
.lesson-sidebar-modern {
  background: var(--card) !important;
  box-shadow: var(--shadow) !important;
}

.sidebar-title-modern,
.sidebar-subtitle-modern {
  color: var(--text) !important;
}

.sidebar-links-modern a {
  color: var(--text-secondary) !important;
}

.sidebar-links-modern a:hover {
  background: var(--bg-secondary) !important;
  color: var(--brand-light) !important;
}

.sidebar-divider {
  border-color: var(--border) !important;
}

/* Navigation Buttons */
.btn-nav-prev {
  background: var(--bg-secondary) !important;
  color: var(--text-secondary) !important;
  border-color: var(--border) !important;
}

.btn-nav-prev:hover {
  background: var(--bg-tertiary) !important;
  color: var(--text) !important;
}

.lesson-navigation-modern {
  border-top-color: var(--border) !important;
}

.nav-buttons {
  border-top-color: var(--border) !important;
}

/* ============================================
   BLOG LISTING PAGE - Dark Theme
   ============================================ */
.blog-search-input {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

.blog-search-input::placeholder {
  color: rgba(255, 255, 255, 0.7) !important;
}

.blog-search-suggestions {
  background: var(--card) !important;
  box-shadow: var(--shadow-lg) !important;
}

.blog-search-suggestions a {
  color: var(--text) !important;
  border-bottom-color: var(--border) !important;
}

.blog-search-suggestions a:hover {
  background: var(--bg-secondary) !important;
}

/* Blog Section */
.blog-section-modern {
  background: transparent !important;
}

/* Blog Cards */
.blog-card-modern {
  background: var(--card) !important;
  box-shadow: var(--shadow) !important;
}

.blog-card-modern:hover {
  box-shadow: var(--shadow-lg) !important;
}

.blog-card-body {
  background: var(--card) !important;
}

.blog-title {
  color: var(--text) !important;
}

.blog-title a {
  color: var(--text) !important;
}

.blog-title a:hover {
  color: var(--brand-light) !important;
}

.blog-excerpt {
  color: var(--text-secondary) !important;
}

.blog-meta {
  border-top-color: var(--border) !important;
  color: var(--text-secondary) !important;
}

.blog-date-badge {
  background: var(--card) !important;
  box-shadow: var(--shadow) !important;
}

.date-day {
  color: var(--brand-light) !important;
}

.date-month {
  color: var(--text-secondary) !important;
}

/* ============================================
   INDIVIDUAL BLOG POST PAGE - Dark Theme
   ============================================ */
.blog-layout-modern {
  background: transparent !important;
}

.blog-post-title {
  color: var(--text) !important;
}

.blog-post-meta {
  border-bottom-color: var(--border) !important;
}

.blog-post-meta-item {
  color: var(--text-secondary) !important;
}

.blog-toc-modern {
  background: var(--bg-secondary) !important;
  border-left-color: var(--brand) !important;
}

.blog-toc-modern strong {
  color: var(--text) !important;
}

.blog-toc-modern a {
  color: var(--text-secondary) !important;
}

.blog-toc-modern a:hover {
  color: var(--brand-light) !important;
}

.blog-post-content {
  color: var(--text) !important;
}

.blog-post-content h2,
.blog-post-content h3 {
  color: var(--text) !important;
}

.blog-post-content pre {
  background: var(--bg-secondary) !important;
}

.blog-post-content code {
  background: var(--bg-tertiary) !important;
  color: var(--brand-light) !important;
}

/* Sidebar */
.sidebar-box-modern {
  background: var(--card) !important;
  box-shadow: var(--shadow) !important;
}

.sidebar-title {
  color: var(--text) !important;
}

.sidebar-post-item {
  border-bottom-color: var(--border) !important;
}

.sidebar-post-title {
  color: var(--text) !important;
}

.sidebar-post-item:hover .sidebar-post-title {
  color: var(--brand-light) !important;
}

.sidebar-post-date {
  color: var(--text-secondary) !important;
}

/* Comments */
.comments-section-modern {
  border-top-color: var(--border) !important;
}

.comment-box-modern {
  background: var(--bg-secondary) !important;
  border-left-color: var(--brand) !important;
}

.comment-author {
  color: var(--text) !important;
}

.comment-date {
  color: var(--text-secondary) !important;
}

.comment-content {
  color: var(--text-secondary) !important;
}

.comment-form-modern {
  background: var(--card) !important;
  box-shadow: var(--shadow) !important;
}

.comment-form-modern h4 {
  color: var(--text) !important;
}

.comment-form-modern .form-control {
  background: var(--bg-secondary) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

.comment-form-modern .form-control:focus {
  border-color: var(--brand) !important;
}

/* Recommended Posts */
.recommend-card-modern {
  background: var(--card) !important;
  box-shadow: var(--shadow) !important;
}

.recommend-card-modern:hover {
  box-shadow: var(--shadow-lg) !important;
}

/* ============================================
   HOME PAGE - Dark Theme
   ============================================ */
.main-content {
  background: var(--bg) !important;
}

.section-title {
  color: var(--text) !important;
}

.section-description {
  color: var(--text-secondary) !important;
}

.btn-view-all {
  color: var(--brand-light) !important;
  border-color: var(--brand) !important;
}

.btn-view-all:hover {
  background: var(--brand) !important;
  color: #fff !important;
}

/* Search Filter Bar */
.search-filter-bar {
  background: var(--card) !important;
  box-shadow: var(--shadow) !important;
}

.search-box-modern .form-control {
  background: var(--bg-secondary) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

.search-box-modern .form-control:focus {
  border-color: var(--brand) !important;
}

.filter-label {
  color: var(--text-secondary) !important;
}

.tag-filter-btn {
  background: var(--bg-tertiary) !important;
  color: var(--text-secondary) !important;
}

.tag-filter-btn:hover {
  background: var(--brand) !important;
  color: #fff !important;
}

.search-suggestions-modern {
  background: var(--card) !important;
  box-shadow: var(--shadow-lg) !important;
}

.search-suggestions-modern a {
  color: var(--text) !important;
  border-bottom-color: var(--border) !important;
}

.search-suggestions-modern a:hover {
  background: var(--bg-secondary) !important;
}

/* Blog Cards on Home */
.blog-footer {
  border-top-color: var(--border) !important;
}

.btn-read-more {
  color: var(--brand-light) !important;
}

.btn-read-more:hover {
  color: var(--brand) !important;
}

/* Hero Search */
.search-input {
  background: transparent !important;
  color: var(--text) !important;
}

/* Floating Cards in Hero */
.floating-card {
  background: var(--card) !important;
  color: var(--brand-light) !important;
}

/* ============================================
   COURSE DETAIL PAGE - Dark Theme
   ============================================ */
.course-detail-card {
  background: var(--card) !important;
  box-shadow: var(--shadow) !important;
}

.course-content-section {
  background: var(--card) !important;
}

.curriculum-item {
  background: var(--bg-secondary) !important;
  border-color: var(--border) !important;
}

.curriculum-item:hover {
  background: var(--bg-tertiary) !important;
}

/* ============================================
   QUIZ PAGE - Dark Theme
   ============================================ */
.quiz-container {
  background: var(--card) !important;
}

.quiz-question {
  background: var(--bg-secondary) !important;
  border-color: var(--border) !important;
}

.quiz-option {
  background: var(--bg-tertiary) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

.quiz-option:hover {
  border-color: var(--brand) !important;
}

.quiz-option.selected {
  background: rgba(102, 126, 234, 0.2) !important;
  border-color: var(--brand) !important;
}

/* ============================================
   AUTH PAGES - Dark Theme
   ============================================ */
.auth-card {
  background: var(--card) !important;
  box-shadow: var(--shadow) !important;
}

.auth-card h2,
.auth-card h3 {
  color: var(--text) !important;
}

.auth-card .form-label {
  color: var(--text) !important;
}

.auth-card .form-control {
  background: var(--bg-secondary) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

/* ============================================
   CERTIFICATE PAGE - Dark Theme
   ============================================ */
.certificate-card {
  background: var(--card) !important;
  box-shadow: var(--shadow) !important;
}

/* ============================================
   PROFILE PAGE - Dark Theme
   ============================================ */
.profile-card {
  background: var(--card) !important;
  box-shadow: var(--shadow) !important;
}

.profile-stats {
  background: var(--bg-secondary) !important;
}

/* ============================================
   GENERAL DARK THEME UTILITIES
   ============================================ */
.shadow,
.shadow-sm,
.shadow-lg {
  box-shadow: var(--shadow) !important;
}

.rounded,
.rounded-3,
.rounded-4 {
  border-color: var(--border) !important;
}

/* Override any inline white backgrounds */
[style*="background: #fff"],
[style*="background:#fff"],
[style*="background: white"],
[style*="background:white"],
[style*="background-color: #fff"],
[style*="background-color:#fff"],
[style*="background-color: white"],
[style*="background-color:white"] {
  background: var(--card) !important;
}

/* Override f8f9fa backgrounds (light gray) */
[style*="background: #f8f9fa"],
[style*="background:#f8f9fa"],
[style*="background-color: #f8f9fa"],
[style*="background-color:#f8f9fa"] {
  background: var(--bg-secondary) !important;
}

/* ============================================
   BOOTSTRAP COMPONENTS & UTILITIES IN DARK THEME
   ============================================ */
.bg-body-tertiary,
.bg-light,
.bg-body-secondary,
.bg-white {
  background-color: var(--card) !important;
  color: var(--text) !important;
}

.border,
.border-top,
.border-bottom,
.border-start,
.border-end {
  border-color: var(--border) !important;
}

/* Tables */
.table {
  --bs-table-bg: var(--card);
  --bs-table-color: var(--text);
  --bs-table-border-color: var(--border);
  --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
  --bs-table-striped-color: var(--text);
  --bs-table-hover-bg: rgba(99, 102, 241, 0.1);
  --bs-table-hover-color: var(--text);
  background-color: var(--card) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

.table thead,
.table thead th,
.table-dark,
.table-dark th {
  background-color: #0d1322 !important;
  color: #f1f5f9 !important;
  border-color: var(--border) !important;
}

.table tbody tr,
.table tbody td,
.table tbody th {
  background-color: var(--card) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

.table-striped tbody tr:nth-of-type(odd) td {
  background-color: rgba(255, 255, 255, 0.02) !important;
}

.table-striped tbody tr:nth-of-type(even) td {
  background-color: var(--card) !important;
}

/* Alerts */
.alert {
  border-radius: 12px;
  border-width: 1px;
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #fca5a5 !important;
}

.alert-info {
  background-color: rgba(6, 182, 212, 0.12) !important;
  border-color: rgba(6, 182, 212, 0.3) !important;
  color: #67e8f9 !important;
}

.alert-warning {
  background-color: rgba(245, 158, 11, 0.12) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
  color: #fcd34d !important;
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
  color: #6ee7b7 !important;
}

/* List Groups */
.list-group-item {
  background-color: var(--card) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

.list-group-item.bg-transparent {
  background-color: transparent !important;
}

/* Code & Pre */
code {
  color: #a5b4fc !important;
  background-color: rgba(99, 102, 241, 0.15) !important;
  padding: 2px 6px;
  border-radius: 4px;
}

pre {
  background-color: #0b1120 !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px;
  color: #f1f5f9 !important;
}

