/**
 * 表格样式 - 期货一键查网站
 */

/* 表格头部样式 */
.table-header {
    background-color: #e0f4f9;
    color: #333;
    font-weight: 500;
    text-align: center;
    border-bottom: 1px solid #ddd;
    font-size: 0.9rem;
}

.exchange-header {
    background-color: #e0f4f9;
    font-weight: bold;
    color: #0275d8;
    text-align: center;
    padding: 10px;
    font-size: 1.5rem;
}

/* 表格基础样式 */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
    table-layout: auto;
}

.table th, .table td {
    text-align: center;
    vertical-align: middle;
    padding: 0.4rem;
    font-size: 0.85rem;
    border: 1px solid #dee2e6;
}

.table th {
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #e0f4f9; /* 统一表头背景色 */
}

.table td {
    word-wrap: break-word;
    max-width: 150px;
}

/* 条纹表格样式 */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* 高亮和文本颜色 */
.text-rise {
    color: #d9534f; /* 上涨红色 */
}

.text-fall {
    color: #5cb85c; /* 下跌绿色 */
}

/* 背景颜色 */
.bg-rise {
    background-color: rgba(217, 83, 79, 0.1); /* 淡红色背景 */
}

.bg-fall {
    background-color: rgba(92, 184, 92, 0.1); /* 淡绿色背景 */
}

/* 涨跌停板颜色 */
.price-rise {
    background-color: rgba(217, 83, 79, 0.1); /* 淡红色背景 */
    color: #d9534f;
}

.price-fall {
    background-color: rgba(92, 184, 92, 0.1); /* 淡绿色背景 */
    color: #5cb85c;
}

.bg-highlight {
    background-color: #fff8e1;
}

.small-text {
    font-size: 0.75rem;
}

/* 响应式表格 */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    border-radius: 4px;
}

/* 移动设备上的表格优化 */
@media (max-width: 767px) {
    .table th, .table td {
        padding: 0.3rem;
        font-size: 0.75rem;
    }
    
    .table td {
        max-width: 100px;
    }
}

/* 交易所分类样式 */
.exchange-section {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.exchange-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #0275d8;
    padding-bottom: 8px;
    display: inline-block;
}

/* 期权表格特定样式 */
.options-table th {
    background-color: #e0f4f9; /* 与期货表格统一表头背景色 */
}

.options-table thead tr:first-child th {
    background-color: #e0f4f9; /* 统一表头背景色 */
}

.options-table thead tr:nth-child(2) th {
    background-color: #f0f9fc; /* 稍微浅一点的背景色，区分层次 */
}

.options-table tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02); /* 与期货表格统一条纹色 */
}

.options-table tr:hover {
    background-color: rgba(0, 123, 255, 0.05); /* 统一悬停效果 */
} 