:root {
    --primary-color: #2563eb;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-color: #1f2937;
    --border-radius: 8px;
    --bar-color: #3b82f6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    line-height: 1.5;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 20px;
}

/* 输入区域 */
.input-section {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

textarea {
    width: 100%;
    height: 150px;
    padding: 15px;
    border: 1px solid #d1d5db;
    border-radius: var(--border-radius);
    font-family: monospace;
    font-size: 14px;
    box-sizing: border-box;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.btn-group {
    margin-top: 15px;
    text-align: right;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 25px;
    font-size: 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #1d4ed8;
}

button.clear {
    background-color: #9ca3af;
    margin-right: 10px;
}

button.clear:hover {
    background-color: #6b7280;
}

/* 统计卡片区域 */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stats-group {
    margin-bottom: 20px;
}

.stats-group-title {
    font-size: 13px;
    color: #6b7280;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin: 8px 2px 10px;
}

.stat-card {
    background: var(--card-bg);
    padding: 15px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-align: center;
    border-top: 4px solid var(--primary-color);
}

.stat-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
}

/* 分数段统计表格 */
.section-box {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

h3 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th,
td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: #f9fafb;
    font-weight: 600;
    font-size: 14px;
}

/* 进度条样式 */
.bar-container {
    background-color: #e5e7eb;
    border-radius: 9999px;
    height: 10px;
    width: 100%;
    overflow: hidden;
}

.bar-fill {
    background-color: var(--bar-color);
    height: 100%;
    border-radius: 9999px;
    transition: width 0.5s ease-in-out;
}

/* 异常值区域 */
.outliers-section {
    border-left: 4px solid #ef4444;
}

.outliers-list {
    font-family: monospace;
    color: #ef4444;
    word-break: break-all;
}
