* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #0f1c3c;
    color: #fff;
    font-family: 'Arial', sans-serif;
    overflow: auto;
}

.dashboard2{
    width: 100vw;
    height: 100vh;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-rows: 0fr 1fr 1fr;
    gap: 15px;
    overflow-y: auto; /* 允许垂直滚动 */
    background: linear-gradient(135deg, rgba(15, 28, 60, 0.9) 0%, rgba(15, 28, 60, 0.95) 100%);
}
.dashboard {
    width: 100vw;
    min-height: 100vh; /* 允许高度扩展 */
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-rows: auto 1fr 1fr; /* 修复第1行高度问题 */
    gap: 15px;
    background: linear-gradient(135deg, rgba(15, 28, 60, 0.9) 0%, rgba(15, 28, 60, 0.95) 100%);
    overflow-y: auto; /* 启用垂直滚动 */
    box-sizing: border-box; /* 防止padding导致宽度溢出 */
}
.header {
    grid-column: 1 / -1;
    height: 100px;
    text-align: center;
    padding: 5px 0;
    background: rgba(0, 150, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(0, 150, 255, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(0, 150, 255, 0.4),
        transparent
    );
    transition: 0.5s;
}
.header:hover::before {
    left: 100%;
}

.header h1 {
    font-size: 2.5rem;
    background: linear-gradient(to right, #00f2fe, #4facfe);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 10px;
}

.header .time {
    font-size: 1.1rem;
    color: #4facfe;
}

.chart-container {
    background: rgba(15, 40, 80, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(0, 150, 255, 0.2);
    padding: 15px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.chart-container:hover {
    box-shadow: 0 0 15px rgba(0, 150, 255, 0.5);
    transform: translateY(-5px);
}

.chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, #00f2fe, transparent);
}

.chart-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #4facfe;
    text-align: center;
    background: rgba(0, 150, 255, 0.1);
    padding: 5px;
    border-radius: 4px;
}

.chart {
    width: 100%;
    height: calc(100% - 30px);
}

.map-container {
    grid-column: 2;
    grid-row: 2 / span 2;
    height: 820px;
}

.bar-container {
    grid-column: 1;
    grid-row: 2;
    height: 400px;
}

.line1-container {
    grid-column: 1;
    grid-row: 3;
    height: 400px;
}

.pie-container {
    grid-column: 3;
    grid-row: 2;
    height: 400px;
}

.rose-container {
    grid-column: 3;
    grid-row: 3;
    height: 400px;
}

.h-bar-container {
    grid-column: 1;
    grid-row: 4;
    height: 400px;
}

.scatter-container {
    grid-column: 3;
    grid-row: 4;
    height: 400px;
}

.line2-container {
    grid-column: 2;
    grid-row: 4;
    height: 400px;
}

.age-container {
    grid-column: 1 / -1;
    grid-row: 5;
    height: 450px;
}

.age-container .chart {
    position: relative;
    height: 350px !important;
}

.decorative-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.decorative-lines::before,
.decorative-lines::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, #00f2fe, transparent);
    animation: decorativeLine 15s linear infinite;
}

.decorative-lines::before {
    top: 10%;
}

.decorative-lines::after {
    bottom: 10%;
}

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

.corner-decor {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #00f2fe;
}

.corner-decor.tl {
    top: 10px;
    left: 10px;
    border-right: none;
    border-bottom: none;
}

.corner-decor.tr {
    top: 10px;
    right: 10px;
    border-left: none;
    border-bottom: none;
}

.corner-decor.bl {
    bottom: 10px;
    left: 10px;
    border-right: none;
    border-top: none;
}

.corner-decor.br {
    bottom: 10px;
    right: 10px;
    border-left: none;
    border-top: none;
}
