body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: #fffbf5; /* 暖色明亮底色 */
    color: #333;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    overflow: hidden;
    position: relative;
    z-index: 0;
}

/* 玻璃拟态光晕背景 */
.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    animation: float 20s infinite alternate;
    opacity: 0.2;
}
.blob-1 { width: 500px; height: 500px; background: #ff9d5c; top: -10%; left: -10%; animation-delay: 0s; }
.blob-2 { width: 600px; height: 600px; background: #ff7f50; bottom: -20%; right: -10%; animation-delay: -5s; }
.blob-3 { width: 400px; height: 400px; background: #ffa07a; top: 40%; left: 40%; animation-delay: -10s; opacity: 0.1; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.2); }
}

.header {
    height: 80px;
    position: relative;
    text-align: center;
    background: transparent;
    border-bottom: 1px solid rgba(255, 122, 0, 0.1);
}

.header h1 {
    margin: 0;
    line-height: 80px;
    font-size: 32px;
    letter-spacing: 2px;
    color: #333;
    font-weight: 800;
}

.header h1 span {
    color: #ff7a00;
}

.header-time {
    position: absolute;
    right: 30px;
    top: 30px;
    font-size: 16px;
    color: #666;
}

.main-container {
    display: flex;
    height: calc(100% - 80px);
    padding: 15px;
    box-sizing: border-box;
    gap: 20px;
}

.column {
    flex: 3;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.column.center {
    flex: 4;
}

/* 玻璃拟态面板 */
.panel {
    background: #ffffff;
    border: 1px solid rgba(255, 122, 0, 0.2);
    border-radius: 16px;
    padding: 15px;
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(255, 122, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.panel:hover {
    box-shadow: 0 8px 25px rgba(255, 122, 0, 0.15);
    border-color: rgba(255, 122, 0, 0.4);
}

.panel-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    text-align: left;
    padding-left: 10px;
    border-left: 4px solid #ff7a00;
    display: flex;
    align-items: center;
}

.title-hint {
    font-size: 12px;
    color: #888;
    font-weight: normal;
    margin-left: 10px;
}

.chart {
    flex: 1;
    width: 100%;
    min-height: 150px;
}

.number-cards {
    display: flex;
    justify-content: space-around;
    gap: 15px;
    margin-bottom: 15px;
}

.card {
    background: #ffffff;
    border: 1px solid rgba(255, 122, 0, 0.2);
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    flex: 1;
    box-shadow: 0 4px 10px rgba(255, 122, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 122, 0, 0.15);
    border-color: rgba(255, 122, 0, 0.5);
}

.clickable-card {
    cursor: pointer;
}

.card-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.card-value {
    font-size: 26px;
    font-weight: bold;
    color: #ff7a00;
}

.map-panel {
    flex: 2;
    padding: 0;
    overflow: hidden;
}

.bottom-center {
    display: flex;
    gap: 20px;
    flex: 1;
}

.half {
    flex: 1;
}

.store-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.stat-item {
    background: #fff8f0;
    border: 1px solid rgba(255,122,0,0.1);
    padding: 10px;
    border-radius: 8px;
    flex: 1 1 40%;
    font-size: 14px;
    color: #666;
    transition: all 0.3s;
}

.stat-item strong {
    color: #ff7a00;
    font-size: 18px;
    margin: 0 5px;
    text-shadow: none;
}

.clickable-store {
    cursor: pointer;
}
.clickable-store:hover {
    background: #fff0e0;
    border-color: rgba(255, 122, 0, 0.3);
    transform: scale(1.02);
}
.click-icon {
    font-size: 12px;
    opacity: 0.5;
}

.supply-stats {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.supply-card {
    flex: 1;
    background: #fff8f0;
    border: 1px dashed rgba(255, 122, 0, 0.3);
    padding: 15px;
    text-align: center;
    border-radius: 12px;
}

.s-title {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.s-val {
    font-size: 28px;
    font-weight: bold;
    color: #ff7a00;
}

.s-val.warning {
    color: #ff4d4f;
    text-shadow: none;
}

/* Modal 组件样式 */
.modal-overlay {
    position: fixed; top:0; left:0; width:100%; height:100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(5px);
    display: none; justify-content: center; align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #ffffff;
    border: 1px solid rgba(255, 122, 0, 0.2);
    border-radius: 16px;
    width: 80%; max-width: 900px; height: 75%;
    display: flex; flex-direction: column;
    padding: 20px; color: #333;
    box-shadow: 0 10px 30px rgba(255,122,0,0.1);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid rgba(255,122,0,0.1);
    padding-bottom: 15px; margin-bottom: 15px;
}

.modal-header h2 {
    margin: 0; color: #ff7a00; font-size: 20px;
}

.modal-close {
    cursor: pointer; font-size: 28px; color: #888;
    transition: color 0.3s;
}
.modal-close:hover { color: #ff4d4f; }

.modal-body {
    flex: 1; overflow-y: auto; overflow-x: auto;
    padding-right: 10px;
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(255, 122, 0, 0.05); border-radius: 3px; }
::-webkit-scrollbar-thumb { background: rgba(255, 122, 0, 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 122, 0, 0.5); }

/* 表格样式 */
table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td { padding: 12px 15px; border-bottom: 1px solid rgba(255,122,0,0.1); text-align: left; }
th {
    color: #ff7a00;
    position: sticky; top: 0;
    background: #fff8f0;
    z-index: 10;
}
tr { transition: background 0.2s; }
tr:hover { background: rgba(255,122,0,0.05); }

/* 下钻弹窗内部图表容器 */
.modal-charts-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    height: 100%;
    width: 100%;
}
.modal-chart-box {
    flex: 1;
    min-width: 45%;
    height: 350px;
    background: #fff8f0;
    border: 1px solid rgba(255,122,0,0.1);
    border-radius: 8px;
    padding: 10px;
}
.modal-chart-title {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.glass-btn {
    background: #fff8f0;
    border: 1px solid #ffaa00;
    color: #ff7a00;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}
.glass-btn:hover {
    background: #fff0e0;
    box-shadow: 0 0 10px rgba(255, 122, 0, 0.2);
}
/* 响应式设计：平板和手机端自适应 */
@media (max-width: 1200px) {
    body, html {
        height: auto;
        min-height: 100%;
        overflow: auto;
    }
    .main-container {
        flex-direction: column;
        height: auto;
        overflow-y: visible;
    }
    
    .column {
        width: 100%;
        flex: none;
    }

    .column.center {
        width: 100%;
        flex: none;
        order: -1; /* 让核心数据和地图在移动端显示在最上方 */
    }

    .header h1 {
        font-size: 24px;
    }

    .header-time {
        display: none; /* 屏幕较小时隐藏时间，节省空间 */
    }

    .panel {
        min-height: 300px; /* 保证图表在移动端有足够高度 */
    }

    .map-panel {
        min-height: 400px;
    }
    
    .bottom-center {
        flex-direction: column;
    }
    
    .bottom-center .panel.half {
        width: 100%;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .header {
        height: 60px;
    }
    .header h1 {
        line-height: 60px;
        font-size: 18px;
        letter-spacing: 1px;
    }

    .number-cards {
        flex-direction: column;
        gap: 10px;
    }

    .modal-content {
        width: 95%;
        height: 90%;
        padding: 15px;
    }

    .modal-charts-container {
        flex-direction: column;
    }
    
    .modal-chart-box {
        min-width: 100%;
    }
    
    .supply-stats {
        flex-direction: column;
    }

    th, td {
        padding: 8px 10px;
    }
}
