:root {
    --primary: #FFD700;
    --primary-dark: #FFB700;
    --primary-light: #FFA500;
    --bg-dark: #0a0a0a;
    --bg-medium: #121212;
    --bg-light: #1a1a1a;
    --text-primary: #d0d0d0;
    --text-secondary: #909090;
    --text-light: #686868;
    --border-color: #282828;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.95);
    box-shadow: 0 4px 30px rgba(255, 215, 0, 0.08);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-logo a {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s;
    letter-spacing: 1px;
}

.navbar-logo a:hover {
    color: var(--primary-dark);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.whitepaper-container {
    display: flex;
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

.toc-sidebar {
    width: 280px;
    background: var(--bg-medium);
    border-right: 1px solid var(--border-color);
    padding: 40px 0;
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
    flex-shrink: 0;
}

.toc-header {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    padding: 0 25px 20px 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    margin-bottom: 20px;
}

.toc-list {
    list-style: none;
}

.toc-list li {
    margin: 0;
}

.toc-list a {
    display: block;
    padding: 12px 25px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
    position: relative;
}

.toc-list a:hover {
    color: var(--primary);
    background: rgba(255, 215, 0, 0.05);
    border-left-color: var(--primary);
    padding-left: 28px;
}

.toc-list a.active {
    color: var(--primary);
    background: rgba(255, 215, 0, 0.1);
    border-left-color: var(--primary);
    font-weight: 600;
}

.whitepaper-content {
    flex: 1;
    padding: 50px 60px;
    max-width: 900px;
}

.paper-header {
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 2px solid rgba(255, 215, 0, 0.15);
}

.paper-header h1 {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 10px;
    letter-spacing: 2px;
    font-weight: 800;
}

.paper-header .subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 0.5px;
}

section {
    margin-bottom: 60px;
    scroll-margin-top: 100px;
}

section h2 {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 25px;
    margin-top: 0;
    font-weight: 700;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

section h3 {
    font-size: 22px;
    color: var(--primary-dark);
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

section p {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 18px;
    line-height: 1.8;
}

section p strong {
    color: var(--primary);
    font-weight: 600;
}

section ul {
    list-style: none;
    margin: 20px 0 20px 0;
}

section ul li {
    margin: 12px 0;
    padding-left: 25px;
    position: relative;
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.7;
}

section ul li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-size: 18px;
}

section code {
    background: rgba(255, 215, 0, 0.08);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    word-break: break-all;
}

section a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    transition: all 0.3s;
}

section a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-dark);
}

footer {
    background: var(--bg-medium);
    border-top: 1px solid var(--border-color);
    padding: 30px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

footer p {
    margin: 0;
}

.toc-sidebar::-webkit-scrollbar,
.whitepaper-content::-webkit-scrollbar {
    width: 8px;
}

.toc-sidebar::-webkit-scrollbar-track,
.whitepaper-content::-webkit-scrollbar-track {
    background: transparent;
}

.toc-sidebar::-webkit-scrollbar-thumb,
.whitepaper-content::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.2);
    border-radius: 4px;
}

.toc-sidebar::-webkit-scrollbar-thumb:hover,
.whitepaper-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.4);
}

@media (max-width: 768px) {
    .whitepaper-container {
        flex-direction: column;
    }

    .toc-sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 25px 0;
        display: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s;
    }

    .toc-sidebar.active {
        display: block;
        max-height: 500px;
    }

    .toc-sidebar::-webkit-scrollbar {
        display: none;
    }

    .toc-header {
        padding: 0 20px 15px 20px;
        margin-bottom: 15px;
    }

    .toc-list a {
        padding: 10px 20px;
        font-size: 14px;
    }

    .whitepaper-content {
        padding: 40px 25px;
    }

    .paper-header h1 {
        font-size: 36px;
        letter-spacing: 1px;
    }

    .paper-header .subtitle {
        font-size: 16px;
    }

    section h2 {
        font-size: 26px;
    }

    section h3 {
        font-size: 20px;
    }

    section p,
    section ul li {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .navbar {
        height: 70px;
    }

    .navbar-container {
        padding: 0 20px;
    }

    .navbar-logo a {
        font-size: 24px;
    }

    .whitepaper-container {
        margin-top: 70px;
        min-height: calc(100vh - 70px);
    }

    .toc-sidebar {
        top: 70px;
    }

    .whitepaper-content {
        padding: 30px 18px;
    }

    .paper-header {
        margin-bottom: 35px;
        padding-bottom: 20px;
    }

    .paper-header h1 {
        font-size: 28px;
        letter-spacing: 0.5px;
    }

    .paper-header .subtitle {
        font-size: 14px;
    }

    section {
        margin-bottom: 40px;
    }

    section h2 {
        font-size: 22px;
        margin-bottom: 18px;
        padding-bottom: 12px;
    }

    section h3 {
        font-size: 18px;
        margin-top: 20px;
        margin-bottom: 12px;
    }

    section p,
    section ul li {
        font-size: 14px;
        line-height: 1.7;
    }

    section code {
        font-size: 12px;
        padding: 2px 6px;
    }

    footer {
        padding: 20px;
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .paper-header h1 {
        font-size: 24px;
    }

    section h2 {
        font-size: 20px;
    }

    .whitepaper-content {
        padding: 20px 15px;
    }
}
