/* ==========================================================================
   QAlify Blog - Modern Tech Theme & Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

:root {
  --bg-dark: #090d16;
  --bg-card: #111827;
  --bg-card-hover: #162032;
  --bg-surface: #1e293b;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.3);

  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.25);
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Subtle background glows */
body::before {
  content: '';
  position: fixed;
  top: -200px;
  left: 20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(9, 13, 22, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -200px;
  right: 10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, rgba(9, 13, 22, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* Layout Components */
.site-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Header (Clean, menu removed as requested) */
.header {
  border-bottom: 1px solid var(--border-color);
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 20px 0;
  overflow: hidden;
}

.header-plexus-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.header .container {
  position: relative;
  z-index: 1;
  width: 100%;
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  cursor: pointer;
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 22px;
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.brand-text-group {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 30%, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tagline {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Header Navigation */
.header-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: var(--transition-fast);
}

.nav-link .nav-icon {
  width: 17px;
  height: 17px;
  transition: transform var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.nav-link:hover .nav-icon {
  transform: scale(1.1);
}

.nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(6, 182, 212, 0.15));
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.3);
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
  color: #ffffff;
  line-height: 1.4;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

/* Main Content Area */
.main-layout {
  padding: 40px 0 80px;
  flex: 1;
}

.layout-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 36px;
  align-items: start;
}

.main-content {
  min-width: 0;
  width: 100%;
}

/* Article Feed (Left Column) */
.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.feed-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.feed-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 22px;
  background: linear-gradient(to bottom, var(--accent-primary), var(--accent-cyan));
  border-radius: 4px;
}

.feed-counter {
  font-size: 14px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 14px;
  border-radius: 30px;
  border: 1px solid var(--border-color);
}

.articles-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Article Card Component */
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 280px 1fr;
  transition: var(--transition-normal);
  cursor: pointer;
  position: relative;
}

.article-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  background: var(--bg-card-hover);
}

.card-image-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  background: var(--bg-surface);
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.article-card:hover .card-image {
  transform: scale(1.06);
}

.card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(9, 13, 22, 0.75);
  backdrop-filter: blur(8px);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 12px;
  transition: var(--transition-fast);
}

.article-card:hover .card-title {
  color: var(--accent-primary);
}

.card-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.read-more-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.article-card:hover .read-more-link {
  color: var(--accent-cyan);
  transform: translateX(4px);
}

/* Pagination / Load More Button */
.load-more-container {
  margin-top: 36px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.btn-load-more {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-surface));
  border: 1px solid var(--border-glow);
  color: var(--text-primary);
  padding: 14px 36px;
  border-radius: var(--radius-xl);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-card);
}

.btn-load-more:hover {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-hover));
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-load-more:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Sidebar (Right Column) */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 100px;
}

.sidebar-widget {
  background: linear-gradient(145deg, var(--bg-card), #141d2e);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: var(--transition-normal);
}

.sidebar-widget::before,
.author-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-cyan));
  z-index: 2;
}

.sidebar-widget:hover,
.author-banner:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.widget-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* Search Widget */
.search-widget {
  padding: 22px 24px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  transition: var(--transition-fast);
  z-index: 2;
}

.search-input {
  width: 100% !important;
  height: 44px !important;
  padding: 0 42px 0 42px !important;
  background-color: rgba(15, 23, 42, 0.8) !important;
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-body) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  transition: all var(--transition-fast) !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  box-sizing: border-box !important;
}

.search-input::placeholder {
  color: var(--text-muted) !important;
  font-size: 13.5px !important;
}

.search-input:hover {
  border-color: rgba(99, 102, 241, 0.5) !important;
  background-color: rgba(15, 23, 42, 0.95) !important;
}

.search-input:focus {
  border-color: var(--accent-primary) !important;
  background-color: #0f172a !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3), 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

.search-input:-webkit-autofill,
.search-input:-webkit-autofill:hover, 
.search-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-primary) !important;
  -webkit-box-shadow: 0 0 0px 1000px #0f172a inset !important;
  transition: background-color 5000s ease-in-out 0s !important;
}

.search-input-wrapper:focus-within .search-icon {
  color: var(--accent-cyan);
  transform: scale(1.1);
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  width: 22px;
  height: 22px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: var(--transition-fast);
  z-index: 3;
}

.search-clear-btn:hover {
  color: #fff;
  background: var(--accent-rose);
  border-color: var(--accent-rose);
  transform: scale(1.1);
}

/* Author Profile Sidebar Banner */
.author-banner {
  background: linear-gradient(145deg, var(--bg-card), #161f33);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: var(--transition-normal);
}

.author-banner-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.author-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-primary);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.35);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.author-banner:hover .author-avatar {
  transform: scale(1.05);
  border-color: var(--accent-cyan);
}

.status-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 13px;
  height: 13px;
  background-color: var(--accent-emerald);
  border: 2px solid var(--bg-card);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
}

.author-meta {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

.author-role {
  font-size: 12px;
  color: var(--accent-cyan);
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-top: 4px;
}

.author-bio {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.02);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.author-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.author-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 10px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-fast);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-habr {
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.25);
}

.btn-habr:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}

.btn-linkedin {
  background: rgba(6, 182, 212, 0.12);
  color: #38bdf8;
  border-color: rgba(6, 182, 212, 0.25);
}

.btn-linkedin:hover {
  background: #0077b5;
  color: #ffffff;
  border-color: #0077b5;
  box-shadow: 0 4px 12px rgba(0, 119, 181, 0.4);
  transform: translateY(-2px);
}

.author-email-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.email-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.author-email-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-cyan);
  text-decoration: none;
  transition: var(--transition-fast);
  padding: 4px 8px;
  border-radius: 6px;
}

.author-email-link:hover {
  color: var(--text-primary);
  background: rgba(6, 182, 212, 0.15);
}

/* Sidebar Banner Banners (2 test banners) */
.promo-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-normal);
  position: relative;
  display: block;
  text-decoration: none;
}

.promo-banner:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card), 0 0 15px rgba(6, 182, 212, 0.2);
}

.banner-img-box {
  width: 100%;
  height: 140px;
  overflow: hidden;
  position: relative;
}

.banner-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.promo-banner:hover .banner-img-box img {
  transform: scale(1.05);
}

.banner-content {
  padding: 18px;
}

.banner-tag {
  display: inline-block;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.banner-2 .banner-tag {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.3);
}

.banner-headline {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.3;
}

.banner-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

.banner-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.promo-banner:hover .banner-btn {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.banner-2:hover .banner-btn {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
}

/* Category Tags Cloud */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  text-decoration: none;
  transition: var(--transition-fast);
  cursor: pointer;
}

.tag-item:hover, .tag-item.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}

/* Detail View Layout (Full Article Page) */
.article-detail-view {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.article-detail-view.active {
  display: block;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
  margin-bottom: 28px;
}

.btn-back:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
  border-color: var(--accent-primary);
  transform: translateX(-4px);
}

.detail-header {
  margin-bottom: 32px;
}

.detail-category {
  display: inline-block;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.detail-title {
  font-family: var(--font-heading);
  font-size: 38px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

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

.detail-hero-cover {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-xl);
  margin-bottom: 36px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
}

.detail-body img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
  margin: 24px 0;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
}

.detail-body {
  width: 100%;
  max-width: 100%;
  font-size: 17px;
  line-height: 1.8;
  color: #cbd5e1;
}

.article-lead {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.6;
  color: #f1f5f9;
  background: rgba(99, 102, 241, 0.08);
  border-left: 4px solid var(--accent-primary);
  padding: 20px 24px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 32px;
}

.article-section {
  margin-bottom: 40px;
}

.article-section h2 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  margin-top: 24px;
}

.article-section p {
  margin-bottom: 16px;
}

.article-section ul {
  margin-bottom: 20px;
  padding-left: 24px;
}

.article-section li {
  margin-bottom: 10px;
}

/* Pros and Cons Grid */
.pros-cons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 24px 0;
}

.pros-box, .cons-box {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border-color);
}

.pros-box {
  border-top: 4px solid var(--accent-emerald);
}

.cons-box {
  border-top: 4px solid var(--accent-rose);
}

.pros-box h3 {
  color: var(--accent-emerald);
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
}

.cons-box h3 {
  color: var(--accent-rose);
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
}

/* Comparison Table Styling */
.table-responsive {
  overflow-x: auto;
  margin: 28px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background: var(--bg-card);
  font-size: 15px;
}

.comparison-table th {
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-weight: 700;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.comparison-table td {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Table of Contents (TOC) Widget */
.toc-container {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 28px 0 36px;
  box-shadow: var(--shadow-card);
}

.toc-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.toc-grid {
  columns: 2 280px;
  column-gap: 24px;
}

.toc-section-block {
  break-inside: avoid;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toc-list li a, .toc-list li a:visited {
  color: var(--text-secondary) !important;
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition-fast);
  display: inline-block;
}

.toc-list li a:hover {
  color: var(--accent-cyan) !important;
  transform: translateX(4px);
}

/* IDE Code Snippet Window Styling */
.code-window {
  background: #1a1b26;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  margin: 24px 0;
  box-shadow: var(--shadow-card);
  transition: var(--transition-normal);
}

.code-window:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.code-window-header {
  background: rgba(0, 0, 0, 0.4);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.window-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.window-filename {
  font-family: monospace;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.code-window pre {
  margin: 0 !important;
  padding: 18px 20px !important;
  background: transparent !important;
  overflow-x: auto;
}

.code-window code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  background: transparent !important;
}

/* Custom scrollbar for code blocks */
.code-window pre::-webkit-scrollbar {
  height: 8px;
}

.code-window pre::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.code-window pre::-webkit-scrollbar-thumb {
  background: var(--bg-surface);
  border-radius: 4px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  background: rgba(9, 13, 22, 0.95);
  padding: 30px 0;
  margin-top: auto;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .layout-grid {
    grid-template-columns: 1fr 300px;
    gap: 24px;
  }

  .article-card {
    grid-template-columns: 240px 1fr;
  }
}

@media (max-width: 768px) {
  .main-layout {
    padding: 24px 0 60px;
  }

  .layout-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .sidebar {
    position: static;
  }

  .article-card {
    grid-template-columns: 1fr;
  }

  .card-image-wrapper {
    height: 190px;
    aspect-ratio: auto;
  }

  .detail-title {
    font-size: clamp(22px, 6vw, 32px);
    line-height: 1.3;
    margin-bottom: 14px;
  }

  .detail-meta {
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 13px;
    padding-bottom: 14px;
  }

  .detail-hero-cover {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
  }

  .article-lead {
    font-size: 16px;
    line-height: 1.6;
    padding: 14px 16px;
    margin-bottom: 24px;
  }

  .toc-container {
    padding: 16px;
    margin: 20px 0 28px;
  }

  .toc-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .pros-cons-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .article-section {
    margin-bottom: 28px;
  }

  .article-section h2 {
    font-size: 21px;
    margin-top: 20px;
    margin-bottom: 12px;
  }

  .article-section h3 {
    font-size: 17px;
    margin-top: 16px;
    margin-bottom: 10px;
  }

  .code-window {
    margin: 18px 0;
    border-radius: var(--radius-sm);
  }

  .code-window-header {
    padding: 8px 12px;
  }

  .code-window pre {
    padding: 12px 14px !important;
  }

  .code-window code {
    font-size: 12.5px !important;
    line-height: 1.5 !important;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 10px 12px;
    font-size: 13px;
  }
}

@media (max-width: 600px) {
  .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .header {
    padding: 12px 0;
  }

  .main-layout {
    padding-top: 24px;
    padding-bottom: 60px;
  }

  .courses-catalog-view {
    padding-top: 24px;
    padding-bottom: 60px;
  }

  .course-player-view {
    padding-top: 20px;
    padding-bottom: 60px;
  }

  .brand-title {
    font-size: 20px;
  }

  .brand-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
}

/* ==========================================================================
   Courses Section & Interactive Player
   ========================================================================== */

/* Courses Catalog View */
.courses-catalog-view {
  padding: 40px 0 80px;
  flex: 1;
  animation: fadeIn 0.3s ease;
}

.courses-hero {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 48px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: 20px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: pulse 2s infinite;
}

.courses-title {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 40%, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
  line-height: 1.2;
}

.courses-subtitle {
  font-size: 16.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

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

/* Course Card */
.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
  position: relative;
  cursor: pointer;
}

.course-card:hover {
  transform: translateY(-6px);
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 24px rgba(99, 102, 241, 0.25);
}

.course-card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0d131f;
}

.course-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.course-card:hover .course-card-image {
  transform: scale(1.04);
}

.course-card-badges {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  z-index: 2;
}

.course-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  backdrop-filter: blur(8px);
}

.tag-primary {
  background: rgba(99, 102, 241, 0.88);
  color: #fff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.tag-cyan {
  background: rgba(6, 182, 212, 0.88);
  color: #fff;
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.4);
}

.course-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-card-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.35;
}

.course-card-desc {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

.course-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-muted);
}

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

.course-card-footer {
  margin-top: 16px;
}

.btn-start-course {
  width: 100%;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
  color: #fff;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-start-course:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

/* ==========================================================================
   Course Player Layout (Sidebar + Main Lesson Content)
   ========================================================================== */
.course-player-view {
  padding: 30px 0 80px;
  flex: 1;
  animation: fadeIn 0.3s ease;
}

.course-player-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 32px;
  align-items: start;
}

/* Course Sidebar */
.course-sidebar {
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.course-sidebar::-webkit-scrollbar {
  width: 6px;
}

.course-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.course-sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.course-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-cyan);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 16px;
  transition: var(--transition-fast);
}

.course-back-link:hover {
  color: #fff;
  transform: translateX(-3px);
}

.course-sidebar-header {
  margin-bottom: 16px;
}

.course-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
}

.course-sidebar-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

/* Course Progress */
.course-progress-box {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 20px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

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

.progress-pct {
  font-weight: 700;
  color: var(--accent-cyan);
}

.progress-bar-bg {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  margin: 8px 0;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-cyan));
  border-radius: 10px;
  transition: width 0.4s ease;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.progress-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.course-nav-header {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-left: 4px;
}

.course-modules-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.course-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.course-nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  transform: translateX(2px);
}

.course-nav-item.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

.nav-item-status {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

.course-nav-item.active .nav-item-status {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.course-nav-item.completed .nav-item-status {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

.nav-item-info {
  flex: 1;
  min-width: 0;
}

.nav-item-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Main Lesson Content Area */
.course-main-area {
  min-width: 0;
  width: 100%;
}

.course-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.course-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.course-breadcrumbs a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.course-breadcrumbs a:hover {
  color: var(--accent-cyan);
}

.crumb-sep {
  color: rgba(255, 255, 255, 0.2);
}

.crumb-active {
  color: var(--text-primary);
  font-weight: 600;
}

.btn-module-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-module-check:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-module-check.completed {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--accent-emerald);
}

.btn-module-check .check-icon {
  transition: transform var(--transition-fast);
}

.btn-module-check.completed .check-icon {
  transform: scale(1.15);
}

.course-content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  box-shadow: var(--shadow-card);
}

/* Module Body Typography & Elements */
.course-module-content {
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.75;
}

.course-module-content h1 {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 20px;
  line-height: 1.25;
}

.course-module-content h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 36px 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
}

.course-module-content h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 24px 0 12px;
}

.course-module-content p {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.course-module-content strong {
  color: var(--text-primary);
}

.course-module-content blockquote {
  border-left: 3px solid var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
  padding: 14px 18px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 20px 0;
  color: var(--text-primary);
}

.course-module-content hr {
  border: none;
  height: 1px;
  background: var(--border-color);
  margin: 32px 0;
}

.course-module-content ul,
.course-module-content ol {
  margin: 16px 0 20px 24px;
  color: var(--text-secondary);
}

.course-module-content li {
  margin-bottom: 8px;
}

.course-module-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 20px 0;
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.course-module-content pre {
  background: #0b0f19 !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 20px 0;
  overflow-x: auto;
}

.course-module-content code {
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-size: 14px;
}

.course-module-content :not(pre) > code {
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13.5px;
}

.course-module-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.course-module-content th,
.course-module-content td {
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
  color: var(--text-secondary);
}

.course-module-content th {
  background: rgba(255, 255, 255, 0.04);
  font-weight: 700;
  color: var(--text-primary);
  text-align: left;
}

/* ==========================================================================
   Interactive Self-Check Cards
   ========================================================================== */
.self-check-card {
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  margin: 20px 0;
  overflow: hidden;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.self-check-card:hover {
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.15);
}

.self-check-header {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.02);
  transition: background var(--transition-fast);
}

.self-check-header:hover {
  background: rgba(99, 102, 241, 0.06);
}

.self-check-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.self-check-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 3px 8px;
  border-radius: 6px;
}

.self-check-prompt {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.btn-self-check-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 6px;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-self-check-toggle:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.toggle-icon {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.self-check-card.open .toggle-icon {
  transform: rotate(180deg);
}

.self-check-answer {
  border-top: 1px dashed rgba(99, 102, 241, 0.25);
  padding: 18px 20px;
  background: rgba(9, 13, 22, 0.95);
  animation: fadeIn 0.3s ease;
}

.self-check-answer-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.answer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-emerald);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.answer-content {
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.65;
}

.answer-content ul,
.answer-content ol {
  margin: 8px 0 10px 20px;
}

/* Pagination Footer */
.course-pagination-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border-color);
}

.btn-course-step {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 180px;
  justify-content: center;
}

.btn-step-next {
  margin-left: auto;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.15));
  border-color: rgba(99, 102, 241, 0.4);
}

.btn-course-step:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
}

.btn-step-next:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(6, 182, 212, 0.25));
  border-color: var(--accent-cyan);
}

.btn-course-step:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-step-text {
  font-size: 14px;
  font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 960px) {
  .course-player-layout {
    grid-template-columns: 1fr;
  }
  
  .course-sidebar {
    position: relative;
    top: 0;
    max-height: none;
  }
  
  .course-content-card {
    padding: 24px 20px;
  }
  
  .courses-grid {
    grid-template-columns: 1fr;
  }
}

/* Mermaid Diagram Card & Interactive Controls */
.mermaid-card {
  margin: 32px 0;
  background: rgba(14, 22, 38, 0.95);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 20px rgba(99, 102, 241, 0.12);
  overflow: hidden;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
  position: relative;
}

.mermaid-card:hover {
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5), 0 0 25px rgba(6, 182, 212, 0.2);
}

.mermaid-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
  backdrop-filter: blur(8px);
  user-select: none;
  flex-wrap: wrap;
  gap: 8px;
}

.mermaid-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mermaid-card-badge svg {
  width: 15px;
  height: 15px;
}

.mermaid-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mermaid-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  outline: none;
  font-family: inherit;
}

.mermaid-btn:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: var(--accent-primary);
  color: #ffffff;
}

.mermaid-btn svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.mermaid-btn-fullscreen {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: #cbd5e1;
}

.mermaid-btn-fullscreen:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

.mermaid-viewport {
  position: relative;
  width: 100%;
  min-height: 200px;
  padding: 28px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: auto;
  cursor: grab;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.4) transparent;
}

.mermaid-viewport:active {
  cursor: grabbing;
}

.mermaid-viewport::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}

.mermaid-viewport::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
}

.mermaid-viewport::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.4);
  border-radius: 4px;
}

.mermaid-viewport::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

.mermaid-canvas {
  display: flex;
  justify-content: center;
  align-items: center;
  transform-origin: center center;
  transition: transform 0.15s ease-out;
  width: 100%;
}

.mermaid-canvas svg {
  max-width: 100% !important;
  height: auto !important;
  font-family: var(--font-body) !important;
}

.mermaid text,
.mermaid .nodeLabel,
.mermaid .label,
.mermaid-canvas text,
.mermaid-canvas .nodeLabel,
.mermaid-canvas .label {
  font-family: var(--font-body) !important;
  font-size: 14.5px !important;
  font-weight: 500 !important;
  color: #ffffff !important;
  fill: #ffffff !important;
}

.mermaid .edgeLabel,
.mermaid-canvas .edgeLabel {
  font-family: var(--font-body) !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: var(--accent-cyan) !important;
  fill: var(--accent-cyan) !important;
  background-color: #0b1120 !important;
  padding: 2px 6px !important;
}

.mermaid .node rect,
.mermaid .node circle,
.mermaid .node polygon,
.mermaid .node path,
.mermaid-canvas .node rect,
.mermaid-canvas .node circle,
.mermaid-canvas .node polygon,
.mermaid-canvas .node path {
  stroke-width: 2px !important;
}

/* Fullscreen Modal Lightbox */
.mermaid-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(5, 8, 16, 0.94);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mermaid-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mermaid-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(99, 102, 241, 0.3);
  flex-shrink: 0;
}

.mermaid-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
}

.mermaid-modal-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mermaid-modal-body {
  flex: 1;
  width: 100%;
  height: calc(100% - 65px);
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 24px;
  cursor: grab;
  user-select: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.4) transparent;
}

.mermaid-modal-body:active {
  cursor: grabbing;
}

.mermaid-modal-body .mermaid-canvas {
  width: auto;
  max-width: none;
}

.mermaid-modal-body svg {
  max-width: none !important;
  height: auto !important;
}


