/* ============================================
   中国专项附加扣除策略分配计算器 - 样式
   清新薄荷绿 + 暖白风格
   ============================================ */

/* CSS变量 */
:root {
  --primary: #10B981;
  --primary-light: #34D399;
  --primary-dark: #059669;
  --primary-bg: #ECFDF5;
  --accent: #F59E0B;
  --accent-light: #FCD34D;
  --bg: #FAFAF9;
  --bg-card: #FFFFFF;
  --bg-section: #F0FDF4;
  --text: #1F2937;
  --text-secondary: #6B7280;
  --text-light: #9CA3AF;
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基础重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

/* 背景装饰 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(16,185,129,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(52,211,153,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(16,185,129,0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* 容器 */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ===== 导航栏 ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(16,185,129,0.1);
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.navbar-logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(16,185,129,0.3);
}

.navbar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.navbar-links {
  display: flex;
  gap: 8px;
}

.navbar-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 20px;
  transition: var(--transition);
  font-weight: 500;
}

.navbar-links a:hover {
  color: var(--primary);
  background: var(--primary-bg);
}

/* ===== 英雄区 ===== */
.hero {
  padding: 120px 0 60px;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(16,185,129,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-bg);
  color: var(--primary-dark);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  border: 1px solid rgba(16,185,129,0.15);
}

.hero h1 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -1px;
  color: var(--text);
}

.hero h1 span {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(16,185,129,0.35);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16,185,129,0.45);
}

.hero-cta:active {
  transform: translateY(0);
}

.hero-features {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}

.hero-feature-icon {
  width: 32px;
  height: 32px;
  background: var(--primary-bg);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* ===== 区域标题 ===== */
.section {
  padding: 60px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-bg);
  color: var(--primary-dark);
  padding: 4px 14px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.section-desc {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* ===== 卡片通用 ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(16,185,129,0.2);
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

/* ===== 成员信息区 ===== */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.member-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  position: relative;
  transition: var(--transition);
  animation: fadeInUp 0.4s ease;
}

.member-card:hover {
  box-shadow: var(--shadow-md);
}

.member-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.member-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
}

.member-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.member-avatar.m0 { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.member-avatar.m1 { background: linear-gradient(135deg, #8B5CF6, #A78BFA); }
.member-avatar.m2 { background: linear-gradient(135deg, #F59E0B, #FCD34D); }
.member-avatar.m3 { background: linear-gradient(135deg, #EF4444, #F87171); }

.member-remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--border-light);
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: var(--transition);
}

.member-remove:hover {
  background: #FEE2E2;
  color: #EF4444;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  margin-bottom: 12px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  transition: var(--transition);
  outline: none;
  font-family: inherit;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.1);
}

.form-input::placeholder {
  color: var(--text-light);
}

.form-input-prefix {
  position: relative;
}

.form-input-prefix .form-input {
  padding-left: 32px;
}

.form-input-prefix::before {
  content: '¥';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 14px;
}

.add-member-btn {
  width: 100%;
  padding: 14px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.add-member-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-bg);
}

/* ===== 扣除项配置区 ===== */
.deduction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.deduction-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  transition: var(--transition);
  animation: fadeInUp 0.4s ease;
}

.deduction-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.08);
}

.deduction-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.deduction-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.deduction-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.deduction-icon.children { background: #FEF3C7; }
.deduction-icon.edu { background: #DBEAFE; }
.deduction-icon.medical { background: #FCE7F3; }
.deduction-icon.loan { background: #D1FAE5; }
.deduction-icon.rent { background: #E0E7FF; }

.deduction-name {
  font-weight: 600;
  font-size: 15px;
}

.deduction-amount {
  font-size: 12px;
  color: var(--text-light);
}

/* 开关 */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--border);
  border-radius: 24px;
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.deduction-body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  display: none;
}

.deduction-card.active .deduction-body {
  display: block;
  animation: fadeIn 0.3s ease;
}

.deduction-body .form-group {
  margin-bottom: 10px;
}

.deduction-body .form-group:last-child {
  margin-bottom: 0;
}

.form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  transition: var(--transition);
  outline: none;
  font-family: inherit;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.1);
}

/* ===== 计算按钮 ===== */
.calc-btn-wrap {
  text-align: center;
  padding: 32px 0;
}

.calc-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 16px 48px;
  border-radius: 50px;
  font-size: 17px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(16,185,129,0.35);
  letter-spacing: 0.5px;
}

.calc-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16,185,129,0.45);
}

.calc-btn:active {
  transform: translateY(0);
}

.calc-btn.loading {
  opacity: 0.7;
  pointer-events: none;
}

.calc-btn svg {
  width: 20px;
  height: 20px;
}

/* ===== 结果区 ===== */
.result-section {
  display: none;
  animation: fadeInUp 0.5s ease;
}

.result-section.visible {
  display: block;
}

.result-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.result-stat {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  transition: var(--transition);
}

.result-stat:hover {
  box-shadow: var(--shadow-md);
}

.result-stat.highlight {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-color: transparent;
}

.result-stat-label {
  font-size: 13px;
  opacity: 0.8;
  margin-bottom: 4px;
}

.result-stat-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.result-stat-unit {
  font-size: 14px;
  font-weight: 400;
  opacity: 0.7;
}

.result-stat-sub {
  font-size: 12px;
  opacity: 0.6;
  margin-top: 4px;
}

/* 结果详情表格 */
.result-detail {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 24px;
}

.result-detail-header {
  padding: 16px 24px;
  background: var(--primary-bg);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
}

.result-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.result-table td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-light);
}

.result-table tr:last-child td {
  border-bottom: none;
}

.result-table tr:hover td {
  background: var(--primary-bg);
}

.result-table .amount {
  font-weight: 600;
  color: var(--primary-dark);
}

.result-table .saved {
  color: var(--primary-dark);
  font-weight: 700;
}

/* 分配策略标签 */
.allocation-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  background: var(--primary-bg);
  color: var(--primary-dark);
}

.allocation-tag.optimal {
  background: var(--primary);
  color: white;
}

/* ===== 公式区 ===== */
.formula-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.formula-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  transition: var(--transition);
}

.formula-card:hover {
  box-shadow: var(--shadow-md);
}

.formula-card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.formula-box {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: "SF Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text);
  overflow-x: auto;
  border: 1px solid var(--border-light);
}

.formula-box .keyword {
  color: var(--primary-dark);
  font-weight: 600;
}

.formula-box .number {
  color: #D97706;
}

.formula-box .op {
  color: #6366F1;
}

.formula-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.6;
}

/* 税率表 */
.tax-table-wrap {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-top: 24px;
}

.tax-table {
  width: 100%;
  border-collapse: collapse;
}

.tax-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.tax-table td {
  padding: 10px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-light);
}

.tax-table tr:last-child td {
  border-bottom: none;
}

.tax-table tr:hover td {
  background: var(--primary-bg);
}

.tax-rate-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--border-light);
  overflow: hidden;
  min-width: 60px;
}

.tax-rate-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  transition: width 0.5s ease;
}

/* ===== 示例区 ===== */
.example-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.example-tab {
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.example-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.example-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.example-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.example-content.active {
  display: block;
}

.example-scenario {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 16px;
}

.example-scenario h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.example-step {
  padding: 12px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.7;
  border-left: 3px solid var(--primary);
}

.example-step:last-child {
  margin-bottom: 0;
}

.example-result {
  margin-top: 16px;
  padding: 16px;
  background: var(--primary-bg);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16,185,129,0.15);
}

.example-result strong {
  color: var(--primary-dark);
}

/* FAQ */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 12px;
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  box-shadow: var(--shadow-sm);
}

.faq-question {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
}

.faq-question::after {
  content: '+';
  font-size: 18px;
  color: var(--text-light);
  transition: var(--transition);
  flex-shrink: 0;
}

.faq-item.open .faq-question::after {
  content: '−';
  color: var(--primary);
}

.faq-answer {
  padding: 0 20px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  display: none;
}

.faq-item.open .faq-answer {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* ===== 页脚 ===== */
.footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.footer-text {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.8;
}

.footer-link {
  color: var(--primary);
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

/* ===== 广告区 ===== */
.ad-container {
  max-width: 728px;
  margin: 24px auto;
  min-height: 90px;
  width: 100%;
}

/* ===== 动画 ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin {
  animation: spin 1s linear infinite;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 28px;
  }

  .hero-desc {
    font-size: 15px;
  }

  .hero-features {
    gap: 20px;
  }

  .section-title {
    font-size: 22px;
  }

  .members-grid,
  .deduction-grid,
  .formula-grid {
    grid-template-columns: 1fr;
  }

  .result-summary {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .navbar-links {
    display: none;
  }

  .result-table-wrap {
    overflow-x: auto;
  }

  .result-table {
    min-width: 500px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 100px 0 40px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .calc-btn {
    padding: 14px 32px;
    font-size: 15px;
  }

  .result-stat-value {
    font-size: 22px;
  }
}

/* ===== 工具类 ===== */
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-secondary); }
.text-sm { font-size: 13px; }
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.hidden { display: none !important; }

/* 提示条 */
.tip-bar {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  color: #92400E;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 16px;
}

.tip-bar-icon {
  flex-shrink: 0;
  font-size: 16px;
}

/* 分割线 */
.divider {
  height: 1px;
  background: var(--border);
  margin: 40px 0;
}

/* 回到顶部 */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  opacity: 0;
  pointer-events: none;
  z-index: 50;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}
