/* ============================================
   Crypto Dashboard - Professional Light Theme
   Style: Minimalism & Swiss Style
   Color: Clean Light + Trust Blue
   Typography: Space Grotesk + DM Sans
   ============================================ */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* CSS Variables - Light Theme Design Tokens */
:root {
    /* Colors - Professional Light Palette */
    --primary: #2563EB;
    --primary-light: #3B82F6;
    --primary-dark: #1D4ED8;
    --secondary: #8B5CF6;
    --secondary-light: #A78BFA;
    --accent: #F59E0B;
    --accent-light: #FBBF24;

    /* Background Layers - Light Mode */
    --bg-base: #F8FAFC;
    --bg-surface: #FFFFFF;
    --bg-elevated: #F1F5F9;
    --bg-hover: #E2E8F0;

    /* Text Colors - High Contrast for Light Mode */
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #64748B;

    /* Semantic Colors */
    --success: #10B981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --danger: #EF4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --warning: #F59E0B;
    --info: #3B82F6;

    /* Borders & Effects - Light Mode */
    --border-color: #E2E8F0;
    --border-light: #F1F5F9;
    --shadow-color: rgba(15, 23, 42, 0.08);

    /* Spacing Scale */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease-out;
    --transition-base: 250ms ease-out;
    --transition-slow: 350ms ease-out;

    /* Shadows - Light Mode */
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 24px rgba(15, 23, 42, 0.1), 0 4px 8px rgba(15, 23, 42, 0.06);
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局触摸优化 */
html {
    /* 移动端平滑滚动 */
    -webkit-tap-highlight-color: transparent;
    /* 改善触摸响应 */
    touch-action: manipulation;
}

/* iOS Safari 优化 */
@supports (-webkit-touch-callout: none) {
    body {
        /* 防止 iOS 双击缩放 */
        touch-action: pan-x pan-y;
    }
}

/* 改善文本选择 */
::selection {
    background: rgba(37, 99, 235, 0.2);
    color: var(--text-primary);
}

/* Base Body - Light Theme */
body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-base);
    min-height: 100vh;
    padding: var(--space-lg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
}

/* 移动端内容区域优化 */
@supports (padding: env(safe-area-inset-bottom)) {
    body {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

/* ============================================
   Header Section
   ============================================ */
.header {
    text-align: center;
    margin-bottom: var(--space-xl);
    padding: var(--space-lg) 0;
}

/* 移动端 header 吸顶 */
@media (max-width: 768px) {
    .header {
        position: sticky;
        top: 0;
        z-index: 100;
        background: var(--bg-base);
        padding: var(--space-md) 0;
        margin-bottom: var(--space-md);
        border-bottom: 1px solid var(--border-color);
        backdrop-filter: blur(10px);
        background: rgba(248, 250, 252, 0.9);
    }
}

.header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.header p {
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

/* ============================================
   Symbol Selector - Pill Buttons
   ============================================ */
.symbol-selector {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    padding: var(--space-sm);
    background: var(--bg-surface);
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* 移动端 symbol selector 吸顶 */
@media (max-width: 768px) {
    .symbol-selector {
        position: sticky;
        top: 60px;
        z-index: 99;
        width: 100%;
        justify-content: space-between;
        padding: var(--space-xs);
        margin-bottom: var(--space-md);
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        box-shadow: var(--shadow-md);
    }
}

.symbol-btn {
    padding: var(--space-sm) var(--space-lg);
    border: 2px solid transparent;
    background: transparent;
    border-radius: var(--radius-full);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    /* 确保触摸区域足够大 */
    min-height: 44px;
    min-width: 44px;
    -webkit-tap-highlight-color: transparent;
}

.symbol-btn:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.symbol-btn:active {
    transform: scale(0.96);
}

.symbol-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.symbol-btn .icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ============================================
   Stats Grid - Clean Cards
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.stat-card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    /* 移动端触摸优化 */
    touch-action: manipulation;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity var(--transition-base);
}

@media (hover: hover) {
    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

    .stat-card:hover::before {
        opacity: 1;
    }
}

.stat-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-card .value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.stat-card .value.positive {
    color: var(--success);
}

.stat-card .value.negative {
    color: var(--danger);
}

.stat-card .value.highlight {
    color: var(--primary);
}

.stat-card .sub-value {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

/* ============================================
   Charts Grid
   ============================================ */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

/* Chart Section - Clean Card */
.chart-section {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

/* PC 端 hover 效果 */
@media (hover: hover) {
    .chart-section:hover {
        box-shadow: var(--shadow-md);
        border-color: rgba(37, 99, 235, 0.3);
        transform: translateY(-2px);
    }

    .chart-section:active {
        transform: translateY(0);
    }
}

.chart-section.full-width {
    grid-column: 1 / -1;
}

.chart-section h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.chart-section h2::before {
    content: '';
    width: 4px;
    height: 16px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 2px;
    flex-shrink: 0;
}

.chart-container {
    position: relative;
    min-height: 200px;
}

.chart-container canvas {
    max-height: 240px;
}

.chart-section.full-width .chart-container canvas {
    max-height: 320px;
}

/* ============================================
   Lazy Loading Styles
   ============================================ */
.chart-section.chart-loading {
    opacity: 0.6;
    pointer-events: none;
}

.chart-section.chart-loading .chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(148, 163, 184, 0.05) 0%,
        rgba(148, 163, 184, 0.15) 50%,
        rgba(148, 163, 184, 0.05) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.chart-section.chart-loaded {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Time Range Selector
   ============================================ */
.range-container {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.range-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.range-header h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.range-dates {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
}

#timeRange {
    margin: var(--space-sm) var(--space-md);
}

/* noUiSlider Custom Light Theme */
.noUi-target {
    background: var(--bg-elevated);
    border: none;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.1);
    height: 8px;
    border-radius: 4px;
}

.noUi-connect {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
}

.noUi-handle {
    border: none;
    background: var(--bg-surface);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15), 0 0 0 2px var(--primary);
    border-radius: 50%;
    width: 20px !important;
    height: 20px !important;
    right: -10px !important;
    top: -6px !important;
    cursor: grab;
    transition: box-shadow var(--transition-fast);
}

.noUi-handle:hover {
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2), 0 0 0 3px var(--primary);
}

.noUi-handle:before,
.noUi-handle:after {
    display: none;
}

.noUi-handle:active {
    cursor: grabbing;
}

/* Quick Buttons */
.quick-btns {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    flex-wrap: wrap;
}

.quick-btn {
    padding: var(--space-xs) var(--space-md);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    border-radius: var(--radius-full);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    /* 确保触摸区域足够大 */
    min-height: 40px;
    min-width: 44px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

@media (hover: hover) {
    .quick-btn:hover {
        border-color: var(--primary);
        color: var(--primary);
        background: rgba(37, 99, 235, 0.05);
    }
}

.quick-btn:active {
    transform: scale(0.96);
}

.quick-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ============================================
   Loading & Status
   ============================================ */
.loading {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: var(--space-sm);
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error {
    text-align: center;
    padding: var(--space-xl);
    color: var(--danger);
}

/* ============================================
   Badges
   ============================================ */
.realtime-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: linear-gradient(135deg, var(--success), #34D399);
    color: white;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.6rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.realtime-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* Exchange & Data Source Badges */
.okx-badge {
    display: inline-block;
    padding: 4px 14px;
    background: linear-gradient(135deg, #1E90FF, #0066CC);
    color: white;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    letter-spacing: 0.02em;
}

.okx-badge-small {
    display: inline-block;
    padding: 2px 8px;
    background: linear-gradient(135deg, #1E90FF, #0066CC);
    color: white;
    font-size: 0.6rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    margin-left: var(--space-sm);
}

.exchange-tag {
    display: inline-block;
    padding: 2px 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.55rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.exchange-tag.binance {
    background: rgba(243, 186, 47, 0.15);
    color: #B8860B;
    border: 1px solid rgba(243, 186, 47, 0.4);
}

.exchange-tag.okx {
    background: rgba(30, 144, 255, 0.1);
    color: #1E90FF;
    border: 1px solid rgba(30, 144, 255, 0.3);
}

.coingecko-badge {
    background: linear-gradient(135deg, #8DC63F, #6AAA2A);
    color: white;
    padding: 4px 14px;
    border-radius: var(--radius-full);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    margin-right: var(--space-sm);
}

.mempool-badge {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: white;
    padding: 4px 14px;
    border-radius: var(--radius-full);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    margin-right: var(--space-sm);
}

.mempool-badge-small {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: white;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.6rem;
    font-weight: 500;
    margin-left: var(--space-sm);
}

.blockchain-badge {
    background: linear-gradient(135deg, #64748B, #475569);
    color: white;
    padding: 4px 14px;
    border-radius: var(--radius-full);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    margin-right: var(--space-sm);
}

/* ============================================
   Section Title
   ============================================ */
.section-title {
    margin: var(--space-xl) 0 var(--space-md);
    padding: 0 var(--space-xs);
}

.section-title h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.section-title h2::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-color), transparent);
    margin-left: var(--space-md);
}

/* ============================================
   Liquidation Section
   ============================================ */
.liquidation-section {
    min-height: 280px;
}

.liquidation-container {
    max-height: 240px;
    overflow-y: auto;
    padding: var(--space-xs);
    /* 移动端滚动优化 */
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* 移动端清算列表优化 */
@media (max-width: 768px) {
    .liquidation-section {
        min-height: 240px;
    }

    .liquidation-container {
        max-height: 200px;
    }

    .liquidation-item {
        flex-wrap: wrap;
        gap: var(--space-xs);
    }

    .liq-time {
        width: 100%;
        text-align: right;
        font-size: 0.65rem;
    }
}

.no-liquidation {
    text-align: center;
    color: var(--text-muted);
    padding: var(--space-xl) var(--space-md);
    font-size: 0.85rem;
}

.liquidation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    animation: slideIn 0.3s ease-out;
    /* 移动端触摸优化 */
    touch-action: manipulation;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.liquidation-long {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.03));
    border-left: 3px solid var(--danger);
}

.liquidation-short {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.03));
    border-left: 3px solid var(--success);
}

.liq-side {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    min-width: 65px;
}

.liquidation-long .liq-side { color: var(--danger); }
.liquidation-short .liq-side { color: var(--success); }

.liq-price {
    color: var(--text-primary);
    font-weight: 500;
}

.liq-value {
    color: var(--primary);
    font-weight: 600;
}

.liq-time {
    color: var(--text-muted);
    font-size: 0.7rem;
}

/* Custom Scrollbar - Light Theme */
.liquidation-container::-webkit-scrollbar {
    width: 6px;
}

.liquidation-container::-webkit-scrollbar-track {
    background: var(--bg-elevated);
    border-radius: 3px;
}

.liquidation-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.liquidation-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   Liquidation Stats
   ============================================ */
.liquidation-stats-section {
    min-height: 280px;
}

.liquidation-stats-container {
    padding: var(--space-sm);
}

.liq-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.liq-stat-section {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    border: 1px solid var(--border-color);
}

.liq-stat-section h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    text-align: center;
    font-weight: 500;
}

.liq-stat-row {
    display: flex;
    gap: var(--space-sm);
}

.liq-stat-item {
    flex: 1;
    text-align: center;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
}

.liq-stat-item.liq-long {
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.liq-stat-item.liq-short {
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.liq-stat-label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.liq-stat-value {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
}

.liq-stat-item.liq-long .liq-stat-value { color: var(--danger); }
.liq-stat-item.liq-short .liq-stat-value { color: var(--success); }

.liq-stat-count {
    display: block;
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Liquidation Ratio Bar */
.liq-ratio-bar {
    display: flex;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    margin-top: var(--space-sm);
    background: var(--bg-elevated);
}

.liq-ratio-long {
    background: linear-gradient(90deg, var(--danger), #F87171);
    transition: width var(--transition-base);
}

.liq-ratio-short {
    background: linear-gradient(90deg, var(--success), #34D399);
    transition: width var(--transition-base);
}

.liq-ratio-labels {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-xs);
    font-size: 0.65rem;
    color: var(--text-muted);
}

.liq-ratio-labels span:first-child { color: var(--danger); }
.liq-ratio-labels span:last-child { color: var(--success); }

/* ============================================
   Global Market Panel (CoinGecko)
   ============================================ */
.global-market-section {
    min-height: auto;
}

.global-market-container {
    padding: var(--space-md);
}

.global-market-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.global-card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

@media (hover: hover) {
    .global-card:hover {
        box-shadow: var(--shadow-md);
        border-color: rgba(16, 185, 129, 0.3);
        transform: translateY(-2px);
    }

    .global-card:active {
        transform: translateY(0);
    }
}

.global-card h4 {
    margin: 0 0 var(--space-md) 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.global-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.global-stat {
    display: flex;
    flex-direction: column;
}

.global-stat.main-stat {
    grid-column: span 2;
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--space-xs);
}

.global-stat .stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.global-stat .stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.main-stat .stat-value {
    font-size: 1.6rem;
}

.stat-change {
    font-size: 0.8rem;
    margin-top: var(--space-xs);
}

.stat-change.positive { color: var(--success); }
.stat-change.negative { color: var(--danger); }

/* Dominance Bars */
.dominance-bars {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.dominance-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.dominance-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.dominance-bar {
    height: 10px;
    background: var(--bg-elevated);
    border-radius: 5px;
    overflow: hidden;
}

.dominance-fill {
    height: 100%;
    border-radius: 5px;
    transition: width var(--transition-base);
}

.dominance-fill.btc { background: linear-gradient(90deg, #F7931A, #E67E22); }
.dominance-fill.eth { background: linear-gradient(90deg, #627EEA, #8B5CF6); }
.dominance-fill.other { background: linear-gradient(90deg, #8B5CF6, #A78BFA); }

/* Trending List */
.trending-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    max-height: 220px;
    overflow-y: auto;
    /* 移动端滚动优化 */
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* 移动端 trending 列表优化 */
@media (max-width: 768px) {
    .trending-list {
        max-height: 180px;
    }
}

.trending-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
    cursor: pointer;
    /* 移动端触摸优化 */
    touch-action: manipulation;
    min-height: 48px;
}

@media (hover: hover) {
    .trending-item:hover {
        background: var(--bg-hover);
        border-color: var(--primary);
    }
}

.trending-item:active {
    transform: scale(0.98);
}

.trending-rank {
    font-size: 0.7rem;
    color: var(--text-muted);
    min-width: 24px;
}

.trending-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.trending-name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.trending-score {
    font-size: 0.7rem;
    color: var(--primary);
}

/* ============================================
   BTC Network Panel
   ============================================ */
.btc-network-container {
    padding: var(--space-md);
}

.btc-network-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

.network-card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

@media (hover: hover) {
    .network-card:hover {
        box-shadow: var(--shadow-md);
        border-color: rgba(59, 130, 246, 0.3);
        transform: translateY(-2px);
    }

    .network-card:active {
        transform: translateY(0);
    }
}

.network-card h4 {
    margin: 0 0 var(--space-md) 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--info);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Fee Items */
.fee-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.fee-item {
    display: flex;
    flex-direction: column;
    padding: var(--space-sm);
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.fee-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.fee-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--info);
}

/* Mempool Stats */
.mempool-stats {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.mempool-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

.mempool-stat:last-child {
    border-bottom: none;
}

.mempool-stat .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.mempool-stat .stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Difficulty Info */
.difficulty-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.diff-progress {
    position: relative;
    height: 28px;
    background: var(--bg-elevated);
    border-radius: 14px;
    overflow: hidden;
}

.diff-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--info), var(--secondary));
    border-radius: 14px;
    transition: width var(--transition-base);
}

.diff-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.diff-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.diff-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.diff-item span:first-child {
    color: var(--text-muted);
}

.diff-item span:last-child {
    font-weight: 600;
    color: var(--text-primary);
}

.diff-item span.positive { color: var(--success); }
.diff-item span.negative { color: var(--danger); }

/* Hashrate Info */
.hashrate-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.hashrate-main {
    text-align: center;
    padding: var(--space-md);
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.03));
    border-radius: var(--radius-md);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.hashrate-value {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
}

.hashrate-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

.hashrate-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.hashrate-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.hashrate-item span:first-child {
    color: var(--text-muted);
}

.hashrate-item span:last-child {
    font-weight: 600;
    color: var(--text-primary);
}

/* No Data Placeholder */
.no-data {
    text-align: center;
    color: var(--text-muted);
    padding: var(--space-xl);
    font-size: 0.9rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-muted);
    font-size: 0.75rem;
    border-top: 1px solid var(--border-color);
    margin-top: var(--space-xl);
}

.footer p {
    margin: var(--space-sm) 0;
}

.footer-credit {
    margin-top: var(--space-md) !important;
}

.footer-credit a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.footer-credit a:hover {
    text-decoration: underline;
}

/* ============================================
   BTC Network Section Visibility
   ============================================ */
.btc-network-section {
    display: none;
}

body[data-symbol="BTC"] .btc-network-section {
    display: block;
}

/* ============================================
   Price Flash Animation
   ============================================ */
.price-flash {
    animation: priceFlash 0.4s ease-out;
}

@keyframes priceFlash {
    0% { background-color: rgba(37, 99, 235, 0.2); }
    100% { background-color: transparent; }
}

/* ============================================
   Chart Legend
   ============================================ */
.chart-legend {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-top: var(--space-sm);
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* ============================================
   Responsive - Large Desktop (1400px+)
   ============================================ */
@media (min-width: 1400px) {
    .charts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   Responsive - Desktop (1024px - 1399px)
   ============================================ */
@media (min-width: 1024px) and (max-width: 1399px) {
    .charts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   Responsive - Tablet (768px - 1023px)
   ============================================ */
@media (min-width: 768px) and (max-width: 1023px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-sm);
    }

    .stat-card {
        padding: var(--space-md) var(--space-sm);
    }

    .stat-card h3 {
        font-size: 0.65rem;
    }

    .stat-card .value {
        font-size: 1.1rem;
    }

    .charts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }

    .chart-section {
        padding: var(--space-md);
    }

    .chart-container {
        min-height: 180px;
    }

    .chart-container canvas {
        max-height: 220px;
    }

    .chart-section.full-width .chart-container canvas {
        max-height: 280px;
    }

    /* 符号选择器优化 */
    .symbol-selector {
        width: 100%;
        justify-content: center;
    }

    .symbol-btn {
        padding: var(--space-sm) var(--space-md);
    }

    /* 时间范围选择器优化 */
    .range-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }

    .quick-btns {
        justify-content: space-between;
    }

    .quick-btn {
        flex: 1;
        text-align: center;
    }
}

/* ============================================
   Responsive - Large Tablet/Desktop (1200px - 1399px)
   ============================================ */
@media (max-width: 1200px) {
    .global-market-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .btc-network-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   Responsive - Mobile (768px and below)
   ============================================ */
@media (max-width: 768px) {
    /* 减少整体内边距，增加内容空间 */
    body {
        padding: var(--space-xs);
    }

    .header h1 {
        font-size: 1.25rem;
    }

    .symbol-selector {
        padding: var(--space-xs);
        border-radius: var(--radius-md);
        gap: 4px;
    }

    .symbol-btn {
        padding: 6px var(--space-sm);
        font-size: 0.75rem;
    }

    /* Stat 卡片优化 - 更紧凑 */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        margin-bottom: var(--space-md);
    }

    .stat-card {
        padding: var(--space-xs) var(--space-xs);
        border-radius: var(--radius-sm);
    }

    .stat-card h3 {
        font-size: 0.6rem;
        margin-bottom: 2px;
    }

    .stat-card .value {
        font-size: 0.95rem;
    }

    .stat-card .sub-value {
        font-size: 0.55rem;
    }

    /* 图表网格优化 */
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 8px;
    }

    .chart-section {
        padding: var(--space-sm);
        border-radius: var(--radius-sm);
    }

    .chart-section h2 {
        font-size: 0.75rem;
        margin-bottom: 6px;
        padding-bottom: 4px;
    }

    .chart-section h2::before {
        height: 12px;
    }

    /* 图表容器优化 - 减少高度以展示更多图表 */
    .chart-container {
        min-height: 140px;
    }

    .chart-container canvas {
        max-height: 160px !important;
    }

    .chart-section.full-width .chart-container canvas {
        max-height: 180px !important;
    }

    /* 全局市场面板优化 */
    .global-market-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .global-card {
        padding: var(--space-sm);
        border-radius: var(--radius-sm);
    }

    .global-card h4 {
        font-size: 0.85rem;
        margin-bottom: var(--space-xs);
    }

    .global-stat .stat-value {
        font-size: 1rem;
    }

    .main-stat .stat-value {
        font-size: 1.3rem;
    }

    /* BTC 网络面板优化 */
    .btc-network-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .network-card {
        padding: var(--space-sm);
        border-radius: var(--radius-sm);
    }

    .network-card h4 {
        font-size: 0.8rem;
        margin-bottom: var(--space-xs);
    }

    /* 内部网格优化 */
    .fee-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }

    .fee-item {
        padding: 6px;
    }

    .global-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }

    .liq-stats-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    /* 时间范围选择器优化 - 横向滚动 */
    .range-container {
        padding: var(--space-sm);
        margin-bottom: var(--space-sm);
    }

    .range-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-xs);
        margin-bottom: var(--space-xs);
    }

    .range-header h3 {
        font-size: 0.75rem;
    }

    .range-dates {
        font-size: 0.7rem;
    }

    #timeRange {
        margin: var(--space-xs) 0;
    }

    .quick-btns {
        display: flex;
        gap: 4px;
        overflow-x: auto;
        padding-bottom: 4px;
        /* 横向滚动优化 */
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .quick-btns::-webkit-scrollbar {
        display: none;
    }

    .quick-btn {
        flex: 0 0 auto;
        padding: 6px 10px;
        font-size: 0.65rem;
        min-height: 28px;
    }

    /* Section title 优化 */
    .section-title {
        margin: var(--space-md) 0 4px;
        padding: 0;
    }

    .section-title h2 {
        font-size: 0.85rem;
    }

    /* Footer 优化 */
    .footer {
        padding: var(--space-sm) var(--space-xs);
        margin-top: var(--space-md);
    }

    /* Badges 优化 */
    .realtime-badge,
    .okx-badge,
    .coingecko-badge,
    .mempool-badge,
    .blockchain-badge {
        font-size: 0.5rem;
        padding: 2px 6px;
    }

    .okx-badge-small,
    .mempool-badge-small {
        font-size: 0.45rem;
        padding: 1px 4px;
    }

    .exchange-tag {
        font-size: 0.45rem;
        padding: 1px 4px;
    }

    /* 清算列表优化 */
    .liquidation-section {
        min-height: 200px;
    }

    .liquidation-container {
        max-height: 180px;
    }

    .liquidation-item {
        padding: 6px var(--space-xs);
        font-size: 0.7rem;
        margin-bottom: 4px;
    }

    /* Trending 列表优化 */
    .trending-list {
        max-height: 160px;
    }

    .trending-item {
        padding: 6px var(--space-xs);
    }

    .trending-name {
        font-size: 0.75rem;
    }

    /* Header sticky 调整 */
    .header {
        padding: var(--space-xs) 0;
        margin-bottom: var(--space-xs);
    }

    /* Symbol selector sticky 调整 */
    .symbol-selector {
        top: 40px;
    }
}

/* ============================================
   Responsive - Small Mobile (480px and below)
   ============================================ */
@media (max-width: 480px) {
    /* 进一步压缩间距 */
    body {
        padding: 4px;
    }

    .header {
        padding: 4px 0;
        margin-bottom: 4px;
    }

    .header h1 {
        font-size: 1.1rem;
    }

    /* Stat 卡片改为 3 列更紧凑 */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
        margin-bottom: var(--space-sm);
    }

    .stat-card {
        padding: 4px;
    }

    .stat-card h3 {
        font-size: 0.55rem;
    }

    .stat-card .value {
        font-size: 0.85rem;
    }

    .stat-card .sub-value {
        font-size: 0.5rem;
    }

    /* Symbol 按钮只显示图标 */
    .symbol-btn {
        padding: 4px 6px;
        font-size: 0;
        min-width: 36px;
        min-height: 36px;
    }

    .symbol-btn .icon {
        width: 20px;
        height: 20px;
    }

    .symbol-btn span {
        display: none;
    }

    /* 图表进一步压缩 */
    .charts-grid {
        gap: 6px;
        margin-bottom: 6px;
    }

    .chart-section {
        padding: 8px;
    }

    .chart-section h2 {
        font-size: 0.7rem;
        margin-bottom: 4px;
    }

    .chart-container {
        min-height: 120px;
    }

    .chart-container canvas {
        max-height: 140px !important;
    }

    .chart-section.full-width .chart-container canvas {
        max-height: 160px !important;
    }

    /* 全局卡片优化 */
    .global-card,
    .network-card {
        padding: 8px;
    }

    .global-card h4,
    .network-card h4 {
        font-size: 0.75rem;
    }

    /* 时间范围选择器 */
    .range-container {
        padding: 8px;
    }

    .range-header h3 {
        font-size: 0.7rem;
    }

    .range-dates {
        font-size: 0.6rem;
    }

    .quick-btn {
        padding: 4px 8px;
        font-size: 0.6rem;
        min-height: 26px;
    }

    /* Section title */
    .section-title {
        margin: var(--space-sm) 0 2px;
    }

    .section-title h2 {
        font-size: 0.75rem;
    }

    /* Badges */
    .realtime-badge,
    .okx-badge,
    .coingecko-badge,
    .mempool-badge,
    .blockchain-badge {
        font-size: 0.45rem;
        padding: 1px 4px;
    }

    /* Footer */
    .footer {
        padding: 8px 4px;
        font-size: 0.65rem;
    }

    /* 清算列表 */
    .liquidation-item {
        padding: 4px 6px;
        font-size: 0.65rem;
    }

    /* Trending */
    .trending-item {
        padding: 4px 6px;
    }

    .trending-name {
        font-size: 0.7rem;
    }
}

/* ============================================
   Accessibility - Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
