:root {
    --primary-color: #1976d2;
    --secondary-color: #e3f2fd;
    --accent-color: #2196f3;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --border-color: #ddd;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --error-color: #f44336;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

body {
    background-color: #f0f2f5;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

h1 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
    font-size: 28px;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

label {
    font-weight: bold;
    color: var(--primary-color);
}

input[type="number"] {
    width: 80px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-align: center;
}

button {
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: bold;
}

button:hover {
    background-color: var(--accent-color);
}

#resetBtn {
    background-color: var(--error-color);
}

#resetBtn:hover {
    background-color: #d32f2f;
}

.alert-container {
    margin-bottom: 20px;
}

.alert {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-weight: bold;
}

.alert.success {
    background-color: #e8f5e9;
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.alert.warning {
    background-color: #fff3e0;
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
}

.alert.error {
    background-color: #ffebee;
    color: var(--error-color);
    border: 1px solid var(--error-color);
}

.hidden {
    display: none;
}

.data-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: white;
}

th, td {
    padding: 10px;
    text-align: center;
    border: 1px solid var(--border-color);
}

th {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: var(--light-gray);
}

.summary-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.summary-box {
    background-color: var(--secondary-color);
    border-radius: 8px;
    padding: 15px 25px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    min-width: 300px;
}

.summary-box h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

#statistics {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#statistics p {
    display: flex;
    justify-content: space-between;
}

#statistics span {
    font-weight: bold;
    color: var(--primary-color);
}

#exportBtn {
    background-color: #4caf50;  /* 绿色，表示导出功能 */
}

#exportBtn:hover {
    background-color: #388e3c;
}

@media (max-width: 1200px) {
    .container {
        padding: 15px;
    }
    
    th, td {
        padding: 8px 5px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .input-group {
        justify-content: space-between;
    }
    
    button {
        width: 100%;
    }
}