/* 工资计算器样式 */
.salary-calculator-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 20px;
}

.salary-calculator-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 页面头部 */
.calculator-header {
    text-align: center;
    margin-bottom: 40px;
}

.header-content {
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calculator-title {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.calculator-title i {
    font-size: 32px;
}

.calculator-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.calculator-badge {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.badge-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: #fff;
    backdrop-filter: blur(10px);
}

/* 快捷预设 */
.quick-presets {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
}

.presets-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 16px;
}

.presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.preset-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 12px 16px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.preset-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* 计算主体 */
.calculator-main {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

/* 输入区域 */
.calculator-inputs {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .input-grid {
        grid-template-columns: 1fr;
    }
}

.input-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: #667eea;
}

.input-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group {
    position: relative;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
}

.input-group label .unit {
    margin-left: auto;
    font-weight: 400;
    color: #888;
}

.input-group label i {
    color: #667eea;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control::placeholder {
    color: #aaa;
}

.input-hint {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn {
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* 结果展示 */
.calculator-results {
    padding: 30px;
}

.result-header {
    margin-bottom: 20px;
}

/* 结果卡片 */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.result-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.result-card.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.result-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 22px;
}

.result-card:not(.primary) .result-icon {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.result-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    opacity: 0.8;
}

.result-value {
    font-size: 24px;
    font-weight: 700;
}

.result-value.highlight {
    font-size: 32px;
}

.result-hint {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 4px;
}

/* 扣款明细 */
.deduction-section {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.details-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.details-title i {
    color: #667eea;
}

.deduction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.deduction-item {
    background: #fff;
    padding: 14px;
    border-radius: 8px;
    text-align: center;
}

.deduction-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.deduction-value {
    font-size: 18px;
    font-weight: 700;
    color: #dc3545;
}

/* 图表区域 */
.comparison-section {
    margin-bottom: 30px;
}

.chart-container {
    height: 300px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

/* 工资条 */
.salary-slip {
    margin-bottom: 30px;
}

.salary-slip-content {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
}

.slip-header {
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 2px solid #667eea;
    margin-bottom: 16px;
}

.slip-header h4 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.slip-section {
    margin-bottom: 16px;
}

.slip-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 16px;
    background: #fff;
    margin-bottom: 4px;
    border-radius: 6px;
}

.slip-row.total-row {
    background: #f8f9fa;
    font-weight: 600;
}

.slip-row.final-row {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.slip-label {
    font-size: 14px;
}

.slip-value {
    font-size: 14px;
    font-weight: 600;
}

.slip-value.final-value {
    font-size: 20px;
}

.slip-divider {
    height: 1px;
    background: #ddd;
    margin: 16px 0;
}

.no-data {
    text-align: center;
    padding: 30px;
    color: #999;
}

/* 个税税率表 */
.tax-info {
    margin-bottom: 30px;
}

.tax-table {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
}

.tax-table table {
    width: 100%;
    border-collapse: collapse;
}

.tax-table th,
.tax-table td {
    padding: 12px 16px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.tax-table th {
    background: #667eea;
    color: #fff;
    font-weight: 600;
}

.tax-table tr:nth-child(even) {
    background: #fff;
}

.tax-table tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

/* 使用说明 */
.calculator-guide {
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
}

.guide-title {
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.guide-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.guide-item {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 24px;
}

.guide-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 22px;
    color: #fff;
}

.guide-item h3 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
}

.guide-item p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin-bottom: 8px;
}

.guide-pros {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pro-tag {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #333;
    color: #fff;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

/* 响应式 */
@media (max-width: 768px) {
    .salary-calculator-section {
        padding: 30px 15px;
    }

    .calculator-title {
        font-size: 28px;
    }

    .calculator-inputs,
    .calculator-results {
        padding: 20px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .result-value.highlight {
        font-size: 26px;
    }

    .guide-content {
        grid-template-columns: 1fr;
    }

    .slip-row {
        flex-direction: column;
        gap: 4px;
        text-align: left;
    }
}