  :root {
    --bg: #0d0d14;
    --surface: #13131f;
    --surface2: #1a1a2e;
    --border: #2a2a45;
    --text: #e8e8f5;
    --text-muted: #7878a0;
    --accent1: #7c6af5; /* morado */
    --accent2: #f5a623; /* naranja */
    --accent3: #4ecdc4; /* teal */
    --accent4: #ff6b9d; /* rosa */
    --accent5: #a8e063; /* verde */
    --code-bg: #0a0a15;
    --green: #4ecdc4;
    --red: #ff6b9d;
  }

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

  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
  }

  /* ─── NOISE OVERLAY ─── */
  body::before {
    content: '';
    position: fixed; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none; z-index: 0;
  }

  /* ─── SIDEBAR ─── */
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: 260px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 24px 0;
    overflow-y: auto;
    z-index: 100;
    transition: transform .3s ease;
  }

  .sidebar-logo {
    padding: 0 24px 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
  }
  .sidebar-logo .logo-tag {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    color: var(--accent1);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 6px;
  }
  .sidebar-logo h2 {
    font-size: 20px; font-weight: 900;
    background: linear-gradient(135deg, var(--accent1), var(--accent3));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  }

  .nav-section-title {
    font-family: 'Space Mono', monospace;
    font-size: 9px; letter-spacing: 2px;
    color: var(--text-muted); text-transform: uppercase;
    padding: 12px 24px 6px;
  }

  .nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 24px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 13px; font-weight: 500;
    border-left: 3px solid transparent;
    transition: all .2s;
  }
  .nav-item:hover { color: var(--text); background: var(--surface2); }
  .nav-item.active {
    color: var(--accent1);
    border-left-color: var(--accent1);
    background: rgba(124,106,245,.08);
  }
  .nav-item .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--border); flex-shrink: 0;
  }
  .nav-item.done .dot { background: var(--accent5); }
  .nav-item.active .dot { background: var(--accent1); box-shadow: 0 0 6px var(--accent1); }

  /* ─── MAIN ─── */
  .main {
    margin-left: 260px;
    padding: 48px 56px;
    max-width: 960px;
    position: relative; z-index: 1;
  }

  /* ─── HERO ─── */
  .hero {
    padding: 60px 0 48px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 48px;
  }
  .hero-tag {
    font-family: 'Space Mono', monospace;
    font-size: 11px; letter-spacing: 3px;
    color: var(--accent2); text-transform: uppercase;
    margin-bottom: 16px;
  }
  .hero h1 {
    font-size: 52px; font-weight: 900; line-height: 1.1;
    margin-bottom: 20px;
  }
  .hero h1 .highlight {
    background: linear-gradient(135deg, var(--accent1) 0%, var(--accent3) 50%, var(--accent4) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  }
  .hero p {
    font-size: 17px; color: var(--text-muted); max-width: 600px;
    line-height: 1.7;
  }

  /* ─── PROGRESS BAR ─── */
  .progress-wrap {
    margin: 32px 0;
    background: var(--surface);
    border-radius: 12px;
    padding: 20px 24px;
    border: 1px solid var(--border);
  }
  .progress-label {
    display: flex; justify-content: space-between;
    font-size: 13px; color: var(--text-muted); margin-bottom: 10px;
  }
  .progress-bar-track {
    height: 8px; background: var(--border); border-radius: 99px; overflow: hidden;
  }
  .progress-bar-fill {
    height: 100%; border-radius: 99px;
    background: linear-gradient(90deg, var(--accent1), var(--accent3));
    transition: width .8s cubic-bezier(.4,0,.2,1);
  }

  /* ─── SECTION ─── */
  .lesson { display: none; animation: fadeIn .4s ease; }
  .lesson.active { display: block; }
  @keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

  .lesson-header {
    display: flex; align-items: flex-start; gap: 16px;
    margin-bottom: 40px;
  }
  .lesson-num {
    font-family: 'Space Mono', monospace;
    font-size: 11px; color: var(--text-muted);
    letter-spacing: 2px; margin-bottom: 6px;
  }
  .lesson h2 { font-size: 34px; font-weight: 900; line-height: 1.2; }
  .lesson-emoji {
    font-size: 40px; flex-shrink: 0;
    background: var(--surface2); width: 64px; height: 64px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 16px; border: 1px solid var(--border);
  }

  /* ─── CONCEPT CARD ─── */
  .concept {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
    position: relative; overflow: hidden;
  }
  .concept::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
  }
  .concept.purple::before { background: linear-gradient(90deg, var(--accent1), #a78bfa); }
  .concept.orange::before { background: linear-gradient(90deg, var(--accent2), #fbbf24); }
  .concept.teal::before  { background: linear-gradient(90deg, var(--accent3), #06b6d4); }
  .concept.pink::before  { background: linear-gradient(90deg, var(--accent4), #f472b6); }
  .concept.green::before { background: linear-gradient(90deg, var(--accent5), #86efac); }

  .concept h3 {
    font-size: 16px; font-weight: 700; margin-bottom: 12px;
    display: flex; align-items: center; gap: 8px;
  }
  .concept p, .concept li {
    font-size: 14px; line-height: 1.8; color: var(--text-muted);
  }
  .concept ul { padding-left: 20px; }
  .concept li { margin-bottom: 4px; }

  /* ─── ANALOGY BOX ─── */
  .analogy {
    background: rgba(245,166,35,.06);
    border: 1px solid rgba(245,166,35,.2);
    border-radius: 12px; padding: 18px 22px; margin-bottom: 20px;
  }
  .analogy-label {
    font-family: 'Space Mono', monospace; font-size: 9px;
    letter-spacing: 2px; color: var(--accent2); margin-bottom: 8px;
    text-transform: uppercase;
  }
  .analogy p { font-size: 14px; line-height: 1.7; color: var(--text); }

  /* ─── CODE BLOCK ─── */
  .code-wrap {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
  }
  .code-header {
    padding: 10px 16px;
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
  }
  .code-dots { display: flex; gap: 6px; }
  .code-dot {
    width: 10px; height: 10px; border-radius: 50%;
  }
  .code-dot:nth-child(1) { background: #ff5f57; }
  .code-dot:nth-child(2) { background: #ffbd2e; }
  .code-dot:nth-child(3) { background: #28c840; }
  .code-filename {
    font-family: 'Space Mono', monospace; font-size: 11px; color: var(--text-muted);
  }
  pre {
    padding: 20px 22px;
    overflow-x: auto;
    font-family: 'Space Mono', monospace;
    font-size: 13px; line-height: 1.8;
  }
  .kw { color: #c792ea; }
  .type { color: #82aaff; }
  .str { color: #c3e88d; }
  .num { color: #f78c6c; }
  .comment { color: #546e7a; font-style: italic; }
  .method { color: #82aaff; }
  .class-name { color: #ffcb6b; }

  /* ─── EXERCISE ─── */
  .exercise {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
    position: relative;
  }
  .exercise-label {
    font-family: 'Space Mono', monospace; font-size: 9px;
    letter-spacing: 2px; color: var(--accent2); text-transform: uppercase;
    margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
  }
  .exercise-label::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
  }
  .exercise h4 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
  .exercise p { font-size: 14px; color: var(--text-muted); line-height: 1.7; margin-bottom: 16px; }
  .exercise .task {
    background: rgba(124,106,245,.08);
    border: 1px solid rgba(124,106,245,.2);
    border-radius: 10px; padding: 16px 18px;
    margin-bottom: 16px;
  }
  .exercise .task p { color: var(--text); margin: 0; }

  /* ─── SOLUTION TOGGLE ─── */
  .solution-toggle {
    cursor: pointer;
    background: none; border: 1px solid var(--border);
    color: var(--text-muted); font-family: 'Outfit', sans-serif;
    font-size: 13px; padding: 10px 18px;
    border-radius: 8px;
    display: flex; align-items: center; gap: 8px;
    transition: all .2s; width: 100%;
    margin-bottom: 12px;
  }
  .solution-toggle:hover { border-color: var(--accent3); color: var(--accent3); }
  .solution-toggle .arrow { transition: transform .3s; }
  .solution-toggle.open .arrow { transform: rotate(90deg); }
  .solution-content { display: none; }
  .solution-content.visible { display: block; }

  /* ─── TIP ─── */
  .tip {
    background: rgba(78,205,196,.06);
    border: 1px solid rgba(78,205,196,.2);
    border-radius: 12px; padding: 16px 20px;
    margin-bottom: 20px;
    display: flex; gap: 12px;
  }
  .tip-icon { font-size: 20px; flex-shrink: 0; }
  .tip p { font-size: 13px; line-height: 1.7; color: var(--text); }

  /* ─── WARNING ─── */
  .warning {
    background: rgba(255,107,157,.06);
    border: 1px solid rgba(255,107,157,.2);
    border-radius: 12px; padding: 16px 20px; margin-bottom: 20px;
    display: flex; gap: 12px;
  }
  .warning-icon { font-size: 20px; flex-shrink: 0; }
  .warning p { font-size: 13px; line-height: 1.7; color: var(--text); }

  /* ─── INLINE CODE ─── */
  code {
    font-family: 'Space Mono', monospace;
    background: rgba(124,106,245,.15);
    color: var(--accent1);
    padding: 2px 7px; border-radius: 5px;
    font-size: 12px;
  }

  /* ─── NAV BUTTONS ─── */
  .lesson-nav {
    display: flex; justify-content: space-between;
    margin-top: 48px; padding-top: 32px;
    border-top: 1px solid var(--border);
  }
  .btn {
    font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 600;
    padding: 12px 28px; border-radius: 10px; cursor: pointer;
    border: none; transition: all .2s; display: flex; align-items: center; gap: 8px;
  }
  .btn-ghost {
    background: var(--surface); color: var(--text-muted);
    border: 1px solid var(--border);
  }
  .btn-ghost:hover { color: var(--text); border-color: var(--text-muted); }
  .btn-primary {
    background: linear-gradient(135deg, var(--accent1), var(--accent3));
    color: white;
  }
  .btn-primary:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(124,106,245,.3); }
  .btn:disabled { opacity: .3; cursor: not-allowed; transform: none !important; }

  /* ─── TABLE ─── */
  table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 13px; }
  th {
    background: var(--surface2); color: var(--text-muted);
    font-family: 'Space Mono', monospace; font-size: 10px;
    letter-spacing: 1px; text-transform: uppercase;
    padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border);
  }
  td {
    padding: 10px 14px; border-bottom: 1px solid rgba(42,42,69,.5);
    color: var(--text-muted); line-height: 1.6;
  }
  tr:last-child td { border-bottom: none; }
  td:first-child { color: var(--accent1); font-family: 'Space Mono', monospace; font-size: 12px; }

  /* ─── STEP BADGE ─── */
  .step {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent1), var(--accent3));
    color: white; font-weight: 700; font-size: 13px; flex-shrink: 0;
    margin-right: 10px;
  }

  /* ─── SCROLLBAR ─── */
  ::-webkit-scrollbar { width: 6px; height: 6px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
  ::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

  /* ─── MOBILE HAMBURGER ─── */
  .hamburger {
    display: none; position: fixed; top: 16px; left: 16px; z-index: 200;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 10px; padding: 10px; cursor: pointer; color: var(--text);
    font-size: 18px;
  }
  @media (max-width: 768px) {
    .hamburger { display: flex; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; padding: 80px 24px 48px; }
    .hero h1 { font-size: 32px; }
  }

  /* HOME GRID */
  .home-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px; margin-top: 32px;
  }
  .home-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 14px; padding: 20px; cursor: pointer;
    transition: all .2s; text-decoration: none; color: inherit;
  }
  .home-card:hover { border-color: var(--accent1); transform: translateY(-2px); }
  .home-card .card-emoji { font-size: 28px; margin-bottom: 10px; }
  .home-card .card-num {
    font-family: 'Space Mono', monospace; font-size: 10px;
    letter-spacing: 2px; color: var(--text-muted); margin-bottom: 6px;
  }
  .home-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
  .home-card p { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

  .badge {
    display: inline-block; padding: 2px 10px; border-radius: 99px;
    font-size: 11px; font-weight: 600; margin-left: 8px;
  }
  .badge-you { background: rgba(168,224,99,.15); color: var(--accent5); }
  .badge-next { background: rgba(124,106,245,.15); color: var(--accent1); }
