/* ========================================
   CSS Variables / Theming
   ======================================== */
:root,
[data-theme="light"] {
  --bg-primary: #f5f7fa;
  --bg-secondary: #ffffff;
  --bg-sidebar: #1a1f36;
  --bg-sidebar-hover: #252b48;
  --bg-sidebar-active: #2d3561;
  --bg-card: #ffffff;
  --bg-code: #f6f8fa;
  --bg-quiz: #f0f7ff;
  --bg-tip: #fffbeb;
  --bg-exercise: #f0fdf4;
  --bg-input: #ffffff;

  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --text-sidebar: #cbd5e0;
  --text-sidebar-active: #ffffff;
  --text-inverse: #ffffff;

  --border-color: #e2e8f0;
  --border-light: #edf2f7;

  --accent: #4f6ef7;
  --accent-hover: #3b5ce4;
  --accent-light: #ebf0ff;
  --success: #38a169;
  --success-light: #c6f6d5;
  --danger: #e53e3e;
  --danger-light: #fed7d7;
  --warning: #d69e2e;
  --warning-light: #fefcbf;
  --info: #3182ce;
  --info-light: #bee3f8;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);

  --sidebar-width: 300px;
  --header-height: 56px;
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.2s ease;
}

[data-theme="dark"] {
  --bg-primary: #0f1117;
  --bg-secondary: #1a1d2e;
  --bg-sidebar: #0d0f1a;
  --bg-sidebar-hover: #1a1d2e;
  --bg-sidebar-active: #252845;
  --bg-card: #1e2235;
  --bg-code: #171928;
  --bg-quiz: #1a2332;
  --bg-tip: #2a2415;
  --bg-exercise: #152218;
  --bg-input: #1a1d2e;

  --text-primary: #e2e8f0;
  --text-secondary: #a0aec0;
  --text-muted: #718096;
  --text-sidebar: #a0aec0;
  --text-sidebar-active: #ffffff;
  --text-inverse: #ffffff;

  --border-color: #2d3348;
  --border-light: #252b3d;

  --accent: #667eea;
  --accent-hover: #7c94ff;
  --accent-light: #1a2340;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.5);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ========================================
   Mobile Header
   ======================================== */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-sidebar);
  color: var(--text-inverse);
  align-items: center;
  padding: 0 16px;
  z-index: 1000;
  gap: 12px;
}

.mobile-header .menu-toggle {
  background: none;
  border: none;
  color: var(--text-inverse);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 8px;
}

.mobile-title {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
}

.mobile-header .theme-toggle {
  background: none;
  border: none;
  color: var(--text-inverse);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 8px;
}

/* ========================================
   Sidebar
   ======================================== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar);
  color: var(--text-sidebar);
  display: flex;
  flex-direction: column;
  z-index: 900;
  overflow-y: auto;
  transition: transform var(--transition);
}

.sidebar-header {
  padding: 24px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-header h2 {
  color: var(--text-inverse);
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-header h2 i {
  color: var(--accent);
}

.sidebar-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Search */
.search-box {
  position: relative;
  padding: 12px 16px;
}

.search-box i {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.search-box input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.05);
  color: var(--text-sidebar);
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-box input:focus {
  border-color: var(--accent);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 16px;
  right: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  max-height: 300px;
  overflow-y: auto;
  display: none;
  z-index: 10;
  box-shadow: var(--shadow-lg);
}

.search-results.active {
  display: block;
}

.search-result-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: 0.85rem;
}

.search-result-item:hover {
  background: var(--accent-light);
}

.search-result-item .sr-module {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Progress */
.progress-overview {
  padding: 8px 16px 12px;
}

.progress-bar-container {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--success));
  border-radius: 3px;
  transition: width 0.5s ease;
}

.progress-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

/* Timer */
.timer-widget {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.timer-btn {
  background: rgba(255,255,255,0.08);
  border: none;
  color: var(--text-sidebar);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  transition: background var(--transition);
  margin-left: auto;
}

.timer-btn:hover {
  background: rgba(255,255,255,0.15);
}

/* Module Nav */
.module-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.module-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text-sidebar);
  padding: 10px 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.module-item:hover {
  background: var(--bg-sidebar-hover);
  color: var(--text-sidebar-active);
}

.module-item.active {
  background: var(--bg-sidebar-active);
  color: var(--text-sidebar-active);
}

.module-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.module-number {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.module-item.completed .module-number {
  background: var(--success);
  color: white;
}

.module-item.in-progress .module-number {
  background: var(--accent);
  color: white;
}

.module-label {
  flex: 1;
  line-height: 1.3;
}

.module-hours {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.module-progress-mini {
  width: 40px;
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}

.module-progress-mini-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* Section list under module */
.section-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(0,0,0,0.15);
}

.section-list.expanded {
  max-height: 600px;
}

.section-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 20px 7px 52px;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}

.section-item:hover {
  color: var(--text-sidebar-active);
  background: rgba(255,255,255,0.03);
}

.section-item.active {
  color: var(--accent);
}

.section-item.completed {
  color: var(--success);
}

.section-item i {
  font-size: 0.7rem;
  width: 14px;
  text-align: center;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.theme-toggle-full {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-sidebar);
  padding: 8px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.82rem;
  transition: background var(--transition);
}

.theme-toggle-full:hover {
  background: rgba(255,255,255,0.1);
}

.reset-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(229,62,62,0.1);
  border: 1px solid rgba(229,62,62,0.2);
  color: var(--danger);
  padding: 8px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.82rem;
  transition: background var(--transition);
}

.reset-btn:hover {
  background: rgba(229,62,62,0.2);
}

/* Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 800;
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  padding: 32px 40px;
  max-width: 900px;
}

/* Welcome Screen */
.welcome-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
}

.welcome-hero {
  text-align: center;
  max-width: 600px;
}

.welcome-icon {
  font-size: 3.5rem;
  color: var(--accent);
  margin-bottom: 20px;
}

.welcome-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.2;
}

.welcome-subtitle {
  color: var(--accent);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 12px;
}

.welcome-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 28px;
  line-height: 1.6;
}

.welcome-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.welcome-stats .stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.welcome-stats .stat i {
  font-size: 1.5rem;
  color: var(--accent);
}

.start-btn, .resume-btn {
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.start-btn {
  background: var(--accent);
  color: white;
}

.start-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.resume-btn {
  background: var(--success);
  color: white;
  margin-left: 12px;
}

.resume-btn:hover {
  background: #2f855a;
  transform: translateY(-1px);
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* ========================================
   Section Content (Rendered Markdown)
   ======================================== */
.section-content {
  animation: fadeIn 0.3s ease;
}

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

.section-content h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

.section-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--accent);
}

.section-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
}

.section-content h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 6px;
}

.section-content p {
  margin-bottom: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.section-content ul, .section-content ol {
  margin-bottom: 14px;
  padding-left: 24px;
}

.section-content li {
  margin-bottom: 6px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.section-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.section-content a {
  color: var(--accent);
  text-decoration: none;
}

.section-content a:hover {
  text-decoration: underline;
}

.section-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 12px 16px;
  margin: 16px 0;
  background: var(--accent-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-secondary);
}

.section-content hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 24px 0;
}

/* Tables */
.section-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.9rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.section-content th {
  background: var(--accent);
  color: white;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
}

.section-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
}

.section-content tr:last-child td {
  border-bottom: none;
}

.section-content tr:nth-child(even) {
  background: var(--bg-primary);
}

/* Code Blocks */
.section-content pre {
  margin: 16px 0;
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.section-content pre code {
  display: block;
  padding: 16px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  tab-size: 2;
}

.section-content code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.88em;
  background: var(--bg-code);
  padding: 2px 6px;
  border-radius: 4px;
}

.section-content pre code {
  background: none;
  padding: 0;
}

/* Mermaid diagrams */
.mermaid-wrapper {
  margin: 20px 0;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  text-align: center;
  overflow-x: auto;
}

/* ========================================
   Quiz Components
   ======================================== */
.quiz-area {
  margin-top: 32px;
  padding: 24px;
  background: var(--bg-quiz);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

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

.quiz-header i {
  color: var(--accent);
  font-size: 1.2rem;
}

.quiz-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.quiz-question {
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}

.quiz-question p {
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.9rem;
  background: var(--bg-secondary);
}

.quiz-option:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.quiz-option.selected {
  border-color: var(--accent);
  background: var(--accent-light);
}

.quiz-option.correct {
  border-color: var(--success);
  background: var(--success-light);
}

.quiz-option.incorrect {
  border-color: var(--danger);
  background: var(--danger-light);
}

.quiz-option input[type="radio"] {
  display: none;
}

.quiz-option .option-marker {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
  transition: all var(--transition);
}

.quiz-option.selected .option-marker {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.quiz-option.correct .option-marker {
  border-color: var(--success);
  background: var(--success);
  color: white;
}

.quiz-option.incorrect .option-marker {
  border-color: var(--danger);
  background: var(--danger);
  color: white;
}

.quiz-explanation {
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--bg-primary);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: none;
  border-left: 3px solid var(--accent);
}

.quiz-explanation.show {
  display: block;
}

.quiz-submit-btn {
  margin-top: 12px;
  padding: 10px 24px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--transition);
}

.quiz-submit-btn:hover {
  background: var(--accent-hover);
}

.quiz-score {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  text-align: center;
  font-size: 1rem;
}

.quiz-score.good {
  background: var(--success-light);
  color: var(--success);
}

.quiz-score.ok {
  background: var(--warning-light);
  color: var(--warning);
}

.quiz-score.bad {
  background: var(--danger-light);
  color: var(--danger);
}

/* ========================================
   Exercise Block
   ======================================== */
.exercise-block {
  margin: 20px 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-exercise);
  overflow: hidden;
}

.exercise-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary);
  transition: background var(--transition);
}

.exercise-header:hover {
  background: rgba(56,161,105,0.08);
}

.exercise-header i {
  color: var(--success);
}

.exercise-header .toggle-icon {
  margin-left: auto;
  transition: transform var(--transition);
}

.exercise-header.expanded .toggle-icon {
  transform: rotate(180deg);
}

.exercise-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  padding: 0 18px;
}

.exercise-body.expanded {
  max-height: 2000px;
  padding: 0 18px 18px;
}

.exercise-body .solution-toggle {
  margin-top: 12px;
  padding: 8px 16px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
}

.exercise-body .solution {
  display: none;
  margin-top: 12px;
}

.exercise-body .solution.show {
  display: block;
}

/* ========================================
   Tip Popup
   ======================================== */
.tip-popup {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 340px;
  background: var(--bg-card);
  border: 1px solid var(--warning);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1100;
  animation: slideUp 0.4s ease;
  overflow: hidden;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.tip-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-tip);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--warning);
}

.tip-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}

.tip-body {
  padding: 14px 16px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========================================
   Navigation
   ======================================== */
.section-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.nav-btn {
  padding: 10px 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.nav-btn:disabled:hover {
  border-color: var(--border-color);
  color: var(--text-primary);
  background: var(--bg-card);
}

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

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
  .mobile-header {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
  }

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

  .sidebar-overlay.active {
    display: block;
  }

  .main-content {
    margin-left: 0;
    padding: 20px 16px;
    padding-top: calc(var(--header-height) + 16px);
    max-width: 100%;
  }

  .welcome-hero h1 {
    font-size: 1.5rem;
  }

  .welcome-stats {
    gap: 16px;
  }

  .section-content h1 {
    font-size: 1.4rem;
  }

  .section-content h2 {
    font-size: 1.2rem;
  }

  .tip-popup {
    left: 16px;
    right: 16px;
    width: auto;
    bottom: 16px;
  }

  .start-btn, .resume-btn {
    padding: 12px 24px;
    font-size: 0.9rem;
  }

  .resume-btn {
    margin-left: 0;
    margin-top: 8px;
  }
}

@media (max-width: 480px) {
  .welcome-stats {
    flex-direction: column;
    gap: 12px;
  }

  .welcome-stats .stat {
    flex-direction: row;
  }

  .section-nav {
    flex-direction: column;
    gap: 10px;
  }

  .nav-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ========================================
   Utility Classes
   ======================================== */
.hidden {
  display: none !important;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Print */
@media print {
  .sidebar, .mobile-header, .tip-popup, .section-nav, .timer-widget {
    display: none !important;
  }
  .main-content {
    margin: 0;
    padding: 20px;
    max-width: 100%;
  }
}
