:root {
    --sidebar-bg: #1e293b;
    --sidebar-text: #e2e8f0;
    --active-color: #38bdf8;
    --hover-bg: #334155;
    --main-bg: #f8fafc;
    --text-color: #334155;
    --code-bg: #1e1e1e;
    --code-text: #d4d4d4;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--main-bg);
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
}

/* --- Mobile Button (Hidden on Desktop) --- */
.mobile-menu-btn {
    display: none; /* Changed from default block to none */
}

/* --- Desktop Layout --- */
.layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: 100vh;
    width: 100%;
}

/* --- Sidebar --- */
.sidebar {
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    border-right: 1px solid #0f172a;
    overflow-y: auto;
    position: relative;
    z-index: 1000;
}

.sidebar .brand {
    padding: 2rem;
    border-bottom: 1px solid #334155;
}

.sidebar .brand h1 {
    font-size: 1.5rem;
    color: white;
}

.sidebar .step-list {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
}

.sidebar .step-btn {
    background: none;
    border: none;
    text-align: left;
    padding: 1rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    color: #94a3b8;
    width: 100%;
}

.sidebar .step-btn:hover {
    background: var(--hover-bg);
    color: white;
}

.sidebar .step-btn.active {
    background: var(--active-color);
    color: #0f172a;
    font-weight: bold;
}

.sidebar .step-btn.active .step-desc {
    color: #1e293b;
    opacity: 0.8;
}

.step-title {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
}

.step-desc {
    display: block;
    font-size: 0.8rem;
    opacity: 0.7;
    font-weight: normal;
}

/* --- Content Area --- */
.content-area {
    padding: 3rem 4rem;
    overflow-y: auto;
    background: white;
    min-width: 0;
}

.step-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.step-content.active {
    display: block;
}

.content-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 1rem;
}

.content-header h2 {
    font-size: 2.2rem;
    color: #0f172a;
}

.content-body h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #334155;
    font-size: 1.25rem;
}

.content-body p, .content-body ul {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.7;
}

.content-body ul {
    padding-left: 20px;
}

/* --- Code Blocks --- */
.code-block {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 1.5rem;
    border-radius: 6px;
    font-family: 'Consolas', monospace;
    overflow-x: auto;
    white-space: pre-wrap;
    position: relative;
    margin-bottom: 1.5rem;
}

.code-block::after {
    content: 'COPY';
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.1);
    padding: 4px 8px;
    font-size: 0.7rem;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.5;
}

.code-block:hover::after {
    opacity: 1;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px), body.mobile-force {
    .layout {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1001;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .content-area {
        padding: 1rem;
        min-height: 100vh;
        margin-top: 70px;
    }

    .mobile-menu-btn {
        display: block !important;
        position: fixed;
        top: 15px;
        right: 15px;
        z-index: 1002;
        background: #1e293b;
        color: white;
        border: none;
        padding: 12px 16px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 1.1rem;
        font-weight: bold;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1000;
    }

    .sidebar.open ~ .sidebar-overlay {
        display: block;
    }
}
