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

:root {
    --primary-color: #4A90E2;
    --secondary-color: #64A8F5;
    --success-color: #10b981;
    --warning-color: #fbbf24;
    --danger-color: #f87171;
    --dark-bg: #0a1929;
    --card-bg: #1a3a5f;
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --border-color: #4A90E2;
    --gradient-1: linear-gradient(135deg, #4A90E2 0%, #64A8F5 100%);
    --gradient-2: linear-gradient(135deg, #64A8F5 0%, #4A90E2 100%);
    --gradient-3: linear-gradient(135deg, #7BB8FF 0%, #4A90E2 100%);
    --gradient-4: linear-gradient(135deg, #4A90E2 0%, #3570C0 100%);
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background: #0a0e27;
    color: var(--text-primary);
    line-height: 1.4;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at top left, rgba(74, 144, 226, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at top right, rgba(100, 168, 245, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom left, rgba(123, 184, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(74, 144, 226, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: backgroundPulse 8s ease-in-out infinite;
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
    z-index: 1;
}

/* 顶部导航栏 */
.header {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, transparent, #4A90E2, #64A8F5, #4A90E2, transparent) 1;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(74, 144, 226, 0.3);
    animation: headerGlow 3s ease-in-out infinite;
}

@keyframes headerGlow {
    0%, 100% { box-shadow: 0 8px 32px rgba(74, 144, 226, 0.3); }
    50% { box-shadow: 0 8px 40px rgba(74, 144, 226, 0.5); }
}

.header .container {
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    align-items: center;
}

.logo {
    text-align: center;
    grid-column: 2;
}

.logo h1 {
    font-size: 26px;
    background: linear-gradient(135deg, #64A8F5 0%, #4A90E2 50%, #7BB8FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    margin-bottom: 0;
    font-weight: 700;
    letter-spacing: 3px;
    position: relative;
    animation: titleShine 3s ease-in-out infinite;
}

.logo h1::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    z-index: -1;
    filter: blur(15px);
    opacity: 0.5;
}

@keyframes titleShine {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

.subtitle {
    font-size: 18px;
    color: #64A8F5;
    text-shadow: 0 0 20px rgba(100, 168, 245, 0.6);
    margin-top: 5px;
    font-weight: 500;
    letter-spacing: 4px;
    opacity: 0.9;
}

.header-info {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: var(--text-secondary);
    justify-content: flex-end;
    grid-column: 3;
}

.date, .time {
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.2) 0%, rgba(100, 168, 245, 0.1) 100%);
    border-radius: 20px;
    border: 1px solid rgba(74, 144, 226, 0.4);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    font-weight: 500;
    transition: all 0.3s ease;
}

.date:hover, .time:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.5);
    border-color: rgba(100, 168, 245, 0.6);
}

/* 主要内容区域 */
.main-content {
    padding: 8px 0 35px;
    height: calc(100vh - 120px);
    overflow-y: auto;
}

/* 主网格布局 */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 8px;
}

.section-title {
    font-size: 16px;
    margin-bottom: 10px;
    padding: 8px 16px;
    background: linear-gradient(90deg, rgba(74, 144, 226, 0.3) 0%, transparent 100%);
    border-left: 4px solid #4A90E2;
    border-radius: 0 10px 10px 0;
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(74, 144, 226, 0.8);
    position: relative;
    overflow: hidden;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #4A90E2, #64A8F5, #7BB8FF);
    animation: titleBorder 2s ease-in-out infinite;
}

@keyframes titleBorder {
    0%, 100% { transform: translateY(-100%); }
    50% { transform: translateY(100%); }
}

/* 数据概览卡片 */
.overview-section {
    margin-bottom: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 8px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.8) 100%);
    border-radius: 16px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(74, 144, 226, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(74, 144, 226, 0.2) inset;
    backdrop-filter: blur(10px);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-1);
}

.stat-card:nth-child(2)::before {
    background: var(--gradient-2);
}

.stat-card:nth-child(3)::before {
    background: var(--gradient-3);
}

.stat-card:nth-child(4)::before {
    background: var(--gradient-4);
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 48px rgba(74, 144, 226, 0.4), 0 0 0 2px rgba(100, 168, 245, 0.5) inset;
    border-color: rgba(100, 168, 245, 0.6);
}

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

.stat-icon {
    font-size: 40px;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.3) 0%, rgba(100, 168, 245, 0.2) 100%);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.stat-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: iconShine 3s ease-in-out infinite;
}

@keyframes iconShine {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.stat-info {
    flex: 1;
}

.stat-info h3 {
    font-size: 12px;
    color: #ffffff;
    margin-bottom: 4px;
    font-weight: 500;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #64A8F5 0%, #7BB8FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
    filter: drop-shadow(0 0 10px rgba(100, 168, 245, 0.6));
}

.stat-trend {
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.stat-trend.up {
    color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
}

.stat-trend.down {
    color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
}

/* 图表容器 */
.modules-section, .counties-section, .trend-section {
    margin-bottom: 0;
}

.chart-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 0;
}

.chart-container-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chart-wrapper-single {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.9) 100%);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(74, 144, 226, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(74, 144, 226, 0.2) inset;
    backdrop-filter: blur(10px);
    height: 340px;
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.chart-wrapper-single::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4A90E2, #64A8F5, #4A90E2, transparent);
    animation: borderFlow 3s linear infinite;
}

@keyframes borderFlow {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.chart-wrapper-single:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(74, 144, 226, 0.3), 0 0 0 2px rgba(100, 168, 245, 0.3) inset;
}

.chart-wrapper, .chart-wrapper-large, .chart-wrapper-medium {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.9) 100%);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(74, 144, 226, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(74, 144, 226, 0.2) inset;
    backdrop-filter: blur(10px);
    height: 365px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.chart-wrapper::before, .chart-wrapper-large::before, .chart-wrapper-medium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4A90E2, #64A8F5, #4A90E2, transparent);
    animation: borderFlow 3s linear infinite;
}

.chart-wrapper:hover, .chart-wrapper-large:hover, .chart-wrapper-medium:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(74, 144, 226, 0.3), 0 0 0 2px rgba(100, 168, 245, 0.3) inset;
}

.chart-wrapper-large {
    grid-column: 1 / -1;
    height: 300px;
}

.chart-wrapper-medium {
    max-width: 600px;
    margin: 15px auto 0;
    height: 320px;
}

/* 数据表格 */
.table-container {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.9) 100%);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(74, 144, 226, 0.3);
    overflow-x: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(74, 144, 226, 0.2) inset;
    backdrop-filter: blur(10px);
    max-height: 390px;
    overflow-y: auto;
    position: relative;
}

.table-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4A90E2, #64A8F5, #4A90E2, transparent);
    animation: borderFlow 3s linear infinite;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: rgba(74, 144, 226, 0.3);
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table th {
    padding: 10px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #ffffff;
    border-bottom: 2px solid var(--primary-color);
}

.data-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-color);
    color: #ffffff;
    font-size: 12px;
}

.data-table tbody tr {
    transition: all 0.3s ease;
}

.data-table tbody tr:hover {
    background: rgba(74, 144, 226, 0.2);
}

/* 县域卡片 */
.counties-cards-section {
    margin-bottom: 5px;
}

.counties-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 5px;
}

.county-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.9) 100%);
    border-radius: 16px;
    padding: 14px;
    border: 1px solid rgba(74, 144, 226, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(74, 144, 226, 0.2) inset;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.county-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.county-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 16px 48px rgba(74, 144, 226, 0.4), 0 0 0 2px rgba(100, 168, 245, 0.5) inset;
    border-color: rgba(100, 168, 245, 0.6);
}

.county-card:hover::after {
    opacity: 1;
}

.county-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--primary-color);
}

.county-header h3 {
    font-size: 16px;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(74, 144, 226, 0.9);
}

.county-badge {
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    background: var(--primary-color);
    color: #ffffff;
}

.county-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.county-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.county-stat-item .label {
    font-size: 12px;
    color: #ffffff;
}

.county-stat-item .value {
    font-size: 18px;
    font-weight: 700;
    color: #64A8F5;
    text-shadow: 0 0 15px rgba(100, 168, 245, 0.9);
}

.county-stat-item .value.growth {
    color: var(--warning-color);
}

/* 筛选按钮 */
.filter-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 16px;
    border: 1px solid var(--primary-color);
    background: var(--card-bg);
    color: #ffffff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--secondary-color);
    color: #ffffff;
    background: rgba(63, 125, 204, 0.2);
    box-shadow: 0 0 10px rgba(63, 125, 204, 0.3);
}

.filter-btn.active {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(63, 125, 204, 0.5);
}

/* 页脚 */
.footer {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
    border-top: 2px solid transparent;
    border-image: linear-gradient(90deg, transparent, #4A90E2, #64A8F5, #4A90E2, transparent) 1;
    padding: 12px 0;
    text-align: center;
    color: #ffffff;
    font-size: 11px;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 999;
    box-shadow: 0 -8px 32px rgba(74, 144, 226, 0.3);
    backdrop-filter: blur(20px);
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card, .chart-wrapper, .county-card, .table-container {
    animation: fadeIn 0.6s ease-out;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 16px;
    }
    
    .logo h1 {
        font-size: 22px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        grid-template-columns: 1fr;
    }
    
    .counties-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-buttons {
        justify-content: center;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
