/* 灵活用工个税计算器独立版 - 大气设计样式文件 */

/* CSS变量定义 - 大气主题色系 */
:root {
    --primary-color: #fbc16a;
    --primary-light: #fbc779;
    --primary-dark: #e8a642;
    --primary-gradient: linear-gradient(135deg, #fbc16a 0%, #fbc779 50%, #fbc16a 100%);
    --primary-gradient-reverse: linear-gradient(135deg, #fbc779 0%, #fbc16a 50%, #fbc779 100%);
    
    /* 毛玻璃效果 */
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-bg-hover: rgba(255, 255, 255, 0.35);
    --glass-bg-strong: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px rgba(251, 193, 106, 0.15);
    --glass-shadow-strong: 0 16px 40px rgba(251, 193, 106, 0.25);
    
    /* 文字颜色 */
    --text-primary: #2c3e50;
    --text-secondary: #5a6c7d;
    --text-light: #8a9ba8;
    --text-white: #ffffff;
    
    /* 背景色 */
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --warm-overlay: linear-gradient(135deg, rgba(251, 193, 106, 0.1) 0%, rgba(251, 199, 121, 0.05) 100%);
}

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-gradient);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* 优化的背景层 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--warm-overlay);
    pointer-events: none;
    z-index: -1;
}

/* 动态背景粒子效果 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1.5" fill="rgba(255,255,255,0.1)"><animate attributeName="opacity" values="0.1;0.3;0.1" dur="4s" repeatCount="indefinite"/></circle><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.15)"><animate attributeName="opacity" values="0.15;0.4;0.15" dur="6s" repeatCount="indefinite"/></circle><circle cx="40" cy="80" r="0.8" fill="rgba(255,255,255,0.2)"><animate attributeName="opacity" values="0.2;0.5;0.2" dur="3s" repeatCount="indefinite"/></circle><circle cx="70" cy="10" r="1.2" fill="rgba(255,255,255,0.12)"><animate attributeName="opacity" values="0.12;0.35;0.12" dur="5s" repeatCount="indefinite"/></circle><circle cx="10" cy="70" r="0.9" fill="rgba(255,255,255,0.18)"><animate attributeName="opacity" values="0.18;0.4;0.18" dur="4.5s" repeatCount="indefinite"/></circle></svg>') repeat;
    pointer-events: none;
    z-index: -1;
    animation: particleFloat 25s linear infinite;
}

@keyframes particleFloat {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-100px) rotate(360deg); }
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 - 强化毛玻璃效果 */
.header {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    padding: 1.2rem 0;
    box-shadow: var(--glass-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--glass-border);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    text-shadow: 0 2px 8px rgba(251, 193, 106, 0.3);
    transition: all 0.3s ease;
    letter-spacing: -0.5px;
}

.logo:hover {
    color: var(--primary-dark);
    transform: translateY(-1px);
    text-shadow: 0 4px 12px rgba(251, 193, 106, 0.4);
}

/* 汉堡菜单按钮 */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    gap: 4px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* 导航菜单 */
.nav-menu {
    display: block;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--glass-bg);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: -1;
    border-radius: 12px;
}

.nav-links a:hover::before,
.nav-links a.active::before {
    opacity: 1;
    background: var(--glass-bg-hover);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 193, 106, 0.2);
}

/* 主要内容区域 */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* 计算器容器 - 强化毛玻璃效果 */
.calculator-container,
.policy-container {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--glass-shadow-strong);
    margin-bottom: 2rem;
    animation: slideUp 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.calculator-container::before,
.policy-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-gradient);
    opacity: 0.8;
}

/* 页面标题 */
.page-title h1 {
    color: var(--text-primary);
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    animation: fadeInDown 0.8s ease-out;
}

.page-title p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: 400;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

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

/* 页面标题 */
.page-title {
    text-align: center;
    margin-bottom: 2rem;
}

.page-title h1 {
    color: #333;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    animation: fadeInDown 0.8s ease-out;
}

.page-title p {
    color: #666;
    font-size: 1.1rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

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

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

/* 计算模式选择 */
.calculation-mode {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.mode-btn {
    padding: 14px 28px;
    border: 2px solid var(--primary-color);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--primary-color);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.mode-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

.mode-btn:hover::before {
    left: 100%;
}

.mode-btn:hover,
.mode-btn.active {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(251, 193, 106, 0.4);
    border-color: var(--primary-light);
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
    animation: slideInLeft 0.6s ease-out;
}

.form-group:nth-child(even) {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 表单标签 */
.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

/* 输入框和选择框 - 强化毛玻璃效果 */
.form-group input,
.form-group select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--glass-border);
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: var(--text-primary);
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--glass-bg-hover);
    box-shadow: 0 0 0 4px rgba(251, 193, 106, 0.2), 0 8px 25px rgba(251, 193, 106, 0.15);
    transform: translateY(-3px);
}

.form-group input::placeholder {
    color: var(--text-light);
    font-style: normal;
    font-weight: 400;
}

/* 动态输入框 */
.dynamic-inputs {
    border: 2px dashed var(--glass-border);
    border-radius: 18px;
    padding: 2rem;
    margin: 1.5rem 0;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dynamic-inputs::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, var(--primary-color), transparent);
    animation: borderRotate 6s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

.dynamic-inputs:hover::before {
    opacity: 0.3;
}

.dynamic-inputs:hover {
    border-color: var(--primary-color);
    background: var(--glass-bg-hover);
    transform: translateY(-3px);
    box-shadow: var(--glass-shadow);
}

@keyframes borderRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 月份选择器 */
.month-selector {
    margin-bottom: 2rem;
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.month-selector h4 {
    text-align: center;
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.month-btn {
    padding: 14px 10px;
    border: 2px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #666;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(251, 193, 106, 0.08);
}

.month-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--primary-gradient);
    border-radius: 50%;
    transition: all 0.4s ease;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.month-btn:hover::before {
    width: 150%;
    height: 150%;
}

.month-btn:hover {
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(251, 193, 106, 0.25);
}

.month-btn.selected {
    background: var(--primary-gradient);
    color: white;
    border-color: var(--primary-light);
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(251, 193, 106, 0.3);
}

.month-btn.selected::after {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.month-btn.has-data {
    background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
    border-color: #28a745;
}

/* 收入输入组样式 */
.income-input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: end;
    animation: bounceIn 0.5s ease-out;
    background: white;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    position: relative;
    transition: all 0.3s ease;
}

.income-input-group::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #fbc16a, #f8971c);
    border-radius: 2px 0 0 2px;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.income-input-group:hover::before {
    transform: scaleY(1);
}

.income-input-group:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.income-input-group .form-group {
    margin-bottom: 0;
    flex: 1;
    position: relative;
}

.income-input-group .month-label {
    background: linear-gradient(135deg, #fbc16a, #f8971c);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 0.5rem;
    position: relative;
    overflow: hidden;
}

.income-input-group .month-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.income-input-group:hover .month-label::before {
    left: 100%;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.remove-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: fit-content;
}

.remove-btn:hover {
    background: #c0392b;
    transform: scale(1.05);
}

.add-month-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: block;
    margin: 1rem auto;
}

.add-month-btn:hover {
    background: #219a52;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(39, 174, 96, 0.3);
}

/* 计算按钮 */
.calculate-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 18px 36px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 2rem auto;
    min-width: 220px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(251, 193, 106, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.calculate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.calculate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(251, 193, 106, 0.4);
}

.calculate-btn:hover::before {
    left: 100%;
}

.calculate-btn:active {
    transform: translateY(-1px);
}

/* 结果显示增强 */
.result-container {
    margin-top: 2rem;
    padding: 2.5rem;
    background: var(--warm-white);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--primary-color);
    animation: slideUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
}

.result-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-gradient);
    z-index: -1;
    border-radius: 15px;
    opacity: 0;
    transition: opacity 0.3s;
}

.result-container:hover::before {
    opacity: 0.1;
}

.result-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(251, 193, 106, 0.1), transparent);
    transition: left 0.8s;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.summary-card:hover::before {
    left: 100%;
}

.summary-value {
    font-size: 2rem;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 0.5rem;
    animation: countUp 1s ease-out;
}

.summary-label {
    color: #666;
    font-weight: 600;
}

.month-badge {
    background: linear-gradient(135deg, #fbc16a, #f8971c);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.9rem;
}

.tax-amount {
    color: #e74c3c;
    font-weight: 600;
}

/* 动画效果 */
@keyframes countUp {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes tableRowSlide {
    from { 
        opacity: 0;
        transform: translateX(-30px);
    }
    to { 
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fireworkExplode {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(20); opacity: 0; }
}

@keyframes sparkFly {
    0% { 
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% { 
        transform: translate(var(--dx), var(--dy)) scale(0);
        opacity: 0;
    }
}

.result-container.show {
    display: block;
    animation: pulseIn 0.8s ease-out;
}

@keyframes pulseIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.result-title {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.result-item:hover {
    background: rgba(251, 193, 106, 0.1);
    border-radius: 8px;
    padding-left: 1rem;
    padding-right: 1rem;
}

.result-item:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.1rem;
    color: #e74c3c;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.result-table th {
    background: linear-gradient(135deg, #fbc16a, #f8971c);
    color: white;
    padding: 12px;
    text-align: center;
    font-weight: 600;
}

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

.result-table tr:hover {
    background: #f8f9fa;
}

.result-table .total-row {
    background: #e8f5e8;
    font-weight: 700;
}

/* 政策页面样式 */
.policy-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    background: white;
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.policy-nav button {
    background: none;
    border: none;
    padding: 12px 24px;
    margin: 0 0.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #666;
}

.policy-nav button.active,
.policy-nav button:hover {
    background: #fbc16a;
    color: white;
    transform: translateY(-2px);
}

.policy-content {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.policy-content.active {
    display: block;
}

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

.policy-section {
    margin-bottom: 2rem;
}

.policy-section h3 {
    color: #fbc16a;
    border-bottom: 2px solid #fbc16a;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.highlight-box {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 1.5rem;
    border-radius: 15px;
    margin: 1rem 0;
    animation: slideInLeft 0.6s ease-out;
}

.formula-box {
    background: #f8f9fa;
    border-left: 5px solid #fbc16a;
    padding: 1.5rem;
    margin: 1rem 0;
    border-radius: 0 15px 15px 0;
    font-family: 'Courier New', monospace;
}

.example-box {
    background: #e8f5e8;
    border: 2px solid #27ae60;
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.policy-source {
    background: #fff3cd;
    border: 2px solid #ffeaa7;
    border-radius: 15px;
    padding: 1rem;
    margin: 1rem 0;
}

/* 更新通知 - 优雅设计 */
.update-notice {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid var(--primary-color);
    color: var(--text-primary);
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    text-align: center;
    animation: gentleGlow 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.update-notice::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
}

.update-notice h4 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.update-notice p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

@keyframes gentleGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(251, 193, 106, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(251, 193, 106, 0.3);
    }
}

/* 底部 */
.footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
    border-top: 1px solid #eee;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .container {
        padding: 0 10px !important;
    }
    
    .header-content {
        position: relative !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .logo {
        font-size: 1.2rem !important;
        flex: 1;
    }
    
    /* 显示汉堡菜单按钮 */
    .mobile-menu-btn {
        display: flex !important;
        z-index: 102;
        order: 2;
    }
    
    /* 隐藏导航菜单，点击时显示 */
    .nav-menu {
        position: absolute !important;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(20px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        border-radius: 0 0 15px 15px;
        z-index: 101;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        order: 3;
    }
    
    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
    }
    
    .nav-links a {
        padding: 1rem 1.5rem;
        display: block;
        text-align: center;
        border-bottom: 1px solid rgba(251, 193, 106, 0.1);
        transition: all 0.3s ease;
    }
    
    .nav-links a:hover {
        background: rgba(251, 193, 106, 0.1);
    }
    
    .nav-links li:last-child a {
        border-bottom: none;
    }
    
    .calculation-mode {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .mode-btn {
        width: 100%;
        max-width: 300px;
        padding: 1rem;
        font-size: 1rem;
    }
    
    .income-input-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .page-title h1 {
        font-size: 2rem;
    }
    
    .calculator-container,
    .policy-container {
        padding: 1rem;
        margin: 0.5rem 0;
    }
    
    .policy-nav {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .result-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    /* 月份选择按钮网格 */
    .month-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.5rem;
    }
    
    .month-btn {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
    
    /* 计算方式选择 */
    .calculation-method {
        padding: 0.75rem !important;
    }
    
    .calculation-method > div {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .calculation-method label {
        justify-content: center;
        padding: 0.5rem;
        background: rgba(255,255,255,0.5);
        border-radius: 6px;
    }
    
    /* 表单输入 */
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group input,
    .form-group select {
        font-size: 16px; /* 防止iOS缩放 */
        padding: 1rem;
    }
    
    /* 快速验证按钮 */
    .verification-buttons {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .verification-buttons button {
        width: 100% !important;
        padding: 0.75rem 1rem !important;
    }
    
    /* 计算按钮 */
    .calculate-btn {
        width: 100%;
        padding: 1.25rem;
        font-size: 1.1rem;
        margin: 1.5rem 0;
    }
    
    /* 结果展示 */
    .result-summary {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }
    
    .summary-card {
        padding: 1rem;
        text-align: center;
    }
    
    .result-table {
        font-size: 0.85rem;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .result-table th,
    .result-table td {
        padding: 0.5rem 0.25rem;
        min-width: 80px;
    }
    
    /* 示例卡片 */
    .example-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }
    
    .example-card {
        padding: 1rem;
        text-align: center;
    }
}

/* 超小屏幕适配 */
@media (max-width: 480px) {
    .container {
        padding: 0 5px;
    }
    
    .page-title h1 {
        font-size: 1.5rem;
    }
    
    .calculator-container,
    .policy-container {
        padding: 0.75rem;
        border-radius: 12px;
    }
    
    .month-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.4rem;
    }
    
    .month-btn {
        padding: 0.6rem 0.3rem;
        font-size: 0.8rem;
    }
    
    .result-table {
        font-size: 0.75rem;
    }
    
    .result-table th,
    .result-table td {
        padding: 0.4rem 0.2rem;
        min-width: 70px;
    }
    
    .summary-card {
        padding: 0.75rem;
    }
    
    .summary-value {
        font-size: 1.25rem;
    }
    
    .logo {
        font-size: 1rem !important;
        padding: 0.5rem !important;
    }
}

/* 横屏手机适配 */
@media (max-width: 896px) and (orientation: landscape) {
    .month-grid {
        grid-template-columns: repeat(6, 1fr) !important;
    }
    
    .calculation-method > div {
        flex-direction: row !important;
    }
    
    .result-summary {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* 移动端触摸优化 */
@media (hover: none) and (pointer: coarse) {
    /* 移动设备专用样式 */
    .month-btn:active {
        transform: scale(0.95);
        background: #fbc16a;
        color: white;
    }
    
    .calculate-btn:active {
        transform: scale(0.98);
    }
    
    .example-card:active {
        transform: scale(0.98);
    }
    
    .mode-btn:active {
        transform: scale(0.98);
    }
    
    /* 移动端按钮增大点击区域 */
    .month-btn {
        min-height: 44px; /* Apple建议的最小触摸目标 */
    }
    
    .nav-links a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 移动端滚动优化 */
    .result-container {
        -webkit-overflow-scrolling: touch;
    }
    
    .result-table {
        -webkit-overflow-scrolling: touch;
    }
    
    /* 移动端输入框优化 - 防止iOS自动缩放 */
    input[type="number"] {
        font-size: 16px !important;
        -webkit-appearance: none;
        appearance: none;
        border-radius: 8px;
    }
    
    select {
        font-size: 16px !important;
        -webkit-appearance: none;
        appearance: none;
        border-radius: 8px;
    }
    
    /* 移动端键盘优化 */
    input[type="number"]:focus {
        transform: none; /* 避免键盘弹出时的缩放问题 */
    }
    
    /* 移动端消息提示优化 */
    .message {
        max-width: 95% !important;
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem !important;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #fbc16a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* PWA安装提示动画 */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.9rem;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 消息提示框 - 优雅设计 */
.message {
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    margin: 1rem 0;
    animation: slideDown 0.5s ease-out;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    font-weight: 500;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.message.success {
    background: rgba(40, 167, 69, 0.1);
    color: #1e7e34;
    border-color: rgba(40, 167, 69, 0.3);
}

.message.error {
    background: rgba(220, 53, 69, 0.1);
    color: #721c24;
    border-color: rgba(220, 53, 69, 0.3);
}

.message.info {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
    border-color: var(--primary-color);
}

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

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #fbc16a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #f8971c;
}

/* 税负率样式 */
.tax-rate {
    font-weight: bold;
    color: #dc3545;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(220, 53, 69, 0.1);
}

/* 计算方式选择区域 */
.calculation-method {
    transition: all 0.3s ease;
}

.calculation-method:hover {
    background: #f0f8f0 !important;
}

.calculation-method input[type="radio"] {
    transform: scale(1.1);
}

.calculation-method label:hover {
    color: #28a745;
}

/* 快速验证按钮区域 */
button[onclick*="Example"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

/* 月份标识 */
.month-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: 500;
}

/* 税额高亮 */
.tax-amount {
    color: #e74c3c;
    font-weight: 600;
}

/* 表格条纹效果增强 */
.result-table tbody tr:nth-child(even) {
    background: rgba(0,0,0,0.02);
}

.result-table tbody tr:hover {
    background: rgba(251, 193, 106, 0.1);
    transform: scale(1.01);
    transition: all 0.3s ease;
}

/* Select 选择框样式 */
select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

select:hover {
    border-color: #fbc16a;
    box-shadow: 0 0 0 3px rgba(251, 193, 106, 0.1);
}

select:focus {
    border-color: #fbc16a;
    box-shadow: 0 0 0 3px rgba(251, 193, 106, 0.2);
    outline: none;
}

/* 工作月份数选择框特殊样式 */
#workingMonths {
    font-weight: 500;
    color: #333;
}

#workingMonths option {
    padding: 0.5rem;
    font-weight: 500;
}
