/* ========================================
   DOCUMENTATION PAGE
   ======================================== */

.doc-page {
    display: flex;
    min-height: 100vh;
    padding-top: var(--header-height);
    background: var(--bg-primary);
}

/* ===== SIDEBAR ===== */
.doc-sidebar {
    flex: 0 0 400px;
    background: var(--bg-secondary);
    border-right: 1px solid rgba(139, 92, 246, 0.15);
    padding: 20px 0;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
}

.doc-sidebar nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.doc-sidebar nav ul li {
    margin: 2px 0;
}

.doc-sidebar .sidebar-header {
    padding: 8px 20px 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-violet);
    font-weight: 700;
}

.doc-sidebar .sidebar-divider {
    padding: 8px 20px;
}

.doc-sidebar .sidebar-divider hr {
    border: none;
    border-top: 1px solid rgba(139, 92, 246, 0.15);
    margin: 0;
}

.doc-sidebar nav ul li button {
    display: block;
    width: 100%;
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.15s;
    text-align: left;
}

.doc-sidebar nav ul li button:hover {
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.05);
}

.doc-sidebar nav ul li button.active {
    color: var(--accent-violet);
    background: rgba(139, 92, 246, 0.08);
    font-weight: 500;
}

/* Scrollbar */
.doc-sidebar::-webkit-scrollbar {
    width: 3px;
}

.doc-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.doc-sidebar::-webkit-scrollbar-thumb {
    background: var(--accent-violet);
    border-radius: 2px;
}

/* ===== CONTENT ===== */
.doc-content {
    flex: 1;
    padding: 30px 50px;
    max-width: calc(100% - 260px);
    overflow-y: auto;
}

.doc-section {
    display: none;
    animation: sectionFadeIn 0.25s ease-out;
}

.doc-section.active {
    display: block;
}

@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.doc-section h1 {
    font-size: 2.2rem;
    background: linear-gradient(135deg, var(--accent-violet), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
}

.doc-section h2 {
    font-size: 1.6rem;
    color: var(--text-primary);
    margin: 24px 0 12px;
}

.doc-section h3 {
    font-size: 1.2rem;
    color: var(--accent-violet);
    margin: 20px 0 8px;
}

.doc-section p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.doc-section ul {
    list-style: none;
    padding: 0;
    margin: 8px 0 16px;
}

.doc-section ul li {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    padding: 4px 0 4px 24px;
    position: relative;
}

.doc-section ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--accent-violet);
    border-radius: 50%;
    opacity: 0.4;
}

.doc-section ul li strong {
    color: var(--text-primary);
}

.doc-section a {
    color: var(--accent-violet);
    text-decoration: underline;
    transition: 0.2s;
}

.doc-section a:hover {
    color: var(--accent-pink);
}

/* ===== FAQ ===== */
.faq-item {
    margin-bottom: 20px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.08);
}

.faq-item h3 {
    color: var(--text-primary);
    margin: 0 0 6px 0;
    font-size: 1rem;
}

.faq-item p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

section {
    height: 100vh unset !important;
    display: unset !important;
    align-items: unset !important;
}

.doc-code {
    padding: 10px;
    border: 1px solid rebeccapurple;
    background: #66339917;
    border-radius: 10px;
    width: fit-content;
}

[data-i18n] {
    white-space: pre-line;
}

.json-code {
    max-height: 68vh;
    width: 300px;
    overflow-y: auto;
}

.json-code::-webkit-scrollbar {
    width: 3px;
}

.json-code::-webkit-scrollbar-track {
    background: transparent;
}

.json-code::-webkit-scrollbar-thumb {
    background: var(--accent-violet);
    border-radius: 2px;
}

.json-key {
    color: #55c8ff;
}

.json-string {
    color: #b58cff;
}

.json-number {
    color: #ffb86c;
}

.json-brace {
    color: #ffd166;
}

.json-boolean,
.json-null {
    color: #ff6b9d;
}

.manifest-grid {
    display: flex;
    gap: 20px;
}

.manifest-grid p {
    width: 20%;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .doc-sidebar {
        flex: 0 0 220px;
    }

    .doc-content {
        padding: 30px 30px;
    }
}

@media (max-width: 768px) {
    .doc-page {
        flex-direction: column;
    }

    .doc-sidebar {
        flex: unset;
        position: static;
        height: auto;
        padding: 12px 16px;
        border-right: none;
        border-bottom: 1px solid rgba(139, 92, 246, 0.15);
        max-height: 300px;
        overflow-y: auto;
    }

    .doc-sidebar nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 2px;
    }

    .doc-sidebar .sidebar-header,
    .doc-sidebar .sidebar-divider {
        display: none;
    }

    .doc-sidebar nav ul li button {
        padding: 4px 12px;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .doc-content {
        max-width: 100%;
        padding: 20px;
    }

    .doc-section h1 {
        font-size: 1.8rem;
    }

    .doc-section h2 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .doc-content {
        padding: 16px;
    }

    .doc-section h1 {
        font-size: 1.5rem;
    }

    .doc-section h3 {
        font-size: 1rem;
    }

    .doc-section ul li {
        font-size: 0.85rem;
        padding-left: 18px;
    }

    .faq-item {
        padding: 12px 16px;
    }
}