/* ===== 随身WiFi排行榜 - 全局样式 ===== */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --accent: #f97316;
  --accent-light: #fff7ed;
  --green: #16a34a;
  --green-light: #f0fdf4;
  --red: #dc2626;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --bg: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --radius: 16px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .05);
  --shadow-hover: 0 4px 12px rgba(15, 23, 42, .08), 0 16px 40px rgba(37, 99, 235, .10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ===== 顶栏 ===== */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 16px;
  height: 60px; display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 19px;
}
.logo em { font-style: normal; color: var(--primary); }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a {
  padding: 8px 12px; border-radius: 8px; color: var(--text-2);
  font-size: 14.5px; font-weight: 500;
}
.nav a:hover { background: var(--primary-light); color: var(--primary); text-decoration: none; }
.nav a.active { background: var(--primary); color: #fff; }

/* ===== 面包屑 ===== */
.breadcrumb { padding: 14px 0 0; font-size: 13px; color: var(--text-3); }
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 6px; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 45%, #7c3aed 100%);
  color: #fff; padding: 56px 0 84px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -80px; top: -80px;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 65%);
}
.hero h1 { font-size: clamp(26px, 4vw, 40px); font-weight: 800; letter-spacing: .5px; }
.hero .sub { margin-top: 12px; font-size: 15.5px; color: rgba(255,255,255,.85); max-width: 640px; }
.hero-stats { display: flex; gap: 28px; margin-top: 28px; flex-wrap: wrap; }
.hero-stats .stat b { font-size: 24px; display: block; }
.hero-stats .stat span { font-size: 13px; color: rgba(255,255,255,.75); }

/* ===== 区块标题 ===== */
.section { padding: 36px 0 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.section-head h2 { font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.section-head h2::before {
  content: ""; width: 5px; height: 20px; border-radius: 3px;
  background: linear-gradient(180deg, #2563eb, #7c3aed);
}
.section-head .more { font-size: 13.5px; color: var(--text-3); }

/* ===== 排名列表 ===== */
.rank-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.rank-item {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.rank-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.rank-thumb {
  flex: none; width: 84px; height: 84px; border-radius: 12px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #eff6ff, #f5f3ff);
}
.rank-thumb:hover { text-decoration: none; }
.rank-thumb .product-photo { width: 72px; height: 72px; object-fit: contain; }
.rank-no {
  flex: none; width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 19px; color: var(--text-3);
  background: #f1f5f9;
}
.rank-item:nth-child(1) .rank-no { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #fff; box-shadow: 0 4px 12px rgba(245,158,11,.4); }
.rank-item:nth-child(2) .rank-no { background: linear-gradient(135deg, #94a3b8, #cbd5e1); color: #fff; }
.rank-item:nth-child(3) .rank-no { background: linear-gradient(135deg, #d97706, #f59e0b); color: #fff; }
.rank-main { flex: 1; min-width: 0; }
.rank-main .t { font-size: 16.5px; font-weight: 700; }
.rank-main .t a { color: var(--text); }
.rank-main .t a:hover { color: var(--primary); }
.rank-tags { display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.chip {
  font-size: 12px; padding: 2px 9px; border-radius: 999px;
  background: #f1f5f9; color: var(--text-2); white-space: nowrap;
}
.chip.blue { background: var(--primary-light); color: var(--primary); }
.chip.orange { background: var(--accent-light); color: var(--accent); }
.chip.green { background: var(--green-light); color: var(--green); }
.rank-side { flex: none; text-align: right; display: flex; align-items: center; gap: 18px; }
.stars { color: #f59e0b; font-size: 15px; letter-spacing: 1px; }
.stars small { color: var(--text-3); font-size: 13px; letter-spacing: 0; margin-left: 4px; }
.score {
  flex: none; width: 56px; text-align: center;
}
.score b { font-size: 22px; color: var(--primary); font-weight: 800; }
.score span { display: block; font-size: 11px; color: var(--text-3); }
.price { font-weight: 800; color: var(--red); font-size: 17px; white-space: nowrap; }
.price small { font-size: 12px; color: var(--text-3); font-weight: 400; }

/* ===== 榜单卡片网格 ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.cat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); text-decoration: none; }
.cat-card .ico { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.cat-card h3 { margin-top: 12px; font-size: 16px; color: var(--text); }
.cat-card p { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.cat-card .link { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--primary); }

/* ===== 产品卡片（设备图 + 信息） ===== */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.product-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.product-cover {
  height: 190px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #eff6ff, #f5f3ff);
  position: relative;
}
.product-cover .tag-flag { position: absolute; top: 12px; left: 12px; }
.product-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-body h3 { font-size: 16.5px; font-weight: 700; }
.product-body h3 a { color: var(--text); }
.product-body h3 a:hover { color: var(--primary); }
.product-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
.product-specs { display: flex; flex-wrap: wrap; gap: 6px; }
.product-bottom {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px; border-top: 1px dashed var(--border);
}

/* ===== 设备示意图（CSS绘制） ===== */
.device {
  width: 120px; height: 120px; border-radius: 24px; position: relative;
  background: linear-gradient(150deg, #ffffff, #e2e8f0);
  box-shadow: inset 0 0 0 1px rgba(148,163,184,.35), 0 10px 24px rgba(15,23,42,.12);
}
.device::before { /* 屏幕区 */
  content: ""; position: absolute; left: 14px; right: 14px; top: 16px; bottom: 22px;
  border-radius: 12px; background: linear-gradient(160deg, #1e3a8a, #3b82f6);
  display: flex; align-items: center; justify-content: center;
}
.device .wifi-mark {
  position: absolute; left: 0; right: 0; top: 40%; text-align: center;
  color: #fff; font-size: 30px; z-index: 2;
}
.device .led { position: absolute; left: 50%; transform: translateX(-50%); bottom: 8px; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.device.black { background: linear-gradient(150deg, #334155, #0f172a); box-shadow: inset 0 0 0 1px rgba(255,255,255,.15), 0 10px 24px rgba(15,23,42,.2); }
.device.black::before { background: linear-gradient(160deg, #0f172a, #1e293b); }
.device.gradient-blue::before { background: linear-gradient(160deg, #0ea5e9, #2563eb); }
.device.purple::before { background: linear-gradient(160deg, #7c3aed, #4f46e5); }
.device.teal::before { background: linear-gradient(160deg, #0d9488, #2563eb); }
/* ===== 真实产品图（COS） ===== */
.product-photo { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 14px; background: #fff; }
.product-cover .product-photo { max-height: 160px; }
.product-hero .device-wrap .product-photo { max-width: 220px; max-height: 220px; }

/* ===== 标签 ===== */
.tag-flag { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; color: #fff; }
.tag-flag.hot { background: linear-gradient(90deg, #ef4444, #f97316); }
.tag-flag.top { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.tag-flag.new { background: linear-gradient(90deg, #22c55e, #16a34a); }
.tag-flag.star { background: linear-gradient(90deg, #6366f1, #8b5cf6); }

/* ===== 按钮 ===== */
.btn {
  display: inline-block; padding: 9px 18px; border-radius: 10px;
  font-weight: 600; font-size: 14px; transition: all .2s; border: none; cursor: pointer;
}
.btn-primary { background: linear-gradient(135deg, #2563eb, #4f46e5); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(37,99,235,.35); text-decoration: none; }
.btn-ghost { background: #fff; color: var(--primary); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--primary); text-decoration: none; }

/* ===== 产品详情页 ===== */
.product-hero {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px; display: grid; grid-template-columns: 260px 1fr; gap: 24px;
  margin-top: 16px;
}
.product-hero .device-wrap {
  background: linear-gradient(160deg, #eff6ff, #f5f3ff); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; min-height: 240px;
}
.product-hero h1 { font-size: 24px; font-weight: 800; }
.product-hero .desc { color: var(--text-2); margin-top: 8px; font-size: 14.5px; }
.spec-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 14px; }
.spec-table td { padding: 8px 12px; border: 1px solid var(--border); }
.spec-table td:first-child { background: #f8fafc; color: var(--text-2); width: 120px; font-weight: 500; }
.buy-row { display: flex; gap: 12px; margin-top: 16px; align-items: center; flex-wrap: wrap; }
.buy-row .price-big { font-size: 28px; font-weight: 800; color: var(--red); }

/* 评分条 */
.score-bars { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.score-bar-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.score-bar-row .lb { flex: none; width: 64px; color: var(--text-2); }
.score-bar-row .track { flex: 1; height: 8px; border-radius: 99px; background: #f1f5f9; overflow: hidden; }
.score-bar-row .fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #2563eb, #7c3aed); }
.score-bar-row .val { flex: none; width: 36px; text-align: right; font-weight: 700; color: var(--primary); }

/* ===== 文章/指南 ===== */
.article {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px; margin-top: 16px;
}
.article h1 { font-size: 24px; font-weight: 800; }
.article h2 { font-size: 19px; margin: 26px 0 12px; padding-left: 12px; border-left: 4px solid var(--primary); }
.article h3 { font-size: 16px; margin: 18px 0 8px; }
.article p, .article li { color: var(--text-2); font-size: 15px; }
.article ul, .article ol { padding-left: 22px; margin: 10px 0; }
.article li { margin: 6px 0; }
.article .tip {
  background: var(--primary-light); border-radius: 12px; padding: 14px 16px;
  margin: 14px 0; font-size: 14px; color: var(--primary-dark);
}
.article .warn { background: var(--accent-light); color: #c2410c; }
.article table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
.article table td, .article table th { border: 1px solid var(--border); padding: 9px 12px; text-align: left; }
.article table th { background: #f8fafc; font-weight: 600; }

/* FAQ */
.faq-item { border: 1px solid var(--border); border-radius: 14px; background: #fff; margin-bottom: 12px; overflow: hidden; }
.faq-item summary {
  cursor: pointer; padding: 16px 18px; font-weight: 600; font-size: 15px;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 20px; color: var(--primary); }
.faq-item[open] summary::after { content: "−"; }
.faq-item .a { padding: 0 18px 16px; color: var(--text-2); font-size: 14.5px; }

/* ===== 页脚 ===== */
.footer { margin-top: 56px; background: #0f172a; color: #94a3b8; padding: 40px 0 24px; font-size: 13.5px; }
.footer a { color: #cbd5e1; }
.footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 10px; }
.footer li { list-style: none; margin: 6px 0; }
.footer .copy { text-align: center; margin-top: 28px; border-top: 1px solid #1e293b; padding-top: 18px; color: #64748b; font-size: 12.5px; }

/* ===== 响应式 ===== */
@media (max-width: 860px) {
  .nav { gap: 0; }
  .nav a { padding: 6px 8px; font-size: 13px; }
  .logo { font-size: 16px; }
  .rank-side { gap: 10px; }
  .score { display: none; }
  .product-hero { grid-template-columns: 1fr; }
  .product-hero .device-wrap { min-height: 180px; }
}
@media (max-width: 560px) {
  .rank-item { flex-wrap: wrap; }
  .rank-side { width: 100%; justify-content: flex-end; text-align: left; }
  .hero { padding: 40px 0 60px; }
  .section-head h2 { font-size: 19px; }
  .topbar .nav { display: none; }
  .article { padding: 18px; }
}
