/* Wiki 页面专用样式 */
:root {
    --wiki-bg: #1e1e1e;
    --wiki-sidebar-bg: #252526;
    --wiki-border: #3e3e42;
    --wiki-text: #cccccc;
    --wiki-heading: #ffffff;
    --wiki-link: #3794ff;
    --wiki-code-bg: #2d2d2d;
}

body.wiki-page {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../assets/images/bkground.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding-top: 80px; /* 为固定导航栏留出空间 */
}

.wiki-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

/* 侧边栏目录 */
.wiki-sidebar {
    background-color: var(--wiki-sidebar-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--wiki-border);
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.wiki-sidebar h3 {
    color: var(--wiki-heading);
    margin-bottom: 15px;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--wiki-border);
    padding-bottom: 10px;
}

.wiki-toc ul {
    list-style: none;
}

.wiki-toc li {
    margin-bottom: 8px;
}

.wiki-toc a {
    color: var(--wiki-text);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
    display: block;
    padding: 4px 8px;
    border-radius: 4px;
}

.wiki-toc a:hover, .wiki-toc a.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

/* 主要内容区域 */
.wiki-content {
    background-color: var(--wiki-bg);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--wiki-border);
    min-height: 80vh;
}

.wiki-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--wiki-border);
    padding-bottom: 20px;
}

.wiki-title h1 {
    font-size: 2.5rem;
    color: var(--wiki-heading);
    margin-bottom: 10px;
}

.wiki-breadcrumb {
    color: var(--wiki-text);
    font-size: 0.9rem;
}

/* 信息卡片 */
.server-info-box {
    background-color: #2d2d2d;
    border: 1px solid var(--mc-diamond);
    border-radius: 4px;
    width: 300px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    float: right;
    margin-left: 30px;
    margin-bottom: 20px;
}

.info-box-header {
    background-color: var(--mc-diamond);
    color: #000;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    font-family: 'Press Start 2P', cursive;
}

.info-box-image {
    width: 100%;
    height: 150px;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.info-box-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-box-content {
    padding: 15px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--mc-green);
    font-weight: bold;
}

.info-value {
    color: #fff;
}

/* 内容排版 */
.wiki-section {
    margin-bottom: 40px;
    /* clear: both;  移除此行以允许文字环绕信息卡片 */
}

.wiki-section h2 {
    font-size: 1.8rem;
    color: var(--mc-diamond);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
}

.wiki-section h3 {
    font-size: 1.4rem;
    color: #fff;
    margin: 25px 0 15px;
}

.wiki-section p {
    margin-bottom: 15px;
    color: var(--wiki-text);
    line-height: 1.8;
}

.wiki-section ul, .wiki-section ol {
    margin-bottom: 15px;
    padding-left: 25px;
    color: var(--wiki-text);
}

.wiki-section li {
    margin-bottom: 8px;
}

/* 命令表格 */
.command-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: #252526;
}

.command-table th, .command-table td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #444;
}

.command-table th {
    background-color: #333;
    color: var(--mc-diamond);
    font-weight: bold;
}

.command-table tr:nth-child(even) {
    background-color: #2a2a2b;
}

.command-table tr:hover {
    background-color: #333;
}

code {
    background-color: var(--wiki-code-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', monospace;
    color: #ff7b72;
}

/* 提示框 */
.wiki-alert {
    padding: 15px;
    border-left: 4px solid;
    margin: 20px 0;
    background-color: rgba(255, 255, 255, 0.05);
}

.wiki-alert.info {
    border-color: var(--mc-diamond);
}

.wiki-alert.warning {
    border-color: var(--accent-color);
}

/* 响应式 */
@media (max-width: 900px) {
    .wiki-container {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .wiki-sidebar {
        position: static;
        width: 100%;
        max-height: 300px;
        margin-bottom: 20px;
        overflow-y: auto;
    }

    .wiki-content {
        padding: 20px;
    }

    .server-info-box {
        float: none;
        width: 100%;
        margin: 0 0 20px 0;
    }
    
    .wiki-title h1 {
        font-size: 1.8rem;
    }
}
