.nav-login { margin-left: auto; }
.nav-login a {
    background: #5DA552;
    color: #fff;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}
.nav-login a:hover {
    background: #4a8a41;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(93,165,82,0.4);
}
.nav-login a.active { background: #4a8a41; }
.nav-login a.active::after { display: none !important; }

/* Wiki 布局 */
/* 2026-11-11：max-width 1200 → 1580，与 docs.css 的三栏宽度一致。
   本文件在 docs.css 之后加载，之前这里把容器卡在 1200px，
   导致 docs.css 里的 1580px 不生效、正文只能到 820px。 */
.wiki-layout {
    display: flex;
    gap: 30px;
    max-width: 1580px;
    margin: 0 auto;
    align-items: flex-start;
}
.wiki-sidebar {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    scrollbar-width: thin;
    background: #fafafa;
    border-radius: var(--radius);
}
.wiki-sidebar::-webkit-scrollbar {
    width: 4px;
}
.wiki-sidebar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}
.wiki-sidebar-group { margin-bottom: 4px; }
.wiki-sidebar-group > button {
    width: 100%;
    background: #f0f2f5;
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    border-radius: var(--radius) var(--radius) 0 0;
    transition: background 0.2s;
    position: relative;
}
.wiki-sidebar-group > button::after {
    content: "▼";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    transition: transform 0.2s;
}
.wiki-sidebar-group.open > button { background: var(--primary-color); color: #fff; }
.wiki-sidebar-group.open > button::after { transform: translateY(-50%) rotate(180deg); }
.wiki-sidebar-items {
    display: none;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
}
.wiki-sidebar-group.open .wiki-sidebar-items { display: block; }
.violation-group .wiki-sidebar-items {
    overflow-y: auto;
    max-height: 204px;
}
.violation-group .wiki-sidebar-items::-webkit-scrollbar {
    width: 5px;
}
.violation-group .wiki-sidebar-items::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 4px;
}
.violation-group .wiki-sidebar-items::-webkit-scrollbar-thumb:hover {
    background: #999;
}
.wiki-sidebar-group.open .wiki-sidebar-items { display: block; }
.wiki-sidebar-items a {
    display: block;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--text-gray);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s;
}
.wiki-sidebar-items a:last-child { border-bottom: none; }
.wiki-sidebar-items a:hover { background: #6c9fc7; color: #fff; }
.wiki-sidebar-items a.active { background: var(--primary-light); color: #fff; font-weight: 600; }

.wiki-main {
    flex: 1;
    min-width: 0;
}
.wiki-breadcrumb {
    font-size: 13px;
    color: var(--text-light-gray);
    margin-bottom: 16px;
}
.wiki-breadcrumb a { color: var(--primary-color); text-decoration: none; }
.wiki-breadcrumb a:hover { text-decoration: underline; }
.wiki-breadcrumb span { margin: 0 6px; }

.wiki-article { display: none; }
.wiki-article.active { display: block; }

.wiki-article h1 {
    font-size: 1.8em;
    color: var(--text-dark);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}
.wiki-lead {
    font-size: 15px;
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 20px;
}
.wiki-article h2 {
    font-size: 1.25em;
    color: var(--primary-dark);
    margin: 28px 0 10px 0;
    padding-left: 10px;
    border-left: 3px solid var(--primary-color);
}
.wiki-article h3 {
    font-size: 1.05em;
    color: var(--text-dark);
    margin: 18px 0 8px 0;
}
.wiki-article p, .wiki-article li {
    color: var(--text-gray);
    line-height: 1.8;
    font-size: 14px;
}
.wiki-article ul { padding-left: 20px; }
.wiki-article li { margin-bottom: 4px; }
.wiki-article code {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--primary-dark);
}
.wiki-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    background: var(--light-gray);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 20px;
}
.wiki-info-row div {
    font-size: 13px;
    color: var(--text-gray);
}
.wiki-info-row div span { margin-right: 6px; }
.wiki-info-row div strong {
    color: var(--text-dark);
    font-weight: 600;
}

.wiki-doc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 14px;
}
.wiki-doc-table th {
    background: var(--primary-color);
    color: #fff;
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
}
.wiki-doc-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-gray);
}
.wiki-doc-table tr:hover td { background: var(--light-gray); }
.wiki-doc-table th:first-child { border-radius: var(--radius) 0 0 0; }
.wiki-doc-table th:last-child { border-radius: 0 var(--radius) 0 0; }

.wiki-custom-block {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin: 14px 0;
    font-size: 14px;
}
.wiki-custom-block.warning {
    background: #fff8e1;
    border-left: 4px solid var(--warning);
    color: #555;
}
.wiki-custom-block.tip {
    background: #e8f5e9;
    border-left: 4px solid var(--success);
    color: #555;
}
.wiki-custom-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-dark);
}
.wiki-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 14px 0;
}
.wiki-steps div {
    flex: 1;
    min-width: 180px;
    background: var(--light-gray);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 14px;
}
.wiki-steps div span {
    display: inline-block;
    width: 26px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}
.wiki-steps div strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-dark);
    font-size: 14px;
}
.wiki-steps div p {
    font-size: 13px;
    color: var(--text-gray);
    margin: 0;
}
.wiki-doc-link {
    display: inline-block;
    background: var(--primary-color);
    color: #fff !important;
    padding: 8px 22px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    margin: 8px 0;
    transition: background 0.3s;
}
.wiki-doc-link:hover { background: var(--primary-dark); }

.wiki-group-btn {
    display: inline-block;
    background: #e3f2fd;
    color: #1565c0 !important;
    padding: 10px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    margin: 6px 0;
    border: 1px solid #bbdefb;
    transition: all 0.2s;
}
.wiki-group-btn:hover {
    background: #bbdefb;
    border-color: #90caf9;
}

.wiki-download-btn {
    display: inline-block;
    background: #fff3e0;
    color: #e65100 !important;
    padding: 10px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    margin: 6px 0;
    border: 1px solid #ffe0b2;
    transition: all 0.2s;
}
.wiki-download-btn:hover {
    background: #ffe0b2;
    border-color: #ffcc80;
}
.wiki-doc-footer {
    margin-top: 30px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}
.wiki-pager {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--light-gray);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px;
    color: var(--text-gray);
}
.wiki-pager:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.wiki-pager span { font-size: 12px; }
.wiki-pager strong { font-weight: 600; }
.wiki-doc-list { padding-left: 20px; }
.wiki-doc-list li { margin-bottom: 6px; }

/* 桌面端隐藏手机目录抽屉相关元素 */
.wiki-toggle-all {
    display: flex;
    gap: 6px;
    padding: 6px 14px 10px 14px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
}
.wiki-toggle-all button {
    flex: 1;
    background: var(--light-gray);
    border: 1px solid var(--border-color);
    padding: 5px 0;
    border-radius: var(--radius);
    font-size: 12px;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.2s;
}
.wiki-toggle-all button:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}
.wiki-sidebar-close, .wiki-sidebar-overlay, .wiki-drawer-btn, .wiki-drawer-spacer, .wiki-drawer-tip { display: none; }

/* 桌面端默认展开侧边栏分组 */

/* 手机端导航菜单在 wiki 页面不被抽屉按钮遮挡 */
@media (max-width: 768px) {
    .navbar { z-index: 1002 !important; }
}

/* 手机端 - 目录抽屉 */
@media (max-width: 768px) {
    .wiki-sidebar {
        position: fixed;
        top: 70px;
        left: 0;
        width: 280px;
        height: calc(100% - 70px);
        background: #fff;
        z-index: 1001;
        padding: 12px 16px;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 16px rgba(0,0,0,0.15);
        margin: 0;
    }
    .wiki-sidebar.open { transform: translateX(0); }
    .wiki-sidebar-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.4);
        z-index: 999;
    }
    .wiki-sidebar-overlay.show { display: block; }
    .wiki-sidebar-close {
        display: block;
        text-align: right;
        font-size: 24px;
        color: var(--text-gray);
        cursor: pointer;
        padding: 0 0 8px 0;
    }
    .wiki-drawer-btn {
        display: block;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        padding: 10px 20px;
        background: #f5f5f5;
        border-bottom: 1px solid var(--border-color);
        cursor: pointer;
        text-align: left;
        transition: background 0.2s;
        z-index: 1001;
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    }
    .wiki-drawer-btn:active { background: #e8e8e8; }
    .wiki-drawer-btn + .wiki-breadcrumb { margin-top: 48px; }
    .wiki-drawer-icon { color: var(--primary-color); font-size: 16px; }
    .wiki-drawer-label { color: var(--primary-color); font-size: 14px; font-weight: 600; }
    .wiki-drawer-hint { color: var(--text-light-gray); font-size: 12px; margin-left: 6px; }
    .wiki-drawer-tip { display: none !important; }

    .wiki-sidebar-group > button {
        padding: 12px 14px;
        font-size: 15px;
    }
    .wiki-sidebar-items a {
        padding: 10px 14px;
        font-size: 14px;
    }
    .wiki-sidebar-group:not(.open) > button::after {
        content: " ▼";
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 11px;
    }
    .wiki-layout { flex-direction: column; }
    .wiki-main { padding: 0; }
    .wiki-drawer-spacer { display: block; height: 50px; }
    .wiki-article h1, .wiki-article h2, .wiki-article h3 { scroll-margin-top: 130px; }
    .wiki-article h1 { font-size: 1.4em; }
    .wiki-article h2 { font-size: 1.1em; }
    .wiki-article p, .wiki-article li { font-size: 14px; line-height: 1.7; }
    .wiki-lead { font-size: 14px; }
    .wiki-info-row { flex-direction: column; gap: 8px; padding: 12px; }
    .wiki-info-row div { font-size: 14px; }
    .wiki-steps { flex-direction: column; }
    .wiki-steps div { min-width: unset; padding: 12px; }
      .wiki-doc-table th, .wiki-doc-table td { padding: 8px 10px; font-size: 13px; }
    .wiki-breadcrumb { font-size: 12px; margin-bottom: 10px; }
    .wiki-custom-block { padding: 10px 14px; font-size: 13px; }
    .wiki-pager { padding: 10px 16px; font-size: 13px; width: 100%; box-sizing: border-box; justify-content: center; }
    .wiki-doc-footer { margin-top: 20px; }
    .wiki-doc-link { padding: 8px 18px; font-size: 13px; width: 100%; box-sizing: border-box; text-align: center; }
    /* 赞助公示表格 - 移动端优化：百分比固定布局，自适应屏幕 */
    .wiki-doc-table.sponsor-table { display: table; width: 100%; table-layout: fixed; }
    .wiki-doc-table.sponsor-table th,
    .wiki-doc-table.sponsor-table td { white-space: normal; padding: 3px 2px; font-size: 11px; }
    .wiki-doc-table.sponsor-table th { text-align: center; }
    /* 序号列：9%，够显示序号二字 */
    .wiki-doc-table.sponsor-table th:nth-child(1),
    .wiki-doc-table.sponsor-table td:nth-child(1) { width: 8%; padding-right: 3px; padding-left: 0; text-align: center; }
    /* 玩家名：35%，上限110px≈16~17字符，超出截断 */
    .wiki-doc-table.sponsor-table th:nth-child(2),
    .wiki-doc-table.sponsor-table td:nth-child(2) { width: 35%; max-width: 110px; padding-left: 3px; padding-right: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
    /* 金额：18% */
    .wiki-doc-table.sponsor-table th:nth-child(3),
    .wiki-doc-table.sponsor-table td:nth-child(3) { width: 18%; white-space: nowrap; padding-left: 3px; padding-right: 3px; }
    /* 金额列的CNY标签紧凑显示 */
    .wiki-doc-table.sponsor-table td:nth-child(3) span {
        display: inline !important;
        padding: 0 2px !important;
        border-radius: 0 !important;
        background: transparent !important;
        font-size: 10px !important;
        color: #999 !important;
    }
    /* 日期：17% */
    .wiki-doc-table.sponsor-table th:nth-child(4),
    .wiki-doc-table.sponsor-table td:nth-child(4) { width: 17%; padding-left: 3px; padding-right: 3px; white-space: nowrap; }
    /* 支付方式：22%，右对齐 */
    .wiki-doc-table.sponsor-table th:nth-child(5),
    .wiki-doc-table.sponsor-table td:nth-child(5) { width: 22%; padding-left: 2px; padding-right: 2px; font-size: 11px; white-space: nowrap; text-align: right; }
    /* 支付方式标签紧凑 */
    .wiki-doc-table.sponsor-table td:nth-child(5) span {
        padding: 1px 5px !important;
        font-size: 10px !important;
    }
}
@media (min-width: 769px) {
    .wiki-doc-table.sponsor-table td { padding: 5px 8px; white-space: nowrap; }
    .wiki-doc-table.sponsor-table th { padding: 7px 8px; white-space: nowrap; }
}

/* ===== 客户端下载表样式（2026-09-25）===== */
.wiki-doc-table.dl-table { border-collapse: separate; border-spacing: 0; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 4px 16px rgba(60, 90, 60, .08); }
.wiki-doc-table.dl-table th { background: linear-gradient(120deg, #4a8a41 0%, #5DA552 55%, #7bc56f 100%); color: #fff; text-align: left; font-weight: 600; font-size: 13px; padding: 10px 10px; white-space: nowrap; }
.wiki-doc-table.dl-table td { padding: 10px 10px; border-bottom: 1px solid #eef2ee; vertical-align: middle; }
.wiki-doc-table.dl-table tbody tr:nth-child(even) td { background: #fafdfa; }
.wiki-doc-table.dl-table tbody tr:hover td { background: #f1f8f0; }
.wiki-doc-table.dl-table tbody tr:last-child td { border-bottom: none; }
.wiki-doc-table.dl-table td:first-child { font-weight: 700; color: #2f6b3a; white-space: nowrap; }
.wiki-doc-table.dl-table td.dl-date, .wiki-doc-table.dl-table td.dl-size { white-space: nowrap; color: #94a3b8; font-size: 13px; }
.wiki-doc-table.dl-table td.dl-count { white-space: nowrap; color: #4a8a41; font-weight: 700; font-size: 13px; }
.wiki-doc-table.dl-table td.dl-file { font-size: 13px; word-break: break-all; }
.wiki-doc-table.dl-table td.dl-file a { color: #5DA552; font-weight: 600; text-decoration: none; }
.wiki-doc-table.dl-table td.dl-file a:hover { text-decoration: underline; }

@media (max-width: 768px) {
    .wiki-doc-table.dl-table { display: block; overflow: visible; background: transparent; box-shadow: none; border-radius: 0; }
    .wiki-doc-table.dl-table thead { display: none; }
    .wiki-doc-table.dl-table tbody, .wiki-doc-table.dl-table tr { display: block; }
    .wiki-doc-table.dl-table tbody tr { background: #fff !important; border: 1px solid #e6efe6; border-radius: 12px; margin-bottom: 10px; padding: 10px 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, .04); }
    .wiki-doc-table.dl-table tbody tr:nth-child(even) td { background: transparent; }
    .wiki-doc-table.dl-table td { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: none; padding: 5px 0; text-align: left; background: transparent !important; }
    .wiki-doc-table.dl-table td::before { content: attr(data-label); color: #94a3b8; font-size: 12px; font-weight: 600; flex: 0 0 auto; }
    .wiki-doc-table.dl-table td:first-child { font-size: 15px; }
    .wiki-doc-table.dl-table td.dl-file { display: block; text-align: left; padding-top: 8px; margin-top: 6px; border-top: 1px dashed #e6efe6; }
    .wiki-doc-table.dl-table td.dl-file::before { display: none; }
}
