/* 表格容器样式 */
.table-container {
    margin: 20px 0;
    width: 100%;
    overflow-x: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: #fff;
}

/* 结果表格基础样式 */
.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background: #fff;
}

/* 表格标题样式 */
.results-table caption {
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    color: #2c3e50;
    caption-side: top;
}

/* 表头样式 */
.results-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.results-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.results-table th:last-child {
    border-right: none;
}

/* 表格主体样式 */
.results-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.results-table tbody tr:hover {
    background-color: #f8f9fa;
}

.results-table tbody tr:last-child {
    border-bottom: none;
}

.results-table td {
    padding: 12px 16px;
    border-right: 1px solid #e9ecef;
}

.results-table td:last-child {
    border-right: none;
}

/* 交替行颜色 */
.results-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.results-table tbody tr:nth-child(even):hover {
    background-color: #e9ecef;
}

/* 特殊单元格样式 */
.results-table td:first-child {
    font-weight: 500;
    color: #2c3e50;
}

/* 科学符号和数字样式 */
.results-table sup,
.results-table sub {
    font-size: 0.8em;
    line-height: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .table-container {
        margin: 15px 0;
        border-radius: 6px;
    }

    .results-table {
        font-size: 13px;
    }

    .results-table caption {
        font-size: 14px;
        padding: 10px 12px;
    }

    .results-table th,
    .results-table td {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .table-container {
        margin: 10px 0;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    }

    .results-table {
        font-size: 12px;
    }

    .results-table caption {
        font-size: 13px;
        padding: 8px 10px;
    }

    .results-table th,
    .results-table td {
        padding: 8px 10px;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .table-container {
        background: #2d3748;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .results-table {
        color: #e2e8f0;
        background: #2d3748;
    }

    .results-table caption {
        background: #4a5568;
        color: #e2e8f0;
        border-bottom-color: #718096;
    }

    .results-table thead {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    }

    .results-table tbody tr {
        border-bottom-color: #4a5568;
    }

    .results-table tbody tr:hover {
        background-color: #4a5568;
    }

    .results-table td {
        border-right-color: #4a5568;
    }

    .results-table tbody tr:nth-child(even) {
        background-color: #4a5568;
    }

    .results-table tbody tr:nth-child(even):hover {
        background-color: #718096;
    }

    .results-table td:first-child {
        color: #e2e8f0;
    }
}