* {
    box-sizing: border-box;
    margin: 0;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans', sans-serif;
}

body {
    background: #f5f7fc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 16px 40px;
}

.calculator-card {
    max-width: 1280px;
    width: 100%;
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06), 0 4px 8px rgba(0, 0, 0, 0.02);
    padding: 28px 24px 32px;
    transition: all 0.2s;
    border: 1px solid #e9ebf0;
    position: relative;
}

/* 返回首页按钮 */
.back-home-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    z-index: 10;
}

.back-home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.back-home-btn i {
    font-size: 1rem;
}

@media (max-width: 768px) {
    .back-home-btn {
        top: 15px;
        right: 15px;
        padding: 8px 14px;
        font-size: 0.85rem;
    }
}

h1 {
    font-size: 1.9rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #0b1c3a;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.subhead {
    color: #5b687c;
    margin-bottom: 28px;
    font-weight: 400;
    border-left: 4px solid #2a7de1;
    padding-left: 16px;
    font-size: 1rem;
}

/* 输入面板 — 响应式网格 */
.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px 24px;
    background: #f9fafc;
    padding: 24px 22px;
    border-radius: 22px;
    margin-bottom: 30px;
    border: 1px solid #eef1f6;
}

.input-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-item label {
    font-weight: 550;
    color: #1e2f4a;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-item label i {
    color: #5e7a9c;
    font-style: normal;
    font-size: 0.85rem;
}

.input-item input, .input-item select {
    padding: 12px 14px;
    border: 1.5px solid #d8dee9;
    border-radius: 18px;
    font-size: 1rem;
    background: white;
    transition: border 0.15s, box-shadow 0.15s;
    outline: none;
    font-weight: 450;
    color: #0b1c3a;
}

.input-item input:focus, .input-item select:focus {
    border-color: #2a7de1;
    box-shadow: 0 0 0 3px rgba(42, 125, 225, 0.15);
}

.input-item input[type="number"] {
    -moz-appearance: textfield;
}
.input-item input[type="number"]::-webkit-outer-spin-button,
.input-item input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.hint-badge {
    font-size: 0.8rem;
    color: #6b7f98;
    margin-top: 4px;
}

/* 结果卡片 */
.results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin: 28px 0 32px;
}

.result-card {
    background: #f2f6fe;
    border-radius: 24px;
    padding: 22px 18px;
    text-align: left;
    border: 1px solid #d9e4f5;
    transition: transform 0.1s;
}

.result-card.highlight {
    background: linear-gradient(145deg, #0b2542 0%, #1a3a5f 100%);
    color: white;
    border: none;
}
.result-card.highlight .result-label {
    color: #bdd0ec;
}
.result-card.highlight .result-value {
    color: white;
}

.result-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 500;
    color: #2e4b6e;
    margin-bottom: 8px;
}

.result-value {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.2;
    color: #0a1e33;
    word-break: break-word;
}

.result-sub {
    font-size: 0.9rem;
    opacity: 0.75;
    margin-top: 6px;
}

/* 表格区域 */
.table-wrapper {
    overflow-x: auto;
    margin: 24px 0 10px;
    border-radius: 20px;
    border: 1px solid #e6eaf0;
    background: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.tax-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 880px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.tax-table th {
    background: #eef2f9;
    color: #1e3a5f;
    font-weight: 600;
    padding: 16px 12px;
    text-align: right;
    border-bottom: 2px solid #cbd6e6;
}

.tax-table td {
    padding: 14px 12px;
    text-align: right;
    border-bottom: 1px solid #e2e8f0;
    color: #1a2c41;
}

.tax-table tbody tr:hover {
    background: #fafcff;
}

.tax-table th:first-child, .tax-table td:first-child {
    text-align: center;
    font-weight: 550;
}

.table-note {
    padding: 12px 8px;
    color: #4a617c;
    font-size: 0.85rem;
}

/* 底部 */
.footer {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    color: #6f7d92;
    font-size: 0.85rem;
    border-top: 1px dashed #cbd5e1;
    padding-top: 22px;
}

.disclaimer {
    background: #fef6e6;
    padding: 10px 18px;
    border-radius: 40px;
    color: #885f0e;
}

details {
    margin-bottom: 10px;
    color: #2c3e5c;
}
summary {
    font-weight: 600;
    cursor: pointer;
    color: #1f4870;
    padding: 6px 0;
}
.instruction-content {
    background: #f3f6fb;
    padding: 18px 20px;
    border-radius: 18px;
    font-size: 0.9rem;
    margin-top: 8px;
}
.instruction-content code {
    background: #e2eaf3;
    padding: 2px 8px;
    border-radius: 40px;
}

@media (max-width: 640px) {
    .calculator-card { padding: 20px 16px; }
    h1 { font-size: 1.6rem; }
    .results-grid { grid-template-columns: repeat(2, 1fr); }
    .result-value { font-size: 1.8rem; }
}
@media (max-width: 420px) {
    .results-grid { grid-template-columns: 1fr; }
}

/* ========== 年终奖计税对比区域 ========== */
.bonus-comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 16px;
}

.bonus-card {
    background: linear-gradient(135deg, #f8f9fc 0%, #eef1f7 100%);
    border-radius: 20px;
    padding: 24px 20px;
    border: 2px solid #d9e0ed;
    transition: all 0.3s ease;
    position: relative;
}

.bonus-card.recommended {
    border-color: #28a745;
    background: linear-gradient(135deg, #f0fff4 0%, #e6f7ed 100%);
    box-shadow: 0 4px 16px rgba(40, 167, 69, 0.15);
}

.bonus-card.recommended::before {
    content: '✅ 推荐';
    position: absolute;
    top: -12px;
    right: 16px;
    background: #28a745;
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.bonus-header {
    margin-bottom: 16px;
}

.bonus-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a3a5f;
    margin-bottom: 6px;
}

.bonus-badge {
    display: inline-block;
    font-size: 0.75rem;
    background: #e1ebfa;
    color: #1a4d8c;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.bonus-details {
    background: white;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
}

.bonus-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #e8ecf1;
}

.bonus-row:last-child {
    border-bottom: none;
}

.bonus-label {
    font-size: 0.9rem;
    color: #4a617c;
    font-weight: 500;
}

.bonus-value {
    font-size: 1.3rem;
    font-weight: 700;
}

.bonus-value.tax {
    color: #dc3545;
}

.bonus-value.net {
    color: #28a745;
}

.bonus-tip {
    font-size: 0.8rem;
    color: #6b7f98;
    line-height: 1.5;
    text-align: center;
}

.bonus-note {
    background: #fff8e6;
    border-left: 4px solid #ffc107;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 0.85rem;
    color: #856404;
    line-height: 1.6;
}

.bonus-note strong {
    color: #533f03;
}

@media (max-width: 768px) {
    .bonus-comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .bonus-card.recommended::before {
        font-size: 0.75rem;
        padding: 3px 10px;
    }
}
