* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Microsoft YaHei", Arial, sans-serif;
}

body {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f8f9fa;
}

.container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.08);
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 24px;
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

h2 {
    color: #34495e;
    margin-bottom: 20px;
    font-size: 18px;
    display: flex;
    align-items: center;
}

h2::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 20px;
    background-color: #3498db;
    margin-right: 10px;
}

.base-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    align-items: end;
}

.five-col-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    font-weight: 500;
    color: #555;
    margin-bottom: 6px;
    font-size: 14px;
}

input, select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
    height: 44px;
}

input:focus, select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* 单选按钮组样式 */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 5px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.radio-option label {
    margin-bottom: 0;
    cursor: pointer;
    font-weight: normal;
}

/* 说明文本样式 */
.description {
    margin-top: 15px;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    border-left: 4px solid #3498db;
}

.btn-container {
    text-align: center;
    margin: 30px 0;
}

button {
    padding: 12px 40px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.loading {
    text-align: center;
    padding: 20px;
    display: none;
    color: #3498db;
    font-size: 0.95rem;
}

.loading::after {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(52, 152, 219, 0.3);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

.error {
    color: #e74c3c;
    padding: 12px 15px;
    background-color: rgba(231, 76, 60, 0.08);
    border-radius: 6px;
    margin: 15px 0;
    display: none;
    border-left: 4px solid #e74c3c;
}

/* 结果区域 */
.result-section {
    margin-top: 30px;
    padding: 25px;
    background: #f0f6fc;
    border-radius: 10px;
    display: none;
}

.result-title {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.result-item {
    background: white;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: box-shadow 0.3s;
}

.result-item:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.result-label {
    font-weight: 600;
    color: #34495e;
    margin-bottom: 8px;
    font-size: 13px;
}

.result-value {
    font-size: 1.3rem;
    color: #2c3e50;
    font-weight: 700;
}

/* 表格样式 */
.summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
}

.summary-table th, .summary-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.summary-table th {
    background-color: #eef2f7;
    color: #2c3e50;
    font-weight: 600;
}

.summary-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.summary-table tr:hover {
    background-color: #eef2f7;
}

.result-section h3 {
    color: #34495e;
}

/* 建研院标识样式 */
.institute-label {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #666;
    font-size: 16px;
    font-weight: normal;
    letter-spacing: 1px;
    opacity: 0.8;
}



/* 图表容器 */
.chart-container {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    height: 500px; /* 设置固定的高度 */
    position: relative;
}

/* 确保canvas元素填充容器 */
#hourlyLoadChart {
    width: 100% !important;
    height: 100% !important;
}

/* 响应式适配 */
@media (max-width: 900px) {
    .base-grid {
        grid-template-columns: 1fr 1fr;
    }
    .five-col-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .result-grid {
        grid-template-columns: 1fr 1fr;
    }
    h1 {
        font-size: 20px;
    }
}
@media (max-width: 600px) {
    .base-grid {
        grid-template-columns: 1fr;
    }
    .five-col-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .result-grid {
        grid-template-columns: 1fr;
    }
    .container {
        padding: 15px;
    }
    .chart-container {
        height: 400px;
    }
}
