/* 基础样式 */
* {
    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;
}

/* 头部样式 */
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: 12px;
}

.refresh-area {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

#refreshBtn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.3s;
}

#refreshBtn:hover {
    background-color: #45a049;
}

#countdown {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
}
#gongzhonghao {
    background-color: #FF0000;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    display: inline-block;
    margin: 0;
    cursor: default;
    transition: background-color 0.3s;
    white-space: nowrap;
    line-height: 1.4;
}

/* 响应式调整 */
@media (max-width: 768px) {
    #gongzhonghao {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
}

@media (max-width: 576px) {
    #gongzhonghao {
        font-size: 0.75rem;
        padding: 4px 8px;
        white-space: normal;
        text-align: center;
        line-height: 1.3;
    }
}
/* 主体内容 */
main {
    padding: 20px 15px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
}

.data-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.data-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.data-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.data-card h2 {
    color: #2a5298;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    text-align: center;
    font-size: 1.2rem;
}

/* 表格容器 */
.table-container {
    width: 100%;
    overflow-x: auto;
}

.table-row {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    min-width: 600px;
}

.table-cell {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    min-height: 80px;
    border-right: 1px solid #eee;
    text-align: center;
}

.table-cell:last-child {
    border-right: none;
}

.data-name {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: bold;
    text-align: center;
    line-height: 1.2;
}

.data-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    text-align: center;
    line-height: 1.2;
}

/* 收益率部分样式 - 左右并行排列 */
.yield-section {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 30px;
}

.yield-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 15px;
    flex: 1;
    min-width: 0;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.yield-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.yield-card h3 {
    color: #2a5298;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    text-align: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.yield-card .table-container {
    margin-top: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.yield-card .table-row {
    min-width: 300px;
    flex: 1;
}

.yield-card .table-cell {
    min-height: 120px; /* 增加高度以容纳说明文字 */
    padding: 12px 8px;
    position: relative;
}

/* 收益率单元格内部结构 - 优化后的布局 */
.yield-cell-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.yield-data-top {
    flex: 0 0 auto; /* 固定高度 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 10px;
    min-height: 70px; /* 固定最小高度 */
}

.yield-data-separator {
    height: 1px;
    background-color: #eee;
    margin: 5px 0;
    flex-shrink: 0;
}

.yield-data-bottom {
    flex: 1; /* 自适应高度 */
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.yield-data-desc {
    font-size: 0.75rem;
    color: #888;
    text-align: left;
    line-height: 1.3;
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.yield-card .data-name {
    font-size: 0.8rem;
}

.yield-card .data-value {
    font-size: 1rem;
}

/* 颜色样式 */
.red {
    color: red !important;
}

.green {
    color: green !important;
}

.black {
    color: black !important;
}

/* 页脚样式 */
footer {
    background: #1e3c72;
    color: white;
    text-align: center;
    padding: 15px;
    margin-top: auto;
    font-size: 0.85rem;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .table-cell {
        padding: 8px 6px;
    }
    
    .data-name {
        font-size: 0.8rem;
    }
    
    .data-value {
        font-size: 1rem;
    }
}

@media (max-width: 992px) {
    header h1 {
        font-size: 1.2rem;
        padding-right: 140px;
    }
    
    .refresh-area {
        top: 12px;
        right: 12px;
    }
    
    .data-card h2 {
        font-size: 1.1rem;
    }
    
    .yield-section {
        flex-wrap: wrap;
    }
    
    .yield-card {
        min-width: calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    header {
        padding: 12px 15px;
    }
    
    header h1 {
        font-size: 1.1rem;
        margin-bottom: 10px;
        padding-right: 120px;
    }
    
    .refresh-area {
        position: relative;
        top: 0;
        right: 0;
        justify-content: center;
        margin-top: 10px;
    }
    
    .data-card, .yield-card {
        padding: 12px;
    }
    
    .table-cell {
        padding: 6px 4px;
        min-height: 70px;
    }
    
    .yield-card .table-cell {
        min-height: 110px;
    }
    
    .data-name {
        font-size: 0.75rem;
        margin-bottom: 6px;
    }
    
    .data-value {
        font-size: 0.9rem;
    }
    
    .yield-data-desc {
        font-size: 0.7rem;
    }
    
    .yield-section {
        flex-direction: column;
    }
    
    .yield-card {
        min-width: 100%;
    }
    
    /* 移动端优化收益率模块 */
    .yield-data-top {
        min-height: 60px;
    }
}

@media (max-width: 576px) {
    header h1 {
        font-size: 1rem;
        padding-right: 0;
    }
    
    #refreshBtn, #countdown {
        font-size: 0.8rem;
        padding: 5px 8px;
    }
    
    .table-row {
        min-width: 500px;
    }
    
    .data-name {
        font-size: 0.7rem;
    }
    
    .data-value {
        font-size: 0.85rem;
    }
    
    .yield-data-desc {
        font-size: 0.65rem;
    }
    
    footer {
        padding: 12px;
        font-size: 0.8rem;
    }
    
    /* 移动端进一步优化 */
    .yield-data-top {
        min-height: 55px;
        padding-bottom: 8px;
    }
    
    .yield-data-bottom {
        padding-top: 8px;
    }
}