/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

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

/* 头部 */
header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

header .subtitle {
    color: #6c757d;
    font-size: 1rem;
    margin-bottom: 12px;
}

/* 刷新按钮 */
.refresh-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.refresh-btn:hover {
    background: #5a6268;
}

.refresh-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 甩锅区 */
.disclaimer {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.disclaimer-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.disclaimer-content {
    font-size: 0.9375rem;
    color: #555;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* 统计卡片 */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 600;
    color: #2c3e50;
}

/* 表格容器 */
.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f8f9fa;
}

th {
    padding: 16px 20px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e9ecef;
}

td {
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9375rem;
}

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

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

tbody tr:last-child td {
    border-bottom: none;
}

/* 操作标签样式 */
.operation-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.operation-tag.buy {
    background-color: #d4edda;
    color: #155724;
}

.operation-tag.sell {
    background-color: #f8d7da;
    color: #721c24;
}

.operation-tag.dca {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* 空状态和加载状态 */
.loading-row td {
    text-align: center;
    color: #6c757d;
    padding: 40px;
}

.empty-state {
    text-align: center;
    color: #6c757d;
    padding: 40px;
}

/* 底部 */
footer {
    text-align: center;
    margin-top: 40px;
    color: #adb5bd;
    font-size: 0.875rem;
}

/* 响应式 */
@media (max-width: 768px) {
    .container {
        padding: 24px 16px;
    }

    header h1 {
        font-size: 2rem;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .table-container {
        overflow-x: auto;
    }

    table {
        min-width: 700px;
    }

    th, td {
        padding: 12px 16px;
    }
}

/* 打印样式 */
@media print {
    body {
        background: white;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .stats {
        display: none;
    }

    footer {
        display: none;
    }
}
