@charset "utf-8";
/* CSS Document */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding: 0;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 95%;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 15px 20px;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

header h1 {
    font-size: 1.4rem;
    margin-bottom: 0;
}

.info-box {
    display: flex;
    justify-content: space-around;
    padding: 15px;
    background-color: #e8f0fe;
    border-bottom: 1px solid #ddd;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
}

.info-item {
    display: inline-block;
    text-align: center;
    min-width: 120px;
    flex-shrink: 0;
    margin: 0 10px;
}

.info-item span {
    display: block;
    font-size: 14px;
    color: #666;
    white-space: nowrap;
}

.info-item strong {
    font-size: 16px;
    color: #2c3e50;
    white-space: nowrap;
}

.table-container {
    overflow-x: auto;
    padding: 20px;
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th, td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
}

th {
    background-color: #f2f6fc;
    color: #2c3e50;
    font-weight: bold;
}

tr:hover {
    background-color: #f8f9fa;
}

/* 正数显示红色 */
td.positive {
    color: #e74c3c;
    font-weight: bold;
}

/* 负数显示绿色 */
td.negative {
    color: #2ecc71;
    font-weight: bold;
}

/* 移动端表格样式 */
.mobile-table {
    display: none;
}

.mobile-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid #ddd;
    padding: 12px 5px;
}

.mobile-row.header {
    background-color: #f2f6fc;
    font-weight: bold;
    color: #2c3e50;
}

.mobile-cell {
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 5px;
}

.mobile-cell.positive {
    color: #e74c3c;
    font-weight: bold;
}

.mobile-cell.negative {
    color: #2ecc71;
    font-weight: bold;
}

footer {
    padding: 15px;
    text-align: center;
    background-color: #f2f6fc;
    color: #666;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .info-box {
        padding: 10px;
        justify-content: space-between;
    }
    
    .info-item {
        min-width: 110px;
        padding: 0 5px;
        margin: 0;
    }
    
    .info-item span {
        font-size: 12px;
    }
    
    .info-item strong {
        font-size: 14px;
    }
    
    th, td {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    header h1 {
        font-size: 1.2rem;
    }
    
    .container {
        margin: 10px auto;
        width: 100%;
        border-radius: 0;
    }
    
    /* 在移动端隐藏常规表格，显示移动端表格 */
    table {
        display: none;
    }
    
    .mobile-table {
        display: block;
    }
    
    .mobile-row {
        grid-template-columns: repeat(4, 1fr);
        padding: 10px 5px;
    }
    
    .mobile-cell {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .info-item {
        min-width: 100px;
    }
    
    .info-item span {
        font-size: 11px;
    }
    
    .info-item strong {
        font-size: 13px;
    }
    
    .table-container {
        padding: 10px;
    }
    
    th, td {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .mobile-row {
        padding: 8px 3px;
    }
    
    .mobile-cell {
        font-size: 12px;
        padding: 0 3px;
    }
}