    :root {
      --bg: #0b0c10; /* Darker background to let blobs shine */
      --surface: rgba(24, 24, 27, 0.7);
      --surface2: rgba(39, 39, 42, 0.6);
      --card: rgba(24, 24, 27, 0.5);
      --border: rgba(255, 255, 255, 0.08);
      --border-glow: rgba(56, 189, 248, 0.2);
      --orange: #38bdf8;
      --orange2: #0284c7;
      --violet: #6366f1;
      --violet2: #818cf8;
      --teal: #10b981;
      --text: #f8fafc;
      --muted: #a1a1aa;
      --muted2: #71717a;
      --glow: rgba(56, 189, 248, 0.25);
      
      /* New Premium Glass Variables */
      --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.005));
      --glass-border: rgba(255, 255, 255, 0.06);
      --glass-highlight: rgba(255, 255, 255, 0.12);
      --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
      --blur: blur(24px);
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      background: var(--bg);
      color: var(--text);
      font-family: 'Inter', sans-serif;
      overflow-x: hidden;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }

    /* ── ANIMATED BACKGROUND BLOBS ── */
    .blob {
      position: fixed;
      border-radius: 50%;
      filter: blur(140px);
      z-index: 0;
      opacity: 0.6;
      animation: float 20s infinite ease-in-out alternate;
      pointer-events: none;
    }
    .blob.b1 {
      top: -10%; left: -10%;
      width: 50vw; height: 50vw;
      background: rgba(99, 102, 241, 0.35); /* Violet */
      animation-delay: 0s;
    }
    .blob.b2 {
      top: 40%; right: -10%;
      width: 45vw; height: 45vw;
      background: rgba(56, 189, 248, 0.3); /* Blue/Teal */
      animation-delay: -5s;
    }
    .blob.b3 {
      bottom: -20%; left: 20%;
      width: 55vw; height: 55vw;
      background: rgba(16, 185, 129, 0.25); /* Emerald */
      animation-delay: -10s;
    }
    
    @keyframes float {
      0% { transform: translate(0, 0) scale(1); }
      50% { transform: translate(5vw, 5vh) scale(1.1); }
      100% { transform: translate(-3vw, -4vh) scale(0.9); }
    }

    /* noise overlay */
    body::after {
      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'/%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: 998;
    }


    /* ── NAV ── */
    .logo-icon {
      width: 38px;
      height: 38px;
      background: linear-gradient(135deg, var(--orange), var(--violet));
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      color: #fff;
      box-shadow: 0 4px 16px var(--border-glow), inset 0 2px 4px rgba(255, 255, 255, 0.2);
      position: relative;
      overflow: hidden;
    }

    .logo-icon::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 50%;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    }

    nav {
      position: sticky;
      top: 0;
      z-index: 200;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 48px;
      border-bottom: 1px solid var(--glass-border);
      backdrop-filter: var(--blur);
      background: rgba(9, 9, 11, 0.7);
      box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    }

    .nav-logo {
      display: flex;
      align-items: center;
      gap: 10px;
      text-decoration: none;
      flex: 1;
    }

    .nav-right {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      flex: 1;
    }

    .logo-name {
      font-size: 22px;
      font-weight: 900;
      letter-spacing: -0.8px;
      color: #ffffff;
    }

    .logo-name .ai {
      color: var(--orange);
    }

    .nav-links {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .nav-link {
      font-size: 13px;
      font-weight: 600;
      color: var(--muted);
      padding: 7px 14px;
      border-radius: 8px;
      cursor: pointer;
      transition: all .2s;
      border: 1px solid transparent;
      text-decoration: none;
      background: none;
    }

    .nav-link:hover {
      color: var(--text);
      border-color: var(--border);
    }

    .nav-badge {
      font-family: 'JetBrains Mono', monospace;
      font-size: 10px;
      padding: 5px 12px;
      background: rgba(99, 102, 241, .15);
      border: 1px solid rgba(99, 102, 241, .3);
      border-radius: 20px;
      color: #a78bfa;
      letter-spacing: 1px;
      text-transform: uppercase;
    }

    @media(max-width:680px) {
      nav {
        padding: 14px 20px;
      }

      .nav-links {
        display: none;
      }

      .nav-badge {
        display: none;
      }
    }

    /* ── HERO ── */
    .hero {
      position: relative;
      z-index: 5;
      text-align: center;
      padding: 80px 24px 40px;
    }

    .hero-eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      background: rgba(56, 189, 248, .08);
      border: 1px solid rgba(56, 189, 248, .2);
      border-radius: 100px;
      padding: 8px 20px;
      font-size: 13px;
      font-weight: 700;
      color: var(--orange);
      margin-bottom: 32px;
      letter-spacing: .3px;
    }

    .hero-eyebrow .dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--orange);
      animation: pulse-dot 1.6s infinite;
    }

    @keyframes pulse-dot {

      0%,
      100% {
        opacity: 1;
        transform: scale(1);
      }

      50% {
        opacity: .3;
        transform: scale(.7);
      }
    }

    .hero-title {
      font-size: clamp(40px, 6vw, 82px);
      font-weight: 900;
      line-height: 1.02;
      letter-spacing: -2px;
      margin-bottom: 24px;
      animation: fadeUp .8s ease both;
    }

    .hero-title .line1 {
      display: block;
      background: linear-gradient(135deg, #fff 0%, #c4b5fd 60%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .hero-title .line2 {
      display: block;
      background: linear-gradient(135deg, var(--orange) 0%, var(--orange2) 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .hero-sub {
      font-size: 18px;
      color: var(--muted);
      max-width: 620px;
      margin: 0 auto 24px;
      line-height: 1.7;
      animation: fadeUp .8s ease .12s both;
    }

    .hero-tagline {
      font-family: 'JetBrains Mono', monospace;
      font-size: 14px;
      color: var(--teal);
      margin-bottom: 40px;
      opacity: .85;
      animation: fadeUp .8s ease .2s both;
    }

    @keyframes fadeUp {
      from {
        opacity: 0;
        transform: translateY(22px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* HERO ACTIONS */
    .hero-actions {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 16px;
      margin-top: 0px;
      margin-bottom: 40px;
      animation: fadeUp .8s ease .3s both;
      flex-wrap: wrap;
    }

    .try-btn {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      background: linear-gradient(135deg, var(--orange), #e05a2b);
      color: #fff;
      border: none;
      padding: 14px 32px;
      border-radius: 14px;
      font-family: 'Inter', sans-serif;
      font-size: 16px;
      font-weight: 800;
      cursor: pointer;
      transition: all .3s;
      box-shadow: 0 8px 32px rgba(56, 189, 248, .45);
      text-decoration: none;
    }

    .try-btn:hover {
      transform: translateY(-3px) scale(1.02);
      box-shadow: 0 12px 40px rgba(56, 189, 248, .6);
    }

    .secondary-btn {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      background: var(--surface);
      color: var(--text);
      border: 1px solid var(--border);
      padding: 14px 32px;
      border-radius: 14px;
      font-family: 'Inter', sans-serif;
      font-size: 16px;
      font-weight: 700;
      cursor: pointer;
      transition: all .3s;
      text-decoration: none;
    }

    .secondary-btn:hover {
      background: rgba(255, 255, 255, 0.05);
      border-color: rgba(255, 255, 255, 0.2);
      transform: translateY(-3px) scale(1.02);
    }

    /* ── STATS BAR ── */
    .stats-bar {
      display: flex;
      justify-content: flex-start;
      gap: 32px;
      padding: 16px 48px;
      flex-wrap: wrap;
      position: relative;
      z-index: 5;
      animation: fadeUp .8s ease .35s both;
    }

    .stat-item {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .stat-item .emoji {
      font-size: 18px;
    }

    .stat-item .text {
      font-family: 'JetBrains Mono', monospace;
      font-size: 12px;
      color: var(--muted2);
    }

    .stat-item .num {
      font-weight: 700;
      font-size: 14px;
    }

    .num-orange {
      color: var(--orange);
    }

    .num-teal {
      color: var(--teal);
    }

    .num-violet {
      color: var(--violet2);
    }

    @media(max-width:680px) {
      .stats-bar {
        padding: 16px 24px;
        gap: 20px;
      }
    }

    /* ── LANG PILLS ── */
    .lang-row {
      display: flex;
      gap: 8px;
      justify-content: center;
      flex-wrap: wrap;
      margin-bottom: 40px;
      padding: 0 24px;
      position: relative;
      z-index: 5;
      animation: fadeUp .8s ease .4s both;
    }

    .lang-pill {
      padding: 7px 16px;
      border-radius: 100px;
      font-family: 'JetBrains Mono', monospace;
      font-size: 12px;
      cursor: pointer;
      border: 1px solid var(--glass-border);
      background: var(--glass-bg);
      backdrop-filter: var(--blur);
      color: var(--muted);
      transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
      user-select: none;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .lang-pill:hover,
    .lang-pill.active {
      background: rgba(56, 189, 248, .15);
      border-color: rgba(56, 189, 248, .4);
      color: var(--orange);
      transform: translateY(-3px);
      box-shadow: 0 8px 12px rgba(56, 189, 248, 0.15);
    }

    /* ── EDITOR ── */
    .editor-wrap {
      position: relative;
      z-index: 5;
      max-width: 1240px;
      margin: 0 auto 60px;
      padding: 0 24px;
    }

    .editor-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
    }

    @media(max-width:800px) {
      .editor-grid {
        grid-template-columns: 1fr;
      }
    }

    .panel {
      background: var(--glass-bg);
      backdrop-filter: var(--blur);
      border: 1px solid var(--glass-border);
      border-radius: 20px;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      box-shadow: var(--glass-shadow);
      transition: border-color .3s, transform 0.3s;
    }

    .panel:hover {
      border-color: rgba(56, 189, 248, .3);
      transform: translateY(-2px);
    }

    .panel-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 18px;
      border-bottom: 1px solid var(--glass-border);
      background: rgba(255, 255, 255, 0.02);
    }

    .panel-bar-left {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .panel-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
    }

    .dot-r {
      background: #ff5f57;
    }

    .dot-y {
      background: #ffbd2e;
    }

    .dot-g {
      background: #28c840;
    }

    .panel-title-txt {
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
      font-weight: 700;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 1.5px;
      margin-left: 6px;
    }

    .sample-btns {
      display: flex;
      gap: 5px;
    }

    .sample-btn {
      background: transparent;
      border: 1px solid var(--border);
      color: var(--muted);
      font-family: 'JetBrains Mono', monospace;
      font-size: 10px;
      padding: 4px 9px;
      border-radius: 5px;
      cursor: pointer;
      transition: all .2s;
      text-transform: uppercase;
      letter-spacing: .5px;
    }

    .sample-btn:hover {
      border-color: rgba(99, 102, 241, .5);
      color: var(--violet2);
    }

    /* ── CODE EDITOR - Single box ── */
    .editor-body {
      display: flex;
      flex: 1;
      overflow: hidden;
    }

    .code-area {
      flex: 1;
      background: transparent;
      border: none;
      outline: none;
      color: var(--text);
      font-family: 'JetBrains Mono', monospace;
      font-size: 13px;
      line-height: 1.75;
      padding: 18px;
      resize: none;
      min-height: 300px;
      caret-color: var(--orange);
      overflow-y: auto;
    }

    .code-area::placeholder {
      color: rgba(255, 255, 255, .12);
    }

    .code-area::selection {
      background: rgba(99, 102, 241, .3);
    }

    /* complexity bar */
    .complexity-bar {
      padding: 10px 18px;
      border-top: 1px solid var(--border);
      display: flex;
      align-items: center;
      gap: 12px;
      background: rgba(0, 0, 0, .15);
    }

    .complexity-label {
      font-family: 'JetBrains Mono', monospace;
      font-size: 10px;
      color: var(--muted2);
      white-space: nowrap;
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    .meter {
      flex: 1;
      height: 4px;
      background: rgba(255, 255, 255, .07);
      border-radius: 10px;
      overflow: hidden;
    }

    .meter-fill {
      height: 100%;
      border-radius: 10px;
      background: linear-gradient(90deg, var(--teal), var(--orange));
      width: 0%;
      transition: width 1s ease;
    }

    .complexity-val {
      font-family: 'JetBrains Mono', monospace;
      font-size: 10px;
      color: var(--teal);
      min-width: 28px;
    }

    /* analogy row */
    .analogy-row {
      display: flex;
      gap: 6px;
      padding: 12px 18px;
      border-top: 1px solid var(--border);
      background: rgba(0, 0, 0, .18);
      flex-wrap: wrap;
      align-items: center;
    }

    .analogy-label {
      font-size: 11px;
      color: var(--muted2);
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .5px;
      margin-right: 4px;
    }

    .analogy-btn {
      padding: 5px 12px;
      border-radius: 100px;
      border: 1px solid var(--border);
      background: transparent;
      color: var(--muted);
      font-family: 'Inter', sans-serif;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: all .2s;
    }

    .analogy-btn:hover,
    .analogy-btn.active {
      background: rgba(16, 185, 129, .1);
      border-color: rgba(16, 185, 129, .4);
      color: var(--teal);
    }

    /* settings */
    .settings-row {
      padding: 12px 8px;
      border-top: 1px solid var(--border);
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      background: var(--surface);
    }

    .select-wrap {
      position: relative;
      flex: 1;
      min-width: 120px;
    }

    select {
      appearance: none;
      width: 100%;
      background: var(--card);
      border: 1px solid var(--border);
      color: var(--text);
      font-family: 'Inter', sans-serif;
      font-size: 13px;
      padding: 8px 30px 8px 12px;
      border-radius: 8px;
      cursor: pointer;
      outline: none;
      transition: border-color .2s;
    }

    select:focus {
      border-color: var(--violet);
    }

    .select-wrap::after {
      content: '▾';
      position: absolute;
      right: 10px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--muted2);
      pointer-events: none;
      font-size: 11px;
    }

    .explain-btn {
      display: flex;
      align-items: center;
      gap: 8px;
      background: linear-gradient(135deg, var(--orange), #e05a2b);
      color: #fff;
      border: none;
      padding: 10px 22px;
      border-radius: 10px;
      font-family: 'Inter', sans-serif;
      font-size: 14px;
      font-weight: 800;
      cursor: pointer;
      transition: all .2s;
      box-shadow: 0 4px 20px rgba(56, 189, 248, .35);
      white-space: nowrap;
    }

    .explain-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 32px rgba(56, 189, 248, .5);
    }

    .explain-btn:active {
      transform: scale(.97);
    }

    /* Run Karo button — teal variation of explain-btn */
    .run-btn {
      background: linear-gradient(135deg, #06d6a0, #00b4d8) !important;
      color: #09090b !important;
      box-shadow: 0 4px 20px rgba(56, 189, 248, .5) !important;
    }

    .run-btn:hover {
      box-shadow: 0 8px 32px rgba(56, 189, 248, .5) !important;
    }

    .explain-btn.loading {
      opacity: .7;
      pointer-events: none;
    }

    .spinner {
      width: 15px;
      height: 15px;
      border: 2px solid rgba(255, 255, 255, .3);
      border-top-color: #fff;
      border-radius: 50%;
      animation: spin .8s linear infinite;
      display: none;
    }

    /* New Feature Badge */
    .new-badge {
      background: linear-gradient(135deg, #f43f5e, #e11d48);
      color: white;
      font-size: 8px;
      font-weight: 800;
      padding: 2px 5px;
      border-radius: 4px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-left: 6px;
      vertical-align: middle;
      box-shadow: 0 0 8px rgba(244, 63, 94, 0.4);
      animation: pulseNew 2s infinite;
    }

    @keyframes pulseNew {
      0% {
        box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.4);
      }

      70% {
        box-shadow: 0 0 0 4px rgba(244, 63, 94, 0);
      }

      100% {
        box-shadow: 0 0 0 0 rgba(244, 63, 94, 0);
      }
    }

    .loading .spinner {
      display: block;
    }

    .loading .btn-icon {
      display: none;
    }

    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }

    /* output */
    .out-tabs {
      display: flex;
      border-bottom: 1px solid var(--border);
    }

    .out-tab {
      flex: 1;
      padding: 12px 10px;
      background: transparent;
      border: none;
      color: var(--muted);
      font-family: 'Inter', sans-serif;
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      transition: all .2s;
      border-bottom: 2px solid transparent;
      text-align: center;
      letter-spacing: .3px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
    }

    .out-tab.active {
      color: var(--orange);
      border-bottom-color: var(--orange);
      background: rgba(56, 189, 248, .04);
    }

    .out-tab:hover:not(.active) {
      color: var(--text);
    }

    .tab-badge-new {
      display: inline-block;
      font-family: 'JetBrains Mono', monospace;
      font-size: 9px;
      font-weight: 800;
      background: linear-gradient(135deg, #ff6b35, #7c3aed);
      color: #fff;
      padding: 2px 7px;
      border-radius: 12px;
      box-shadow: 0 2px 8px rgba(56, 189, 248, 0.3);
    }

    .out-body {
      padding: 22px;
      flex: 1;
      overflow-y: auto;
      line-height: 1.8;
      max-height: 480px;
    }

    .out-body::-webkit-scrollbar {
      width: 6px;
    }

    .out-body::-webkit-scrollbar-track {
      background: rgba(255, 255, 255, .03);
      border-radius: 3px;
    }

    .out-body::-webkit-scrollbar-thumb {
      background: var(--orange);
      border-radius: 3px;
    }

    .placeholder-state {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      min-height: 280px;
      color: var(--muted);
      text-align: center;
      gap: 14px;
    }

    .placeholder-state .icon {
      font-size: 44px;
      opacity: .35;
    }

    .placeholder-state h3 {
      font-size: 17px;
      font-weight: 700;
      color: var(--text);
      opacity: .35;
    }

    .placeholder-state p {
      font-size: 13px;
      max-width: 240px;
    }

    .output-actions {
      padding: 10px 14px;
      border-top: 1px solid var(--border);
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 7px;
      background: var(--surface);
    }

    .action-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      background: rgba(255, 255, 255, .04);
      border: 1px solid var(--border);
      color: var(--muted);
      padding: 9px 6px;
      border-radius: 10px;
      font-family: 'Inter', sans-serif;
      font-size: 11px;
      font-weight: 700;
      cursor: pointer;
      transition: all .22s ease;
      position: relative;
      overflow: hidden;
      white-space: nowrap;
      letter-spacing: .1px;
      width: 100%;
    }

    .btn-icon-svg {
      width: 13px;
      height: 13px;
      flex-shrink: 0;
    }

    .action-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
    }

    .action-btn.btn-pdf {
      background: linear-gradient(135deg, rgba(56, 189, 248, .12), rgba(99, 102, 241, .08));
      border-color: rgba(56, 189, 248, .3);
      color: var(--orange);
    }

    .action-btn.btn-pdf:hover {
      background: linear-gradient(135deg, var(--orange), #e05a2b);
      border-color: var(--orange);
      color: #fff;
      box-shadow: 0 5px 18px rgba(56, 189, 248, .38);
    }

    .action-btn.btn-share:hover {
      border-color: rgba(251, 191, 36, .5);
      color: #fbbf24;
      background: rgba(251, 191, 36, .06);
    }

    .action-btn.btn-debug {
      background: rgba(239, 68, 68, .06);
      border-color: rgba(239, 68, 68, .25);
      color: #f87171;
    }

    .action-btn.btn-debug:hover {
      background: rgba(239, 68, 68, .14);
      border-color: rgba(239, 68, 68, .55);
      color: #fca5a5;
      box-shadow: 0 4px 16px rgba(239, 68, 68, .18);
      transform: translateY(-2px);
    }

    .action-btn.btn-debug.loading-debug {
      opacity: .6;
      pointer-events: none;
    }

    /* level badge */
    .level-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px 10px;
      border-radius: 100px;
      font-family: 'JetBrains Mono', monospace;
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    .lb-b {
      background: rgba(16, 185, 129, .1);
      color: var(--teal);
      border: 1px solid rgba(16, 185, 129, .3);
    }

    .lb-i {
      background: rgba(255, 189, 0, .1);
      color: #fbbf24;
      border: 1px solid rgba(255, 189, 0, .3);
    }

    .lb-a {
      background: rgba(56, 189, 248, .1);
      color: var(--orange);
      border: 1px solid rgba(56, 189, 248, .3);
    }

    /* AI Generated Output Markdown Styles */
    .ai-generated-content {
      font-family: 'Inter', sans-serif;
      color: rgba(255, 255, 255, 0.9);
      line-height: 1.6;
      font-size: 15px;
    }

    .ai-generated-content h1,
    .ai-generated-content h2,
    .ai-generated-content h3 {
      color: var(--teal);
      margin-top: 1.5rem;
      margin-bottom: 0.75rem;
      font-weight: 700;
    }

    .ai-generated-content p {
      margin-bottom: 1rem;
    }

    .ai-generated-content pre {
      background: rgba(10, 15, 30, 0.8);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 8px;
      padding: 1rem;
      overflow-x: auto;
      margin: 1rem 0;
    }

    .ai-generated-content code {
      font-family: 'JetBrains Mono', monospace;
      background: rgba(10, 15, 30, 0.5);
      color: var(--teal);
      padding: 0.2em 0.4em;
      border-radius: 4px;
      font-size: 0.9em;
    }

    .ai-generated-content pre code {
      background: transparent;
      padding: 0;
      color: inherit;
    }

    .ai-generated-content ul,
    .ai-generated-content ol {
      margin-left: 1.5rem;
      margin-bottom: 1rem;
    }

    .ai-generated-content li {
      margin-bottom: 0.5rem;
    }

    .ai-generated-content strong {
      color: #fff;
      font-weight: 600;
    }

    .ai-generated-content blockquote {
      border-left: 4px solid var(--violet);
      margin: 1rem 0;
      padding-left: 1rem;
      color: rgba(255, 255, 255, 0.7);
      font-style: italic;
    }

    /* explanation text */
    .expl-block {
      animation: fadeUp .4s ease;
    }

    .expl-block h3 {
      font-size: 18px;
      font-weight: 800;
      margin-bottom: 14px;
      color: var(--teal);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .expl-text {
      font-size: 14px;
      line-height: 1.95;
      color: rgba(241, 239, 255, .85);
    }

    .expl-text strong {
      color: var(--orange);
      font-weight: 700;
    }

    .expl-text code {
      font-family: 'JetBrains Mono', monospace;
      font-size: 12px;
      background: rgba(99, 102, 241, .15);
      color: #c4b5fd;
      padding: 2px 6px;
      border-radius: 4px;
    }

    /* ── COMPLEXITY VISUALIZER ── */
    .cx-wrap {
      padding: 4px 0;
    }

    .cx-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 18px;
    }

    .cx-title {
      font-size: 14px;
      font-weight: 700;
      color: var(--text);
    }

    .cx-badge {
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
      padding: 4px 10px;
      border-radius: 20px;
      background: rgba(56, 189, 248, .12);
      border: 1px solid rgba(56, 189, 248, .3);
      color: var(--orange);
    }

    .cx-row {
      margin-bottom: 16px;
    }

    .cx-label-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 5px;
    }

    .cx-name {
      font-size: 13px;
      font-weight: 600;
      color: var(--text);
    }

    .cx-val {
      font-family: 'JetBrains Mono', monospace;
      font-size: 12px;
      font-weight: 700;
    }

    .cx-val.g {
      color: var(--teal);
    }

    .cx-val.y {
      color: #fbbf24;
    }

    .cx-val.o {
      color: var(--orange);
    }

    .cx-val.r {
      color: #ef4444;
    }

    .bar-track {
      height: 12px;
      background: rgba(255, 255, 255, .06);
      border-radius: 10px;
      overflow: hidden;
    }

    .bar-fill {
      height: 100%;
      border-radius: 10px;
      transition: width 1.3s cubic-bezier(.22, 1, .36, 1);
      width: 0%;
    }

    .bf-t {
      background: linear-gradient(90deg, var(--teal), var(--orange));
    }

    .bf-s {
      background: linear-gradient(90deg, var(--violet), var(--violet2));
    }

    .bf-cx {
      background: linear-gradient(90deg, var(--orange), #ef4444);
    }

    .cx-desc {
      font-size: 12px;
      color: var(--muted);
      margin-top: 5px;
      line-height: 1.5;
    }

    .bigo-box {
      margin-top: 20px;
      padding: 16px;
      background: rgba(255, 255, 255, .02);
      border: 1px solid var(--border);
      border-radius: 12px;
    }

    .bigo-title {
      font-size: 13px;
      font-weight: 700;
      margin-bottom: 14px;
      color: var(--text);
    }

    .bigo-bars {
      display: flex;
      gap: 8px;
      justify-content: space-around;
      align-items: flex-end;
      height: 140px;
    }

    .bigo-col {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-end;
      gap: 6px;
    }

    .bigo-fill {
      width: 100%;
      transition: height 1.3s cubic-bezier(.22, 1, .36, 1);
      background: rgba(255, 255, 255, 0.08);
      border-radius: 4px 4px 0 0;
    }

    .bigo-col.hi .bigo-fill {
      box-shadow: 0 0 20px currentColor;
    }

    .bigo-lbl {
      font-family: 'JetBrains Mono', monospace;
      font-size: 10px;
      color: var(--muted2);
      font-weight: 700;
    }

    .bigo-col.hi .bigo-lbl {
      color: var(--text);
    }

    .cx-insight {
      margin-top: 14px;
      padding: 12px;
      background: rgba(16, 185, 129, .05);
      border-left: 3px solid var(--teal);
      border-radius: 6px;
      font-size: 13px;
      line-height: 1.7;
    }

    /* ── QUIZ ── */
    .quiz-wrap {
      padding: 4px 0;
    }

    .quiz-empty {
      text-align: center;
      padding: 30px;
      color: var(--muted);
    }

    .quiz-empty .icon {
      font-size: 36px;
      opacity: .3;
      margin-bottom: 10px;
    }

    .quiz-top {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 14px;
    }

    .q-dots {
      display: flex;
      gap: 5px;
    }

    .q-dot {
      width: 9px;
      height: 9px;
      border-radius: 50%;
      background: rgba(255, 255, 255, .1);
      transition: background .4s;
    }

    .q-dot.done {
      background: var(--teal);
    }

    .q-dot.cur {
      background: var(--orange);
    }

    .q-score {
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
      padding: 3px 9px;
      background: rgba(16, 185, 129, .12);
      border: 1px solid rgba(16, 185, 129, .3);
      border-radius: 20px;
      color: var(--teal);
    }

    .q-num {
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
      color: var(--muted2);
      text-transform: uppercase;
      letter-spacing: 1px;
      margin-bottom: 5px;
    }

    .q-question {
      font-size: 14px;
      font-weight: 700;
      line-height: 1.6;
      margin-bottom: 14px;
    }

    .q-opts {
      display: flex;
      flex-direction: column;
      gap: 7px;
    }

    .q-opt {
      padding: 10px 14px;
      border: 1.5px solid var(--border);
      border-radius: 10px;
      background: rgba(255, 255, 255, .02);
      cursor: pointer;
      transition: all .25s;
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 13px;
      color: var(--text);
      font-family: 'Inter', sans-serif;
      text-align: left;
    }

    .q-opt:hover:not(:disabled) {
      border-color: var(--orange);
      background: rgba(56, 189, 248, .06);
    }

    .q-opt:disabled {
      cursor: default;
    }

    .q-opt.correct {
      border-color: var(--teal);
      background: rgba(16, 185, 129, .1);
    }

    .q-opt.wrong {
      border-color: #ef4444;
      background: rgba(239, 68, 68, .08);
    }

    .q-opt.show-c {
      border-color: rgba(16, 185, 129, .4);
    }

    .q-letter {
      width: 24px;
      height: 24px;
      border-radius: 6px;
      background: rgba(255, 255, 255, .07);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      font-weight: 700;
      flex-shrink: 0;
      font-family: 'JetBrains Mono', monospace;
    }

    .correct .q-letter {
      background: var(--teal);
      color: #000;
    }

    .wrong .q-letter {
      background: #ef4444;
      color: #fff;
    }

    .show-c .q-letter {
      background: rgba(16, 185, 129, .35);
    }

    .q-feedback {
      margin-top: 10px;
      padding: 10px 13px;
      border-radius: 8px;
      font-size: 12px;
      line-height: 1.6;
    }

    .q-feedback.c {
      background: rgba(16, 185, 129, .1);
      border-left: 4px solid var(--teal);
      color: #d1fae5;
    }

    .q-feedback.w {
      background: rgba(239, 68, 68, .08);
      border-left: 4px solid #ef4444;
      color: #fee2e2;
    }

    .q-nav {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 12px;
    }

    .q-hint {
      font-size: 12px;
      color: var(--muted);
    }

    .q-next {
      padding: 7px 16px;
      background: linear-gradient(135deg, var(--orange), #e05a2b);
      border: none;
      border-radius: 8px;
      color: #fff;
      font-weight: 700;
      cursor: pointer;
      font-family: 'Inter', sans-serif;
      font-size: 12px;
      transition: all .2s;
    }

    .q-next:hover {
      transform: translateY(-1px);
      box-shadow: 0 4px 16px rgba(56, 189, 248, .4);
    }

    .q-result {
      text-align: center;
      padding: 20px 10px;
      animation: fadeUp .5s ease;
    }

    .q-result-emoji {
      font-size: 40px;
      margin-bottom: 10px;
    }

    .q-result-title {
      font-size: 18px;
      font-weight: 800;
      margin-bottom: 6px;
    }

    .q-result-score {
      font-family: 'JetBrains Mono', monospace;
      font-size: 30px;
      font-weight: 700;
      color: var(--orange);
      margin: 6px 0;
    }

    .q-result-msg {
      font-size: 13px;
      color: var(--muted);
      margin-bottom: 14px;
      line-height: 1.6;
    }

    .q-retry {
      padding: 10px 22px;
      background: linear-gradient(135deg, var(--orange), #e05a2b);
      border: none;
      border-radius: 10px;
      color: #fff;
      font-weight: 800;
      cursor: pointer;
      font-family: 'Inter', sans-serif;
      font-size: 14px;
      transition: all .2s;
    }

    .q-retry:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 24px rgba(56, 189, 248, .4);
    }

    /* ─── SECTIONS COMMON ─── */
    .sec {
      position: relative;
      z-index: 5;
      max-width: 1200px;
      margin: 0 auto;
      padding: 80px 24px;
    }

    .sec-tag {
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
      letter-spacing: 2px;
      text-transform: uppercase;
      color: var(--violet2);
      margin-bottom: 10px;
      opacity: .85;
    }

    .sec-title {
      font-size: clamp(26px, 3.5vw, 42px);
      font-weight: 900;
      letter-spacing: -1px;
      margin-bottom: 10px;
    }

    .sec-sub {
      font-size: 16px;
      color: var(--muted);
      margin-bottom: 50px;
      max-width: 560px;
    }

    /* ─── HOW IT WORKS ─── */
    .steps-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 16px;
    }

    @media(max-width:900px) {
      .steps-grid {
        grid-template-columns: repeat(2, 1fr);
      }
    }

    @media(max-width:540px) {
      .steps-grid {
        grid-template-columns: 1fr;
      }
    }

    .step-card {
      background: var(--glass-bg);
      backdrop-filter: var(--blur);
      border: 1px solid var(--glass-border);
      border-top: 1px solid var(--glass-highlight);
      border-left: 1px solid var(--glass-highlight);
      border-radius: 18px;
      padding: 26px 20px;
      position: relative;
      overflow: hidden;
      transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
      box-shadow: var(--glass-shadow);
    }

    .step-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 1px;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    }

    .step-card:hover {
      border-color: rgba(99, 102, 241, .4);
      transform: translateY(-5px);
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(99, 102, 241, 0.15);
      background: rgba(30, 30, 35, 0.7);
    }

    .step-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-family: 'JetBrains Mono', monospace;
      font-size: 10px;
      color: var(--orange);
      text-transform: uppercase;
      letter-spacing: 1px;
      margin-bottom: 14px;
    }

    .step-num {
      width: 24px;
      height: 24px;
      border-radius: 6px;
      background: linear-gradient(135deg, var(--orange), var(--violet));
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      font-weight: 800;
      color: #fff;
    }

    .step-icon {
      font-size: 30px;
      margin-bottom: 12px;
      display: block;
    }

    .step-title {
      font-size: 16px;
      font-weight: 800;
      margin-bottom: 7px;
    }

    .step-desc {
      font-size: 13px;
      color: var(--muted);
      line-height: 1.6;
    }

    /* ─── WHY DIFFERENT ─── */
    .why-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 16px;
    }

    @media(max-width:860px) {
      .why-grid {
        grid-template-columns: 1fr 1fr;
      }
    }

    @media(max-width:520px) {
      .why-grid {
        grid-template-columns: 1fr;
      }
    }

    .why-card {
      background: var(--glass-bg);
      backdrop-filter: var(--blur);
      border: 1px solid var(--glass-border);
      border-top: 1px solid var(--glass-highlight);
      border-left: 1px solid var(--glass-highlight);
      border-radius: 18px;
      padding: 26px;
      transition: all .3s;
      position: relative;
      overflow: hidden;
      box-shadow: var(--glass-shadow);
    }

    .why-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 1px;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    }

    .why-card:hover {
      border-color: rgba(56, 189, 248, .4);
      transform: translateY(-6px);
      box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 15px rgba(56, 189, 248, 0.15);
      background: rgba(30, 30, 35, 0.7);
    }

    /* Featured cards (Complexity + Quiz) */
    .why-featured {
      border-color: rgba(56, 189, 248, .15);
      background: linear-gradient(135deg, rgba(56, 189, 248, .04) 0%, rgba(99, 102, 241, .04) 100%);
    }

    .why-featured:hover {
      border-color: rgba(56, 189, 248, .35);
    }

    .why-new-badge {
      display: inline-block;
      font-family: 'JetBrains Mono', monospace;
      font-size: 9px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 1px;
      padding: 2px 7px;
      border-radius: 20px;
      background: linear-gradient(135deg, var(--orange), var(--violet));
      color: #fff;
      margin-left: 6px;
      vertical-align: middle;
      box-shadow: 0 2px 8px rgba(56, 189, 248, .4);
    }

    .why-vs {
      display: flex;
      gap: 12px;
      margin-bottom: 14px;
      align-items: flex-start;
    }

    .why-icon-wrap {
      width: 44px;
      height: 44px;
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 22px;
      flex-shrink: 0;
    }

    .ww-o {
      background: rgba(56, 189, 248, .15);
    }

    .why-title {
      font-size: 15px;
      font-weight: 800;
      margin-bottom: 5px;
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 4px;
    }

    .why-desc {
      font-size: 13px;
      color: var(--muted);
      line-height: 1.6;
    }

    .why-tag {
      display: inline-block;
      font-family: 'JetBrains Mono', monospace;
      font-size: 10px;
      padding: 3px 9px;
      border-radius: 20px;
      background: rgba(16, 185, 129, .1);
      border: 1px solid rgba(16, 185, 129, .25);
      color: var(--teal);
      margin-top: 10px;
    }

    /* ─── FAQ ─── */
    .faq-list {
      display: grid;
      grid-template-columns: 1fr;
      gap: 14px;
      max-width: 900px;
      margin: 0 auto;
    }

    .faq-item {
      background: var(--glass-bg);
      backdrop-filter: var(--blur);
      border: 1px solid var(--glass-border);
      border-top: 1px solid var(--glass-highlight);
      border-left: 1px solid var(--glass-highlight);
      border-radius: 16px;
      margin-bottom: 16px;
      overflow: hidden;
      box-shadow: var(--glass-shadow);
      transition: border-color 0.3s, transform 0.3s;
    }

    .faq-item:hover {
       border-color: rgba(255, 255, 255, 0.15);
       transform: translateY(-2px);
    }

    .faq-item.open {
      border-color: rgba(56, 189, 248, .35);
      box-shadow: 0 8px 24px rgba(56, 189, 248, .15);
    }

    .faq-q {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 20px 24px;
      cursor: pointer;
      gap: 16px;
      user-select: none;
    }

    .faq-q-left {
      display: flex;
      align-items: center;
      gap: 14px;
      flex: 1;
    }

    .faq-num {
      display: none;
    }

    .faq-qtext {
      font-size: 15px;
      font-weight: 700;
      line-height: 1.5;
    }

    .faq-chevron {
      font-size: 14px;
      color: var(--muted2);
      transition: transform .3s;
      flex-shrink: 0;
    }

    .faq-item.open .faq-chevron {
      transform: rotate(180deg);
      color: var(--orange);
    }

    .faq-ans {
      max-height: 0;
      overflow: hidden;
      transition: max-height .4s cubic-bezier(.4, 0, .2, 1);
    }

    .faq-ans-inner {
      padding: 0 24px 20px 24px;
      font-size: 14px;
      color: var(--muted);
      line-height: 1.9;
    }

    .faq-item.open .faq-ans {
      max-height: 1000px;
    }

    .faq-ans-inner code {
      font-family: 'JetBrains Mono', monospace;
      font-size: 12px;
      background: rgba(99, 102, 241, .15);
      color: #c4b5fd;
      padding: 3px 8px;
      border-radius: 5px;
    }

    /* ─── TOAST ─── */
    .toast {
      position: fixed;
      bottom: 24px;
      right: 24px;
      background: var(--card);
      border: 1px solid var(--teal);
      border-radius: 12px;
      padding: 12px 20px;
      font-size: 13px;
      color: var(--teal);
      z-index: 9999;
      transform: translateY(80px);
      opacity: 0;
      transition: all .3s ease;
    }

    .toast.show {
      transform: translateY(0);
      opacity: 1;
    }

    /* ─── FOOTER ─── */
    footer {
      position: relative;
      z-index: 5;
      border-top: 1px solid var(--border);
      padding: 48px;
    }

    .footer-inner {
      max-width: 1200px;
      margin: 0 auto;
      display: grid;
      grid-template-columns: 1.5fr 1fr 1fr;
      gap: 40px;
    }

    @media(max-width:720px) {
      .footer-inner {
        grid-template-columns: 1fr;
        gap: 28px;
      }

      footer {
        padding: 36px 24px;
      }
    }

    .footer-brand .logo-name {
      font-size: 22px;
      font-weight: 900;
      letter-spacing: -1px;
    }

    .footer-tagline {
      font-family: 'JetBrains Mono', monospace;
      font-size: 12px;
      color: var(--muted);
      margin: 8px 0 14px;
    }

    .footer-domain {
      font-family: 'JetBrains Mono', monospace;
      font-size: 12px;
      color: var(--orange);
      padding: 5px 12px;
      border: 1px solid rgba(56, 189, 248, .25);
      border-radius: 8px;
      display: inline-block;
    }

    .footer-col h4 {
      font-size: 13px;
      font-weight: 800;
      margin-bottom: 14px;
      color: var(--text);
      text-transform: uppercase;
      letter-spacing: .5px;
    }

    .footer-links {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 9px;
    }

    .footer-links li a {
      font-size: 13px;
      color: var(--muted);
      text-decoration: none;
      transition: color .2s;
    }

    .footer-links li a:hover {
      color: var(--orange);
    }

    .footer-bottom {
      max-width: 1200px;
      margin: 32px auto 0;
      padding-top: 24px;
      border-top: 1px solid var(--border);
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 12px;
      font-size: 12px;
      color: var(--muted2);
    }

    .footer-bottom strong {
      color: var(--orange);
    }

    /* ─── ENHANCED EXPLANATION STYLES ─── */
    .expl-section {
      margin-bottom: 20px;
      border-radius: 12px;
      overflow: hidden;
      animation: fadeUp .4s ease;
    }

    .expl-badge {
      display: inline-flex;
      align-items: center;
      padding: 4px 11px;
      border-radius: 20px;
      border: 1px solid;
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
      font-weight: 700;
    }

    .expl-hd-icon {
      font-size: 16px;
      margin-right: 2px;
    }

    .expl-section-header {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 14px;
      background: rgba(56, 189, 248, .08);
      border-left: 3px solid var(--orange);
      font-size: 13px;
      font-weight: 800;
      color: var(--orange);
      letter-spacing: .3px;
    }

    .expl-section-body {
      padding: 14px 14px 14px 17px;
      font-size: 13.5px;
      line-height: 1.9;
      color: rgba(241, 239, 255, .88);
    }

    .expl-section-body p {
      margin-bottom: 10px;
    }

    .expl-section-body p:last-child {
      margin-bottom: 0;
    }

    .expl-highlight-box {
      background: rgba(99, 102, 241, .08);
      border: 1px solid rgba(99, 102, 241, .2);
      border-radius: 10px;
      padding: 12px 14px;
      margin: 10px 0;
      font-size: 13px;
      line-height: 1.8;
    }

    .expl-highlight-box.teal {
      background: rgba(16, 185, 129, .07);
      border-color: rgba(16, 185, 129, .2);
    }

    .expl-highlight-box.orange {
      background: rgba(56, 189, 248, .07);
      border-color: rgba(56, 189, 248, .2);
    }

    .expl-code-block {
      background: rgba(0, 0, 0, .4);
      border: 1px solid rgba(255, 255, 255, .07);
      border-radius: 8px;
      padding: 12px 14px;
      font-family: 'JetBrains Mono', monospace;
      font-size: 12px;
      color: #c4b5fd;
      overflow-x: auto;
      white-space: pre;
      margin: 8px 0;
    }

    .expl-bullet {
      display: flex;
      gap: 8px;
      margin: 6px 0;
      align-items: flex-start;
    }

    .expl-bullet::before {
      content: '▸';
      color: var(--orange);
      flex-shrink: 0;
      margin-top: 1px;
    }

    .expl-complexity-row {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      margin: 10px 0;
    }

    .expl-cx-chip {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 14px;
      border-radius: 20px;
      font-family: 'JetBrains Mono', monospace;
      font-size: 12px;
      font-weight: 700;
    }

    .expl-cx-chip.time {
      background: rgba(56, 189, 248, .12);
      border: 1px solid rgba(56, 189, 248, .3);
      color: var(--orange);
    }

    .expl-cx-chip.space {
      background: rgba(99, 102, 241, .12);
      border: 1px solid rgba(99, 102, 241, .3);
      color: var(--violet2);
    }

    .expl-opt-card {
      background: rgba(16, 185, 129, .05);
      border: 1px solid rgba(16, 185, 129, .15);
      border-radius: 10px;
      padding: 10px 14px;
      margin: 8px 0;
      font-size: 13px;
      line-height: 1.7;
    }

    .expl-opt-card strong {
      color: var(--teal);
    }

    .expl-code-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 10px 10px 0 0;
      padding: 8px 14px;
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
      color: var(--muted);
    }

    .expl-code-wrap {
      border: 1px solid var(--border);
      border-top: none;
      border-radius: 0 0 10px 10px;
      overflow: hidden;
    }

    /* ─── QUIZ UPGRADE ─── */
    .quiz-wrap {
      padding: 4px 0;
    }

    .q-question {
      font-size: 14px;
      font-weight: 700;
      line-height: 1.6;
      margin-bottom: 14px;
    }

    @keyframes slideIn {
      from {
        opacity: 0;
        transform: translateX(20px);
      }

      to {
        opacity: 1;
        transform: translateX(0);
      }
    }

    @keyframes slideOut {
      from {
        opacity: 1;
        transform: translateX(0);
      }

      to {
        opacity: 0;
        transform: translateX(-20px);
      }
    }

    .quiz-slide {
      animation: slideIn .3s ease;
    }

    .q-result-breakdown {
      margin: 12px 0;
      text-align: left;
      max-width: 320px;
      margin: 12px auto;
    }

    .q-result-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 7px 12px;
      border-radius: 8px;
      font-size: 12px;
      margin-bottom: 5px;
    }

    .q-result-item.corr {
      background: rgba(16, 185, 129, .1);
      border: 1px solid rgba(16, 185, 129, .25);
    }

    .q-result-item.incorr {
      background: rgba(239, 68, 68, .08);
      border: 1px solid rgba(239, 68, 68, .2);
    }

    .q-result-item span:first-child {
      color: var(--muted);
    }

    .q-result-item span:last-child {
      font-weight: 700;
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
    }

    .q-result-item.corr span:last-child {
      color: var(--teal);
    }

    .q-result-item.incorr span:last-child {
      color: #ef4444;
    }

    .q-prog-bar {
      height: 3px;
      background: rgba(255, 255, 255, .06);
      border-radius: 3px;
      margin-bottom: 14px;
      overflow: hidden;
    }

    .q-prog-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--orange), var(--violet));
      border-radius: 3px;
      transition: width .4s ease;
    }

    /* ─── DEBUG TAB ─── */
    .tab-debug {
      color: #f87171 !important;
    }

    .tab-debug.active {
      color: #fca5a5 !important;
      border-bottom-color: #ef4444 !important;
      background: rgba(239, 68, 68, .04) !important;
    }

    /* ─── DEBUG UI ─── */
    .debug-wrap {
      animation: fadeUp .35s ease;
    }

    .debug-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 16px;
    }

    .debug-title {
      font-size: 14px;
      font-weight: 700;
      color: var(--text);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .debug-running {
      display: flex;
      align-items: center;
      gap: 7px;
      font-size: 12px;
      color: #f87171;
    }

    .debug-spinner {
      width: 12px;
      height: 12px;
      border: 2px solid rgba(239, 68, 68, .3);
      border-top-color: #ef4444;
      border-radius: 50%;
      animation: spin .8s linear infinite;
    }

    .debug-section {
      margin-bottom: 16px;
    }

    .debug-sec-title {
      font-size: 11px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 1.2px;
      margin-bottom: 8px;
      display: flex;
      align-items: center;
      gap: 7px;
    }

    .debug-sec-title.red {
      color: #ef4444;
    }

    .debug-sec-title.yellow {
      color: #fbbf24;
    }

    .debug-sec-title.green {
      color: var(--teal);
    }

    .debug-sec-title::before {
      content: '';
      display: block;
      width: 3px;
      height: 13px;
      border-radius: 2px;
      background: currentColor;
    }

    .bug-card {
      background: rgba(239, 68, 68, .06);
      border: 1px solid rgba(239, 68, 68, .2);
      border-radius: 10px;
      padding: 12px 14px;
      margin-bottom: 8px;
      position: relative;
      overflow: hidden;
    }

    .bug-card::before {
      content: '';
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 3px;
      background: #ef4444;
    }

    .bug-card-top {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 6px;
    }

    .bug-line-badge {
      font-family: 'JetBrains Mono', monospace;
      font-size: 10px;
      padding: 2px 8px;
      border-radius: 5px;
      background: rgba(239, 68, 68, .15);
      border: 1px solid rgba(239, 68, 68, .3);
      color: #fca5a5;
      flex-shrink: 0;
    }

    .bug-type {
      font-size: 11px;
      font-weight: 800;
      color: #f87171;
      text-transform: uppercase;
      letter-spacing: .5px;
    }

    .bug-desc {
      font-size: 13px;
      color: rgba(241, 239, 255, .85);
      line-height: 1.6;
      margin-bottom: 8px;
    }

    .bug-code-orig {
      background: rgba(239, 68, 68, .08);
      border: 1px solid rgba(239, 68, 68, .15);
      border-radius: 6px;
      padding: 7px 10px;
      font-family: 'JetBrains Mono', monospace;
      font-size: 12px;
      color: #fca5a5;
      margin-bottom: 5px;
    }

    .bug-fix-card {
      background: rgba(16, 185, 129, .06);
      border: 1px solid rgba(16, 185, 129, .2);
      border-radius: 10px;
      padding: 12px 14px;
      margin-bottom: 8px;
      position: relative;
      overflow: hidden;
    }

    .bug-fix-card::before {
      content: '';
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 3px;
      background: var(--teal);
    }

    .bug-fix-code {
      background: rgba(16, 185, 129, .08);
      border: 1px solid rgba(16, 185, 129, .15);
      border-radius: 6px;
      padding: 7px 10px;
      font-family: 'JetBrains Mono', monospace;
      font-size: 12px;
      color: #a7f3d0;
      margin: 5px 0;
    }

    .bug-fix-title {
      font-size: 11px;
      font-weight: 800;
      color: var(--teal);
      text-transform: uppercase;
      letter-spacing: .5px;
      margin-bottom: 6px;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .warn-card {
      background: rgba(251, 191, 36, .05);
      border: 1px solid rgba(251, 191, 36, .2);
      border-radius: 10px;
      padding: 11px 14px;
      margin-bottom: 7px;
      display: flex;
      gap: 10px;
    }

    .warn-card-icon {
      font-size: 18px;
      flex-shrink: 0;
    }

    .warn-card-text {
      font-size: 13px;
      color: rgba(241, 239, 255, .8);
      line-height: 1.6;
    }

    .warn-card-text strong {
      color: #fbbf24;
    }

    .debug-clean {
      text-align: center;
      padding: 24px 14px;
    }

    .debug-clean-icon {
      font-size: 44px;
      margin-bottom: 10px;
    }

    .debug-clean-title {
      font-size: 16px;
      font-weight: 800;
      color: var(--teal);
      margin-bottom: 6px;
    }

    .debug-clean-msg {
      font-size: 13px;
      color: var(--muted);
      line-height: 1.7;
    }

    /* =========================================================
       Terminal IDE Overlay Styles 
       ========================================================= */
    body.ide-theme {
      overflow: hidden;
      margin: 0;
      height: 100vh;
      display: flex;
      flex-direction: column;
    }

    .ide-layout {
      display: flex;
      height: 100vh;
      width: 100vw;
      background: transparent;
      
    }

    .ide-sidebar {
      width: 65px;
      background: var(--glass-bg);
      backdrop-filter: var(--blur);
      border-right: 1px solid var(--glass-border);
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 20px 0;
      gap: 20px;
      flex-shrink: 0;
      z-index: 10;
    }

    .ide-logo {
      width: 42px;
      height: 42px;
      background: linear-gradient(135deg, var(--orange), var(--violet));
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-weight: 900;
      font-size: 22px;
      text-decoration: none;
      box-shadow: 0 4px 16px var(--border-glow);
    }

    .ide-lang-pills {
      display: flex;
      flex-direction: column;
      gap: 14px;
      margin-top: 10px;
      flex: 1;
    }

    .ide-lang-pills .lang-pill {
      width: 44px;
      height: 44px;
      padding: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 10px;
      font-size: 22px;
      border: 1px solid transparent;
      transition: all 0.2s;
      background: transparent;
      color: var(--text);
    }
    .ide-lang-pills .lang-pill:hover,
    .ide-lang-pills .lang-pill.active {
      border-color: var(--orange);
      background: rgba(56, 189, 248, 0.15);
      transform: translateY(-2px);
    }

    .ide-sidebar-bottom {
      margin-top: auto;
    }

    .ide-main {
      flex: 1;
      display: flex;
      flex-direction: column;
      min-width: 0;
      height: 100%;
    }

    .ide-header {
      height: 65px;
      background: var(--glass-bg);
      backdrop-filter: var(--blur);
      border-bottom: 1px solid var(--glass-border);
      display: flex;
      align-items: center;
      padding: 0 24px;
      justify-content: space-between;
      flex-shrink: 0;
    }

    .ide-filename {
      font-family: 'JetBrains Mono', monospace;
      font-weight: 700;
      color: var(--text);
      font-size: 16px;
      display: flex;
      align-items: center;
    }

    .ide-actions {
      display: flex;
      align-items: center;
      gap: 16px;
    }

    .ide-select {
      padding: 0 30px 0 12px;
      height: 38px;
      font-size: 13px;
      line-height: 38px;
      margin: 0;
      width: 100%;
    }
    
    .ide-select-wrap {
      position: relative;
      height: 38px;
      min-width: 130px !important;
      width: auto !important;
    }
    
    .ide-select-wrap select {
      padding-top: 0;
      padding-bottom: 0;
    }

    .ide-split-container {
      display: flex;
      flex: 1;
      height: calc(100vh - 65px);
      overflow: hidden;
    }

    .ide-editor-pane {
      flex: 1;
      display: flex;
      flex-direction: column;
      min-width: 0;
      border-right: 1px solid var(--glass-border);
      background: var(--glass-bg);
      backdrop-filter: var(--blur);
    }

    .ide-output-pane {
      flex: 1;
      display: flex;
      flex-direction: column;
      min-width: 0;
      background: var(--glass-bg);
      backdrop-filter: var(--blur);
    }

    .ide-editor-wrapper {
      flex: 1;
      display: flex;
      overflow: hidden;
    }

    .ide-line-numbers {
      width: 48px;
      background: rgba(0, 0, 0, 0.2);
      border-right: 1px solid var(--glass-border);
      color: var(--muted);
      font-family: 'JetBrains Mono', monospace;
      font-size: 14px;
      line-height: 1.75;
      padding: 18px 12px;
      text-align: right;
      overflow: hidden;
      user-select: none;
      flex-shrink: 0;
      white-space: pre;
    }

    .ide-textarea {
      flex: 1;
      resize: none;
      border: none;
      background: transparent;
      height: 100%;
      outline: none;
      white-space: pre;
      padding: 18px 24px;
      font-size: 14px;
      line-height: 1.75;
      overflow-y: auto;
    }

    .ide-outbody {
      flex: 1;
      overflow-y: auto;
      background: transparent;
      padding: 24px;
    }

    .ide-tabs {
      background: transparent;
      border-bottom: 1px solid var(--glass-border);
      padding: 4px 16px;
      min-height: 50px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .ide-meter-bar {
      border-top: 1px solid var(--glass-border);
      background: transparent;
      flex-shrink: 0;
      padding: 12px 24px;
    }
    
    .ide-outactions {
      border-top: 1px solid var(--glass-border);
      background: transparent;
    }