/* ====== 基础布局（触底页脚） ====== */
html,
body {
  height: 100%;
  margin: 0;
}

body {
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: #0a2540;
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(47, 128, 237, .10), transparent 60%),
    linear-gradient(180deg, #f6f9ff 0%, #f1f5ff 18%, #eef2ff 40%, #f7f9ff 100%);
}

.wrap {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
}

main {
  flex: 1;
}

/* ====== 头部（毛玻璃导航） ====== */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px;
  margin: 4px 0 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .62));
  border: 1px solid rgba(20, 40, 80, .08);
  border-radius: 14px;
  backdrop-filter: saturate(120%) blur(8px);
  box-shadow: 0 10px 24px rgba(10, 37, 64, .08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  /* background: linear-gradient(135deg, #0d4bcf, #2f80ed); */
  display: grid;
  place-items: center;
  /* color: #fff; */
  /* font-weight: 800; */
  /* box-shadow: 0 6px 16px rgba(13, 75, 207, .20); */
}

.slogan {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .2px;
}

.tag {
  font-size: 12px;
  color: #4b5b78;
  background: linear-gradient(90deg, #eef4ff, #f6f9ff);
  padding: 4px 10px;
  border-radius: 999px;
}

.nav a {
  display: inline-block;
  color: #3b4a66;
  background: #ffffffc9;
  border: 1px solid rgba(20, 40, 80, .08);
  border-radius: 12px;
  margin-left: 8px;
  padding: 8px 12px;
  box-shadow: 0 4px 10px rgba(10, 37, 64, .05);
  transition: .2s;
  text-decoration: none;
}

.nav a:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(10, 37, 64, .10);
}

.nav a.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.nav a.active:hover {
  background: #1d4ed8;
}

/* ====== 主面板 & 卡片网格 ====== */
.panel {
  background: #fff;
  border: 1px solid rgba(20, 40, 80, .06);
  border-radius: 16px;
  padding: 18px 18px;
  box-shadow: 0 16px 36px rgba(10, 37, 64, .08);
}

.h1 {
  font-size: clamp(22px, 2.6vw, 32px);
  margin: 4px 0 8px;
  letter-spacing: .2px;
}

.sub {
  color: #5c6d88;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

@media (max-width: 1000px) {
  .grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
}

@media (max-width: 640px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 130px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), #fff);
  border: 1px solid rgba(20, 40, 80, .08);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(10, 37, 64, .08);
  text-decoration: none;
  color: inherit;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(10, 37, 64, .12);
}

.card b {
  font-size: 16px;
}

.card .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(47, 128, 237, .20);
  background: transparent;
  color: #2563eb;
  font-weight: 600;
}

.card .pill::after {
  content: "→";
  margin-left: 8px;
  opacity: .9;
  transition: transform .18s;
}

.card:hover .pill::after {
  transform: translateX(2px);
}

/* ====== 页脚（触底 + 分层） ====== */
footer.foot {
  margin-bottom: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .75), rgba(255, 255, 255, .9));
  border-top: 1px solid rgba(20, 40, 80, .10);
  padding: 12px 10px;
  text-align: center;
  font-size: 14px;
  color: #4b5b78;
}

footer .beian {
  color: #3b5bd6;
  text-decoration: none;
  border-bottom: 1px dotted rgba(59, 91, 214, .4);
}

footer .beian:hover {
  border-bottom-color: rgba(59, 91, 214, .8);
}

.sr {
  position: absolute;
  clip: rect(1px, 1px, 1px, 1px);
  padding: 0;
  border: 0;
  height: 1px;
  width: 1px;
  overflow: hidden
}



.grid .card {
  min-height: 150px;
  /* 根据实际高度调整 */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* 文章正文排版（可选） */
article.content h2 {
  font-size: 1.35rem;
  margin-top: 1.2rem;
}

article.content h3 {
  font-size: 1.15rem;
  margin-top: 1rem;
}

article.content p {
  margin: .6rem 0;
}

article.content pre,
article.content code {
  background: #f5f7fb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

article.content pre {
  padding: 12px;
  overflow: auto;
}

article.content code {
  padding: 2px 6px;
}

article.content a {
  color: #2563eb;
  text-decoration: none;
}

article.content a:hover {
  text-decoration: underline;
}

/* —— 专题卡片小修复 —— */
.sub.auto {
  height: auto !important;
}

/* 用于覆盖 60px 的默认高度 */
.card a.pill {
  /* 让按钮用 pill 风格，不要紫色下划线 */
  text-decoration: none;
  color: inherit;
}

.card a.pill:hover {
  border-color: rgba(37, 99, 235, .35);
}

.logo a {
  color: inherit;
  text-decoration: none;
  display: inline-block;
}


/* ====== Social Nav (WeChat Popover) ====== */
.social-nav {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #fff;
  border: 1px solid rgba(20, 40, 80, .08);
  border-radius: 999px;
  color: #4b5b78;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 10px rgba(10, 37, 64, .05);
  transition: .2s;
  position: relative;
  cursor: pointer;
}

.social-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(10, 37, 64, .10);
  color: #2563eb;
}

.qr-popover {
  position: absolute;
  top: 110%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #fff;
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(20, 40, 80, .08);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
  width: 140px;
  text-align: center;
  pointer-events: none;
}

.social-link:hover .qr-popover {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.qr-popover img {
  width: 100%;
  border-radius: 8px;
  display: block;
}

.qr-popover p {
  font-size: 12px;
  margin: 8px 0 0;
  color: #5c6d88;
}

.qr-popover::after {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  margin-left: -6px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-top: 1px solid rgba(20, 40, 80, .08);
  border-left: 1px solid rgba(20, 40, 80, .08);
  transform: rotate(45deg);
}

/* ====== AI Model Ranking ====== */
.ranking-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 14px;
}

.ranking-table th {
  text-align: left;
  color: #5c6d88;
  font-weight: 500;
  padding: 8px;
  border-bottom: 1px solid #eef2ff;
}

.ranking-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #f6f9ff;
  color: #0a2540;
}

.ranking-table tr:last-child td {
  border-bottom: none;
}

.ranking-score {
  font-weight: 700;
  color: #2563eb;
}

.rank-1 {
  color: #d97706;
}

/* Gold-ish */
.rank-2 {
  color: #4b5563;
}

.rank-3 {
  color: #b45309;
}

.model-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  background: #eef2ff;
  color: #3b82f6;
  margin-left: 6px;
}

/* ====== Tool Cards Improvements ====== */
.tool-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #475569;
  font-size: 14px;
  flex-shrink: 0;
}

.tool-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.tool-details h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}

.tool-details p {
  margin: 2px 0 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
}

.tool-tag {
  background: #e0f2fe;
  color: #0284c7;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  margin-left: 6px;
  vertical-align: middle;
}

.btn-sm {
  align-self: flex-start;
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 6px;
  background: #000;
  color: #fff;
  text-decoration: none;
  transition: .2s;
}

.btn-sm:hover {
  opacity: 0.8;
}