/* ========= WHITEPAPER STYLES ========= */

.whitepaper-content {
    padding-top: 80px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 3%;
    padding-right: 3%;
}

.whitepaper-title {
    color: #07A5E9;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
}

.whitepaper-subtitle {
    color: #D8D8E8;
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.whitepaper-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* Chapter Sidebar */
.chapter-sidebar {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.chapter-nav {
    background: #181c2b;
    border: 1px solid #2E2F46;
    border-radius: 8px;
    padding: 1rem 0;
}

.chapter-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.chapter-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.chapter-item:hover {
    background: rgba(7, 165, 233, 0.1);
    border-left-color: #07A5E9;
}

.chapter-item.active {
    background: rgba(7, 165, 233, 0.15);
    border-left-color: #07A5E9;
}

.chapter-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #2E2F46;
    color: #D8D8E8;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.chapter-item.active .chapter-number {
    background: #07A5E9;
    color: #fff;
}

.chapter-label {
    color: #D8D8E8;
    font-size: 0.85rem;
    line-height: 1.3;
}

.chapter-item.active .chapter-label {
    color: #07A5E9;
    font-weight: 500;
}

/* Chapter Content Area */
.chapter-content-area {
    flex: 1;
    min-width: 0;
    background: #181c2b;
    border: 1px solid #2E2F46;
    border-radius: 8px;
    padding: 2rem;
    min-height: 500px;
}

.chapter-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: #D8D8E8;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #2E2F46;
    border-top-color: #07A5E9;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.chapter-error {
    text-align: center;
    padding: 3rem 1rem;
    color: #D8D8E8;
}

.chapter-error h2 {
    color: #07A5E9;
    margin-bottom: 1rem;
}

/* Chapter Content Styles */
.chapter-content-area h2 {
    color: #07A5E9;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #2E2F46;
}

.chapter-content-area h3 {
    color: #5BC4F1;
    font-size: 1.3rem;
    font-weight: 500;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.chapter-content-area p {
    color: #D8D8E8;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.chapter-content-area ul,
.chapter-content-area ol {
    color: #D8D8E8;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.chapter-content-area li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.chapter-content-area a {
    color: #07A5E9;
    text-decoration: none;
}

.chapter-content-area a:hover {
    text-decoration: underline;
}

.chapter-content-area strong {
    color: #07A5E9;
}

.chapter-content-area code {
    background: #0d1117;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
    color: #5BC4F1;
}

.chapter-content-area pre {
    background: #0d1117;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.chapter-content-area pre code {
    background: none;
    padding: 0;
}

.chapter-content-area blockquote {
    border-left: 3px solid #07A5E9;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #a0a0b0;
    font-style: italic;
}

.chapter-content-area .chapter-intro {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #c0c0d0;
    margin-bottom: 1.5rem;
}

.chapter-content-area .placeholder-notice {
    background: rgba(34, 43, 231, 0.1);
    border-left: 3px solid #222BE7;
    padding: 1rem;
    border-radius: 0 4px 4px 0;
    margin-bottom: 1.5rem;
}

.chapter-content-area .placeholder-notice p {
    color: #a0a0b0;
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 992px) {
    .whitepaper-layout {
        flex-direction: column;
    }

    .chapter-sidebar {
        width: 100%;
        position: static;
        max-height: none;
    }

    .chapter-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .chapter-item {
        padding: 0.5rem 0.75rem;
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .chapter-item:hover,
    .chapter-item.active {
        border-left-color: transparent;
        border-bottom-color: #07A5E9;
    }
}

@media (max-width: 768px) {
    .whitepaper-content {
        padding-top: 70px;
    }

    .whitepaper-title {
        font-size: 1.8rem;
    }

    .whitepaper-subtitle {
        font-size: 1rem;
    }

    .chapter-content-area {
        padding: 1.25rem;
    }

    .chapter-content-area h2 {
        font-size: 1.5rem;
    }
}
