/* WIKI LAYOUT */
body.wiki-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    /* Scroll içeride olacak */
    background: var(--bg);
    color: var(--text-main);
    align-items: stretch !important;
    /* layout.css 'center' override */
    padding-top: 56px !important;
    /* Header height */
    margin: 0 !important;
}

.wiki-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* SIDEBAR */
.wiki-sidebar {
    width: 260px;
    background: var(--bg-panel);
    /* Cam efekti için panel rengi */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 24px 16px;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.wiki-nav-group {
    margin-bottom: 24px;
}

.wiki-nav-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    padding-left: 12px;
}

.wiki-nav-link {
    display: block;
    padding: 8px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.2s;
}

.wiki-nav-link:hover {
    background: rgba(120, 120, 128, 0.1);
    /* Apple tarzı hover */
    color: var(--text-main);
}

.wiki-nav-link.active {
    background: var(--accent);
    /* Theme color */
    color: #fff;
    font-weight: 500;
}

/* CONTENT AREA */
.wiki-content {
    flex: 1;
    padding: 40px 60px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.wiki-article {
    max-width: 800px;
    margin: 0 auto;
}

/* TYPOGRAPHY */
.wiki-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.wiki-meta {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 40px;
    display: flex;
    gap: 16px;
}

.wiki-section {
    margin-bottom: 60px;
    scroll-margin-top: 100px;
    /* Header için pay */
}

.wiki-h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
}

.wiki-h3 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 12px;
    color: var(--text-main);
}

.wiki-p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.wiki-list {
    margin-bottom: 16px;
    padding-left: 20px;
}

.wiki-list li {
    margin-bottom: 8px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* CODE BLOCKS */
.wiki-code-block {
    background: #1e1e1e;
    /* VS Code Dark */
    border-radius: 12px;
    padding: 16px;
    margin: 24px 0;
    overflow-x: auto;
    font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: #d4d4d4;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.wiki-code-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #888;
    font-size: 11px;
    text-transform: uppercase;
}

/* TABLES */
.wiki-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14px;
}

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

.wiki-table th {
    background: rgba(120, 120, 128, 0.05);
    font-weight: 600;
    color: var(--text-main);
}

.wiki-table td {
    color: var(--text-secondary);
}

/* CALLOUTS */
.wiki-callout {
    background: rgba(0, 122, 255, 0.1);
    /* Blue tint */
    border-left: 4px solid #007aff;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 24px 0;
    color: var(--text-main);
}

.wiki-callout.warning {
    background: rgba(255, 149, 0, 0.1);
    border-color: #ff9500;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .wiki-sidebar {
        position: fixed;
        left: 0;
        top: 60px;
        /* Header height */
        bottom: 0;
        z-index: 100;
        transform: translateX(-100%);
    }

    .wiki-sidebar.active {
        transform: translateX(0);
    }

    .wiki-content {
        padding: 20px;
    }

    .wiki-header-toggle {
        display: block;
        /* Mobile toggle button */
    }
}