* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #1a73e8;
}

h2 {
    margin-bottom: 15px;
    color: #1a73e8;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.form-section, .result-section {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input, select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

button {
    padding: 10px 20px;
    background-color: #1a73e8;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #1557b0;
}

#reset {
    background-color: #f44336;
}

#reset:hover {
    background-color: #d32f2f;
}

.result-table {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.total-row {
    font-weight: bold;
    background-color: #e6f7ff;
}

.calculation-details {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
}

.calculation-details h3 {
    margin-bottom: 10px;
    color: #1a73e8;
}

#calculation-details-content {
    white-space: pre-line;
    line-height: 1.8;
}

#result-section {
    display: none;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    input, select, button {
        font-size: 14px;
    }
    
    th, td {
        padding: 8px;
    }
}

/* 全局覆盖层样式 */
#global-overlay {
    position: fixed;
    inset: 0;                 /* 等价于 top:0; right:0; bottom:0; left:0; */
    background: rgba(0, 0, 0, 0.4); /* 半透明遮罩，可按需调整 */
    z-index: 9999;            /* 覆盖在所有内容之上 */
    display: none;            /* 默认隐藏 */
    /* 如需阻止底层点击，保持默认；如果需要允许点击穿透，可设置 pointer-events:none; */
}

#global-overlay.active {
    display: block;
}