.wiki-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: calc(100vh - 64px);
}

.wiki-sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--gold-border);
    padding: 24px 0;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--bg-tertiary) transparent;
}

.sidebar-heading {
    font-family: var(--font-display);
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 16px 20px 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s;
    border-left: 2px solid transparent;
}

.sidebar-link:hover {
    color: var(--text-primary);
    background: var(--gold-subtle);
}

.sidebar-link.active {
    color: var(--gold);
    background: var(--gold-subtle);
    border-left-color: var(--gold);
}

.sidebar-link .link-icon {
    font-size: 15px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.wiki-content {
    padding: 40px 48px 60px;
    max-width: 900px;
}

.wiki-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.wiki-breadcrumb a {
    color: var(--text-secondary);
}

.wiki-breadcrumb .sep {
    color: var(--text-muted);
    font-size: 10px;
}

.article-title {
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--gold);
    text-shadow: 0 0 20px rgba(255, 179, 0, 0.2);
    margin-bottom: 8px;
    letter-spacing: 1px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.article-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 36px;
    font-weight: 300;
}

.wiki-heading {
    font-family: var(--font-display);
    font-size: 12px;
    color: var(--gold-light);
    margin: 40px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gold-border);
    letter-spacing: 1px;
}

.wiki-heading:first-of-type {
    margin-top: 0;
}

.wiki-text {
    font-size: 14px;
    line-height: 1.75;
    color: var(--text-primary);
    margin-bottom: 16px;
    overflow-wrap: anywhere;
}

.command-block {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--gold-border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.command-name {
    padding: 10px 16px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--gold);
    background: rgba(255, 179, 0, 0.05);
    border-right: 1px solid var(--gold-border);
    white-space: nowrap;
    font-weight: 600;
}

.command-desc {
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    overflow-wrap: anywhere;
}

.info-box {
    background: var(--bg-tertiary);
    border-left: 3px solid var(--gold);
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.info-box-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.info-box-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2px;
    background: var(--gold-border);
    border-radius: 8px;
    overflow: hidden;
    margin: 16px 0;
}

.feature-item {
    padding: 16px 20px;
    background: var(--bg-tertiary);
}

.feature-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.feature-detail {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.cost-badge {
    display: inline-block;
    background: rgba(255, 179, 0, 0.1);
    color: var(--gold);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 4px;
}

.tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 4px;
}

.tag-echelite {
    background: rgba(255, 179, 0, 0.1);
    color: var(--gold);
}

.tag-echelar {
    background: rgba(0, 200, 255, 0.1);
    color: #00c8ff;
}

.tag-free {
    background: rgba(0, 200, 80, 0.1);
    color: #00c850;
}

.table-wrap {
    overflow-x: auto;
    margin: 16px 0;
    border: 1px solid var(--gold-border);
    border-radius: 8px;
}

.wiki-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.wiki-table th {
    background: rgba(255, 179, 0, 0.06);
    color: var(--gold);
    font-weight: 600;
    text-align: left;
    padding: 10px 16px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--gold-border);
}

.wiki-table td {
    padding: 10px 16px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    overflow-wrap: anywhere;
}

.wiki-table tr:last-child td {
    border-bottom: none;
}

.wiki-table tr:hover td {
    background: rgba(255, 179, 0, 0.02);
}

code {
    font-family: 'Courier New', monospace;
    color: var(--gold);
    font-size: 12px;
    background: rgba(255, 179, 0, 0.08);
    padding: 1px 6px;
    border-radius: 3px;
    word-break: break-word;
}

.faq-item {
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item .wiki-text {
    margin-bottom: 0;
}

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

.wiki-list li {
    position: relative;
    padding: 6px 0 6px 20px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.wiki-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-size: 12px;
}

.sidebar-mobile-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--bg-primary);
    border: none;
    cursor: pointer;
    z-index: 100;
    font-size: 20px;
    box-shadow: 0 4px 16px rgba(255, 179, 0, 0.3);
}

@media (max-width: 900px) {
    .wiki-layout {
        grid-template-columns: 1fr;
    }

    .wiki-sidebar {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        height: auto;
        z-index: 99;
        border-right: none;
    }

    .wiki-sidebar.open {
        display: block;
    }

    .sidebar-mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .wiki-content {
        padding: 24px 20px 60px;
        max-width: 100%;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .command-block {
        grid-template-columns: 1fr;
    }

    .command-name {
        border-right: none;
        border-bottom: 1px solid var(--gold-border);
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 600px) {
    .wiki-content {
        padding: 20px 14px 72px;
    }

    .article-title {
        font-size: 15px;
        letter-spacing: 0.6px;
    }

    .article-subtitle {
        font-size: 13px;
        margin-bottom: 24px;
    }

    .wiki-heading {
        font-size: 10px;
        margin: 28px 0 12px;
    }

    .wiki-text,
    .wiki-list li {
        font-size: 13px;
        line-height: 1.65;
    }

    .info-box {
        padding: 14px;
        margin: 16px 0;
    }

    .info-box-text,
    .command-desc,
    .feature-detail {
        font-size: 12px;
    }

    .wiki-table {
        font-size: 12px;
    }

    .wiki-table th,
    .wiki-table td {
        padding: 8px 10px;
    }

    .command-name {
        font-size: 12px;
        padding: 9px 12px;
    }

    .sidebar-mobile-toggle {
        width: 44px;
        height: 44px;
        bottom: 14px;
        right: 14px;
    }
}
