/* ===== DESIGN SYSTEM ===== */
:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-glass: rgba(255,255,255,0.04);
  --bg-glass-hover: rgba(255,255,255,0.08);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-1: #6366f1;
  --accent-2: #8b5cf6;
  --accent-3: #a78bfa;
  --gradient-main: linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa);
  --gradient-warm: linear-gradient(135deg, #f59e0b, #ef4444);
  --gradient-cool: linear-gradient(135deg, #06b6d4, #3b82f6);
  --gradient-green: linear-gradient(135deg, #10b981, #059669);
  --gradient-pink: linear-gradient(135deg, #ec4899, #f43f5e);
  --gradient-orange: linear-gradient(135deg, #f97316, #eab308);
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --border: rgba(255,255,255,0.06);
  --border-active: rgba(99,102,241,0.4);
  --sidebar-w: 300px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--accent-3); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
img { max-width: 100%; }
::selection { background: var(--accent-1); color: #fff; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--accent-1); border-radius: 3px; }

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  z-index: 100;
  display: flex; flex-direction: column;
  transition: transform var(--transition);
  overflow: hidden;
}
.sidebar-header {
  padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 28px; }
.logo-text {
  font-size: 20px; font-weight: 800;
  background: var(--gradient-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sidebar-close { display: none; font-size: 20px; padding: 4px; color: var(--text-muted); }

/* Progress global */
.progress-global { padding: 16px 24px; border-bottom: 1px solid var(--border); }
.progress-global-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 8px; }
.progress-bar-global {
  height: 6px; background: var(--bg-glass); border-radius: 3px; overflow: hidden;
}
.progress-bar-fill {
  height: 100%; background: var(--gradient-main); border-radius: 3px;
  transition: width 0.6s ease;
}
.progress-global-percent { font-size: 12px; color: var(--accent-3); margin-top: 6px; font-weight: 600; }

/* Sidebar nav */
.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px; }
.nav-block {
  margin-bottom: 8px;
}
.nav-block-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}
.nav-block-header:hover { background: var(--bg-glass-hover); color: var(--text-primary); }
.nav-block-header .block-icon {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.nav-block-header .block-arrow {
  margin-left: auto; font-size: 10px; transition: transform var(--transition);
}
.nav-block.open .block-arrow { transform: rotate(90deg); }
.nav-block-header .block-progress {
  margin-left: auto; font-size: 11px; color: var(--text-muted); font-weight: 500;
  margin-right: 4px;
}

.nav-lessons { overflow: hidden; max-height: 0; transition: max-height 0.4s ease; }
.nav-block.open .nav-lessons { max-height: 600px; }

.nav-lesson {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px 8px 50px; border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-muted);
  cursor: pointer; transition: all var(--transition);
  position: relative;
}
.nav-lesson:hover { background: var(--bg-glass-hover); color: var(--text-primary); }
.nav-lesson.active { background: var(--bg-glass-hover); color: var(--accent-3); }
.nav-lesson.completed { color: var(--success); }
.nav-lesson .lesson-check {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; flex-shrink: 0;
  transition: all var(--transition);
}
.nav-lesson.completed .lesson-check {
  background: var(--success); border-color: var(--success); color: #fff;
}
.nav-lesson.active .lesson-check { border-color: var(--accent-3); }

/* ===== MAIN ===== */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  transition: margin-left var(--transition);
}

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px;
  padding: 16px 32px;
  background: rgba(10,14,26,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.menu-btn { display: none; flex-direction: column; gap: 4px; padding: 8px; }
.menu-btn span { width: 20px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: var(--transition); }
.topbar-title { font-size: 16px; font-weight: 600; }
.topbar-progress { margin-left: auto; font-size: 13px; color: var(--text-muted); }

/* Content */
.content { padding: 32px; max-width: 900px; margin: 0 auto; }

/* ===== HOME PAGE ===== */
.home-hero {
  text-align: center; padding: 60px 0 40px;
}
.home-hero h1 {
  font-size: 48px; font-weight: 900; line-height: 1.1;
  background: var(--gradient-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 16px;
}
.home-hero p { font-size: 18px; color: var(--text-secondary); max-width: 600px; margin: 0 auto; }

.home-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin: 40px 0;
}
.stat-card {
  background: var(--bg-glass); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; text-align: center;
  transition: all var(--transition);
}
.stat-card:hover { transform: translateY(-4px); border-color: var(--border-active); box-shadow: var(--shadow); }
.stat-value { font-size: 36px; font-weight: 800; background: var(--gradient-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.home-blocks { display: grid; gap: 16px; margin-top: 40px; }

.block-card {
  background: var(--bg-glass); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  display: flex; align-items: flex-start; gap: 20px;
  cursor: pointer; transition: all var(--transition);
  position: relative; overflow: hidden;
}
.block-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%;
  border-radius: 4px 0 0 4px;
}
.block-card:nth-child(1)::before { background: var(--gradient-main); }
.block-card:nth-child(2)::before { background: var(--gradient-cool); }
.block-card:nth-child(3)::before { background: var(--gradient-warm); }
.block-card:nth-child(4)::before { background: var(--gradient-green); }
.block-card:nth-child(5)::before { background: var(--gradient-pink); }
.block-card:hover { transform: translateY(-4px); border-color: var(--border-active); box-shadow: var(--shadow-lg); }

.block-card-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; flex-shrink: 0;
}
.block-card:nth-child(1) .block-card-icon { background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(139,92,246,0.2)); }
.block-card:nth-child(2) .block-card-icon { background: linear-gradient(135deg, rgba(6,182,212,0.2), rgba(59,130,246,0.2)); }
.block-card:nth-child(3) .block-card-icon { background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(239,68,68,0.2)); }
.block-card:nth-child(4) .block-card-icon { background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(5,150,105,0.2)); }
.block-card:nth-child(5) .block-card-icon { background: linear-gradient(135deg, rgba(236,72,153,0.2), rgba(244,63,94,0.2)); }

.block-card-info { flex: 1; }
.block-card-info h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.block-card-info p { font-size: 14px; color: var(--text-secondary); margin-bottom: 12px; }
.block-card-meta { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--text-muted); }
.block-card-progress {
  height: 4px; background: var(--bg-glass); border-radius: 2px; overflow: hidden; margin-top: 12px;
}
.block-card-progress-fill {
  height: 100%; border-radius: 2px; transition: width 0.6s ease;
}
.block-card:nth-child(1) .block-card-progress-fill { background: var(--gradient-main); }
.block-card:nth-child(2) .block-card-progress-fill { background: var(--gradient-cool); }
.block-card:nth-child(3) .block-card-progress-fill { background: var(--gradient-warm); }
.block-card:nth-child(4) .block-card-progress-fill { background: var(--gradient-green); }
.block-card:nth-child(5) .block-card-progress-fill { background: var(--gradient-pink); }

/* ===== LESSON PAGE ===== */
.lesson-header {
  margin-bottom: 32px; padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.lesson-breadcrumb {
  font-size: 12px; color: var(--text-muted); margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.lesson-breadcrumb span { cursor: pointer; }
.lesson-breadcrumb span:hover { color: var(--accent-3); }
.lesson-header h1 {
  font-size: 32px; font-weight: 800; line-height: 1.2; margin-bottom: 10px;
}
.lesson-header .lesson-meta {
  display: flex; gap: 16px; font-size: 13px; color: var(--text-muted);
}

/* Lesson sections */
.lesson-section {
  margin-bottom: 40px;
  animation: fadeInUp 0.5s ease;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.lesson-section h2 {
  font-size: 22px; font-weight: 700; margin-bottom: 16px;
  padding-left: 16px; border-left: 3px solid var(--accent-1);
}
.lesson-section h3 { font-size: 17px; font-weight: 600; margin: 20px 0 10px; color: var(--accent-3); }
.lesson-section p { margin-bottom: 14px; color: var(--text-secondary); font-size: 15px; line-height: 1.8; }
.lesson-section ul, .lesson-section ol { margin: 10px 0 16px 24px; color: var(--text-secondary); }
.lesson-section li { margin-bottom: 8px; font-size: 15px; line-height: 1.7; }

/* Info boxes */
.info-box {
  padding: 20px 24px; border-radius: var(--radius);
  margin: 20px 0; border-left: 4px solid;
  background: var(--bg-glass);
}
.info-box.tip { border-color: var(--success); }
.info-box.warning { border-color: var(--warning); }
.info-box.important { border-color: var(--accent-1); }
.info-box.example { border-color: #06b6d4; }
.info-box-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.info-box.tip .info-box-title { color: var(--success); }
.info-box.warning .info-box-title { color: var(--warning); }
.info-box.important .info-box-title { color: var(--accent-3); }
.info-box.example .info-box-title { color: #06b6d4; }
.info-box p { margin-bottom: 6px; }

/* ===== ACCORDION ===== */
.accordion { margin: 16px 0; }
.accordion-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: 8px; overflow: hidden;
  transition: border-color var(--transition);
}
.accordion-item:hover { border-color: var(--border-active); }
.accordion-trigger {
  width: 100%; padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; font-weight: 600;
  background: var(--bg-glass);
  transition: background var(--transition);
}
.accordion-trigger:hover { background: var(--bg-glass-hover); }
.accordion-trigger .acc-arrow { transition: transform var(--transition); }
.accordion-item.open .acc-arrow { transform: rotate(180deg); }
.accordion-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 20px;
}
.accordion-item.open .accordion-body { max-height: 1000px; padding: 16px 20px; }
.accordion-body p { font-size: 14px; color: var(--text-secondary); }

/* ===== FLIP CARDS ===== */
.flip-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin: 20px 0; }
.flip-card {
  height: 180px; perspective: 1000px; cursor: pointer;
}
.flip-card-inner {
  width: 100%; height: 100%;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
  position: relative;
}
.flip-card.flipped .flip-card-inner { transform: rotateY(180deg); }
.flip-card-front, .flip-card-back {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px; text-align: center;
  border: 1px solid var(--border);
}
.flip-card-front {
  background: var(--bg-glass);
  font-size: 15px; font-weight: 600;
}
.flip-card-front::after { content: '🔄 Нажми'; position: absolute; bottom: 10px; font-size: 11px; color: var(--text-muted); font-weight: 400; }
.flip-card-back {
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.15));
  transform: rotateY(180deg);
  font-size: 13px; color: var(--text-secondary); line-height: 1.5;
}

/* ===== QUIZ ===== */
.quiz { margin: 30px 0; }
.quiz-title {
  font-size: 20px; font-weight: 700; margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.quiz-question {
  background: var(--bg-glass); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 16px;
  transition: border-color var(--transition);
}
.quiz-question.answered-correct { border-color: var(--success); }
.quiz-question.answered-wrong { border-color: var(--error); }
.quiz-q-text { font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.quiz-q-num { color: var(--accent-3); margin-right: 8px; }

.quiz-options { display: flex; flex-direction: column; gap: 8px; }
.quiz-option {
  padding: 12px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-glass);
  font-size: 14px; text-align: left;
  transition: all var(--transition);
  display: flex; align-items: flex-start; gap: 10px;
}
.quiz-option:hover:not(.selected):not(.disabled) {
  border-color: var(--accent-1); background: var(--bg-glass-hover);
}
.quiz-option.selected { border-color: var(--accent-1); background: rgba(99,102,241,0.1); }
.quiz-option.correct { border-color: var(--success); background: rgba(16,185,129,0.1); color: var(--success); }
.quiz-option.wrong { border-color: var(--error); background: rgba(239,68,68,0.1); color: var(--error); }
.quiz-option.disabled { cursor: default; opacity: 0.6; }
.quiz-option .opt-marker {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; flex-shrink: 0; margin-top: 1px;
  transition: all var(--transition);
}
.quiz-option.selected .opt-marker { border-color: var(--accent-1); background: var(--accent-1); color: #fff; }
.quiz-option.correct .opt-marker { border-color: var(--success); background: var(--success); color: #fff; }
.quiz-option.wrong .opt-marker { border-color: var(--error); background: var(--error); color: #fff; }

.quiz-explanation {
  margin-top: 12px; padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-secondary); line-height: 1.6;
  display: none;
}
.quiz-explanation.show { display: block; background: rgba(99,102,241,0.05); border: 1px solid rgba(99,102,241,0.15); }

.quiz-check-btn {
  padding: 12px 32px; border-radius: var(--radius-sm);
  background: var(--gradient-main); color: #fff;
  font-size: 14px; font-weight: 600;
  margin-top: 8px;
  transition: all var(--transition); opacity: 0.85;
}
.quiz-check-btn:hover { opacity: 1; transform: translateY(-2px); box-shadow: 0 4px 20px rgba(99,102,241,0.4); }

.quiz-result {
  background: var(--bg-glass); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px; text-align: center; margin-top: 24px;
}
.quiz-result-score { font-size: 48px; font-weight: 900; margin-bottom: 8px; }
.quiz-result-score.great { color: var(--success); }
.quiz-result-score.ok { color: var(--warning); }
.quiz-result-score.bad { color: var(--error); }
.quiz-result-text { font-size: 16px; color: var(--text-secondary); }

/* ===== CASE STUDY ===== */
.case-study {
  background: var(--bg-glass); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px; margin: 24px 0;
  position: relative; overflow: hidden;
}
.case-study::before {
  content: '📋'; position: absolute; top: -10px; right: -10px;
  font-size: 80px; opacity: 0.05;
}
.case-study-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--accent-3); margin-bottom: 12px;
}
.case-study h4 { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.case-study p { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.7; }

.case-options { display: flex; flex-direction: column; gap: 10px; }
.case-option {
  padding: 14px 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-glass);
  font-size: 14px; text-align: left; transition: all var(--transition);
  cursor: pointer;
}
.case-option:hover:not(.revealed) { border-color: var(--accent-1); transform: translateX(4px); }
.case-option.best { border-color: var(--success); background: rgba(16,185,129,0.1); }
.case-option.ok { border-color: var(--warning); background: rgba(245,158,11,0.1); }
.case-option.bad { border-color: var(--error); background: rgba(239,68,68,0.1); }
.case-feedback {
  margin-top: 12px; padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px; line-height: 1.6;
  display: none;
}
.case-feedback.show {
  display: block;
  background: rgba(99,102,241,0.05);
  border: 1px solid rgba(99,102,241,0.15);
  color: var(--text-secondary);
}

/* ===== CHECKLIST ===== */
.checklist {
  background: var(--bg-glass); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin: 24px 0;
}
.checklist-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.checklist-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px; color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition);
}
.checklist-item:last-child { border-bottom: none; }
.checklist-item:hover { color: var(--text-primary); }
.checklist-item .check-box {
  width: 20px; height: 20px; border-radius: 4px;
  border: 2px solid var(--text-muted); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; transition: all var(--transition);
  margin-top: 1px;
}
.checklist-item.checked .check-box {
  background: var(--success); border-color: var(--success); color: #fff;
}
.checklist-item.checked { color: var(--success); text-decoration: line-through; opacity: 0.7; }

/* ===== LESSON NAV ===== */
.lesson-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--border);
}
.lesson-nav-btn {
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-glass);
  transition: all var(--transition);
  display: flex; align-items: center; gap: 8px;
}
.lesson-nav-btn:hover { border-color: var(--accent-1); transform: translateY(-2px); }
.lesson-nav-btn.primary { background: var(--gradient-main); border: none; color: #fff; }
.lesson-nav-btn.primary:hover { box-shadow: 0 4px 20px rgba(99,102,241,0.4); }

.lesson-complete-btn {
  display: block; width: 100%; padding: 16px;
  border-radius: var(--radius); text-align: center;
  font-size: 16px; font-weight: 700;
  background: var(--gradient-green); color: #fff;
  margin-top: 32px;
  transition: all var(--transition);
}
.lesson-complete-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(16,185,129,0.4); }
.lesson-complete-btn.completed { background: var(--bg-glass); color: var(--success); border: 1px solid var(--success); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: block; }
  .sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 90; display: none; }
  .sidebar-overlay.show { display: block; }
  .main { margin-left: 0; }
  .menu-btn { display: flex; }
  .home-hero h1 { font-size: 32px; }
  .home-stats { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .content { padding: 20px 16px; }
  .topbar { padding: 12px 16px; }
  .flip-cards { grid-template-columns: 1fr; }
  .lesson-nav { flex-direction: column; gap: 12px; }
  .lesson-nav-btn { width: 100%; justify-content: center; }
}

/* ===== ANIMATIONS ===== */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.animate-pulse { animation: pulse 2s infinite; }

/* ===== DRAG & DROP SORT ===== */
.sort-exercise { margin: 20px 0; }
.sort-exercise-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.sort-list { display: flex; flex-direction: column; gap: 8px; }
.sort-item {
  padding: 14px 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-glass);
  font-size: 14px; cursor: grab; user-select: none;
  transition: all var(--transition);
  display: flex; align-items: center; gap: 10px;
}
.sort-item:active { cursor: grabbing; }
.sort-item.dragging { opacity: 0.4; border-color: var(--accent-1); }
.sort-item.drag-over { border-color: var(--accent-1); background: rgba(99,102,241,0.1); transform: translateY(2px); }
.sort-item .sort-handle { color: var(--text-muted); font-size: 16px; }
.sort-item .sort-num { width: 24px; height: 24px; border-radius: 50%; background: var(--bg-glass-hover); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.sort-check-btn {
  margin-top: 12px; padding: 10px 24px; border-radius: var(--radius-sm);
  background: var(--gradient-main); color: #fff; font-size: 13px; font-weight: 600;
  transition: all var(--transition);
}
.sort-check-btn:hover { opacity: 0.9; }
.sort-result { margin-top: 10px; font-size: 14px; font-weight: 600; }
.sort-result.correct { color: var(--success); }
.sort-result.wrong { color: var(--error); }

/* Tab styles for lesson sections */
.lesson-tabs {
  display: flex; gap: 4px; margin-bottom: 24px;
  border-bottom: 1px solid var(--border); padding-bottom: 0;
  overflow-x: auto;
}
.lesson-tab {
  padding: 10px 18px; font-size: 13px; font-weight: 600;
  color: var(--text-muted); border-bottom: 2px solid transparent;
  white-space: nowrap; transition: all var(--transition);
}
.lesson-tab:hover { color: var(--text-primary); }
.lesson-tab.active { color: var(--accent-3); border-bottom-color: var(--accent-1); }

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeInUp 0.3s ease; }
