/* ==========================================================================
   Kelajak Soati - Modern Design System & Styles
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Theme: Dark (Default) */
  --bg-primary: #0a0f1d;
  --bg-secondary: #111827;
  --bg-tertiary: #1f293d;
  --bg-card: rgba(22, 30, 49, 0.75);
  --bg-card-hover: rgba(30, 41, 67, 0.9);
  --bg-glass: rgba(17, 24, 39, 0.7);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.6);

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

  --accent-blue: #3b82f6;
  --accent-emerald: #10b981;
  --accent-purple: #8b5cf6;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #6366f1 50%, #a855f7 100%);

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px rgba(56, 189, 248, 0.2);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --notebook-line: rgba(59, 130, 246, 0.15);
  --notebook-margin: #ef4444;
  --notebook-paper: #131b2e;

  --content-font-size: 16px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-glass: rgba(255, 255, 255, 0.8);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(79, 70, 229, 0.5);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-highlight: #0284c7;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 20px rgba(14, 165, 233, 0.15);

  --notebook-line: rgba(2, 132, 199, 0.12);
  --notebook-margin: #dc2626;
  --notebook-paper: #ffffff;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: var(--content-font-size);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(at 10% 10%, rgba(56, 189, 248, 0.06) 0px, transparent 50%),
    radial-gradient(at 90% 90%, rgba(139, 92, 246, 0.06) 0px, transparent 50%);
  background-attachment: fixed;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Glass effect utility */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
}

/* Layout container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Header & Navbar
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 0;
  transition: var(--transition);
}

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

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
  flex-shrink: 0;
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.brand-text p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Search bar */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box input {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 8px 16px 8px 36px;
  font-size: 0.85rem;
  color: var(--text-primary);
  width: 190px;
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  width: 250px;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

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

/* Button styles */
.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.25);
}

.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.4);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
}

/* Font controls */
.font-controls {
  display: flex;
  align-items: center;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.font-controls button {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 7px 10px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  transition: var(--transition);
}

.font-controls button:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

/* ==========================================================================
   Hero & Quick Summary Bar
   ========================================================================== */
.hero-banner {
  padding: 32px 0 20px 0;
}

.hero-card {
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-info {
  flex: 1;
  min-width: 280px;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.hero-info h2 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  line-height: 1.25;
}

.hero-info p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 650px;
}

/* Progress summary widget */
.progress-widget {
  background: var(--bg-tertiary);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.progress-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Navigation Tabs (Main Lessons Switcher)
   ========================================================================== */
.tabs-navigation {
  padding: 12px 0 20px 0;
  position: sticky;
  top: 73px;
  z-index: 90;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.lesson-nav-list {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.lesson-nav-list::-webkit-scrollbar {
  display: none;
}

.nav-tab-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

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

.nav-tab-btn.active {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.tab-badge {
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.15);
  font-weight: 700;
}

[data-theme="dark"] .nav-tab-btn.active .tab-badge {
  background: rgba(0, 0, 0, 0.25);
  color: #000;
}

/* ==========================================================================
   Sub-Navigation / Mode Switcher inside a lesson
   ========================================================================== */
.sub-tabs-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 24px 0;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.sub-tabs {
  display: inline-flex;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  gap: 4px;
}

.sub-tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.sub-tab-btn:hover {
  color: var(--text-primary);
}

.sub-tab-btn.active {
  background: var(--bg-tertiary);
  color: #38bdf8;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

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

/* Daftarga ko'chirish rejimi (Focus / Pen mode) */
.btn-notebook-mode {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #f59e0b;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-notebook-mode:hover, .btn-notebook-mode.active {
  background: #f59e0b;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

/* ==========================================================================
   Lesson Content View
   ========================================================================== */
.lesson-page {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.lesson-page.active {
  display: block;
}

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

/* Lesson Header Card */
.lesson-header-card {
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  border-left: 5px solid var(--accent-blue);
}

.lesson-header-card.l1 { border-left-color: #3b82f6; }
.lesson-header-card.l2 { border-left-color: #10b981; }
.lesson-header-card.l3 { border-left-color: #8b5cf6; }
.lesson-header-card.l4 { border-left-color: #f59e0b; }

.lesson-meta-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.lesson-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.lesson-tag.l1 { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.lesson-tag.l2 { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.lesson-tag.l3 { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.lesson-tag.l4 { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.lesson-header-card h2 {
  font-size: 1.55rem;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.3;
}

.lesson-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.lesson-goal-box {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.88rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-left: 3px solid #38bdf8;
}

.lesson-goal-box strong {
  color: var(--text-primary);
  white-space: nowrap;
}

/* ==========================================================================
   DAFTARGA YOZILADIGAN KONSPEKT CARD STYLING (Notebook Section)
   ========================================================================== */
.notebook-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Banner alert for notebook */
.notebook-notice {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
  border: 1px dashed rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.notice-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notice-icon {
  font-size: 28px;
}

.notice-text h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 2px;
}

.notice-text p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Real notebook card */
.notebook-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  background: var(--notebook-paper);
  position: relative;
  transition: var(--transition);
}

.notebook-header-bar {
  background: var(--bg-tertiary);
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.notebook-header-bar .title-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notebook-header-bar h3 {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notebook-body {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Notebook section block */
.conspect-block {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  transition: var(--transition);
}

.conspect-block:hover {
  border-color: var(--border-focus);
}

.block-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.block-title-row h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-copy-small {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.btn-copy-small:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: #38bdf8;
}

/* Notebook write grid & lists */
.definitions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.def-item {
  background: var(--bg-tertiary);
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-blue);
  cursor: pointer;
  transition: var(--transition);
}

.def-item:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}

.def-term {
  font-weight: 700;
  color: var(--text-highlight);
  font-size: 0.92rem;
  margin-bottom: 6px;
  display: block;
}

.def-desc {
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.5;
}

/* Seven programs cards */
.programs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.program-item {
  background: var(--bg-tertiary);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.program-item:hover {
  border-color: var(--border-focus);
}

.program-badge {
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  min-width: 32px;
  text-align: center;
}

.program-content h5 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.program-content p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Bullet points list */
.styled-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.styled-list li {
  position: relative;
  padding-left: 24px;
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.55;
  cursor: pointer;
  transition: var(--transition);
}

.styled-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: #38bdf8;
  font-weight: bold;
  font-size: 1.1rem;
}

.styled-list li:hover {
  color: #38bdf8;
}

/* Rights and duties 2-col */
.rights-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

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

.rights-table th {
  background: var(--bg-tertiary);
  font-weight: 700;
  color: var(--text-highlight);
}

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

/* Question answers block */
.qa-notebook-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.qa-notebook-item {
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  border-left: 3px solid #10b981;
}

.qa-notebook-q {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.qa-notebook-a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  background: var(--bg-secondary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-color);
}

.qa-notebook-a strong {
  color: #10b981;
}

/* Personal summary box */
.summary-box {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 18px 22px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.6;
}

/* Checkbox tracker row */
.notebook-footer-tracker {
  background: var(--bg-tertiary);
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.tracker-check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.tracker-check-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #10b981;
  cursor: pointer;
}

/* ==========================================================================
   O'QISH UCHUN MATNLAR (Reading Section)
   ========================================================================== */
.reading-container {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.reading-article {
  padding: 26px 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  line-height: 1.7;
}

.reading-article h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-highlight);
  display: flex;
  align-items: center;
  gap: 10px;
}

.reading-article p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
  white-space: pre-line;
}

.reading-article p:last-child {
  margin-bottom: 0;
}

.quote-highlight {
  background: var(--bg-tertiary);
  border-left: 4px solid #8b5cf6;
  padding: 14px 18px;
  margin: 16px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-primary);
}

/* ==========================================================================
   SAVOL-JAVOBLAR & NAZORAT SECTION
   ========================================================================== */
.qa-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.accordion-item:hover {
  border-color: var(--border-focus);
}

.accordion-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  background: var(--bg-tertiary);
  gap: 12px;
}

.accordion-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.accordion-icon {
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.accordion-item.open .accordion-icon {
  transform: rotate(180deg);
  color: #38bdf8;
}

.accordion-content {
  display: none;
  padding: 18px 20px;
  border-top: 1px solid var(--border-color);
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.accordion-item.open .accordion-content {
  display: block;
}

/* ==========================================================================
   QUIZ (BLITS TEST)
   ========================================================================== */
.quiz-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.quiz-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px 26px;
}

.quiz-q-text {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.quiz-opt-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.quiz-opt-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.quiz-opt-btn.correct {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #10b981;
  font-weight: 700;
}

.quiz-opt-btn.wrong {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

.quiz-explanation {
  display: none;
  background: var(--bg-secondary);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  border-left: 3px solid #38bdf8;
  margin-top: 8px;
  animation: fadeIn 0.2s ease;
}

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

/* ==========================================================================
   FOCUS / NOTEBOOK WRITING MODE (Daftarga ko'chirish maxsus rejimi)
   ========================================================================== */
body.notebook-mode-active {
  --bg-primary: #0d1322;
  --text-primary: #ffffff;
  font-size: 18px;
}

[data-theme="light"] body.notebook-mode-active {
  --bg-primary: #fffefb;
  --text-primary: #111827;
}

body.notebook-mode-active .notebook-body {
  background-image: repeating-linear-gradient(
    transparent,
    transparent 31px,
    var(--notebook-line) 31px,
    var(--notebook-line) 32px
  );
  line-height: 32px;
  border-left: 4px solid var(--notebook-margin);
  padding-left: 40px;
}

body.notebook-mode-active .conspect-block {
  background: transparent;
  border: 1px dashed var(--notebook-line);
  margin-bottom: 24px;
}

body.notebook-mode-active .styled-list li:hover,
body.notebook-mode-active .def-item:hover,
body.notebook-mode-active .program-item:hover {
  background: rgba(251, 191, 36, 0.15) !important;
  border-radius: 4px;
}

/* Active line pointer marker */
.line-highlight {
  background-color: rgba(253, 224, 71, 0.25) !important;
  border-radius: 4px;
  padding: 2px 4px;
  box-shadow: 0 0 10px rgba(253, 224, 71, 0.2);
}

/* ==========================================================================
   Overview Tab (Barcha darslar umumiy ko'rinishi)
   ========================================================================== */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.overview-lesson-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: var(--transition);
  cursor: pointer;
}

.overview-lesson-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-focus);
}

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

.overview-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.overview-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 8px 0 4px 0;
  line-height: 1.35;
}

.overview-card-meta {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.overview-card-btn {
  margin-top: 12px;
  width: 100%;
  justify-content: center;
}

/* Comparative summary table */
.comparison-card {
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  margin-bottom: 28px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-top: 16px;
}

.comp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.comp-table th, .comp-table td {
  padding: 12px 16px;
  border: 1px solid var(--border-color);
}

.comp-table th {
  background: var(--bg-tertiary);
  font-weight: 700;
  color: var(--text-highlight);
  white-space: nowrap;
}

.comp-table tr:hover {
  background: var(--bg-card-hover);
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast-msg {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  background: #1e293b;
  color: #f8fafc;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  border-left: 4px solid #10b981;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-msg.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background: var(--bg-glass);
  padding: 24px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 12pt !important;
  }

  .site-header,
  .tabs-navigation,
  .sub-tabs-wrapper,
  .header-actions,
  .hero-banner,
  .btn-copy-small,
  .notebook-footer-tracker,
  .btn-notebook-mode,
  .site-footer,
  .quiz-container {
    display: none !important;
  }

  .lesson-page {
    display: block !important;
    page-break-after: always;
  }

  .notebook-card, .conspect-block {
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #000 !important;
  }

  .block-title-row h4, .def-term, h2, h3 {
    color: #000 !important;
  }
}

/* Responsive queries */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .search-box input {
    width: 130px;
  }

  .search-box input:focus {
    width: 180px;
  }

  .hero-card {
    padding: 18px 20px;
  }

  .hero-info h2 {
    font-size: 1.3rem;
  }

  .notebook-body {
    padding: 18px;
  }
}
