/* ========================================
   DeepWeiqi 全站全局样式 V1.3
   最后更新：2026-06-09
   ======================================== */

/* 一、页面基础 */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* 修复 footer 间距问题 */
    justify-content: flex-start;
}

/* 二、内容容器（子页面统一最大宽度 480px） */
.page-container,
.container {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    padding: 0px;
    /* 核心修复：弹性撑开 + 盒模型统一 */
    flex: 1 0 auto;
    box-sizing: border-box;
}

/* 三、面包屑导航 */
.breadcrumb {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
    padding: 8px 0;
}
.breadcrumb a {
    color: #106450;
    text-decoration: none;
}
.breadcrumb a:hover {
    text-decoration: underline;
}
.breadcrumb .sep {
    margin: 0 6px;
    color: #aaa;
}
.breadcrumb .current {
    color: #1a1a1a;
    font-weight: 500;
}

/* 四、品牌标志色 */
.brand-color {
    color: #106450;
}
.brand-bg {
    background: #106450;
    color: #fff;
}

/* 五、公共组件对齐 */
.ps-search-wrapper {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.site-footer {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    margin-top: 16px;
    margin-bottom: 0;
}

/* 六、通用排名表格样式（V1.3） */
.ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    font-weight: 600;
    table-layout: fixed;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.ranking-table th {
    background: #106450;
    color: #fff;
    padding: 10px 4px;
    font-weight: 600;
    font-size: 15px;
    text-align: center;
    border: none;
}

.ranking-table td {
    padding: 10px 4px;
    text-align: center;
    border-bottom: 1px solid #d4e8e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    line-height: 1.9;
}

/* 偶数行 */
.ranking-table tbody tr:nth-child(even) {
    background: #f6faf8;
}

/* 奇数行 */
.ranking-table tbody tr:nth-child(odd) {
    background: #ffffff;
}

/* hover */
.ranking-table tbody tr:hover {
    background: #d4e8e1;
}

/* 男子姓名 */
.ranking-male {
    color: #0000FF;
    font-weight: 600;
}

/* 女子姓名 */
.ranking-female {
    color: #C00000;
    font-weight: 600;
}

/* 数值增减 */
.ranking-up {
    color: #FF0000;
}

.ranking-down {
    color: #00cc00;
}

/* 旧版兼容 */
.player-name {
    cursor: pointer;
}
.player-name:hover {
    text-decoration: underline;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* 移动端 */
@media (max-width: 480px) {
    .ranking-table {
        font-size: 14px;
    }
    .ranking-table th {
        font-size: 14px;
        padding: 8px 2px;
    }
    .ranking-table td {
        padding: 8px 2px;
        font-size: 14px;
    }
}

/* ========== 打印样式 ========== */
@media print {
    /* 全局重置 */
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 12pt;
        padding: 0;
    }

    /* 隐藏不需要打印的元素 */
    .breadcrumb,
    .search-bar,
    .pk-search-bar,
    .local-search-wrapper,
    .ns-search-wrapper,
    .page-info-bar,
    .info-links,
    .select-bar,
    .upload-area,
    .action-bar,
    .expand-btn,
    .round-nav,
    #footer-placeholder,
    #snapshotIndicator,
    button,
    input,
    select {
        display: none !important;
    }

    /* 容器自适应 */
    .container {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* 卡片去除阴影和圆角 */
    .result-card,
    .calc-card,
    .section {
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin-bottom: 12pt !important;
    }

    /* 表格优化 */
    .ranking-table,
    .record-table {
        font-size: 10pt;
        border: 1px solid #000;
    }
    .ranking-table th,
    .record-table th {
        background: #eee !important;
        color: #000 !important;
        border: 1px solid #000;
    }
    .ranking-table td,
    .record-table td {
        border: 1px solid #000;
        color: #000;
    }
    .ranking-table tr:nth-child(even),
    .record-table tr:nth-child(even) {
        background: #f9f9f9 !important;
    }

    /* 链接颜色 */
    a {
        color: #000 !important;
        text-decoration: none;
    }

    /* 图片不过大 */
    .detail-image {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    /* 分页优化 */
    table {
        page-break-inside: auto;
    }
    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
}