/* =========================================================
   .NET / C# Senior Engineer Interview Prep - Student-Friendly Theme
   ========================================================= */

:root {
  --bg-main: #0b0f19;
  --bg-card: #111827;
  --bg-card-hover: #172033;
  --bg-sidebar: #0d121f;
  --bg-header: rgba(15, 23, 42, 0.85);
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-code: #070a12;
  --border-color: #1e293b;
  --border-highlight: #3b82f6;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-white: #ffffff;
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: rgba(99, 102, 241, 0.15);
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #a855f7;

  --badge-lead-bg: rgba(244, 63, 94, 0.15);
  --badge-lead-text: #fb7185;
  --badge-senior-bg: rgba(168, 85, 247, 0.15);
  --badge-senior-text: #c084fc;
  --badge-intermediate-bg: rgba(6, 182, 212, 0.15);
  --badge-intermediate-text: #38bdf8;
  --badge-fundamental-bg: rgba(16, 185, 129, 0.15);
  --badge-fundamental-text: #34d399;

  --status-red-bg: rgba(244, 63, 94, 0.15);
  --status-red-text: #fb7185;
  --status-yellow-bg: rgba(245, 158, 11, 0.15);
  --status-yellow-text: #fbbf24;
  --status-green-bg: rgba(16, 185, 129, 0.15);
  --status-green-text: #34d399;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --font-scale: 1;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.5);
  --sidebar-width: 320px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-sidebar: #f1f5f9;
  --bg-header: rgba(255, 255, 255, 0.9);
  --bg-secondary: #e2e8f0;
  --bg-tertiary: #cbd5e1;
  --bg-code: #0f172a;
  --border-color: #e2e8f0;
  --border-highlight: #3b82f6;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-white: #ffffff;

  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: rgba(79, 70, 229, 0.1);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-size: calc(14px * var(--font-scale));
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* App Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  transition: var(--transition);
}

.sidebar-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.brand-info h1 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}

.brand-info p {
  font-size: 11px;
  color: var(--accent-cyan);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.sidebar-stats {
  padding: 14px 20px;
  background: var(--primary-light);
  border-bottom: 1px solid var(--border-color);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 11.5px;
  font-weight: 600;
}

.progress-bar-bg {
  height: 7px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f43f5e, #f59e0b, #10b981);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
  width: 0%;
}

.mastery-breakdown {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 10.5px;
  font-weight: 600;
}

.mastery-tag-red { color: var(--accent-rose); }
.mastery-tag-yellow { color: var(--accent-amber); }
.mastery-tag-green { color: var(--accent-emerald); }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 8px;
}

.section-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  margin-bottom: 3px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
}

.section-nav-item:hover {
  background-color: var(--bg-card);
  color: var(--text-primary);
  transform: translateX(3px);
}

.section-nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  border-left: 3px solid var(--primary);
}

.nav-item-title {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  color: var(--text-muted);
}

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

/* Main Content Area */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Top Sticky Header */
.top-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  max-width: 550px;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-box input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}

.action-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--text-muted);
}

.action-btn.primary {
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  color: #fff;
  border: none;
}

.action-btn.primary:hover {
  opacity: 0.92;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.action-btn.accent {
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  color: #fff;
  border: none;
}

.font-size-control {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.font-size-btn {
  padding: 6px 10px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.font-size-btn:hover {
  background: var(--bg-secondary);
}

/* Dashboard Banner */
.content-body {
  padding: 24px;
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
}

.hero-banner {
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 50%, #082f49 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-subtitle {
  font-size: 13.5px;
  color: #cbd5e1;
  max-width: 760px;
  line-height: 1.5;
}

.quick-study-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.stat-card {
  background: rgba(17, 24, 39, 0.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.stat-label {
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.stat-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-white);
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.stat-sub {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-secondary);
}

/* Quick Filter Pills */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.filter-pill {
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.filter-pill:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.filter-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.filter-pill .pill-count {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.2);
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

/* Section Header in Content */
.section-wrapper {
  margin-bottom: 36px;
  scroll-margin-top: 80px;
}

.section-headline {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-headline-info h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-headline-info p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.section-progress-pill {
  font-size: 11.5px;
  font-weight: 700;
  background: var(--bg-secondary);
  color: var(--accent-cyan);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* Question Cards */
.questions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.question-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: var(--shadow-md);
}

.question-card.status-mastered {
  border-left: 4px solid var(--accent-emerald);
}

.question-card.status-review {
  border-left: 4px solid var(--accent-amber);
}

.question-card.status-learning {
  border-left: 4px solid var(--accent-rose);
}

.question-card.expanded {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.card-header {
  padding: 15px 18px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  user-select: none;
}

.card-title-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
}

.q-number-badge {
  font-size: 11.5px;
  font-weight: 800;
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  min-width: 38px;
  text-align: center;
}

.q-content-meta {
  flex: 1;
}

.q-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.45;
  margin-bottom: 6px;
}

.q-meta-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-fundamental {
  background: var(--badge-fundamental-bg);
  color: var(--badge-fundamental-text);
}

.badge-intermediate {
  background: var(--badge-intermediate-bg);
  color: var(--badge-intermediate-text);
}

.badge-senior {
  background: var(--badge-senior-bg);
  color: var(--badge-senior-text);
}

.badge-lead {
  background: var(--badge-lead-bg);
  color: var(--badge-lead-text);
}

.badge-scenario {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
}

.tag-pill {
  font-size: 10px;
  background: var(--bg-secondary);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

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

/* Confidence Rating Selector */
.confidence-selector {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.conf-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  transition: var(--transition);
  color: var(--text-muted);
}

.conf-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.conf-btn.active.red {
  background: var(--status-red-bg);
  color: var(--status-red-text);
}

.conf-btn.active.yellow {
  background: var(--status-yellow-bg);
  color: var(--status-yellow-text);
}

.conf-btn.active.green {
  background: var(--status-green-bg);
  color: var(--status-green-text);
}

.expand-chevron {
  font-size: 13px;
  color: var(--text-muted);
  transition: transform 0.25s ease;
  margin-left: 4px;
}

.question-card.expanded .expand-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

/* Card Body / Detailed Explanation */
.card-body {
  display: none;
  padding: 0 18px 18px 18px;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.12);
}

.question-card.expanded .card-body {
  display: block;
  animation: fadeIn 0.25s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.verbatim-prompt-box {
  background: var(--bg-secondary);
  border-left: 3px solid var(--accent-cyan);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 14px 0;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
}

/* Student-Friendly Sections inside Explanation */

/* 1. ELI5 / Analogy Box */
.eli5-box {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.eli5-icon {
  font-size: 22px;
}

.eli5-content h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.eli5-content p {
  font-size: 12.5px;
  color: var(--text-primary);
  line-height: 1.55;
}

/* 2. 60-Second Interview Pitch */
.pitch-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 14px;
}

.pitch-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

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

.pitch-tag {
  font-size: 10px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

.pitch-text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.6;
}

/* 3. Deep Technical Breakdown */
.tldr-box {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 14px;
}

.tldr-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.tldr-text {
  font-size: 12.5px;
  color: var(--text-primary);
  line-height: 1.6;
}

.explanation-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 14px 0 6px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.key-points-list {
  list-style: none;
  margin-bottom: 14px;
}

.key-points-list li {
  font-size: 12.5px;
  color: var(--text-secondary);
  padding-left: 18px;
  position: relative;
  margin-bottom: 6px;
  line-height: 1.55;
}

.key-points-list li strong {
  color: var(--text-primary);
}

.key-points-list li::before {
  content: "▹";
  position: absolute;
  left: 3px;
  color: var(--primary);
  font-size: 13px;
}

/* Code Snippet Container */
.code-container {
  background: var(--bg-code);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 12px 0;
}

.code-header {
  background: #04060a;
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  font-size: 11px;
  color: var(--text-muted);
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.copy-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-white);
}

.code-container pre {
  padding: 12px;
  overflow-x: auto;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 12px;
  color: #e2e8f0;
  line-height: 1.55;
}

/* 4. Common Traps / Senior Nuance */
.senior-tip-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-top: 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.senior-tip-icon {
  font-size: 18px;
}

.senior-tip-content h4 {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-amber);
  margin-bottom: 3px;
}

.senior-tip-content p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* User Notes Area */
.user-notes-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
}

.notes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.user-notes-textarea {
  width: 100%;
  min-height: 55px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 8px 10px;
  font-size: 12px;
  font-family: inherit;
  resize: vertical;
  outline: none;
}

.user-notes-textarea:focus {
  border-color: var(--primary);
}

/* Visual Memory Diagrams & ASCII Layouts */
.memory-diagram-box {
  background: #050811;
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: var(--radius-md);
  padding: 14px;
  margin: 14px 0;
  position: relative;
  overflow-x: auto;
}

.memory-diagram-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.memory-diagram-box pre {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 12px;
  color: #38bdf8;
  line-height: 1.4;
  margin: 0;
}

/* Step-by-Step RAM Walkthrough */
.step-walkthrough {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0;
}

.step-card {
  background: var(--bg-secondary);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.step-number {
  background: var(--primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  min-width: 22px;
  text-align: center;
}

.step-content h5 {
  font-size: 12.5px;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.step-content p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Under the Hood / Decompiled C# */
.under-hood-box {
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 14px 0;
}

.under-hood-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-purple);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.under-hood-box p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}

/* Curated Video Resources Section */
.video-resources-section {
  margin: 16px 0;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.video-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.video-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-rose);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}

.video-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  text-decoration: none;
  display: flex;
  gap: 12px;
  align-items: center;
  transition: var(--transition);
}

.video-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-rose);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.video-play-btn {
  width: 36px;
  height: 36px;
  background: rgba(244, 63, 94, 0.15);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-rose);
  font-size: 14px;
  flex-shrink: 0;
}

.video-card:hover .video-play-btn {
  background: var(--accent-rose);
  color: #ffffff;
}

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

.video-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.channel-tag {
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Flashcard / Study Modal */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.active {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

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

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* Flashcard Reveal Mechanism */
.flashcard-reveal-area {
  margin-top: 18px;
}

.reveal-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary-light), rgba(6, 182, 212, 0.15));
  border: 2px dashed var(--primary);
  border-radius: var(--radius-md);
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.reveal-btn:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

/* Practice Timer */
.practice-timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  font-family: monospace;
}

.timer-running {
  color: var(--accent-amber);
  border-color: var(--accent-amber);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* Cheat Sheet Modal & Roadmap Modal Tables */
.cheat-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 12px;
}

.cheat-table th, .cheat-table td {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.cheat-table th {
  background: var(--bg-secondary);
  color: var(--accent-cyan);
  font-weight: 700;
}

.cheat-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

/* Empty search state */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 44px;
  margin-bottom: 10px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-wrapper {
    margin-left: 0;
  }

  .menu-toggle {
    display: flex;
  }
}

@media (max-width: 640px) {
  .top-header {
    padding: 10px 14px;
  }

  .content-body {
    padding: 14px;
  }

  .hero-banner {
    padding: 16px;
  }

  .hero-title {
    font-size: 17px;
  }

  .hero-header-flex {
    flex-direction: column;
  }

  .card-header {
    padding: 12px;
  }

  .q-title {
    font-size: 13.5px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}
