@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        :root {
            --bg-primary: #0f172a;
            --bg-secondary: #1e293b;
            --bg-tertiary: #334155;
            --text-primary: #f1f5f9;
            --text-secondary: #cbd5e1;
            --text-muted: #64748b;
            --accent: #06b6d4;
            --accent-dark: #0891b2;
            --success: #10b981;
            --warning: #f59e0b;
            --border: #475569;
            --shadow: rgba(0, 0, 0, 0.3);
        }
        
        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background: var(--bg-primary);
            color: var(--text-primary);
            overflow-x: hidden;
        }
        
        .app-container {
            display: grid;
            grid-template-columns: 320px 1fr;
            height: 100vh;
        }

        .sidebar-overlay {
            display: none;
        }

        .sidebar-toggle-btn {
            display: none;
        }
        
        /* Progress Sidebar */
        .progress-sidebar {
            background: var(--bg-secondary);
            border-right: 1px solid var(--border);
            padding: 2rem 1.5rem;
            overflow-y: auto;
        }

        /* Project Panel */
        .project-panel {
            margin-bottom: 2rem;
            padding-bottom: 2rem;
            border-bottom: 1px solid var(--border);
        }

        .project-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            margin-bottom: 1rem;
        }

        .project-header h3 {
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--text-muted);
        }

        .project-header-actions {
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }

        .project-icon-btn {
            width: 32px;
            height: 32px;
            border-radius: 0.5rem;
            border: 1px solid var(--border);
            background: var(--bg-tertiary);
            color: var(--text-secondary);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
        }

        .project-icon-btn:hover {
            border-color: var(--accent);
            color: var(--text-primary);
        }

        .project-icon-btn svg {
            width: 16px;
            height: 16px;
            stroke: currentColor;
            stroke-width: 1.6;
            fill: none;
        }

        .project-body {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }

        .project-actions {
            display: flex;
            gap: 0.5rem;
        }

        .project-list {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            max-height: 240px;
            overflow-y: auto;
            padding-right: 0.25rem;
        }

        .project-item {
            background: var(--bg-tertiary);
            border: 1px solid var(--border);
            color: var(--text-secondary);
            padding: 0.75rem 0.9rem;
            border-radius: 0.6rem;
            cursor: pointer;
            transition: all 0.2s;
            text-align: left;
        }

        .project-item:hover {
            border-color: var(--accent);
            background: var(--bg-primary);
        }

        .project-item.active {
            border-color: var(--accent);
            background: rgba(6, 182, 212, 0.15);
            color: var(--text-primary);
        }

        .project-title {
            font-size: 0.875rem;
            font-weight: 600;
            margin-bottom: 0.2rem;
        }

        .project-meta {
            font-size: 0.7rem;
            color: var(--text-muted);
        }

        .project-empty {
            font-size: 0.8rem;
            color: var(--text-muted);
            padding: 0.5rem 0;
        }

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

        .project-panel.collapsed .project-body {
            display: none;
        }
        
        .mode-selector {
            margin-bottom: 2rem;
            padding-bottom: 2rem;
            border-bottom: 1px solid var(--border);
        }
        
        .mode-selector h3 {
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--text-muted);
            margin-bottom: 1rem;
        }
        
        .mode-options {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        
        .mode-btn {
            background: var(--bg-tertiary);
            border: 1px solid var(--border);
            color: var(--text-secondary);
            padding: 0.75rem 1rem;
            border-radius: 0.5rem;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 0.875rem;
            text-align: left;
        }
        
        .mode-btn:hover {
            background: var(--bg-primary);
            border-color: var(--accent);
        }
        
        .mode-btn.active {
            background: var(--accent);
            color: var(--bg-primary);
            border-color: var(--accent);
            font-weight: 600;
        }
        
        .mode-desc {
            font-size: 0.75rem;
            opacity: 0.7;
            margin-top: 0.25rem;
        }
        
        /* Milestone Steps */
        .milestone-steps {
            position: relative;
        }
        
        .milestone-steps::before {
            content: '';
            position: absolute;
            left: 1rem;
            top: 2rem;
            bottom: 2rem;
            width: 2px;
            background: var(--border);
        }
        
        .step {
            position: relative;
            padding-left: 3rem;
            padding-bottom: 2rem;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .step:last-child {
            padding-bottom: 0;
        }
        
        .step-indicator {
            position: absolute;
            left: 0;
            top: 0;
            width: 2rem;
            height: 2rem;
            border-radius: 50%;
            background: var(--bg-tertiary);
            border: 2px solid var(--border);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            font-weight: 600;
            transition: all 0.3s;
            z-index: 1;
        }
        
        .step.completed .step-indicator {
            background: var(--success);
            border-color: var(--success);
            color: white;
        }
        
        .step.active .step-indicator {
            background: var(--accent);
            border-color: var(--accent);
            color: var(--bg-primary);
            box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.2);
            transform: scale(1.1);
        }
        
        .step-content h4 {
            font-size: 0.875rem;
            margin-bottom: 0.25rem;
            transition: color 0.2s;
        }
        
        .step.active .step-content h4 {
            color: var(--accent);
        }
        
        .step-content p {
            font-size: 0.75rem;
            color: var(--text-muted);
        }
        
        /* Main Content */
        .main-content {
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        
        .header {
            background: var(--bg-secondary);
            border-bottom: 1px solid var(--border);
            padding: 1.5rem 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .header h1 {
            font-size: 1.5rem;
            font-weight: 700;
        }
        
        .header-actions {
            display: flex;
            gap: 1rem;
        }
        
        .btn {
            padding: 0.625rem 1.25rem;
            border-radius: 0.5rem;
            border: none;
            cursor: pointer;
            font-size: 0.875rem;
            font-weight: 500;
            transition: all 0.2s;
        }

        .btn:disabled,
        .project-icon-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        .btn.is-loading {
            opacity: 0.75;
        }

        .btn.is-loading::after {
            content: '';
            display: inline-block;
            width: 0.95rem;
            height: 0.95rem;
            margin-left: 0.5rem;
            border-radius: 999px;
            border: 2px solid currentColor;
            border-top-color: transparent;
            animation: spin 0.8s linear infinite;
            vertical-align: -2px;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }
        
        .btn-secondary {
            background: var(--bg-tertiary);
            color: var(--text-secondary);
        }
        
        .btn-secondary:hover {
            background: var(--border);
        }
        
        .btn-primary {
            background: var(--accent);
            color: var(--bg-primary);
        }
        
        .btn-primary:hover {
            background: var(--accent-dark);
        }
        
        .content-area {
            flex: 1;
            overflow-y: auto;
            padding: 2rem;
        }
        
        .stage-container {
            max-width: 900px;
            margin: 0 auto;
        }
        
        .stage {
            display: none;
            animation: fadeIn 0.4s ease-out;
        }
        
        .stage.active {
            display: block;
        }
        
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .stage-title {
            font-size: 2rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
        }
        
        .stage-subtitle {
            color: var(--text-muted);
            font-size: 1rem;
            margin-bottom: 2rem;
        }
        
        /* Question Cards */
        .question-card {
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 0.75rem;
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            transition: all 0.3s;
        }
        
        .question-card:hover {
            border-color: var(--accent);
            box-shadow: 0 4px 12px var(--shadow);
        }
        
        .question-label {
            font-size: 0.875rem;
            color: var(--text-muted);
            margin-bottom: 0.5rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        
        .question-text {
            font-size: 1.125rem;
            font-weight: 600;
            margin-bottom: 1rem;
        }
        
        .question-input {
            width: 100%;
            background: var(--bg-primary);
            border: 1px solid var(--border);
            color: var(--text-primary);
            padding: 0.75rem 1rem;
            border-radius: 0.5rem;
            font-size: 1rem;
            font-family: inherit;
            transition: all 0.2s;
        }
        
        .question-input:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
        }
        
        textarea.question-input {
            min-height: 120px;
            resize: vertical;
        }

        .checkbox-row {
            display: flex;
            gap: 0.6rem;
            align-items: flex-start;
            color: var(--text-secondary);
            font-size: 0.95rem;
            line-height: 1.35;
        }

        .checkbox-row input[type="checkbox"] {
            width: 1rem;
            height: 1rem;
            margin-top: 0.15rem;
            accent-color: var(--accent);
        }
        
        .choice-group {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }
        
        .choice-btn {
            background: var(--bg-primary);
            border: 1px solid var(--border);
            color: var(--text-secondary);
            padding: 1rem;
            border-radius: 0.5rem;
            cursor: pointer;
            text-align: left;
            transition: all 0.2s;
            font-size: 0.9375rem;
        }
        
        .choice-btn:hover {
            background: var(--bg-tertiary);
            border-color: var(--accent);
        }
        
        .choice-btn.selected {
            background: var(--accent);
            color: var(--bg-primary);
            border-color: var(--accent);
            font-weight: 600;
        }
        
        /* Summary View */
        .summary-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 1.5rem;
            margin-top: 2rem;
        }
        
        .summary-card {
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 0.75rem;
            padding: 1.5rem;
        }
        
        .summary-card h3 {
            font-size: 1.125rem;
            margin-bottom: 1rem;
            color: var(--accent);
        }
        
        .summary-item {
            margin-bottom: 1rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid var(--border);
        }
        
        .summary-item:last-child {
            border-bottom: none;
            margin-bottom: 0;
            padding-bottom: 0;
        }
        
        .summary-item-label {
            font-size: 0.75rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 0.25rem;
        }
        
        .summary-item-value {
            font-size: 0.9375rem;
            color: var(--text-primary);
        }
        
        /* Code Preview */
        .code-preview {
            background: var(--bg-primary);
            border: 1px solid var(--border);
            border-radius: 0.75rem;
            padding: 1.5rem;
            margin-top: 2rem;
            overflow-x: auto;
            position: relative;
        }

        .code-preview.has-copy {
            padding-top: 2.75rem;
        }

        .code-preview pre {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.875rem;
            line-height: 1.6;
            color: var(--text-secondary);
        }
        
        .code-line {
            display: block;
        }
        
        .code-comment {
            color: var(--text-muted);
        }

        .copy-btn {
            position: absolute;
            top: 0.75rem;
            right: 0.75rem;
            width: 36px;
            height: 32px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 0.5rem;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s;
        }

        .copy-btn:hover {
            border-color: var(--accent);
            color: var(--text-primary);
        }

        .copy-btn.copied {
            border-color: var(--success);
            color: var(--success);
        }

        .copy-btn svg {
            width: 18px;
            height: 18px;
            stroke: currentColor;
            stroke-width: 1.6;
            fill: none;
        }
        
        /* Progress Bar */
        .progress-bar-container {
            background: var(--bg-secondary);
            height: 4px;
            width: 100%;
            border-radius: 2px;
            overflow: hidden;
        }
        
        .progress-bar-fill {
            background: linear-gradient(90deg, var(--accent), var(--success));
            height: 100%;
            transition: width 0.5s ease-out;
            border-radius: 2px;
        }
        
        /* Completion Screen */
        .completion-screen {
            text-align: center;
            padding: 4rem 2rem;
        }
        
        .completion-icon {
            width: 80px;
            height: 80px;
            background: var(--success);
            border-radius: 50%;
            margin: 0 auto 2rem;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2.5rem;
            animation: scaleIn 0.5s ease-out;
        }
        
        @keyframes scaleIn {
            from {
                transform: scale(0);
            }
            to {
                transform: scale(1);
            }
        }
        
        .completion-screen h2 {
            font-size: 2rem;
            margin-bottom: 1rem;
        }
        
        .completion-screen p {
            color: var(--text-secondary);
            font-size: 1.125rem;
            margin-bottom: 2rem;
        }
        
        .download-options {
            display: flex;
            gap: 1rem;
            justify-content: center;
            margin-top: 2rem;
        }

        .guide-card {
            border-color: rgba(6, 182, 212, 0.4);
            background: rgba(6, 182, 212, 0.06);
        }

        .guide-list {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            margin-top: 0.75rem;
        }

        .guide-item {
            display: flex;
            gap: 0.6rem;
            align-items: flex-start;
            color: var(--text-secondary);
            font-size: 0.95rem;
            line-height: 1.4;
        }

        .guide-mark {
            width: 1.25rem;
            flex: 0 0 1.25rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            color: var(--accent);
        }

        .guide-item.done {
            color: var(--success);
        }

        .guide-item.done .guide-mark {
            color: var(--success);
        }

        .guide-item.optional {
            color: var(--text-muted);
        }

        .guide-item.optional .guide-mark {
            color: var(--text-muted);
        }

        .cache-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 0.75rem;
            margin-top: 0.75rem;
        }

        .cache-item {
            background: var(--bg-primary);
            border: 1px solid var(--border);
            border-radius: 0.6rem;
            padding: 0.75rem 0.9rem;
        }

        .cache-label {
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--text-muted);
            margin-bottom: 0.35rem;
        }

        .cache-value {
            font-size: 0.95rem;
            color: var(--text-secondary);
            word-break: break-all;
        }

        .cache-warning {
            margin-top: 0.75rem;
            padding: 0.75rem 0.9rem;
            border-radius: 0.6rem;
            border: 1px solid rgba(245, 158, 11, 0.5);
            background: rgba(245, 158, 11, 0.12);
            color: var(--text-secondary);
            font-size: 0.9rem;
            line-height: 1.4;
        }

        .cache-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-top: 1rem;
        }

        @media (max-width: 900px) {
            .app-container {
                grid-template-columns: 1fr;
            }

            body.sidebar-open {
                overflow: hidden;
            }

            .sidebar-toggle-btn {
                display: inline-flex;
            }

            .sidebar-overlay {
                display: block;
                position: fixed;
                inset: 0;
                background: rgba(0, 0, 0, 0.55);
                opacity: 0;
                pointer-events: none;
                transition: opacity 0.25s ease;
                z-index: 40;
            }

            body.sidebar-open .sidebar-overlay {
                opacity: 1;
                pointer-events: auto;
            }

            .progress-sidebar {
                position: fixed;
                inset: 0 auto 0 0;
                width: min(320px, 88vw);
                transform: translateX(-105%);
                transition: transform 0.25s ease;
                z-index: 50;
                box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
                padding: 1.25rem 1rem;
                border-right: 1px solid var(--border);
            }

            body.sidebar-open .progress-sidebar {
                transform: translateX(0);
            }

            .header {
                padding: 1rem;
                gap: 0.75rem;
                flex-wrap: wrap;
            }

            .header-actions {
                gap: 0.5rem;
                flex-wrap: wrap;
            }

            .content-area {
                padding: 1rem;
            }

            .stage-title {
                font-size: 1.6rem;
            }
        }
