/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 导航标签 */
.nav-tabs {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-tabs .container {
    display: flex;
    gap: 0;
}

.tab-btn {
    flex: 1;
    padding: 1rem 2rem;
    border: none;
    background: white;
    color: #666;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: #f8f9fa;
    color: #333;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #f8f9ff;
}

/* 主要内容 */
main {
    padding: 2rem 0;
}

.tab-content {
    display: none;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

/* 表单样式 */
.calculator-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.calc-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 1rem;
}

.calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.calc-btn:active {
    transform: translateY(0);
}

/* 结果显示 */
.result {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9ff;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    display: none;
}

.result.show {
    display: block;
    animation: fadeInUp 0.5s ease;
}

.result h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e1e5e9;
}

.result-item:last-child {
    border-bottom: none;
    font-weight: 600;
    font-size: 1.1rem;
    color: #d63384;
}

.result-label {
    color: #666;
}

.result-value {
    font-weight: 600;
    color: #333;
}

/* 税率表 */
.tax-info {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.tax-info h2 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    text-align: center;
}

.tax-table {
    margin-bottom: 2rem;
}

.tax-table h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

table th,
table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

table th {
    background: #f8f9ff;
    font-weight: 600;
    color: #667eea;
}

table tr:hover {
    background: #f8f9fa;
}

/* 底部 */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .nav-tabs .container {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1 1 50%;
        min-width: 50%;
    }
    
    .tab-content {
        padding: 1.5rem;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    table th,
    table td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .tab-btn {
        flex: 1 1 100%;
        min-width: 100%;
    }
    
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* 隐藏元素 */
.hidden {
    display: none !important;
}

/* 节税方案样式 */
.tax-planning-info {
    margin-top: 2rem;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.tax-planning-info h3 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

.comparison-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.comparison-card {
    background: #f8f9ff;
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid #667eea;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comparison-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.comparison-card h4 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.comparison-card ul {
    list-style: none;
    padding: 0;
}

.comparison-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e1e5e9;
    color: #555;
    position: relative;
    padding-left: 1.5rem;
}

.comparison-card li:last-child {
    border-bottom: none;
}

.comparison-card li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

/* 对比结果表格 */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #e1e5e9;
}

.comparison-table th {
    background: #667eea;
    color: white;
    font-weight: 600;
}

.comparison-table tr:nth-child(even) {
    background: #f8f9ff;
}

.comparison-table tr:hover {
    background: #f0f2ff;
}

.best-option {
    background: #d4edda !important;
    color: #155724;
    font-weight: 600;
}

.savings-highlight {
    color: #28a745;
    font-weight: 600;
}

@media (max-width: 768px) {
    .comparison-cards {
        grid-template-columns: 1fr;
    }
    
    .comparison-table {
        font-size: 0.9rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.5rem;
    }
}