/* ===== 全局重置 & 基础 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #ffffff;
}
.app {
    max-width: 680px;
    width: 100%;
    background: #ffffff;
    border-radius: 24px;
    margin: 10px 12px;
    padding: 10px 20px 16px;
}

/* ===== 头部 ===== */
.header {
    display: flex;
    align-items: center;
    padding-bottom: 14px;
    margin-bottom: 16px;

}
.header a {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.header img {
    height: 40px;
    width: auto;
    display: block;
}

/* ===== 输入区 ===== */
.input-area {
    margin-bottom: 6px;
}
.input-area textarea {
    width: 100%;
    height: 140px;
    padding: 12px 14px;
    font-size: 20px;
    font-weight: 700;
    border: 2px solid #c8e6c9;
    border-radius: 12px;
    background: #ffffff;
    transition: 0.15s;
    color: #1e3a2a;
    outline: none;
    resize: vertical;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    vertical-align: top;
}
.input-area textarea:focus {
    border-color: #43a047;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(67, 160, 71, 0.15);
}
.input-area textarea::placeholder {
    color: #a5d6a7;
    font-size: 14px;
    font-weight: 400;
}

/* ===== 工具栏 ===== */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}
.btn {
    background: #2e7d32;
    color: #fff;
    border: none;
    padding: 6px 24px;
    border-radius: 40px;
    font-size: 15px;
    font-weight: bold;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    letter-spacing: 0.2px;
    height: 32px;
}
.btn:hover {
    background: #1b5e20;
}
.btn:active {
    transform: scale(0.96);
}
.btn-light {
    background: #e8f5e9;
    color: #2e7d32;
}
.btn-light:hover {
    background: #c8e6c9;
    box-shadow: none;
}
.info-badge {
    font-size: 13px;
    color: #388e3c;
    background: #e8f5e9;
    padding: 3px 14px;
    border-radius: 30px;
    font-weight: 500;
}

/* ===== 提示文字 ===== */
.hint {
    font-size: 13px;
    color: #558b5a;
    margin-top: 10px;
    text-align: center;
    line-height: 1.6;
}
.hint em {
    color: #c62828;
    font-style: normal;
    font-weight: 500;
}
.hint .eg {
    color: #2e7d32;
    font-weight: 600;
}

/* ===== 结果区 ===== */
.result {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 2px solid #e8f5e9;
}
.empty {
    color: #6a829e;
    font-size: 14px;
    text-align: center;
    padding: 20px 0;
}
.empty strong {
    color: #1a314d;
}
.hidden {
    display: none !important;
}

/* ===== 底部 ===== */
.footer {
    margin-top: 18px;
    font-size: 12px;
    color: #7a8fa5;
    text-align: center;
    border-top: 2px solid #e8f5e9;
    padding-top: 14px;
}
.footer a {
    color: #558b5a;
    text-decoration: none;
}
.footer a:hover {
    color: #2e7d32;
}
.footer img {
    display: block;
    margin: 6px auto 0;
    height: 20px;
    width: auto;
}

/* ===== 复式注数计算器专属 ===== */
.result-block {
    margin-bottom: 24px;
    border-bottom: 2px solid #c8e6c9;
    padding-bottom: 16px;
}
.result-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.result-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-bottom: 6px;
}
.result-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1b3a1b;
}
.result-header .count {
    font-size: 14px;
    color: #558b5a;
    font-weight: 400;
}
.list-wrap {
    margin: 6px 0 8px;
}
.list-wrap ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}
.list-wrap ul li {
    padding: 3px 0;
    font-size: 18px;
    font-weight: 700;
    color: #1e3a2a;
}
.list-wrap ul li:last-child {
    border-bottom: none;
}
.cpy {
    display: block;
    margin: 2px auto 0;
    padding: 6px 20px;
    font-size: 16px;
    font-weight: 700;
    border: 0;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 30px;
    cursor: pointer;
    transition: .15s;
}
.cpy:hover {
    background: #c8e6c9;
}

/* ===== 数字统计工具专属 ===== */
.summary {
    padding: 10px 10px 10px 0;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 18px;
    font-weight: bold;
    font-size: 18px;
    color: #1f3a5a;
    border-bottom: 3px solid #2e7d32;
}
.summary strong {
    font-weight: 600;
    color: #0b1f33;
}
.group-list {
    display: flex;
    flex-direction: column;
}
.group-row {
    padding: 8px 0;
    border-bottom: 1px solid #c8e6c9;
}
.group-row:last-child {
    border-bottom: none;
}
.group-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-bottom: 2px;
}
.group-label {
    font-weight: 700;
    font-size: 18px;
    color: #2e7d32;
}
.group-count {
    font-size: 14px;
    font-weight: 500;
    color: #558b5a;
}
.nums-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1px 4px;
    font-size: 18px;
    font-weight: 700;
    color: #1e3a2a;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    padding: 2px 0;
}
.num-item {
    background: transparent;
    font-size: 18px;
    font-weight: 700;
}
.dash {
    color: #a5d6a7;
    font-weight: 300;
    font-size: 16px;
    user-select: none;
}

/* ===== 响应式 ===== */
@media (max-width: 480px) {
    .app { padding: 16px 14px; margin: 10px 8px; }
    .header img { height: 34px; }
    .input-area textarea { height: 120px; font-size: 18px; font-weight: 700; padding: 10px 12px; }
    .input-area textarea::placeholder { font-size: 13px; font-weight: 400; }
    .btn { padding: 5px 18px; font-size: 12px; height: 30px; }
    .result-header h3 { font-size: 18px; }
    .list-wrap ul li { font-size: 16px; font-weight: 700; padding: 2px 0; }
    .result-block { padding-bottom: 12px; margin-bottom: 18px; }
    .cpy { font-size: 14px; font-weight: 700; padding: 5px 16px; }
    .group-label { font-size: 15px; }
    .group-count { font-size: 12px; }
    .nums-line { font-size: 16px; }
    .num-item { font-size: 16px; }
    .dash { font-size: 14px; }
    .summary { font-size: 15px; gap: 4px 10px; padding: 8px 8px 8px 0; }
}