:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #10102a;
    --bg-card: #161635;
    --bg-card-hover: #1c1c45;
    --bg-code: #0d0d20;
    --text-primary: #f0f0ff;
    --text-secondary: #9898c0;
    --text-muted: #5e5e8a;
    --accent-html: #e44d26;
    --accent-css: #264de4;
    --accent-js: #f0db4f;
    --accent-green: #22c55e;
    --accent-purple: #8b5cf6;
    --accent-blue: #3b82f6;
    --accent-pink: #ec4899;
    --gradient: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #a855f7 100%);
    --gradient-html: linear-gradient(135deg, #e44d26, #f16529);
    --gradient-css: linear-gradient(135deg, #264de4, #2965f1);
    --gradient-js: linear-gradient(135deg, #f0db4f, #d4b800);
    --gradient-success: linear-gradient(135deg, #22c55e, #16a34a);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(139, 92, 246, 0.3);
    --glass: rgba(22, 22, 53, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.15);
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { font-family: 'Inter', sans-serif; background: var(--bg-primary); color: var(--text-primary); line-height: 1.6; overflow-x: hidden; }
::selection { background: var(--accent-purple); color: white; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-purple); border-radius: 3px; }
a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.gradient-text { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}
@keyframes confetti-fall {
    0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}
@keyframes blink {
    50% { border-color: transparent; }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes progressFill {
    from { width: 0; }
}
.animate-in { animation: fadeInUp 0.5s ease forwards; }
.animate-in-delay-1 { animation: fadeInUp 0.5s ease 0.1s forwards; opacity: 0; }
.animate-in-delay-2 { animation: fadeInUp 0.5s ease 0.2s forwards; opacity: 0; }
.animate-in-delay-3 { animation: fadeInUp 0.5s ease 0.3s forwards; opacity: 0; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: rgba(10, 10, 26, 0.85); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; height: 60px; gap: 32px; }
.nav-logo { font-size: 1.1rem; font-weight: 700; font-family: 'JetBrains Mono', monospace; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.logo-icon { color: var(--accent-purple); font-size: 1.2rem; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-link { padding: 8px 14px; border-radius: 8px; font-size: 0.88rem; font-weight: 500; color: var(--text-secondary); transition: var(--transition-fast); position: relative; }
.nav-link:hover { color: var(--text-primary); background: rgba(139, 92, 246, 0.08); }
.nav-link.active { color: var(--accent-purple); background: rgba(139, 92, 246, 0.12); }
.nav-link.active::after { content: ''; position: absolute; bottom: -1px; left: 14px; right: 14px; height: 2px; background: var(--accent-purple); border-radius: 1px; }
.nav-progress { display: flex; align-items: center; gap: 10px; font-size: 0.82rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
.progress-bar-mini { width: 80px; height: 4px; background: var(--bg-card); border-radius: 2px; overflow: hidden; }
.progress-fill-mini { height: 100%; background: var(--gradient); border-radius: 2px; transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1); }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; background: none; border: none; z-index: 1100; }
.hamburger span { width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: var(--transition-fast); }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
.mobile-menu { display: none; position: fixed; top: 60px; left: 0; right: 0; bottom: 0; background: rgba(10, 10, 26, 0.98); backdrop-filter: blur(20px); z-index: 999; padding: 24px; flex-direction: column; gap: 4px; }
.mobile-menu.open { display: flex; }
.mobile-menu .nav-link { padding: 14px 16px; font-size: 1rem; border-radius: 10px; }
.mobile-menu .nav-link.active::after { display: none; }

/* ============================================================
   HERO / DASHBOARD
   ============================================================ */
.hero-dashboard { padding: 100px 0 40px; text-align: center; position: relative; overflow: hidden; }
.hero-dashboard::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 50%); animation: pulse 8s ease-in-out infinite; }
.badge { display: inline-block; font-size: 0.8rem; color: var(--accent-purple); background: rgba(139, 92, 246, 0.1); border: 1px solid rgba(139, 92, 246, 0.2); padding: 6px 16px; border-radius: 20px; margin-bottom: 16px; font-weight: 500; backdrop-filter: blur(10px); }
.hero-text h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; margin-bottom: 12px; }
.hero-text p { color: var(--text-secondary); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 48px 0; }
.section-title { font-size: 1.6rem; font-weight: 700; margin-bottom: 32px; text-align: center; }

/* ============================================================
   STICKY RESUME
   ============================================================ */
.resume-bar { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: 20px 24px; margin-bottom: 32px; display: flex; align-items: center; gap: 20px; backdrop-filter: blur(10px); animation: fadeInUp 0.5s ease; }
.resume-bar .resume-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.resume-bar .resume-info { flex: 1; }
.resume-bar .resume-info h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 2px; }
.resume-bar .resume-info p { font-size: 0.82rem; color: var(--text-muted); }
.resume-bar .resume-btn { padding: 10px 20px; background: var(--gradient); border: none; border-radius: 8px; color: white; font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: var(--transition); white-space: nowrap; }
.resume-bar .resume-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3); }

/* ============================================================
   STATS
   ============================================================ */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 12px; transition: var(--transition); position: relative; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--gradient); opacity: 0; transition: var(--transition); }
.stat-card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.stat-card:hover::before { opacity: 1; }
.stat-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.85rem; font-family: 'JetBrains Mono', monospace; color: white; }
.stat-icon.html { background: var(--gradient-html); }
.stat-icon.css { background: var(--gradient-css); }
.stat-icon.js { background: var(--gradient-js); color: #1a1a2e; }
.stat-icon.total { background: var(--gradient); }
.stat-info { display: flex; flex-direction: column; }
.stat-number { font-size: 1.6rem; font-weight: 800; font-family: 'JetBrains Mono', monospace; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); }
.stat-bar { height: 4px; background: var(--bg-primary); border-radius: 2px; overflow: hidden; }
.stat-bar-fill { height: 100%; border-radius: 2px; transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1); animation: progressFill 1s ease; }
.stat-bar-fill.html { background: var(--gradient-html); }
.stat-bar-fill.css { background: var(--gradient-css); }
.stat-bar-fill.js { background: var(--gradient-js); }
.stat-bar-fill.total { background: var(--gradient); }

/* ============================================================
   COURSES GRID
   ============================================================ */
.courses-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.course-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: var(--transition); display: flex; flex-direction: column; position: relative; }
.course-card::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius-lg); opacity: 0; transition: var(--transition); pointer-events: none; }
.course-card:hover { border-color: var(--border-hover); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.course-card:hover::after { opacity: 1; background: linear-gradient(135deg, rgba(139, 92, 246, 0.03), transparent); }
.course-header { padding: 24px; display: flex; align-items: center; justify-content: space-between; position: relative; overflow: hidden; }
.course-header::before { content: ''; position: absolute; inset: 0; opacity: 0.1; }
.course-header.html::before { background: var(--gradient-html); }
.course-header.css::before { background: var(--gradient-css); }
.course-header.js::before { background: var(--gradient-js); }
.course-icon { font-size: 1.4rem; font-weight: 800; font-family: 'JetBrains Mono', monospace; position: relative; z-index: 1; }
.course-header.html .course-icon { color: var(--accent-html); }
.course-header.css .course-icon { color: var(--accent-css); }
.course-header.js .course-icon { color: var(--accent-js); }
.course-badge { font-size: 0.75rem; background: rgba(255,255,255,0.1); padding: 4px 10px; border-radius: 8px; position: relative; z-index: 1; backdrop-filter: blur(4px); }
.course-body { padding: 20px 24px; flex: 1; }
.course-body h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.course-body p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 16px; line-height: 1.6; }
.course-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.progress-bar { flex: 1; height: 6px; background: var(--bg-primary); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.progress-fill.html { background: var(--gradient-html); }
.progress-fill.css { background: var(--gradient-css); }
.progress-fill.js { background: var(--gradient-js); }
.course-progress span { font-size: 0.8rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; white-space: nowrap; }
.course-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.course-tags span { font-size: 0.75rem; padding: 3px 10px; background: rgba(139, 92, 246, 0.08); color: var(--text-muted); border-radius: 6px; transition: var(--transition-fast); }
.course-tags span:hover { background: rgba(139, 92, 246, 0.15); color: var(--text-secondary); }
.course-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.course-level { font-size: 0.8rem; color: var(--accent-green); font-weight: 500; }
.course-arrow { font-size: 1.2rem; color: var(--text-muted); transition: var(--transition); }
.course-card:hover .course-arrow { color: var(--accent-purple); transform: translateX(4px); }

/* ============================================================
   TOOLS
   ============================================================ */
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tool-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; text-align: center; transition: var(--transition); cursor: pointer; position: relative; overflow: hidden; }
.tool-card::before { content: ''; position: absolute; inset: 0; background: var(--gradient); opacity: 0; transition: var(--transition); }
.tool-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.tool-card:hover::before { opacity: 0.03; }
.tool-icon { font-size: 2rem; margin-bottom: 12px; position: relative; z-index: 1; }
.tool-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; position: relative; z-index: 1; }
.tool-card p { color: var(--text-secondary); font-size: 0.88rem; margin-bottom: 16px; position: relative; z-index: 1; }
.tool-link { color: var(--accent-purple); font-size: 0.88rem; font-weight: 500; position: relative; z-index: 1; display: inline-block; }
.reset-btn { background: none; border: none; cursor: pointer; font-family: inherit; color: #ef4444; font-size: 0.88rem; font-weight: 500; position: relative; z-index: 1; }

/* ============================================================
   COURSE PAGE LAYOUT
   ============================================================ */
.course-header { padding: 100px 0 40px; background: var(--bg-secondary); border-bottom: 1px solid var(--border); text-align: center; position: relative; overflow: hidden; }
.course-header::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.1) 0%, transparent 60%); }
.course-header-content { position: relative; z-index: 1; }
.course-header-content h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.course-header-content p { color: var(--text-secondary); margin-bottom: 24px; }
.course-progress-large { max-width: 400px; margin: 0 auto; position: relative; z-index: 1; }
.progress-bar-large { height: 8px; background: var(--bg-primary); border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.progress-fill.html { background: var(--gradient-html); }
.progress-fill.css { background: var(--gradient-css); }
.progress-fill.js { background: var(--gradient-js); }
.progress-fill { height: 100%; border-radius: 4px; transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.course-progress-large span { font-size: 0.85rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
.course-layout { display: grid; grid-template-columns: 280px 1fr; gap: 32px; padding-top: 24px; min-height: 80vh; }
.course-sidebar { position: sticky; top: 72px; height: calc(100vh - 72px); overflow-y: auto; padding: 24px 0; border-right: 1px solid var(--border); }
.course-sidebar::-webkit-scrollbar { width: 3px; }
.course-sidebar::-webkit-scrollbar-thumb { background: var(--bg-card); border-radius: 2px; }
.sidebar-title { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 12px; padding: 0 16px; }
.lesson-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 8px; cursor: pointer; transition: var(--transition-fast); font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 2px; }
.lesson-item:hover { background: rgba(139, 92, 246, 0.06); color: var(--text-primary); }
.lesson-item.active { background: rgba(139, 92, 246, 0.12); color: var(--accent-purple); font-weight: 500; }
.lesson-item.completed { color: var(--accent-green); }
.lesson-check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.7rem; flex-shrink: 0; transition: var(--transition); }
.lesson-item.completed .lesson-check { background: var(--accent-green); border-color: var(--accent-green); color: white; }
.lesson-num { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--text-muted); flex-shrink: 0; width: 22px; }
.lesson-list { list-style: none; }
.lesson-list .lesson-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 8px; cursor: pointer; transition: var(--transition-fast); font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 2px; }
.lesson-list .lesson-item:hover { background: rgba(139, 92, 246, 0.06); color: var(--text-primary); }
.lesson-list .lesson-item.active { background: rgba(139, 92, 246, 0.12); color: var(--accent-purple); font-weight: 500; }
.lesson-list .lesson-item.completed { color: var(--accent-green); }
.lesson-list .lesson-title { font-size: 0.85rem; }

/* COURSE HEADER BAR */
.course-header-bar { padding: 20px 0; border-bottom: 1px solid var(--border); margin-bottom: 32px; display: flex; align-items: center; justify-content: space-between; }
.course-header-bar h1 { font-size: 1.4rem; font-weight: 700; }
.course-header-bar .progress-text { font-size: 0.85rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }

/* ============================================================
   LESSON CONTENT
   ============================================================ */
.course-main { padding: 0 0 80px; }
.lesson { display: none; animation: fadeIn 0.3s ease; }
.lesson.active { display: block; }
.lesson-title { font-size: 1.8rem; font-weight: 700; margin-bottom: 8px; }
.lesson-subtitle { color: var(--text-secondary); font-size: 1rem; margin-bottom: 32px; }
.lesson h3 { font-size: 1.2rem; font-weight: 600; margin: 28px 0 12px; color: var(--text-primary); }
.lesson h4 { font-size: 1rem; font-weight: 600; margin: 20px 0 8px; color: var(--text-secondary); }
.lesson p { color: var(--text-secondary); margin-bottom: 12px; line-height: 1.7; }
.lesson ul, .lesson ol { color: var(--text-secondary); margin: 12px 0; padding-left: 24px; }
.lesson li { margin-bottom: 6px; line-height: 1.6; }
.lesson strong { color: var(--text-primary); }
.lesson code { background: rgba(139, 92, 246, 0.1); color: var(--accent-purple); padding: 2px 6px; border-radius: 4px; font-family: 'JetBrains Mono', monospace; font-size: 0.85em; }

/* ============================================================
   CODE BLOCKS
   ============================================================ */
.code-block { background: var(--bg-code); border: 1px solid var(--border); border-radius: var(--radius); margin: 16px 0; overflow: hidden; position: relative; }
.code-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: rgba(0,0,0,0.3); border-bottom: 1px solid var(--border); }
.code-lang { font-size: 0.75rem; font-family: 'JetBrains Mono', monospace; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.code-dots { display: flex; gap: 6px; }
.code-dots span { width: 10px; height: 10px; border-radius: 50%; }
.code-dots .red { background: #ff5f57; }
.code-dots .yellow { background: #febc2e; }
.code-dots .green { background: #28c840; }
.code-copy-btn { padding: 4px 10px; background: rgba(139, 92, 246, 0.15); border: 1px solid rgba(139, 92, 246, 0.2); border-radius: 6px; color: var(--accent-purple); font-size: 0.75rem; font-family: 'JetBrains Mono', monospace; cursor: pointer; transition: var(--transition-fast); }
.code-copy-btn:hover { background: rgba(139, 92, 246, 0.25); }
.code-copy-btn.copied { background: rgba(34, 197, 94, 0.15); border-color: rgba(34, 197, 94, 0.2); color: var(--accent-green); }
.code-block pre { padding: 16px; overflow-x: auto; font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; line-height: 1.7; color: var(--text-secondary); }
.code-block code { font-family: inherit; }

/* SYNTAX HIGHLIGHTING */
.tag { color: #e44d26; }
.attr { color: #d19a66; }
.val { color: #98c379; }
.comment { color: #5c6370; font-style: italic; }
.prop { color: #61afef; }
.sel { color: #e5c07b; }
.fn { color: #61afef; }
.kw { color: #c678dd; }
.str { color: #98c379; }
.num { color: #d19a66; }

/* ============================================================
   BUTTONS
   ============================================================ */
.complete-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.3); color: var(--accent-green); border-radius: var(--radius); font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: var(--transition); font-family: inherit; margin-top: 24px; }
.complete-btn:hover { background: rgba(34, 197, 94, 0.2); transform: translateY(-1px); }
.complete-btn.done { background: var(--accent-green); color: white; border-color: var(--accent-green); }

.lesson-nav { display: flex; justify-content: space-between; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.lesson-nav button { padding: 12px 24px; border-radius: var(--radius); font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: var(--transition); font-family: inherit; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary); }
.lesson-nav button:hover { border-color: var(--border-hover); background: var(--bg-card-hover); transform: translateY(-1px); }
.lesson-nav button:disabled { opacity: 0.3; cursor: not-allowed; transform: none; }
.lesson-nav .next-btn { background: var(--gradient); border: none; color: white; }
.lesson-nav .next-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3); }

.btn-complete { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; background: rgba(139, 92, 246, 0.1); border: 1px solid rgba(139, 92, 246, 0.25); color: var(--accent-purple); border-radius: var(--radius); font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: var(--transition); font-family: inherit; margin-top: 16px; }
.btn-complete:hover { background: rgba(139, 92, 246, 0.2); transform: translateY(-1px); }
.btn-complete.done { background: var(--accent-green); color: white; border-color: var(--accent-green); }

.btn-nav { padding: 12px 24px; border-radius: var(--radius); font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: var(--transition); font-family: inherit; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary); }
.btn-nav:hover:not(:disabled) { border-color: var(--border-hover); background: var(--bg-card-hover); }
.btn-nav:disabled { opacity: 0.3; cursor: not-allowed; }
.btn-next { background: var(--gradient); border: none; color: white; }
.btn-next:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3); }

/* ============================================================
   INFO BOX
   ============================================================ */
.info-box { background: rgba(139, 92, 246, 0.06); border: 1px solid rgba(139, 92, 246, 0.15); border-radius: var(--radius); padding: 16px 20px; margin: 16px 0; }
.info-box.tip { background: rgba(34, 197, 94, 0.06); border-color: rgba(34, 197, 94, 0.15); }
.info-box.warning { background: rgba(245, 158, 11, 0.06); border-color: rgba(245, 158, 11, 0.15); }
.info-box strong { display: block; margin-bottom: 4px; }
.info-box p { margin: 0; font-size: 0.9rem; }

/* ============================================================
   EDITOR PAGE
   ============================================================ */
.editor-layout { padding-top: 72px; min-height: 100vh; }
.editor-toolbar { display: flex; gap: 8px; padding: 12px 24px; background: var(--bg-secondary); border-bottom: 1px solid var(--border); flex-wrap: wrap; align-items: center; }
.editor-toolbar button { padding: 8px 16px; border-radius: 8px; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: var(--transition); font-family: inherit; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary); }
.editor-toolbar button:hover { border-color: var(--border-hover); }
.editor-toolbar .run-btn { background: var(--accent-green); border-color: var(--accent-green); color: white; }
.editor-toolbar .run-btn:hover { filter: brightness(1.1); }
.editor-toolbar .tpl-label { font-size: 0.78rem; color: var(--text-muted); margin-left: 8px; }
.editor-main { display: grid; grid-template-columns: 1fr 1fr; height: calc(100vh - 120px); }
.editor-panels { display: flex; flex-direction: column; border-right: 1px solid var(--border); }
.editor-panel { flex: 1; display: flex; flex-direction: column; border-bottom: 1px solid var(--border); }
.editor-panel:last-child { border-bottom: none; }
.panel-header { display: flex; align-items: center; padding: 8px 16px; background: var(--bg-secondary); border-bottom: 1px solid var(--border); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.panel-header.html-label { color: var(--accent-html); }
.panel-header.css-label { color: var(--accent-css); }
.panel-header.js-label { color: var(--accent-js); }
.panel-header span { margin-left: 8px; font-size: 0.7rem; color: var(--text-muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.editor-panel textarea { flex: 1; width: 100%; padding: 12px 16px; background: var(--bg-code); border: none; color: var(--text-primary); font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; line-height: 1.6; resize: none; outline: none; tab-size: 2; }
.preview-panel { display: flex; flex-direction: column; }
.preview-header { padding: 8px 16px; background: var(--bg-secondary); border-bottom: 1px solid var(--border); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--accent-green); }
#preview { flex: 1; border: none; background: white; }
.console-panel { border-top: 1px solid var(--border); max-height: 150px; overflow-y: auto; }
.console-header { padding: 8px 16px; background: var(--bg-secondary); border-bottom: 1px solid var(--border); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: #f59e0b; }
.console-output { padding: 8px 16px; font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: var(--text-secondary); }
.console-line { padding: 2px 0; border-bottom: 1px solid var(--border); }
.console-line.error { color: #ef4444; }

/* TIPS */
.tips-section { padding: 32px 24px; background: var(--bg-secondary); }
.tips-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 16px; }
.tip-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; transition: var(--transition-fast); }
.tip-card:hover { border-color: var(--border-hover); }
.tip-card h4 { font-size: 0.85rem; margin-bottom: 4px; color: var(--accent-purple); }
.tip-card p { font-size: 0.8rem; color: var(--text-secondary); }

/* ============================================================
   EXERCISES & QUIZ SYSTEM
   ============================================================ */
.exercises-section { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--border); }
.exercises-header { margin-bottom: 24px; }
.exercises-header h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; }
.exercises-header p { color: var(--text-secondary); font-size: 0.9rem; }

.exercise-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; transition: var(--transition); position: relative; overflow: hidden; }
.exercise-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gradient); opacity: 0; transition: var(--transition); }
.exercise-card:hover { border-color: var(--border-hover); }
.exercise-card:hover::before { opacity: 1; }
.exercise-card.completed { border-color: rgba(34, 197, 94, 0.3); }
.exercise-card.completed::before { opacity: 1; background: var(--gradient-success); }
.exercise-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.exercise-badge { font-size: 0.75rem; font-weight: 600; padding: 4px 12px; border-radius: 20px; background: rgba(139, 92, 246, 0.12); color: var(--accent-purple); }
.exercise-card.completed .exercise-badge { background: rgba(34, 197, 94, 0.15); color: var(--accent-green); }
.exercise-header h4 { font-size: 1.05rem; font-weight: 600; margin: 0; }
.exercise-desc { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; margin-bottom: 16px; }

.exercise-editor { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.exercise-code-header { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px; background: rgba(0,0,0,0.3); border-bottom: 1px solid var(--border); }
.exercise-code-header span { font-size: 0.75rem; font-family: 'JetBrains Mono', monospace; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.exercise-run-btn { padding: 6px 14px; background: var(--accent-green); color: white; border: none; border-radius: 6px; font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: var(--transition); font-family: inherit; }
.exercise-run-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.exercise-run-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.exercise-textarea { width: 100%; min-height: 120px; padding: 14px 16px; background: var(--bg-code); border: none; color: var(--text-primary); font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; line-height: 1.6; resize: vertical; outline: none; tab-size: 2; }

.exercise-feedback { margin-top: 12px; }
.feedback-success { background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.2); border-radius: var(--radius); padding: 12px 16px; color: var(--accent-green); font-size: 0.9rem; animation: fadeInUp 0.3s ease; }
.feedback-error { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.2); border-radius: var(--radius); padding: 12px 16px; color: #ef4444; font-size: 0.9rem; animation: fadeInUp 0.3s ease; }
.feedback-error small { color: var(--text-secondary); }

.exercise-hint-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; margin-top: 12px; background: none; border: 1px solid var(--border); border-radius: 8px; color: var(--text-secondary); font-size: 0.85rem; cursor: pointer; transition: var(--transition-fast); font-family: inherit; }
.exercise-hint-btn:hover { border-color: var(--border-hover); color: var(--text-primary); }
.exercise-hint-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.exercise-hint-box { margin-top: 8px; padding: 12px 16px; background: rgba(245, 158, 11, 0.06); border: 1px solid rgba(245, 158, 11, 0.15); border-radius: var(--radius); animation: fadeIn 0.3s ease; }
.hint-text { color: var(--text-secondary); font-size: 0.88rem; margin-bottom: 4px; }

/* QUIZ */
.quiz-section { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.quiz-section h4 { font-size: 1.1rem; font-weight: 600; margin-bottom: 16px; color: var(--accent-purple); }

.quiz-question { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px; transition: var(--transition-fast); }
.quiz-question:hover { border-color: var(--border-hover); }
.quiz-text { font-size: 0.95rem; color: var(--text-primary); margin-bottom: 14px; line-height: 1.6; }
.quiz-text strong { color: var(--accent-purple); }

.quiz-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.quiz-option { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; transition: var(--transition-fast); font-size: 0.9rem; color: var(--text-secondary); }
.quiz-option:hover { border-color: var(--border-hover); color: var(--text-primary); }
.quiz-option input[type="radio"] { accent-color: var(--accent-purple); width: 16px; height: 16px; }
.quiz-option:has(input:checked) { border-color: var(--accent-purple); background: rgba(139, 92, 246, 0.08); color: var(--text-primary); }

.quiz-check-btn { padding: 10px 20px; background: var(--gradient); border: none; border-radius: 8px; color: white; font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: var(--transition); font-family: inherit; }
.quiz-check-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3); }
.quiz-check-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.quiz-feedback { margin-top: 12px; }

/* ============================================================
   AI GUIDE
   ============================================================ */
#aiGuideBubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    transition: var(--transition);
    animation: float 3s ease-in-out infinite;
}
#aiGuideBubble:hover { transform: scale(1.1); box-shadow: 0 6px 30px rgba(139, 92, 246, 0.5); }

#aiGuide {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 380px;
    max-height: 520px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    display: none;
    flex-direction: column;
    z-index: 10000;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: fadeInUp 0.3s ease;
}

.ai-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}
.ai-header span { font-weight: 700; font-size: 0.95rem; }
.ai-close {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}
.ai-close:hover { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 360px;
}
.ai-messages::-webkit-scrollbar { width: 4px; }
.ai-messages::-webkit-scrollbar-thumb { background: var(--bg-card); border-radius: 2px; }

.ai-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.5;
    animation: fadeInUp 0.2s ease;
}
.ai-msg-bot {
    align-self: flex-start;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}
.ai-msg-user {
    align-self: flex-end;
    background: var(--accent-purple);
    color: white;
    border-bottom-right-radius: 4px;
}

.ai-typing { display: flex; gap: 4px; padding: 10px 14px; align-self: flex-start; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; border-bottom-left-radius: 4px; }
.ai-typing span { width: 6px; height: 6px; background: var(--text-muted); border-radius: 50%; animation: pulse 1s ease-in-out infinite; }
.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }

.ai-suggestions { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px; border-top: 1px solid var(--border); }
.ai-suggestion { padding: 6px 12px; background: rgba(139, 92, 246, 0.08); border: 1px solid rgba(139, 92, 246, 0.15); border-radius: 16px; font-size: 0.78rem; color: var(--accent-purple); cursor: pointer; transition: var(--transition-fast); }
.ai-suggestion:hover { background: rgba(139, 92, 246, 0.15); }

.ai-input-area {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
}
.ai-input-area input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition-fast);
}
.ai-input-area input:focus { border-color: var(--accent-purple); }
.ai-input-area button {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background: var(--gradient);
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.ai-input-area button:hover { transform: translateY(-1px); }

/* ============================================================
   DOCUMENTATION PAGE
   ============================================================ */
.doc-layout { display: grid; grid-template-columns: 250px 1fr; gap: 0; padding-top: 60px; min-height: 100vh; }
.doc-sidebar { position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; padding: 24px 16px; border-right: 1px solid var(--border); background: var(--bg-secondary); }
.doc-sidebar::-webkit-scrollbar { width: 3px; }
.doc-sidebar::-webkit-scrollbar-thumb { background: var(--bg-card); border-radius: 2px; }
.doc-sidebar h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin: 20px 0 8px; }
.doc-sidebar h3:first-child { margin-top: 0; }
.doc-sidebar ul { list-style: none; }
.doc-sidebar li a { display: block; padding: 5px 12px; border-radius: 6px; font-size: 0.85rem; color: var(--text-secondary); transition: all 0.2s ease; text-decoration: none; }
.doc-sidebar li a:hover { color: var(--text-primary); background: rgba(139, 92, 246, 0.08); }
.doc-sidebar li a.active { color: var(--accent-purple); background: rgba(139, 92, 246, 0.12); }
.doc-section { padding: 40px 32px; border-bottom: 1px solid var(--border); }
.doc-section h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 8px; }
.doc-section h2 .gradient-text { font-size: inherit; }
.doc-section h3 { font-size: 1.15rem; font-weight: 600; margin: 28px 0 12px; color: var(--accent-purple); }
.doc-section h4 { font-size: 1rem; font-weight: 600; margin: 20px 0 8px; color: var(--text-primary); }
.doc-section p { color: var(--text-secondary); margin-bottom: 12px; line-height: 1.7; }
.doc-section ul, .doc-section ol { color: var(--text-secondary); margin: 12px 0; padding-left: 24px; }
.doc-section li { margin-bottom: 6px; line-height: 1.6; }

.doc-search { width: 100%; padding: 10px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary); font-size: 0.88rem; font-family: inherit; outline: none; margin-bottom: 16px; transition: var(--transition-fast); }
.doc-search:focus { border-color: var(--accent-purple); }
.doc-search::placeholder { color: var(--text-muted); }

.ref-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.88rem; }
.ref-table th { text-align: left; padding: 10px 14px; background: var(--bg-card); color: var(--text-primary); font-weight: 600; border-bottom: 2px solid var(--border); white-space: nowrap; }
.ref-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text-secondary); vertical-align: top; }
.ref-table td code { background: var(--bg-code); padding: 2px 6px; border-radius: 4px; font-size: 0.82rem; color: var(--accent-purple); font-family: 'JetBrains Mono', monospace; }
.ref-table tr:hover { background: rgba(139, 92, 246, 0.04); }

/* ============================================================
   SCROLL TO TOP
   ============================================================ */
.scroll-top { position: fixed; bottom: 90px; right: 24px; width: 40px; height: 40px; border-radius: 50%; background: var(--bg-card); border: 1px solid var(--border); color: var(--text-primary); font-size: 1.2rem; cursor: pointer; display: none; align-items: center; justify-content: center; z-index: 999; transition: var(--transition); }
.scroll-top.visible { display: flex; }
.scroll-top:hover { background: var(--accent-purple); border-color: var(--accent-purple); transform: translateY(-2px); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { padding: 32px 0; border-top: 1px solid var(--border); text-align: center; }
.footer p { color: var(--text-muted); font-size: 0.85rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .doc-layout { grid-template-columns: 1fr; }
    .doc-sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); padding: 16px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .courses-grid { grid-template-columns: 1fr; }
    .tools-grid { grid-template-columns: 1fr; }
    .course-layout { grid-template-columns: 1fr; }
    .course-sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); padding: 16px; display: flex; flex-wrap: wrap; gap: 4px; overflow-y: visible; }
    .sidebar-title { width: 100%; }
    .lesson-list { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; }
    .lesson-list .lesson-item { flex: 0 0 auto; }
    .resume-bar { flex-direction: column; text-align: center; }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .nav-container { justify-content: space-between; }
    .stats-grid { grid-template-columns: 1fr; }
    .editor-main { grid-template-columns: 1fr; height: auto; }
    .editor-panels { border-right: none; }
    .editor-panel textarea { min-height: 150px; }
    .preview-panel iframe { min-height: 300px; }
    #aiGuide { width: calc(100vw - 32px); right: 16px; bottom: 16px; }
    .doc-section { padding: 24px 16px; }
    .ref-table { font-size: 0.8rem; }
    .ref-table th, .ref-table td { padding: 8px; }
}
