﻿/* Wiki / GitBook Style Layout - Refined for SurvivalDub */
:root {
    --wiki-sidebar-width: 300px;
    --wiki-bg: #131b28;
    /* Site Background */
    --wiki-sidebar-bg: #1e283a;
    /* Site Panel Background */
    --wiki-accent: #2196f3;
    /* Site Main Accent Blue */
    --wiki-accent-glow: rgba(33, 150, 243, 0.4);
    --wiki-text: #aeaeae;
    /* Site Main Text Color */
    --wiki-text-bright: #ffffff;
    --wiki-border: rgba(255, 255, 255, 0.1);
    --wiki-sidebar-item-hover: rgba(33, 150, 243, 0.1);
}

.wiki-container {
    display: flex;
    width: 100% !important;
    max-width: none !important;
    margin: 0;
    min-height: calc(100vh - 200px);
    background: var(--wiki-sidebar-bg);
    color: var(--wiki-text);
    font-family: 'Montserrat', sans-serif !important;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease;
}

.wiki-container.is-loading {
    opacity: 0.7;
}

/* Sidebar */
.wiki-sidebar {
    width: var(--wiki-sidebar-width);
    background: rgba(0, 0, 0, 0.1);
    border-right: 1px solid var(--wiki-border);
    position: relative;
    height: auto;
    min-height: 100%;
    overflow-y: auto;
    padding: 2.5rem 1.5rem;
    flex-shrink: 0;
}

/* Sidebar Scrollbar */
.wiki-sidebar::-webkit-scrollbar {
    width: 6px;
}

.wiki-sidebar::-webkit-scrollbar-thumb {
    background: #232f44;
    border-radius: 10px;
}

.wiki-nav-section {
    margin-bottom: 2rem;
}

.wiki-nav-title {
    font-size: 1.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--wiki-accent);
    margin-bottom: 1rem;
    padding-left: 0.5rem;
    font-weight: 800;
}

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

.wiki-nav-item {
    margin-bottom: 0.25rem;
}

.wiki-nav-link {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    color: var(--wiki-text);
    text-decoration: none;
    font-size: 1.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 600;
}

.wiki-nav-link:hover,
.wiki-nav-link.active {
    background: var(--wiki-sidebar-item-hover);
    color: var(--wiki-text-bright);
    transform: translateX(5px);
}

.wiki-nav-link.active {
    border-left: 3px solid var(--wiki-accent);
    padding-left: calc(1rem - 3px);
}

.wiki-nav-link i,
.wiki-nav-link i.mdi {
    margin-right: 10px;
    color: var(--wiki-accent);
    font-size: 2.1rem;
}

/* Main Content Wrapper */
.wiki-content-wrapper {
    flex: 1;
    min-width: 0;
    padding: 3rem;
    background: var(--wiki-sidebar-bg);
}

.wiki-header {
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--wiki-border);
    padding-bottom: 2rem;
}

.wiki-title {
    font-size: 4rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--wiki-accent);
    text-transform: uppercase;
    text-align: center;
}

.wiki-description {
    font-size: 1.1rem;
    color: var(--wiki-text);
    line-height: 1.6;
}

/* Content Area */
.post-content {
    font-size: 1.5rem;
    line-height: 1.7;
    color: var(--wiki-text);
    display: flex;
    flex-direction: column;
}

.post-content h2,
.post-content h3 {
    color: var(--wiki-text-bright);
    margin: 0.5em 0 0.4em;
    font-size: 3.2rem;
    line-height: 1.8em;
    font-weight: 700;
}

.post-content .kg-card.kg-image-card {
    margin: 2rem 0;
}

.post-content .kg-card.kg-callout-card {
    margin: 2rem 0;
}

/* Placeholder for empty state */
.wiki-placeholder {
    padding: 5rem 2rem;
    text-align: center;
    border: 2px dashed var(--wiki-border);
    border-radius: 10px;
    color: var(--wiki-text-muted);
}

/* Responsiveness */
@media (max-width: 1024px) {
    .wiki-content-wrapper {
        padding: 2.5rem;
    }

    .wiki-sidebar {
        width: 260px;
    }

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

@media (max-width: 850px) {
    .wiki-container {
        flex-direction: column;
        border-radius: 0;
        margin: 0;
    }

    .wiki-sidebar {
        width: 100%;
        height: auto;
        min-height: auto;
        max-height: none;
        position: relative;
        padding: 1.5rem;
        border-right: none;
        border-bottom: 1px solid var(--wiki-border);
    }

    .wiki-content-wrapper {
        padding: 2rem;
    }
}