/* index.php 与 rank.php 共用页面样式 */
.main-wrap { flex: 1; width: 100%; max-width: 1120px; margin: 18px auto 0; padding: 0 20px; }

.tabs { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tab-btn, .tab-link {
  display: inline-flex; align-items: center; text-decoration: none;
  padding: 9px 18px; border-radius: 999px; border: 1px solid #e2e8f0;
  background: #fff; color: #475569; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.tab-btn:hover, .tab-link:hover { border-color: #1d68c4; color: #1d68c4; }
.tab-btn.active, .tab-link.active { background: #1d68c4; color: #fff; border-color: #1d68c4; }

.panel { display: none; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 30px 32px; box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04); }
.panel.active { display: block; }
.card { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 20px 24px; box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04); }

.panel-title-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.panel-icon { width: 42px; height: 42px; border-radius: 50%; background: #eff6ff; color: #1d68c4; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.panel-title-bar h1 { margin: 0; font-size: 22px; font-weight: 700; color: #0f172a; }
.panel-title-bar p { margin: 2px 0 0; font-size: 13px; color: #64748b; }

.search-hero { display: flex; gap: 0; margin-bottom: 18px; }
.search-hero input { flex: 1; padding: 13px 16px; border: 1.5px solid #3b82f6; border-right: none; border-radius: 8px 0 0 8px; font-size: 15px; outline: none; background: #fff; }
.search-hero input:focus { border-color: #1d68c4; }
.search-hero button { padding: 0 34px; border: none; border-radius: 0 8px 8px 0; background: #2b7de9; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background 0.18s; }
.search-hero button:hover { background: #1d68c4; }
.search-hero button:disabled { opacity: 0.65; cursor: not-allowed; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: #475569; margin-bottom: 5px; }
.opt-input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 13.5px; font-family: inherit; outline: none; background: #fff; }
.opt-input:focus, select:focus, textarea:focus { border-color: #1d68c4; box-shadow: 0 0 0 3px rgba(29, 104, 196, 0.10); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.btn-main { width: 100%; padding: 13px; border: none; border-radius: 10px; background: #2b7de9; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 6px; }
.btn-main:hover { background: #1d68c4; }
.loading { display: none; margin-top: 14px; padding: 12px 16px; border-radius: 8px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; font-size: 13px; }

.pc-res { margin-top: 18px; padding: 18px; border-radius: 12px; background: #f8fafc; border: 1px solid #e2e8f0; display: none; }
.pc-grade { font-size: 36px; font-weight: 800; color: #0d9488; margin-right: 12px; }
.pc-item { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed #e2e8f0; font-size: 13px; }
.pc-item:last-child { border-bottom: none; }

.hist-bar { display: flex; gap: 8px; margin-bottom: 14px; }
.hist-bar input { flex: 1; padding: 9px 14px; font-size: 13.5px; border: 1px solid #cbd5e1; border-radius: 8px; outline: none; }
.hist-bar button { padding: 9px 18px; border-radius: 8px; border: none; background: #2b7de9; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.hist-bar a.reset-btn { padding: 9px 14px; border-radius: 8px; border: 1px solid #cbd5e1; color: #475569; font-size: 13px; text-decoration: none; white-space: nowrap; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th, .data-table td { padding: 11px 10px; text-align: left; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.data-table th { color: #64748b; font-size: 12px; font-weight: 700; background: #f8fafc; white-space: nowrap; }
.data-table tbody tr:hover { background: #f8fafc; }
.data-table tbody tr:last-child td { border-bottom: none; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; background: #f0fdfa; color: #0d9488; }
.badge-gray { background: #f1f5f9; color: #475569; }
.act-link { color: #1d68c4; font-weight: 600; text-decoration: none; margin-right: 10px; white-space: nowrap; }
.act-link:hover { text-decoration: underline; }
.act-sub { color: #475569; font-weight: 600; text-decoration: none; white-space: nowrap; }
.act-sub:hover { color: #0f172a; }

.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-size: 12.5px; color: #64748b; }
.pager a { padding: 6px 12px; border: 1px solid #cbd5e1; border-radius: 8px; text-decoration: none; color: #334155; font-weight: 600; margin-left: 6px; }
.pager a:hover { border-color: #1d68c4; color: #1d68c4; }

/* 历史拦截弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.52); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 999; }
.modal-mask.show { display: flex; }
.modal-card { width: 100%; max-width: 560px; background: #fff; border-radius: 16px; padding: 26px 26px 22px; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.modal-title { font-size: 18px; font-weight: 700; color: #0f172a; }
.modal-close { border: none; background: #f1f5f9; color: #64748b; width: 30px; height: 30px; border-radius: 999px; font-size: 16px; cursor: pointer; flex-shrink: 0; }
.modal-sub { font-size: 13px; color: #64748b; line-height: 1.6; margin-bottom: 16px; }
.hist-list { max-height: 290px; overflow-y: auto; border: 1px solid #e5e7eb; border-radius: 10px; margin-bottom: 18px; }
.hist-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid #f1f5f9; }
.hist-row:last-child { border-bottom: none; }
.hist-row:hover { background: #f8fafc; }
.hist-name { font-size: 13.5px; font-weight: 700; color: #0f172a; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hist-time { font-size: 12px; color: #64748b; margin-top: 3px; }
.btn-view { display: inline-block; padding: 7px 14px; border-radius: 999px; background: #eff6ff; color: #1d68c4; border: 1px solid #bfdbfe; font-size: 12.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn-view:hover { background: #dbeafe; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.btn-cancel { padding: 10px 18px; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff; color: #475569; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.btn-go { padding: 10px 20px; border-radius: 8px; border: none; background: #2b7de9; color: #fff; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.btn-go:hover { background: #1d68c4; }

/* 排行榜专属样式 */
.rank-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.rank-head h1 { margin: 0 0 4px; font-size: 24px; font-weight: 700; color: #0f172a; }
.rank-head p { margin: 0; font-size: 13.5px; color: #64748b; }
.meta-pill { font-size: 12.5px; color: #64748b; background: #fff; border: 1px solid #e2e8f0; padding: 6px 14px; border-radius: 999px; white-space: nowrap; }
.rank-num { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 999px; font-size: 13px; font-weight: 800; color: #64748b; background: #f1f5f9; }
.rank-1 { background: #fef3c7; color: #b45309; font-size: 16px; }
.rank-2 { background: #e2e8f0; color: #334155; font-size: 16px; }
.rank-3 { background: #ffedd5; color: #c2410c; font-size: 16px; }
.site-name { font-weight: 700; color: #0f172a; font-size: 14px; }
.site-dom { font-size: 12px; color: #64748b; margin-top: 2px; }
.site-cat { display: inline-block; margin-top: 3px; font-size: 11px; color: #64748b; background: #f1f5f9; padding: 1px 7px; border-radius: 5px; }
.score-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 8px; font-weight: 700; font-size: 13px; white-space: nowrap; }
.score-focus { box-shadow: inset 0 0 0 1.5px currentColor; }
.sub-dims { font-size: 11.5px; color: #64748b; white-space: nowrap; }
.sub-dims span { margin-right: 6px; }
.act-btn { display: inline-block; padding: 6px 12px; border-radius: 999px; background: #eff6ff; color: #1d68c4; border: 1px solid #bfdbfe; font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.act-btn:hover { background: #dbeafe; }
.empty { text-align: center; padding: 48px 20px; color: #64748b; font-size: 14px; }
.empty a { display: inline-block; margin-top: 14px; padding: 10px 22px; border-radius: 999px; background: #2b7de9; color: #fff; text-decoration: none; font-weight: 600; font-size: 13.5px; }

/* ---- GEO 内容区（首页事实块：定义 / 权重 / 对比 / 步骤 / FAQ） ---- */
.geo-sec { margin-top: 22px; }
.geo-sec h2 { font-size: 18px; font-weight: 700; color: #0f172a; margin: 26px 0 12px; padding-left: 10px; border-left: 4px solid #1d68c4; line-height: 1.3; }
.geo-sec h2:first-of-type { margin-top: 2px; }
.geo-sec p { font-size: 14px; line-height: 1.95; color: #334155; margin: 0 0 14px; }
.geo-sec .data-table { font-size: 13px; }
.geo-sec .data-table th { background: #eff6ff; color: #1e40af; }
.geo-sec .data-table td { color: #334155; }
.geo-steps { margin: 0 0 8px; padding-left: 22px; }
.geo-steps li { font-size: 14px; line-height: 1.9; color: #334155; margin-bottom: 6px; }
.geo-steps li strong { color: #0f172a; }
.geo-faq h3 { font-size: 14.5px; font-weight: 700; color: #0f172a; margin: 16px 0 6px; }
.geo-faq h3::before { content: "Q "; color: #1d68c4; font-weight: 800; }
.geo-faq p { margin: 0 0 10px; color: #475569; }
.panel-title-bar h2 { margin: 0; font-size: 22px; font-weight: 700; color: #0f172a; }

@media (max-width: 720px) {
  .geo-sec h2 { font-size: 16px; margin: 22px 0 10px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .panel, .card { padding: 18px 14px; }
  .search-hero { flex-direction: column; gap: 8px; }
  .search-hero input { border-right: 1.5px solid #3b82f6; border-radius: 8px; }
  .search-hero button { border-radius: 8px; padding: 12px; }
  .modal-foot { flex-direction: column-reverse; }
  .btn-cancel, .btn-go { width: 100%; }
  .hide-sm { display: none; }
}