:root {
  --primary: #0e9e92;
  --primary-dark: #0b7d73;
  --primary-light: #e6f5f4;
  --danger: #e5484d;
  --text: #1f2933;
  --text-2: #52606d;
  --text-3: #9aa5b1;
  --border: #e4e7eb;
  --bg: #f5f7f8;
  --radius: 10px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

/* ---------- 顶部 Hero ---------- */
.hero {
  background: linear-gradient(135deg, #0b7d73 0%, #0e9e92 55%, #12b5a2 100%);
  padding: 40px 16px 38px;
  text-align: center;
  color: #fff;
}
.hero h1 { font-size: 30px; font-weight: 700; letter-spacing: 1px; }
.hero .sub { margin-top: 8px; font-size: 14px; opacity: .92; }

/* ---------- 居中搜索面板 ---------- */
.search-panel {
  max-width: 920px;
  margin: 22px auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px 16px;
}

/* ---------- 号码类型卡片 ---------- */
.type-cards {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.type-card {
  flex: 0 0 250px;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 16px;
  cursor: pointer;
  transition: border-color .15s;
  text-align: center;
  text-decoration: none;
}
.type-card:hover { border-color: var(--primary); }
.type-card.active { border-color: var(--primary); background: var(--primary-light); }
.type-card .t { font-size: 15px; font-weight: 700; letter-spacing: .5px;color: #000; }
.type-card.active .t { color: var(--primary-dark); }
.type-card .d { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ---------- 搜索行 ---------- */
.search-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.state-wrap { position: relative; }
.npa-wrap { position: relative; }
.state-wrap input, .npa-wrap input, .seg-npa, .seg-kw {
  height: 44px;
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 15px;
  outline: none;
  background: #fff;
  color: var(--text);
  transition: border-color .15s;
}
.state-wrap input:focus, .npa-wrap input:focus, .seg-npa:focus, .seg-kw:focus { border-color: var(--primary); }
.state-wrap input { width: 150px; }
.npa-wrap input { width: 92px; text-align: center; font-weight: 600; }
.seg-kw  { width: 170px; }
.phone-sep { color: var(--text-3); font-size: 18px; user-select: none; }
.state-list, .npa-list {
  position: absolute;
  top: 46px; left: 0;
  width: 280px; max-height: 300px; overflow-y: auto;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(31,41,51,.14);
  z-index: 30;
  display: none;
}
.state-list.open, .npa-list.open { display: block; }
.state-list .opt, .npa-list .opt {
  padding: 8px 12px; font-size: 14px; cursor: pointer; display: flex; justify-content: space-between;
}
.state-list .opt:hover, .npa-list .opt:hover { background: var(--primary-light); }
.state-list .opt .ab, .npa-list .opt .ab { color: var(--text-3); font-size: 12px; }
.search-tips-line {
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 12px;
}
.search-tips-line a { color: var(--primary-dark); text-decoration: none; cursor: pointer; }
.btn-clear-mobile {
  flex: 0 0 32px; width: 32px; height: 44px;
  border: none; background: transparent; color: var(--text-3);
  font-size: 18px; line-height: 1; cursor: pointer; padding: 0;
  transition: color .15s;
}
.btn-clear-mobile:hover { color: var(--danger); }

/* ---------- 主体两栏 ---------- */
.layout {
  max-width: 1200px;
  margin: 18px auto 40px;
  padding: 0 24px;
  display: flex;
  gap: 22px;
  align-items: flex-start;
}
.sidebar {
  flex: 0 0 260px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  position: sticky;
  top: 14px;
}
.sidebar .clear-filters {
  font-size: 13px; color: var(--primary-dark); cursor: pointer; font-weight: 600;
  margin-bottom: 6px; display: inline-block;
}
.sidebar .sec { border-top: 1px solid var(--border); padding: 14px 0 4px; }
.sidebar .sec:first-of-type { border-top: none; }
.sidebar .sec-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.sidebar select, .sidebar input[type=text], .sidebar input[type=number] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px 9px;
  font-size: 13px;
  outline: none;
  background: #fff;
}
.sidebar select:focus, .sidebar input:focus { border-color: var(--primary); }
.sidebar .chk { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); margin: 8px 0; cursor: pointer; }
.sidebar .chk input { accent-color: var(--primary); width: 15px; height: 15px; cursor: pointer; }
.sidebar .sec-hint { font-size: 12px; color: var(--text-3); margin-top: 7px; }
.exact-row { display: flex; gap: 6px; }
.exact-row input { flex: 1; min-width: 0; }
.exact-row button {
  flex: 0 0 auto; border: none; background: var(--primary); color: #fff;
  border-radius: 7px; padding: 8px 12px; font-size: 13px; cursor: pointer;
}
.exact-row button:hover { background: var(--primary-dark); }
.price-row2 { display: flex; align-items: center; gap: 6px; }
.price-row2 input { flex: 1; min-width: 0; text-align: center; }

/* ---------- 联系信息 ---------- */
.sec-contact .contact-list { list-style: none; font-size: 13px; color: var(--text-2); }
.sec-contact .contact-list li { margin: 7px 0; }
.sec-contact .contact-list a { color: var(--primary-dark); text-decoration: none; }
.sec-contact .contact-list a:hover { text-decoration: underline; }
.sec-contact .contact-note {
  margin-top: 10px; font-size: 12px; color: var(--text-3);
  background: var(--primary-light); border-radius: 8px; padding: 8px 10px;
}

.main-col { flex: 1; min-width: 0; }
.error-banner {
  padding: 12px 16px; background: #fdecec; border: 1px solid #f5c2c4;
  border-radius: 8px; color: #a12629; font-size: 14px; margin-bottom: 14px;
}
.error-banner .hint { display: block; margin-top: 4px; font-size: 12px; color: #c0564f; }
.results-bar {
  display: flex; justify-content: flex-end; align-items: center;
  flex-wrap: wrap; gap: 10px; margin-bottom: 14px;
}
.results-bar .sorter { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.results-bar select {
  border: 1px solid var(--border); border-radius: 7px; padding: 7px 9px;
  font-size: 13px; outline: none; background: #fff;
}

/* ---------- 卡片 ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 13px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 16px 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow .15s, transform .15s;
}
.card:hover { box-shadow: 0 8px 24px rgba(31, 41, 51, .1); transform: translateY(-2px); }
.card .tn { font-size: 22px; font-weight: 700; letter-spacing: .5px; text-align: center; }
.card .tags { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; min-height: 20px; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 4px; background: #f0f4f5; color: var(--text-2); }
.tag.type { background: var(--primary-light); color: var(--primary-dark); }
.tag.hot { background: #fdecec; color: #c53030; }
.tag.instant { background: #fff5e5; color: #b7791f; }
.tag.exclusive { background: #e8f1fd; color: #1d6fc4; }
.card .price-row { text-align: center; }
.card .price { color: var(--danger); font-size: 24px; font-weight: 700; }
.card .price-unit { font-size: 11px; color: var(--text-3); margin-left: 4px; }
.card .price-orig { font-size: 12px; color: var(--text-3); text-decoration: line-through; margin-right: 4px; }
.card .loc { font-size: 12px; color: var(--text-2); text-align: center; }
.card .meta { font-size: 11px; color: var(--text-3); text-align: center; }
.card .actions { display: flex; gap: 7px; margin-top: 2px; }
.card .actions .btn-copy {
  flex: 1; border: 1px solid var(--primary); color: var(--primary-dark); background: #fff;
  border-radius: 7px; padding: 6px 0; font-size: 12px; cursor: pointer;
}
.card .actions .btn-copy:hover { background: var(--primary-light); }
.card .actions .btn-buy {
  flex: 1; text-align: center; border: none; background: var(--primary); color: #fff;
  border-radius: 7px; padding: 6px 0; font-size: 12px; cursor: pointer;
}
.card .actions .btn-buy:hover { background: var(--primary-dark); }

/* ---------- 分页 ---------- */
.results-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 24px; flex-wrap: wrap; gap: 10px;
}
.results-foot .count { font-size: 14px; color: var(--text-2); }
.results-foot .count b { color: var(--danger); font-size: 17px; }
.pagination { display: flex; gap: 6px; flex-wrap: wrap; }
.pagination button {
  min-width: 34px; height: 34px; border: 1px solid var(--border); background: #fff;
  border-radius: 7px; font-size: 13px; color: var(--text-2); cursor: pointer; padding: 0 9px;
}
.pagination button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pagination button.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.pagination button:disabled { opacity: .45; cursor: not-allowed; }
.pagination .ellipsis { color: var(--text-3); padding: 0 2px; align-self: center; }
.pager-size { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.pager-size select { border: 1px solid var(--border); border-radius: 7px; padding: 6px 9px; font-size: 13px; }
.page-jump { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); margin-left: 6px; }
.page-jump input {
  width: 64px; height: 34px; border: 1px solid var(--border); border-radius: 7px;
  padding: 0 8px; font-size: 13px; text-align: center;
}
.page-jump input:focus { border-color: var(--primary); outline: none; }
.page-jump button {
  height: 34px; border: 1px solid var(--border); background: #fff; border-radius: 7px;
  font-size: 13px; color: var(--text-2); cursor: pointer; padding: 0 10px;
}
.page-jump button:hover { border-color: var(--primary); color: var(--primary); }
.page-jump input::-webkit-outer-spin-button,
.page-jump input::-webkit-inner-spin-button { opacity: 1; }

/* ---------- 状态 ---------- */
.loading-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 13px; }
.skeleton { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); height: 165px; position: relative; overflow: hidden; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,.05), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%);} to { transform: translateX(100%);} }
.state-box { text-align: center; padding: 50px 16px; color: var(--text-2); }
.state-box .emoji { font-size: 40px; }
.state-box .title { font-size: 16px; font-weight: 600; margin-top: 10px; color: var(--text); }
.state-box .desc { font-size: 13px; color: var(--text-3); margin-top: 6px; }

footer { text-align: center; padding: 22px 16px 30px; font-size: 12px; color: var(--text-3); border-top: 1px solid var(--border); }
.footer-nav { display: flex; gap: 10px; justify-content: center; }
.footer-nav a { color: var(--primary-dark); text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }

/* ---------- 内容页 ---------- */
.hero-sm { padding: 34px 16px 32px; }
.hero-sm h1 { font-size: 26px; }
.doc-wrap { max-width: 780px; margin: 24px auto 44px; padding: 0 20px; }
.back-link { font-size: 13px; color: var(--primary-dark); text-decoration: none; display: inline-block; margin-bottom: 14px; }
.back-link:hover { text-decoration: underline; }
.faq-item, .contact-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 12px;
}
.faq-item h2, .contact-card h2 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.faq-item p, .contact-card p { font-size: 14px; color: var(--text-2); line-height: 1.75; }
.contact-card ul { list-style: none; font-size: 14px; color: var(--text-2); }
.contact-card ul li { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.contact-card ul li:last-child { border-bottom: none; }
.contact-card ul li span { flex: 0 0 72px; color: var(--text-3); font-size: 13px; }
.contact-card ul li a { color: var(--primary-dark); text-decoration: none; }
.contact-card ul li a:hover { text-decoration: underline; }
.contact-card ol { margin-left: 20px; font-size: 14px; color: var(--text-2); line-height: 1.9; }
.contact-card .muted { margin-top: 10px; font-size: 13px; color: var(--text-3); }
.doc-cta { background: var(--primary-light); border-radius: var(--radius); padding: 20px; text-align: center; margin-top: 18px; }
.doc-cta-title { font-size: 15px; font-weight: 700; }
.doc-cta-desc { font-size: 13px; color: var(--text-2); margin-top: 5px; }
.doc-cta-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: var(--primary-dark); }
.doc-cta-links a { color: var(--primary-dark); text-decoration: none; }
.doc-cta-links a:hover { text-decoration: underline; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .layout { flex-direction: column; }
  .sidebar { position: static; width: 100%; flex: none; }
  .hero h1 { font-size: 24px; }
  .hero { padding: 30px 12px 34px; }
  .search-panel { margin-top: 18px; }
}
@media (max-width: 560px) {
  .hero { padding: 26px 14px 130px; }
  .search-panel {
    margin-top: -130px;
    background: transparent;
    border: none;
    padding: 0 14px;
  }
  .type-cards { gap: 10px; margin-bottom: 20px; }
  .type-card { flex: 1 1 0; padding: 10px 8px; background: rgba(0,0,0,.28); border-color: rgba(255,255,255,.45); }
  .type-card .t { color: #fff; }
  .type-card .d { color: rgba(255,255,255,.78); }
  .type-card.active { background: rgba(0,0,0,.48); border-color: #fff; }
  .type-card.active .t { color: #fff; }
  .search-row { flex-wrap: nowrap; gap: 7px; }
  .state-wrap { flex: 1 1 0; min-width: 0; }
  .state-wrap input { width: 100%; }
  .seg-kw { flex: 1 1 0; width: auto; min-width: 0; }
  .state-wrap input, .npa-wrap input, .seg-npa, .seg-kw {
    height: 38px;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, .85);
    border-radius: 0;
    background: transparent;
    color: #fff;
    font-weight: 600;
  }
  .state-wrap input::placeholder, .npa-wrap input::placeholder, .seg-npa::placeholder, .seg-kw::placeholder { color: rgba(255, 255, 255, .72); }
  .npa-wrap { flex: 0 0 84px; }
  .npa-wrap input { width: 100%; padding: 0 4px; }
  .phone-sep { color: #fff; font-weight: 600; }
  .btn-clear-mobile {
    display: block;
    flex: 0 0 30px; width: 30px; height: 38px;
    border: none; background: transparent; color: #fff;
    font-size: 20px; line-height: 1; cursor: pointer; padding: 0;
  }
  .search-tips-line { color: var(--text-3); margin-top: 12px; }
  .search-tips-line a { color: var(--primary-dark); font-weight: 600; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
