:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --accent: #58a6ff;
    --accent-hover: #79b8ff;
    --border: #30363d;
    --code-bg: #1f2428;
    --success: #3fb950;
    --warning: #d29922;
    --error: #f85149;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 16px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--accent);
    color: var(--text-primary);
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-top: 50px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-top: 35px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

p {
    margin-bottom: 16px;
    color: var(--text-primary);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.toc {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 25px 30px;
    margin-bottom: 40px;
}

.toc-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-secondary);
    font-weight: 600;
}

.toc ol {
    padding-left: 20px;
}

.toc li {
    margin: 10px 0;
}

pre {
    background-color: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 20px;
    overflow-x: auto;
    margin: 16px 0;
}

pre code {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: none;
    padding: 0;
    border-radius: 0;
}

code {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.9em;
    background-color: var(--bg-tertiary);
    padding: 3px 7px;
    border-radius: 5px;
    color: var(--accent);
}

ul, ol {
    margin: 16px 0;
    padding-left: 25px;
}

li {
    margin: 8px 0;
}

.checklist {
    list-style: none;
    padding-left: 0;
}

.checklist li {
    padding-left: 28px;
    position: relative;
}

.checklist li::before {
    content: "☐";
    position: absolute;
    left: 0;
    color: var(--accent);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background-color: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
}

tr:last-child td {
    border-bottom: none;
}

.alert {
    margin: 20px 0;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid;
}

.alert-warning {
    border-color: var(--warning);
    background-color: rgba(210, 153, 34, 0.1);
}

.alert-info {
    border-color: var(--accent);
    background-color: rgba(88, 166, 255, 0.1);
}

.alert p {
    margin: 0;
}

.alert strong {
    color: var(--warning);
}

.alert-info strong {
    color: var(--accent);
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 40px 0;
}

img {
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin: 20px 0;
}

.directory-structure {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 20px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.6;
    margin: 16px 0;
    white-space: pre;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--accent);
    color: var(--bg-primary);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 20px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.back-to-top:hover {
    opacity: 1;
    text-decoration: none;
}

@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    pre {
        padding: 12px 15px;
    }

    table {
        font-size: 14px;
    }

    th, td {
        padding: 10px 12px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}
