/* ═══════════════════════════════════════════
   贷款计算器 - 大气豪华版样式
   设计：深蓝+金色主调，大面积留白，强视觉冲击
   ═══════════════════════════════════════════ */

/* ---------- CSS变量 ---------- */
:root {
  --primary:     #0f1f3d;
  --primary-deep:#060d1f;
  --primary-med: #1a3664;
  --primary-light:#2563eb;
  --accent:      #f59e0b;
  --accent-light:#fbbf24;
  --success:     #10b981;
  --danger:      #ef4444;
  --bg:          #f4f7fb;
  --card:        #ffffff;
  --text:        #0f172a;
  --text-sec:    #475569;
  --text-muted:  #94a3b8;
  --border:      #e2e8f0;
  --shadow-sm:   0 1px 3px rgba(15,31,61,0.06);
  --shadow:      0 4px 24px rgba(15,31,61,0.08);
  --shadow-lg:   0 12px 48px rgba(15,31,61,0.12);
  --radius:      16px;
  --radius-sm:   10px;
  --radius-xs:   6px;
  --transition:   all 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ---------- 全局 ---------- */
*, *::before, *::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; }
body {
  font-family: 'PingFang SC','Microsoft YaHei','Helvetica Neue',Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
a { text-decoration:none; color:inherit; }
img { max-width:100%; display:block; }

/* ---------- 导航栏 ---------- */
.navbar-custom {
  background: rgba(15,31,61,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 2px 32px rgba(0,0,0,0.18);
  padding: 0;
  min-height: 64px;
  transition: var(--transition);
}
.navbar-custom .container { min-height:64px; }
.navbar-brand-custom {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff !important;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.navbar-brand-custom .brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.navbar-custom .nav-link {
  color: rgba(255,255,255,0.78) !important;
  font-weight: 500;
  font-size: 0.92rem;
  padding: 8px 16px !important;
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
}
.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
  color: #fff !important;
  background: rgba(255,255,255,0.1);
}
.navbar-custom .btn-login {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: var(--primary-deep) !important;
  border: none;
  border-radius: 20px;
  padding: 7px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  transition: var(--transition);
}
.navbar-custom .btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(245,158,11,0.4);
}

/* ---------- Hero 区域 ---------- */
.hero-section {
  position: relative;
  background: linear-gradient(160deg, #060d1f 0%, #0f1f3d 35%, #1a3664 70%, #2563eb 100%);
  color: #fff;
  padding: 72px 0 100px;
  text-align: center;
  overflow: hidden;
}
/* 背景装饰圆 */
.hero-section::before {
  content:'';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,0.12) 0%, transparent 70%);
  top: -200px; right: -100px;
  pointer-events: none;
}
.hero-section::after {
  content:'';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,0.15) 0%, transparent 70%);
  bottom: -150px; left: -80px;
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245,158,11,0.15);
  border: 1px solid rgba(245,158,11,0.3);
  color: var(--accent-light);
  border-radius: 20px;
  padding: 6px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}
.hero-title {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}
.hero-title .highlight {
  background: linear-gradient(90deg, var(--accent-light), #fff, var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.1rem;
  opacity: 0.75;
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.hero-stat-item { text-align:center; }
.hero-stat-num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent-light);
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.82rem;
  opacity: 0.65;
  margin-top: 4px;
}

/* Hero 底部波浪 */
.hero-wave {
  position: absolute;
  bottom: -1px; left: 0; width: 100%;
  line-height: 0;
}
.hero-wave svg { display:block; width:100%; height:auto; }

/* ---------- 功能亮点 ---------- */
.features-strip {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  position: relative;
  z-index: 10;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-sec);
}
.feature-item .fi-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

/* ---------- 计算器标签栏 ---------- */
.calc-tabs-wrap {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 64px;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.calc-tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 2px;
  padding: 0 8px;
}
.calc-tabs::-webkit-scrollbar { display:none; }
.calc-tab-btn {
  white-space: nowrap;
  border: none;
  background: none;
  padding: 16px 20px 14px;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0;
}
.calc-tab-btn:hover { color: var(--primary-light); background: rgba(37,99,235,0.04); }
.calc-tab-btn.active {
  color: var(--primary-light);
  border-bottom-color: var(--primary-light);
  font-weight: 700;
  background: rgba(37,99,235,0.04);
}

/* ---------- 计算器主区域 ---------- */
.calc-section { padding: 32px 0 60px; }
.calc-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid rgba(226,232,240,0.6);
  transition: var(--transition);
}
.calc-card:hover { box-shadow: var(--shadow-lg); }
.calc-card-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-med) 60%, var(--primary-light) 100%);
  color: #fff;
  padding: 24px 28px 22px;
  position: relative;
  overflow: hidden;
}
.calc-card-header::after {
  content:'';
  position: absolute;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(245,158,11,0.08);
  top: -60px; right: -40px;
  pointer-events: none;
}
.calc-card-header h5 { margin:0; font-weight:800; font-size:1.1rem; position:relative; z-index:1; }
.calc-card-header p { margin:6px 0 0; opacity:0.78; font-size:0.84rem; position:relative; z-index:1; }
.calc-card-body { padding: 28px; }

/* ---------- 表单 ---------- */
.form-label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 2px;
}
.form-label .required { color:var(--danger); margin-left:2px; }
.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 0.93rem;
  transition: var(--transition);
  background: #fff;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
  outline: none;
}
.input-group-text {
  background: #f8fafc;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
}
.form-check-input:checked { background-color:var(--primary-light); border-color:var(--primary-light); }

/* ---------- 按钮 ---------- */
.btn-calc {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-med) 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 32px;
  font-size: 1.02rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(37,99,235,0.3);
  letter-spacing: 0.5px;
  width: 100%;
  margin-top: 4px;
  position: relative;
  overflow: hidden;
}
.btn-calc::after {
  content:'';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s;
}
.btn-calc:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(37,99,235,0.4); }
.btn-calc:hover::after { opacity:1; }
.btn-calc:active { transform: translateY(0); }
.btn-reset {
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  border-radius: 12px;
  padding: 14px 24px;
  font-size: 0.92rem;
  background: #fff;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}
.btn-reset:hover { border-color:var(--danger); color:var(--danger); background:#fff5f5; }

/* ---------- 结果区域 ---------- */
.result-section {
  background: linear-gradient(135deg, #f0f9ff 0%, #eff6ff 50%, #eef2ff 100%);
  border-radius: var(--radius);
  padding: 28px;
  margin-top: 24px;
  border: 1px solid #bfdbfe;
  display: none;
  animation: fadeSlideUp 0.5s ease;
}
.result-section.show { display:block; }
@keyframes fadeSlideUp {
  from { opacity:0; transform:translateY(16px); }
  to   { opacity:1; transform:translateY(0); }
}
.result-highlight {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-med) 50%, var(--primary-light) 100%);
  border-radius: 14px;
  padding: 28px 32px;
  color: #fff;
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.result-highlight::before {
  content:'';
  position: absolute;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(245,158,11,0.1);
  top: -60px; right: -40px;
}
.result-highlight .amount {
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: -1px;
  position: relative;
}
.result-highlight .amount .unit { font-size:0.55em; font-weight:600; margin-left:4px; opacity:0.8; }
.result-highlight .label { font-size:0.88rem; opacity:0.8; margin-top:6px; }
.result-stat {
  background: #fff;
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid rgba(226,232,240,0.6);
  transition: var(--transition);
}
.result-stat:hover { transform:translateY(-2px); box-shadow:0 6px 20px rgba(0,0,0,0.08); }
.result-stat .stat-val { font-size:1.3rem; font-weight:800; color:var(--primary-light); line-height:1.2; }
.result-stat .stat-label { font-size:0.78rem; color:var(--text-muted); margin-top:5px; }

/* ---------- 还款明细表 ---------- */
.schedule-table-wrap {
  max-height: 400px;
  overflow-y: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-top: 16px;
}
.schedule-table-wrap::-webkit-scrollbar { width:6px; }
.schedule-table-wrap::-webkit-scrollbar-thumb { background:var(--border); border-radius:3px; }
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.schedule-table thead th {
  background: var(--primary);
  color: #fff;
  padding: 12px 14px;
  text-align: center;
  position: sticky; top:0;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.3px;
}
.schedule-table tbody tr:nth-child(even) { background:#f8fafc; }
.schedule-table tbody td {
  padding: 10px 14px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  color: var(--text-sec);
}
.schedule-table tbody tr:hover { background:#eff6ff; }

/* ---------- 评估结果进度条 ---------- */
.eval-bar {
  height: 14px;
  border-radius: 7px;
  background: #e2e8f0;
  overflow: hidden;
  margin: 10px 0;
}
.eval-bar-fill {
  height: 100%;
  border-radius: 7px;
  transition: width 1s cubic-bezier(0.4,0,0.2,1);
  background: linear-gradient(90deg, var(--success), #34d399);
}
.eval-bar-fill.warn { background: linear-gradient(90deg, var(--accent), var(--accent-light)); }
.eval-bar-fill.danger { background: linear-gradient(90deg, var(--danger), #f87171); }

/* ---------- 分享按钮 ---------- */
.share-btns { display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; }
.share-btn {
  border:none; border-radius:22px; padding:7px 18px;
  font-size:0.83rem; cursor:pointer;
  display:flex; align-items:center; gap:5px;
  transition: var(--transition); font-weight:500;
}
.share-btn:hover { transform:translateY(-1px); opacity:0.9; }
.share-wechat { background:#07c160; color:#fff; }
.share-weibo  { background:#e6162d; color:#fff; }
.share-copy   { background:#f1f5f9; color:var(--text-sec); border:1px solid var(--border); }

/* ---------- 资讯区域 ---------- */
#news-section { background:#fff; padding:60px 0; }
.section-header { text-align:center; margin-bottom:40px; }
.section-header h4 {
  font-size:1.6rem; font-weight:800; color:var(--text);
  margin-bottom:8px;
}
.section-header p { color:var(--text-muted); font-size:0.95rem; }
.news-card {
  background:#fff;
  border-radius:var(--radius);
  padding:22px 24px;
  box-shadow:var(--shadow);
  transition:var(--transition);
  cursor:pointer;
  border:1px solid rgba(226,232,240,0.6);
  height:100%;
}
.news-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-lg); border-color:rgba(37,99,235,0.2); }
.news-card .news-tag {
  display:inline-block;
  background:linear-gradient(135deg, #eff6ff, #dbeafe);
  color:var(--primary-light);
  padding:3px 10px; border-radius:4px;
  font-size:0.75rem; font-weight:600;
}
.news-card .news-title { font-weight:700; font-size:0.97rem; color:var(--text); line-height:1.6; margin:10px 0 8px; }
.news-card .news-summary { font-size:0.84rem; color:var(--text-muted); line-height:1.6; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.news-card .news-meta { font-size:0.78rem; color:var(--text-muted); margin-top:12px; display:flex; align-items:center; gap:12px; }

/* ---------- 页脚 ---------- */
footer {
  background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary) 100%);
  color: rgba(255,255,255,0.65);
  padding: 56px 0 0;
  font-size: 0.88rem;
}
footer h6 { color:#fff; font-weight:700; margin-bottom:16px; font-size:0.95rem; }
footer a { color:rgba(255,255,255,0.6); transition:var(--transition); }
footer a:hover { color:var(--accent-light); }
.footer-links { list-style:none; padding:0; }
.footer-links li { margin-bottom:8px; }
.footer-links li a { font-size:0.85rem; }
.footer-bottom {
  border-top:1px solid rgba(255,255,255,0.08);
  margin-top:40px; padding:20px 0;
  text-align:center; font-size:0.82rem;
  color:rgba(255,255,255,0.4);
}
.footer-social {
  display:flex; gap:10px; margin-top:12px;
}
.footer-social a {
  width:36px; height:36px; border-radius:10px;
  background:rgba(255,255,255,0.08);
  display:flex; align-items:center; justify-content:center;
  transition:var(--transition); font-size:0.95rem;
}
.footer-social a:hover { background:var(--accent); color:#fff; }

/* ---------- 认证弹窗 ---------- */
.auth-modal .modal-header {
  background:linear-gradient(135deg, var(--primary), var(--primary-med));
  color:#fff; border-bottom:none; padding:20px 24px;
}
.auth-modal .modal-content { border-radius:16px; overflow:hidden; border:none; }
.auth-modal .nav-tabs { border-bottom:2px solid var(--border); }
.auth-modal .nav-tabs .nav-link {
  border:none; color:var(--text-muted); font-weight:600; padding:10px 20px;
}
.auth-modal .nav-tabs .nav-link.active {
  color:var(--primary-light); border-bottom:2px solid var(--primary-light);
  background:none;
}

/* ---------- Toast ---------- */
.toast-container { z-index:99999; }
.toast { border-radius:12px; font-size:0.9rem; }

/* ---------- 加载动画 ---------- */
.loading-spinner {
  display:inline-block; width:18px; height:18px;
  border:2px solid rgba(255,255,255,0.3); border-top-color:#fff;
  border-radius:50%; animation:spin 0.7s linear infinite;
  vertical-align:middle; margin-right:6px;
}
@keyframes spin { to{transform:rotate(360deg)} }

/* ---------- 空态 ---------- */
.empty-tip { text-align:center; padding:48px 0; color:var(--text-muted); }
.empty-tip .icon { font-size:3rem; margin-bottom:8px; }

/* ---------- 返回顶部 ---------- */
.back-to-top {
  position:fixed; bottom:24px; right:24px;
  width:46px; height:46px; border-radius:50%;
  background:var(--primary-light); color:#fff;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 4px 16px rgba(37,99,235,0.35);
  cursor:pointer; z-index:999;
  opacity:0; visibility:hidden;
  transition:var(--transition);
  border:none; font-size:1.1rem;
}
.back-to-top.visible { opacity:1; visibility:visible; }
.back-to-top:hover { transform:translateY(-3px); box-shadow:0 6px 24px rgba(37,99,235,0.5); }

/* ---------- 响应式 ---------- */
@media (max-width:768px) {
  .hero-title { font-size:1.7rem; }
  .hero-section { padding:48px 0 72px; }
  .hero-stats { gap:24px; }
  .hero-stat-num { font-size:1.5rem; }
  .calc-card-body { padding:18px; }
  .result-highlight .amount { font-size:1.7rem; }
  .calc-tab-btn { padding:13px 14px 11px; font-size:0.82rem; }
  .section-header h4 { font-size:1.3rem; }
  footer { padding:40px 0 0; }
}
@media (max-width:480px) {
  .hero-title { font-size:1.4rem; }
  .hero-sub { font-size:0.92rem; }
  .calc-card-header { padding:18px 16px 16px; }
  .result-highlight { padding:20px 16px; }
  .result-highlight .amount { font-size:1.5rem; }
}

/* ---------- 数字动画 ---------- */
.count-up { display:inline-block; }

/* ---------- 工具提示 ---------- */
.tip-icon {
  display:inline-flex; align-items:center; justify-content:center;
  width:16px; height:16px; border-radius:50%;
  background:var(--bg); color:var(--text-muted);
  font-size:0.65rem; font-weight:700; cursor:help;
  margin-left:4px; vertical-align:middle;
}

/* ---------- 错误提示 ---------- */
.error-msg {
  background:#fef2f2; border:1px solid #fecaca;
  color:#dc2626; border-radius:var(--radius-xs);
  padding:10px 14px; font-size:0.85rem; margin-top:8px;
}

/* ---------- 成功提示 ---------- */
.success-msg {
  background:#f0fdf4; border:1px solid #bbf7d0;
  color:#16a34a; border-radius:var(--radius-xs);
  padding:10px 14px; font-size:0.85rem; margin-top:8px;
}
