:root {
    --bg-color: #050a10;
    --card-bg: rgba(255, 255, 255, 0.05);
    --accent-color: #00d2ff;
    --secondary-accent: #9d50bb;
    --text-primary: #e0e6ed;
    --text-muted: #8892b0;
    --border-color: rgba(255, 255, 255, 0.1);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

.glass-bg {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, #1b2735 0%, #090a0f 100%);
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

.glow-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    letter-spacing: 2px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(0, 210, 255, 0.5));
}

.logo h1 {
    font-size: 2.4rem;
    background: linear-gradient(135deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.logo h1 span {
    line-height: 1.1;
}

.logo h1 small {
    font-size: 0.7rem;
    font-weight: 300;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.5;
    -webkit-text-fill-color: #666; /* 更低调的辅助色 */
}

.accent {
    font-weight: 700;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* 恢复分栏布局 */
.dashboard-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.data-card {
    height: 768px; /* 进一步增加高度，使底边与右侧历史负荷图平齐 */
    display: flex;
    flex-direction: column;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

h2 {
    font-size: 1.1rem;
    color: var(--accent-color);
    border-left: 4px solid var(--secondary-accent);
    padding-left: 10px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.config-card {
    height: 304px; /* 同步右侧首个 Chart Card 高度 (210 + Padding + Header) */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    color: white;
    padding: 10px;
    border-radius: 8px;
    outline: none;
}

button {
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent-color), #00a8cc);
    color: #000;
}

.secondary-btn {
    background: linear-gradient(135deg, var(--secondary-accent), #6e48aa);
    color: #fff;
}

.secondary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tertiary-btn {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    margin-top: 1rem;
}

button:hover:not(:disabled) {
    filter: brightness(1.2);
    box-shadow: 0 0 15px var(--accent-color);
}

.table-container {
    max-height: 580px; /* 随着卡片高度增加，增大表格的可视高度 */
    overflow-y: auto;
    border-radius: 8px;
    margin-bottom: auto; /* 推开底部的按钮 */
}

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

th, td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.65rem;
}

td input {
    width: 60px;
    background: transparent;
    border: 1px solid transparent;
    color: white;
    text-align: center;
    font-size: 0.65rem;
}

td input:focus {
    border-color: var(--accent-color);
    background: rgba(255,255,255,0.1);
}

.chart-container-half {
    width: 100%;
    height: 350px;
}

.weather-chart-container {
    width: 100%;
    height: 210px;
}

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.hidden { display: none; }

.small-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.mini-btn {
    padding: 6px;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.primary-highlight {
    background: linear-gradient(135deg, var(--secondary-accent), #6e48aa);
    border-color: var(--accent-color);
    color: #fff;
    font-weight: 700;
}

.modal-card {
    width: 90%;
    max-width: 500px;
    background: var(--bg-color);
    border: 1px solid var(--accent-color);
}

textarea {
    width: 100%;
    height: 150px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-family: monospace;
    resize: none;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--card-bg);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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