/* 税收计算器样式 */
.calculator-section {
    padding: 40px 0;
    background: #f5f5f5;
    min-height: 100vh;
}

.calculator-container {
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.calculator-title {
    text-align: center;
    color: #333;
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 600;
}

/* 标签页样式 */
.tab-container {
    margin-bottom: 20px;
}

.tab-buttons {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 0;
}

.tab-btn:first-child {
    border-radius: 4px 0 0 4px;
}

.tab-btn:last-child {
    border-radius: 0 4px 4px 0;
    border-left: none;
}

.tab-btn.active {
    background: #814597;
    color: white;
    border-color: #814597;
}

.tab-btn:hover {
    background: #814597;
    color: white;
    border-color: #814597;
}

/* 使用说明样式 */
.usage-instructions {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 3px solid #6c5ce7;
}

.usage-instructions h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1rem;
    font-weight: 600;
}

.usage-instructions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.usage-instructions li {
    padding: 4px 0;
    color: #666;
    position: relative;
    padding-left: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.usage-instructions li:before {
    content: "•";
    color: #6c5ce7;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* 操作按钮样式 */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
}

.btn-primary {
    background: #6c5ce7;
    color: white;
}

.btn-primary:hover {
    background: #5a4fcf;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #74b9ff;
    color: white;
}

.btn-secondary:hover {
    background: #0984e3;
    transform: translateY(-1px);
}

.btn-success {
    background: #00b894;
    color: white;
}

.btn-success:hover {
    background: #00a085;
    transform: translateY(-1px);
}

.btn-info {
    background: #00cec9;
    color: white;
}

.btn-info:hover {
    background: #00b3b0;
    transform: translateY(-1px);
}

.btn-danger {
    background: #e17055;
    color: white;
}

.btn-danger:hover {
    background: #d63031;
    transform: translateY(-1px);
}

/* 平台收入区域样式 */
.platform-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
}

.platform-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
    text-align: left;
    font-weight: 600;
}

/* 月收入网格样式 */
.monthly-income-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.month-input {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.month-input label {
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.month-input input {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.month-input input:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.1);
}

.calculation-note {
    text-align: left;
    color: #666;
    font-style: italic;
    margin-top: 10px;
    font-size: 0.85rem;
}

/* 删除区域样式 */
.delete-section {
    text-align: right;
    margin-top: 15px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: none;
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 20px 30px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
}

.modal-body {
    padding: 30px;
}

.modal-body h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.modal-body h4 {
    color: #814597;
    margin: 25px 0 15px 0;
    font-size: 1.1rem;
}

.tax-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    font-size: 14px;
}

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

.tax-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

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

.calculation-formula {
    background-color: #e8f5e8;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #28a745;
}

.calculation-formula p {
    margin: 10px 0;
    line-height: 1.6;
    color: #333;
}

.policy-reference {
    background-color: #e7f3ff;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.policy-reference p {
    margin: 10px 0;
    line-height: 1.6;
    color: #333;
}

.policy-reference a {
    color: #6c5ce7;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.policy-reference a:hover {
    color: #5a4fcf;
    text-decoration: underline;
}

/* 删除按钮禁用状态 */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #6c757d !important;
    border-color: #6c757d !important;
}

/* 计算结果表格样式 */
.calculation-results {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.calculation-results h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
}

.table-container {
    overflow-x: auto;
    margin-bottom: 15px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.results-table th,
.results-table td {
    padding: 12px 8px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
}

.results-table th {
    background: #6c5ce7;
    color: white;
    font-weight: 600;
    white-space: nowrap;
}

.results-table tbody tr:hover {
    background-color: #f8f9fa;
}

.results-table tbody tr:nth-child(even) {
    background-color: #fdfdfd;
}

.results-table tbody tr:nth-child(even):hover {
    background-color: #f0f0f0;
}

/* 数字列右对齐 */
.results-table td:not(:first-child) {
    text-align: right;
}

/* 月份列左对齐 */
.results-table td:first-child {
    text-align: center;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .calculator-container {
        padding: 20px;
        margin: 20px;
    }
    
    .calculator-title {
        font-size: 1.8rem;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-buttons .btn {
        width: 100%;
        max-width: none;
        margin-bottom: 10px;
    }
    
    .tab-buttons {
        flex-direction: column;
    }
    
    .tab-btn {
        border-radius: 4px;
        border: 1px solid #814597;
        margin-bottom: 5px;
    }
    
    .monthly-income-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-header,
    .modal-body {
        padding: 20px;
    }
    
    .tax-table {
        font-size: 12px;
    }
    
    .tax-table th,
    .tax-table td {
        padding: 8px 4px;
    }
    
    .results-table {
        font-size: 12px;
    }
    
    .results-table th,
    .results-table td {
        padding: 8px 4px;
    }
    
    .calculation-results {
        padding: 15px;
    }
}