:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --bg-dark: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #38bdf8;
    --success: #22c55e;
    --warning: #f59e0b;
    --font-mono: 'JetBrains Mono', monospace;
    --font-heading: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-heading);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
    /* Prevent body scroll, layout handles it */
}

/* Layout */
.app-layout {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: 600;
}

.timeline-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.timeline-group {
    margin-bottom: 1.5rem;
}

.timeline-group h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 0.75rem;
}

.timeline-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.timeline-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.timeline-item .time {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-right: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Main Content */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    scroll-behavior: smooth;
    max-width: 1000px;
    /* Limit line length for readability */
    margin: 0 auto;
}

.main-header {
    margin-bottom: 3rem;
    text-align: center;
}

.main-header h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    scroll-margin-top: 2rem;
    /* Scrolling offset */
}

.step-number {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
}

.timestamp-badge {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: full;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Code Blocks */
.code-block {
    background-color: #0d1117;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.code-header {
    background-color: rgba(255, 255, 255, 0.03);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.code-header span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}

.copy-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.code-content {
    padding: 1.25rem;
    overflow-x: auto;
    color: #e2e8f0;
    line-height: 1.7;
    white-space: pre;
    /* Fix for whitespace collapsing */
}

/* Command Styling */
.command {
    color: var(--accent);
}

.arg {
    color: var(--success);
}

.flag {
    color: var(--warning);
}

.comment {
    color: #64748b;
    font-style: italic;
}

/* Command Descriptions */
.cmd-desc {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: #94a3b8;
    background: #0d1117;
    padding: 1rem;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.cmd-desc code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.8em;
}

/* Lists in Text */
ul {
    list-style-type: none;
    margin-bottom: 1.5rem;
    padding-left: 0.5rem;
}

ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

ul li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary);
}

code {
    font-family: var(--font-mono);
    color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Responsive */
@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
        height: auto;
        overflow: auto;
    }

    body {
        overflow: auto;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .timeline-nav {
        display: none;
        /* Hide timeline on mobile by default or make it collapsible */
    }

    .sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .content {
        padding: 1rem;
    }
}