/* ===== 基础变量与重置 ===== */
:root {
  --brand: #1d4ed8;
  --brand-dark: #12308a;
  --brand-light: #3b82f6;
  --cyan: #0ea5e9;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f4f7fc;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(15, 23, 42, .07);
  --shadow-hover: 0 14px 34px rgba(29, 78, 216, .16);
  --header-h: 68px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 15px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { color: var(--ink); margin: 0; line-height: 1.4; }
p { margin: 0; }
button, input, select, textarea { font-family: inherit; font-size: inherit; outline: none; }

.container { width: min(1200px, 100% - 40px); margin: 0 auto; }

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.logo-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--cyan));
  color: #fff; font-weight: 800; font-size: 18px;
  letter-spacing: -.5px;
}

.logo-text strong { display: block; font-size: 15px; color: var(--ink); letter-spacing: .5px; }
.logo-text span { display: block; font-size: 11px; color: var(--muted); letter-spacing: 1.2px; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }

.nav > li { position: relative; }

.nav a.nav-link {
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text);
  font-size: 15px;
  transition: .2s;
}

.nav a.nav-link:hover { background: #eef4ff; color: var(--brand); }

.nav a.nav-link.active { color: var(--brand); font-weight: 600; background: #eaf1ff; }

.nav a.nav-link .caret { font-size: 10px; margin-left: 3px; opacity: .6; }

.dropdown {
  position: absolute;
  top: 100%; left: 0;
  min-width: 168px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 8px;
  display: none;
}

.nav > li:hover .dropdown { display: block; }

.dropdown a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  transition: .18s;
}

.dropdown a:hover { background: #eef4ff; color: var(--brand); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  transition: .2s;
  white-space: nowrap;
}

.btn-primary { background: linear-gradient(135deg, var(--brand), var(--cyan)); color: #fff; box-shadow: 0 6px 16px rgba(29, 78, 216, .28); }
.btn-primary:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn-ghost { background: #eef4ff; color: var(--brand); }
.btn-ghost:hover { background: #dbe8ff; }
.btn-outline { background: #fff; color: var(--brand); border: 1px solid #c7dbff; }
.btn-outline:hover { background: #f2f7ff; }
.btn-lg { padding: 13px 30px; font-size: 16px; }

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  font-size: 18px;
  color: var(--ink);
}

/* ===== Banner ===== */
.hero {
  position: relative;
  color: #fff;
  background: linear-gradient(135deg, #0b1a4a, #0e7490);
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }

.hero-inner { position: relative; padding: 78px 0 86px; }

.hero-tag {
  display: inline-block;
  padding: 5px 14px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  font-size: 13px;
  background: rgba(255, 255, 255, .1);
  margin-bottom: 20px;
}

.hero h1 { color: #fff; font-size: 40px; margin-bottom: 16px; letter-spacing: 1px; }
.hero p.lead { font-size: 16px; color: rgba(255, 255, 255, .82); max-width: 620px; margin-bottom: 30px; }

.hero-search {
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  padding: 7px;
  max-width: 620px;
  backdrop-filter: blur(4px);
}

.hero-search input {
  flex: 1;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 0 16px;
}

.hero-search input::placeholder { color: rgba(255, 255, 255, .6); }
.hero-search .btn { padding: 10px 26px; }

.hero-stats { display: flex; gap: 46px; margin-top: 42px; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-size: 28px; color: #fff; }
.hero-stats div span { font-size: 13px; color: rgba(255, 255, 255, .7); }

/* ===== 区块通用 ===== */
.section { padding: 60px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.section-head h2 { font-size: 26px; }
.section-head h2::after {
  content: ""; display: block; width: 46px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--brand), var(--cyan)); margin-top: 10px;
}
.section-head p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.more-link { color: var(--brand); font-size: 14px; }
.more-link:hover { text-decoration: underline; }

/* ===== 分类卡片 ===== */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }

.cat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 14px;
  text-align: center;
  transition: .25s;
}

.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: #c7dbff; }
.cat-icon { width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; }
.cat-card h3 { font-size: 15px; margin-bottom: 4px; }
.cat-card p { font-size: 12px; color: var(--muted); }

/* ===== 信息卡片 ===== */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.info-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: .25s;
  display: flex;
  flex-direction: column;
  border: 1px solid transparent;
}

.info-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: #dbe7ff; }
.card-cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #e8edf6; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: .4s; }
.info-card:hover .card-cover img { transform: scale(1.06); }

.card-badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(15, 23, 42, .68);
  color: #fff; font-size: 12px;
  padding: 3px 10px; border-radius: 6px;
  backdrop-filter: blur(3px);
}

.card-price {
  position: absolute; bottom: 12px; right: 12px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #fff; font-size: 13px; font-weight: 600;
  padding: 3px 12px; border-radius: 999px;
}

.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 16px; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 44px; }
.card-body h3 a:hover { color: var(--brand); }
.card-sum { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.tag { font-size: 12px; color: var(--brand); background: #eef4ff; padding: 2px 9px; border-radius: 5px; }

.card-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted);
  padding-top: 12px; border-top: 1px dashed var(--line);
  margin-top: auto;
}

.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-size: 13px; font-weight: 600;
  background: linear-gradient(135deg, var(--brand), var(--cyan));
  flex-shrink: 0;
}

.card-meta .publisher { color: var(--ink); font-weight: 500; }
.card-meta .views { margin-left: auto; }

/* ===== 流程 ===== */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { position: relative; background: var(--card); border-radius: var(--radius); padding: 26px 20px; box-shadow: var(--shadow); }
.step .num { font-size: 34px; font-weight: 800; color: #e6edfb; line-height: 1; margin-bottom: 10px; }
.step h3 { font-size: 16px; margin-bottom: 6px; }
.step p { font-size: 13px; color: var(--muted); }

/* ===== 工具条 / 筛选 ===== */
.filter-bar {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 24px;
}

.filter-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.search-box { display: flex; flex: 1; min-width: 240px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.search-box input { flex: 1; border: 0; padding: 10px 14px; }
.search-box button { border: 0; background: var(--brand); color: #fff; padding: 0 20px; cursor: pointer; }
.search-box button:hover { background: var(--brand-dark); }

.filter-select { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); cursor: pointer; }

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.chip { padding: 5px 14px; border-radius: 999px; background: #f1f5fb; color: var(--muted); font-size: 13px; cursor: pointer; transition: .2s; }
.chip:hover { background: #e4ecfb; color: var(--brand); }
.chip.active { background: var(--brand); color: #fff; }

.result-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-size: 14px; color: var(--muted); }
.result-bar strong { color: var(--brand); }

/* ===== 分页 ===== */
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 34px; flex-wrap: wrap; }
.pager button {
  min-width: 38px; height: 38px; padding: 0 12px;
  border: 1px solid var(--line); background: #fff;
  border-radius: 9px; color: var(--text); cursor: pointer; transition: .2s;
}
.pager button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pager button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager button:disabled { opacity: .5; cursor: not-allowed; }

/* ===== 详情页 ===== */
.breadcrumb { padding: 16px 0; font-size: 13px; color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }

.detail-layout { display: grid; grid-template-columns: 1fr 330px; gap: 26px; align-items: start; padding-bottom: 60px; }

.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.detail-cover { aspect-ratio: 16 / 8; overflow: hidden; background: #e8edf6; }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-body { padding: 26px 28px 30px; }
.detail-title { font-size: 25px; margin: 12px 0 14px; }

.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-info-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 22px 0; padding: 18px; background: #f7f9fe; border-radius: 12px; }
.detail-info-list div { font-size: 14px; }
.detail-info-list span { color: var(--muted); display: inline-block; width: 72px; }
.detail-info-list strong { color: var(--ink); font-weight: 600; }

.detail-content h3 { font-size: 17px; margin: 24px 0 10px; padding-left: 11px; border-left: 3px solid var(--brand); }
.detail-content p { margin-bottom: 12px; color: var(--text); }
.detail-content ul { margin: 0 0 14px; padding-left: 0; }
.detail-content li { position: relative; padding-left: 20px; margin-bottom: 8px; }
.detail-content li::before { content: ""; position: absolute; left: 4px; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); }

.contact-panel { padding: 22px; }
.contact-panel h3 { font-size: 17px; margin-bottom: 16px; }
.contact-person { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px dashed var(--line); }
.contact-person .avatar { width: 48px; height: 48px; font-size: 18px; }
.contact-person strong { display: block; color: var(--ink); font-size: 16px; }
.contact-person span { font-size: 13px; color: var(--muted); }

.contact-item { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.contact-item .k { color: var(--muted); width: 60px; flex-shrink: 0; }
.contact-item .v { color: var(--ink); font-weight: 600; word-break: break-all; }

.side-title { font-size: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.side-list { padding: 8px 0; }
.side-list a { display: flex; gap: 12px; padding: 10px 20px; transition: .2s; }
.side-list a:hover { background: #f7f9fe; }
.side-list img { width: 74px; height: 52px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.side-list h4 { font-size: 14px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.side-list span { font-size: 12px; color: var(--muted); }

/* ===== 表单 ===== */
.form-panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 32px; margin-bottom: 60px; }
.form-grid { display: grid; grid-template-columns: 1fr 320px; gap: 30px; align-items: start; }
.form-item { margin-bottom: 18px; }
.form-item label { display: block; font-size: 14px; color: var(--ink); margin-bottom: 7px; font-weight: 500; }
.form-item label i { color: #ef4444; font-style: normal; margin-right: 3px; }
.form-item input[type=text], .form-item input[type=tel], .form-item select, .form-item textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; transition: .2s; color: var(--ink);
}
.form-item input:focus, .form-item select:focus, .form-item textarea:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(29, 78, 216, .1); }
.form-item textarea { min-height: 190px; resize: vertical; line-height: 1.8; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.err { font-size: 12px; color: #ef4444; margin-top: 6px; display: none; }
.form-item.error input, .form-item.error select, .form-item.error textarea { border-color: #ef4444; }
.form-item.error .err { display: block; }

.cover-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cover-picker label { position: relative; cursor: pointer; border-radius: 10px; overflow: hidden; border: 2px solid transparent; display: block; margin: 0; }
.cover-picker input { position: absolute; opacity: 0; }
.cover-picker img { aspect-ratio: 16 / 10; object-fit: cover; }
.cover-picker input:checked + img { opacity: .55; }
.cover-picker label:has(input:checked) { border-color: var(--brand); }

.tips-box { background: #f7f9fe; border-radius: 12px; padding: 20px; border: 1px solid var(--line); }
.tips-box h3 { font-size: 15px; margin-bottom: 12px; }
.tips-box li { position: relative; padding-left: 16px; font-size: 13px; color: var(--muted); margin-bottom: 9px; }
.tips-box li::before { content: ""; position: absolute; left: 0; top: 10px; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }

.form-actions { display: flex; gap: 12px; margin-top: 8px; }

/* ===== 关于页 ===== */
.about-hero { background: linear-gradient(135deg, #0b1a4a, #0e7490); color: #fff; padding: 54px 0; }
.about-hero h1 { color: #fff; font-size: 30px; margin-bottom: 10px; }
.about-hero p { color: rgba(255, 255, 255, .8); font-size: 15px; }

.about-grid { display: grid; grid-template-columns: 1fr 360px; gap: 26px; align-items: start; padding-bottom: 60px; }
.about-block { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; margin-bottom: 22px; }
.about-block h2 { font-size: 19px; margin-bottom: 14px; padding-left: 12px; border-left: 3px solid var(--brand); }
.about-block p { margin-bottom: 12px; }

.info-table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 400; }
.info-table th { width: 92px; color: var(--muted); }

.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 6px; }
.value-item { background: #f7f9fe; border-radius: 12px; padding: 16px; text-align: center; }
.value-item strong { display: block; color: var(--brand); font-size: 20px; }
.value-item span { font-size: 12px; color: var(--muted); }

/* ===== 空状态 ===== */
.empty { text-align: center; padding: 70px 20px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.empty .ico { font-size: 46px; opacity: .35; }
.empty h3 { font-size: 17px; margin: 12px 0 6px; }
.empty p { color: var(--muted); font-size: 14px; }

/* ===== 页脚 ===== */
.site-footer { background: #0d1b3d; color: #a9b7d4; padding: 52px 0 0; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 34px; padding-bottom: 36px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.site-footer p { font-size: 13.5px; margin-bottom: 10px; }
.footer-links li { margin-bottom: 9px; }
.footer-links a { font-size: 13.5px; color: #a9b7d4; transition: .2s; }
.footer-links a:hover { color: #fff; padding-left: 4px; }
.footer-contact li { font-size: 13.5px; margin-bottom: 10px; display: flex; gap: 8px; }
.footer-contact .k { color: #6d80ab; flex-shrink: 0; }

.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 18px 0; font-size: 13px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.footer-bottom a { color: #8fb0ff; }
.footer-bottom a:hover { text-decoration: underline; }

/* ===== 响应式 ===== */
@media (max-width: 1080px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-layout, .form-grid, .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1024px) {
  .nav {
    display: none;
    position: absolute;
    top: var(--header-h); left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a.nav-link { padding: 12px 14px; }
  .dropdown { position: static; display: none; box-shadow: none; border: 0; padding: 0 0 0 14px; }
  .nav > li:hover .dropdown { display: none; }
  .nav > li.open .dropdown { display: block; }
  .menu-toggle { display: block; }
  .header-inner { gap: 12px; }
  .nav-user { flex-wrap: wrap; padding: 4px 0; }
}

@media (max-width: 860px) {
  .hero h1 { font-size: 28px; }
  .hero-inner { padding: 54px 0 60px; }
  .hero-stats { gap: 26px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 44px 0; }
}

@media (max-width: 620px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .form-row { grid-template-columns: 1fr; }
  .detail-info-list { grid-template-columns: 1fr; }
  .hero-search { flex-direction: column; border-radius: 16px; }
  .hero-search input { padding: 12px 16px; }
  .cover-picker { grid-template-columns: repeat(2, 1fr); }
  .form-panel { padding: 22px 18px; }
  .detail-body { padding: 20px 18px 24px; }
  .detail-title { font-size: 21px; }
}

/* ===== 头部账户区 ===== */
.nav-user { display: flex; align-items: center; gap: 8px; }
.nav-user .nav-link { padding: 8px 10px; }

.balance-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 13px; border-radius: 999px;
  background: #fff5e6; color: #c2410c;
  font-size: 13px; font-weight: 600;
  border: 1px solid #fde3c2;
}
.balance-chip:hover { background: #ffeccd; }

.user-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px 5px 5px; border-radius: 999px;
  background: #eef4ff; color: var(--brand); font-size: 14px;
}
.user-chip .avatar { width: 26px; height: 26px; font-size: 12px; }
.user-chip:hover { background: #dbe8ff; }

/* ===== 登录 / 注册 ===== */
.auth-page { display: grid; grid-template-columns: 460px 1fr; gap: 30px; align-items: start; padding: 30px 0 10px; }

.auth-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 8px 30px 30px;
}
.auth-tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.auth-tab {
  padding: 16px 2px; border: 0; background: none; cursor: pointer;
  font-size: 16px; color: var(--muted); position: relative;
}
.auth-tab.active { color: var(--brand); font-weight: 600; }
.auth-tab.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--brand); border-radius: 2px;
}
.auth-form .form-item { margin-bottom: 16px; }
.auth-submit { width: 100%; margin-top: 4px; }
.auth-switch { text-align: center; font-size: 14px; color: var(--muted); margin-top: 16px; }
.auth-switch a { color: var(--brand); }

.auth-msg { font-size: 13.5px; margin: 4px 0 10px; min-height: 20px; }
.auth-msg.bad { color: #ef4444; }
.auth-msg.ok { color: #16a34a; }

.agree-label { display: block; font-weight: 400 !important; font-size: 13.5px !important; color: var(--text) !important; }
.agree-label a { color: var(--brand); }
.agree-label.error { color: #ef4444 !important; }

/* ===== 身份证照片上传 ===== */
.id-upload {
  position: relative;
  display: block;
  width: 100%;
  height: 98px;
  border: 1px dashed #cfd9e8;
  border-radius: 9px;
  background: #fbfcfe;
  overflow: hidden;
  cursor: pointer;
  text-align: center;
  margin-bottom: 0;
}
.id-upload:hover { border-color: var(--brand); background: #f4f9ff; }
.id-upload input[type="file"] {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; z-index: 2;
}
.id-upload-ph {
  display: grid; place-items: center; height: 100%;
  color: #94a3b8; font-size: 13px; font-weight: 400;
}
.id-upload-img { display: none; width: 100%; height: 100%; object-fit: cover; }
.id-upload.filled { border-style: solid; border-color: #bfd3f2; }
.id-upload.filled .id-upload-img { display: block; }

/* ===== 后台证件照缩略图 ===== */
.id-photo { display: inline-block; width: 76px; height: 48px; border-radius: 6px; overflow: hidden; border: 1px solid #e2e8f0; background: #f8fafd; }
.id-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.id-photo-empty { display: grid; place-items: center; width: 76px; height: 48px; border-radius: 6px; background: #f1f5f9; color: #94a3b8; font-size: 11px; }
.id-card-box { position: fixed; inset: 0; z-index: 90; background: rgba(15,23,42,.85); display: grid; place-items: center; padding: 24px; }
.id-card-box img { max-width: 92vw; max-height: 88vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }

/* ===== 发布收费提示条 ===== */
.fee-bar {
  display: flex; align-items: center; gap: 30px; flex-wrap: wrap;
  background: linear-gradient(135deg, #eef4ff, #f7fbff);
  border: 1px solid #d8e6ff; border-radius: var(--radius);
  padding: 18px 22px; margin-bottom: 22px;
}
.fee-bar > div span { display: block; font-size: 13px; color: var(--muted); }
.fee-bar > div strong { font-size: 22px; color: var(--ink); }
.fee-bar > div strong.fee { color: #ef4444; }
.fee-bar-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== 用户中心 ===== */
.user-hero {
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; flex-wrap: wrap;
  background: linear-gradient(135deg, #0b1a4a, #0e7490);
  border-radius: var(--radius); padding: 26px 28px; color: #fff;
}
.user-hero-left { display: flex; align-items: center; gap: 16px; }
.user-hero-left .avatar { width: 56px; height: 56px; font-size: 24px; background: rgba(255, 255, 255, .18); }
.user-hero-left h2 { color: #fff; font-size: 21px; }
.user-hero-left p { font-size: 13px; color: rgba(255, 255, 255, .72); margin-top: 4px; }

.balance-box span { font-size: 13px; color: rgba(255, 255, 255, .75); }
.balance-box strong { display: block; font-size: 30px; color: #ffd591; line-height: 1.3; }
.balance-actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }

.user-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 24px; }
.status-ok { color: #16a34a; background: #e8f8ee; padding: 2px 10px; border-radius: 5px; font-size: 13px; }

.my-post { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.my-post:last-child { border-bottom: 0; }
.my-post-cover { width: 108px; flex-shrink: 0; }
.my-post-cover img { width: 108px; height: 68px; object-fit: cover; border-radius: 8px; }
.my-post-main { flex: 1; min-width: 0; }
.my-post-main h4 { font-size: 15px; font-weight: 500; margin-bottom: 4px; }
.my-post-main h4 a:hover { color: var(--brand); }
.my-post-main p { font-size: 13px; color: var(--muted); }
.my-post-op { display: flex; gap: 8px; flex-shrink: 0; }
.btn.danger { color: #dc2626; border-color: #f3c6c6; }
.btn.danger:hover { background: #fef2f2; }

.record-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.record-table th, .record-table td { padding: 13px 20px; text-align: left; border-bottom: 1px solid var(--line); }
.record-table th { color: var(--muted); font-weight: 400; background: #fafbfd; }
.record-table tbody tr:last-child td { border-bottom: 0; }
.bill-type { font-size: 12px; padding: 2px 9px; border-radius: 5px; }
.bill-type.in { background: #e8f8ee; color: #16a34a; }
.bill-type.out { background: #fdeaea; color: #dc2626; }
td.in { color: #16a34a; font-weight: 600; }
td.out { color: #dc2626; font-weight: 600; }

/* ===== 微信支付弹窗 ===== */
.pay-mask {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(15, 23, 42, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow: auto;
}
.pay-modal {
  width: 380px; max-width: 100%;
  background: #fff; border-radius: 16px;
  padding: 22px 24px 24px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .3);
  animation: payIn .2s ease-out;
}
@keyframes payIn { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

.pay-head { display: flex; align-items: center; gap: 9px; font-size: 16px; margin-bottom: 14px; }
.pay-head strong { color: var(--ink); }
.wx-logo {
  width: 26px; height: 26px; border-radius: 6px;
  background: #07c160; color: #fff;
  display: grid; place-items: center; font-size: 14px; font-weight: 700;
}
.pay-close {
  margin-left: auto; width: 28px; height: 28px;
  border: 0; background: #f1f5fb; border-radius: 8px;
  font-size: 18px; line-height: 1; color: var(--muted); cursor: pointer;
}
.pay-close:hover { background: #e6ecf7; color: var(--ink); }

.pay-amount { text-align: center; font-size: 30px; font-weight: 700; color: var(--ink); margin: 6px 0 14px; }
.pay-quick { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 12px; }
.pay-chip {
  padding: 6px 14px; border-radius: 8px; cursor: pointer;
  background: #f1f5fb; color: var(--text); font-size: 13px; transition: .2s;
}
.pay-chip:hover { background: #e4ecfb; color: var(--brand); }
.pay-chip.active { background: var(--brand); color: #fff; }

.pay-custom input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 9px; background: #fbfcfe; margin-bottom: 14px;
}
.pay-qr { text-align: center; padding: 12px 0 6px; }
.pay-qr img { width: 190px; margin: 0 auto; border: 1px solid var(--line); border-radius: 10px; }
.pay-scan { font-size: 13px; color: var(--muted); margin-top: 10px; }

.pay-info {
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted);
  background: #f7f9fe; border-radius: 9px; padding: 10px 12px; margin: 12px 0 16px;
}
.pay-info b { color: var(--ink); font-weight: 600; }
.pay-done { width: 100%; }
.pay-done:disabled { opacity: .6; cursor: not-allowed; }
.pay-actions { display: flex; gap: 10px; margin-top: 12px; }
.pay-actions .btn { flex: 1; }
.pay-state {
  text-align: center; font-size: 13.5px; color: var(--muted);
  background: #f7f9fe; border-radius: 9px; padding: 10px 12px; margin-bottom: 4px;
}
.pay-state.ok { color: #16a34a; background: #e8f8ee; }
.pay-state.bad { color: #dc2626; background: #fdeaea; }
.pay-tip { font-size: 12px; color: var(--muted); text-align: center; margin-top: 12px; line-height: 1.7; }

/* ===== 协议 / 隐私政策 文档页 ===== */
.doc-layout { display: grid; grid-template-columns: 220px 1fr; gap: 26px; align-items: start; padding-bottom: 50px; }
.doc-nav-inner { position: sticky; top: 88px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 16px; }
.doc-nav-inner h3 { font-size: 15px; margin-bottom: 10px; }
.doc-nav-inner a { display: block; padding: 7px 10px; border-radius: 7px; font-size: 13.5px; color: var(--muted); transition: .2s; }
.doc-nav-inner a:hover { background: #eef4ff; color: var(--brand); }

.doc-body { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 34px 38px 40px; }
.doc-lead { background: #f7f9fe; border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0; padding: 14px 16px; font-size: 14px; margin-bottom: 26px; }
.doc-body h2 { font-size: 18px; margin: 30px 0 12px; padding-left: 11px; border-left: 3px solid var(--cyan); }
.doc-body p { margin-bottom: 10px; font-size: 14.5px; }
.doc-body b { color: var(--ink); }
.doc-body .info-table { margin-top: 6px; }
.doc-foot { text-align: right; margin-top: 34px; font-size: 14px; color: var(--muted); line-height: 1.9; }

.legal-links a { margin: 0 2px; }

@media (max-width: 1080px) {
  .auth-page { grid-template-columns: 1fr; }
  .doc-layout { grid-template-columns: 1fr; }
  .doc-nav-inner { position: static; }
  .user-info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .auth-card { padding: 4px 18px 22px; }
  .fee-bar { gap: 16px; }
  .fee-bar-actions { margin-left: 0; width: 100%; }
  .my-post { flex-wrap: wrap; }
  .my-post-cover, .my-post-cover img { width: 100%; }
  .my-post-cover img { height: 150px; }
  .record-table th:nth-child(1), .record-table td:nth-child(1) { display: none; }
  .doc-body { padding: 24px 18px 30px; }
}
