/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #0b0e11;
    color: #eaecef;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid #1e2329;
}

h1 {
    font-size: 2.5em;
    color: #f0b90b;
    margin-bottom: 10px;
}

.subtitle {
    color: #848e9c;
    font-size: 1.1em;
}

/* 控制栏样式 */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #181a20;
    border-radius: 8px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #f0b90b;
    color: #0b0e11;
    font-weight: bold;
}

.btn-primary:hover {
    background-color: #d4a10a;
    transform: translateY(-1px);
}

.auto-refresh {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #848e9c;
}

.auto-refresh input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* 状态提示样式 */
.status {
    text-align: center;
    padding: 20px;
}

.loading {
    color: #f0b90b;
    font-size: 1.2em;
}

.error {
    color: #f6465d;
    padding: 20px;
    background-color: rgba(246, 70, 93, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(246, 70, 93, 0.3);
}

.error button {
    margin-top: 10px;
    padding: 8px 16px;
    background-color: #f6465d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* 信息框样式 */
.info-box {
    background-color: #181a20;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-box p {
    margin: 0;
    color: #848e9c;
}

.update-time {
    color: #00d395;
}

/* 表格容器样式 */
.tables-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.table-section {
    background-color: #181a20;
    border-radius: 8px;
    padding: 20px;
}

.table-title {
    color: #f0b90b;
    font-size: 1.5em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0b90b;
}

/* 表格样式 */
.volatility-table {
    width: 100%;
    background-color: transparent;
    border-collapse: collapse;
}

thead {
    background-color: #1e2329;
}

th {
    padding: 15px 10px;
    text-align: left;
    font-weight: 600;
    color: #848e9c;
    font-size: 0.9em;
    text-transform: uppercase;
}

td {
    padding: 12px 10px;
    border-top: 1px solid #1e2329;
}

tbody tr {
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background-color: #1e2329;
}

/* 高波动率行高亮 */
.high-volatility {
    background-color: rgba(240, 185, 11, 0.1);
}

.medium-volatility {
    background-color: rgba(240, 185, 11, 0.05);
}

/* 特定列样式 */
.rank {
    font-weight: bold;
    color: #f0b90b;
    text-align: center;
}

.symbol {
    font-weight: 600;
    color: #eaecef;
}

.price {
    color: #eaecef;
    font-family: 'Courier New', monospace;
}

.price-up {
    color: #00d395;
    font-weight: 600;
}

.price-down {
    color: #f6465d;
    font-weight: 600;
}

.volatility-score {
    font-weight: 600;
    color: #f0b90b;
}

.leverage {
    color: #00d395;
    font-weight: 600;
}

.notional {
    text-align: right;
    font-family: 'Courier New', monospace;
}

/* 图例说明样式 */
.legend {
    margin-top: 30px;
    padding: 20px;
    background-color: #181a20;
    border-radius: 8px;
}

.legend h3 {
    color: #f0b90b;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.legend ul {
    list-style: none;
    padding-left: 0;
}

.legend li {
    margin-bottom: 10px;
    color: #848e9c;
    padding-left: 20px;
    position: relative;
}

.legend li:before {
    content: "•";
    color: #f0b90b;
    position: absolute;
    left: 0;
}

.legend strong {
    color: #eaecef;
}

/* 页脚样式 */
footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #1e2329;
    text-align: center;
}

footer p {
    color: #f6465d;
    font-size: 0.9em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8em;
    }
    
    .controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .info-box {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    table {
        font-size: 0.9em;
    }
    
    th, td {
        padding: 8px 5px;
    }
    
    .legend {
        padding: 15px;
    }
}

/* 加载动画 */
.loading:after {
    content: '';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60% {
        content: '...';
    }
    80%, 100% {
        content: '';
    }
}