/* ==========================================================================
   Firebird · Vibe Coding 社区 — 全局样式
   ========================================================================== */

/* ---------- 1. 主题变量 ---------- */
:root {
  --primary: #F97316;
  --primary-dark: #EA580C;
  --secondary: #1E3A5F;
  --bg: #F8F9FA;
  --card-bg: #FFFFFF;
  --text: #1A1A2E;
  --text-secondary: #6B7280;
  --text-light: #9CA3AF;
  --border: #E5E7EB;
  --tag-bg: #F3F4F6;
  --success: #10B981;
  --error: #EF4444;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 12px 24px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --skeleton: #E5E7EB;
  --placeholder-bg: #E5E7EB;
}

[data-theme="dark"] {
  --bg: #0F172A;
  --card-bg: #1E293B;
  --text: #E2E8F0;
  --text-secondary: #94A3B8;
  --text-light: #64748B;
  --border: #334155;
  --tag-bg: #334155;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 12px 24px rgba(0, 0, 0, 0.5);
  --skeleton: #334155;
  --placeholder-bg: #334155;
}

/* ---------- 2. 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.2s ease, color 0.2s ease;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.hidden { display: none !important; }

/* ---------- 3. Header ---------- */
.site-header {
  background: var(--secondary);
  color: #fff;
  padding: 1rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo { line-height: 1.3; }
.logo-main { font-size: 2rem; font-weight: 700; letter-spacing: 1px; }
.logo-sub { display: block; font-size: 0.8rem; color: rgba(255, 255, 255, 0.8); margin-left: 0.35rem; font-weight: 500; }
.logo-slogan { display: block; font-size: 0.7rem; color: rgba(255, 255, 255, 0.55); margin-left: 0.35rem; margin-top: 0.1rem; }

.header-actions { display: flex; align-items: center; gap: 0.6rem; }
.nav-links { display: flex; align-items: center; gap: 0.6rem; }

.nav-btn {
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}
.nav-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.nav-btn.ghost { background: rgba(255, 255, 255, 0.12); }
.nav-btn.ghost:hover { background: rgba(255, 255, 255, 0.22); }

.theme-toggle { font-size: 1.25rem; padding: 0.35rem; border-radius: 8px; background: rgba(255, 255, 255, 0.12); transition: background 0.2s ease; line-height: 1; }
.theme-toggle:hover { background: rgba(255, 255, 255, 0.25); }
.hamburger { display: none; font-size: 1.5rem; padding: 0.2rem 0.5rem; border-radius: 8px; background: rgba(255, 255, 255, 0.12); line-height: 1; }

/* ---------- 4. 搜索框 ---------- */
.search-wrap { margin: 1.5rem 0 1rem; position: relative; }
.search-wrap input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.6rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  background: var(--card-bg);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-wrap input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15); }
.search-wrap::before {
  content: "🔍";
  position: absolute;
  left: 0.9rem; top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  opacity: 0.7;
  pointer-events: none;
}

/* ---------- 5. 分类导航栏（自动换行，不出现滚动条） ---------- */
.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.25rem 0 0.75rem;
  margin-bottom: 0.25rem;
}
.cat-pill {
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--text);
  font-size: 0.9rem;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.cat-pill:hover { opacity: 0.85; }
.cat-pill.active { background: var(--primary); color: #fff; font-weight: 700; }

/* ---------- 5.5 工具栏（排行榜 + 排序） ---------- */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.25rem 0 1.25rem;
  flex-wrap: wrap;
}
.toolbar-right { display: flex; align-items: center; gap: 0.75rem; }
.result-count { font-size: 0.85rem; color: var(--text-secondary); }
.sort-select {
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.sort-select:focus { outline: none; border-color: var(--primary); }

/* ---------- 6. 排行榜入口区（5 张卡片） ---------- */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin: 0 0 1.75rem;
}
.entry-card {
  border-radius: 12px;
  padding: 1.4rem 1rem;
  text-align: center;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, padding 0.2s ease;
  box-shadow: var(--shadow);
}
.entry-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.entry-card:nth-child(1) { background: linear-gradient(135deg, #F97316, #FBBF24); }
.entry-card:nth-child(2) { background: linear-gradient(135deg, #10B981, #06B6D4); }
.entry-card:nth-child(3) { background: linear-gradient(135deg, #6366F1, #8B5CF6); }
.entry-card.entry-rec { background: linear-gradient(135deg, #EC4899, #8B5CF6); }
.entry-card.entry-ess { background: linear-gradient(135deg, #1E3A5F, #475569); }

.entry-emoji { font-size: 1.8rem; display: block; margin-bottom: 0.35rem; }
.entry-title { font-weight: 700; font-size: 1.02rem; }
.entry-desc { font-size: 0.78rem; opacity: 0.85; margin-top: 0.15rem; }

/* 搜索时：入口卡片缩小成小胶囊，突出搜索结果 */
.entry-grid.searching {
  grid-template-columns: repeat(5, auto);
  justify-content: start;
  gap: 0.45rem;
  margin-bottom: 1rem;
}
.entry-grid.searching .entry-card { padding: 0.35rem 0.75rem; border-radius: 999px; display: flex; align-items: center; gap: 0.3rem; }
.entry-grid.searching .entry-card:hover { transform: none; }
.entry-grid.searching .entry-emoji { font-size: 1rem; margin: 0; }
.entry-grid.searching .entry-title { font-size: 0.82rem; }
.entry-grid.searching .entry-desc { display: none; }

/* ---------- 7. 产品卡片网格 ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(280px, 1fr));
  gap: 1.25rem;
}
.product-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.card-image { height: 200px; background: var(--placeholder-bg); position: relative; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.product-card:hover .card-image img { transform: scale(1.04); }
.img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; font-weight: 700;
  color: var(--text-light);
  background: var(--placeholder-bg);
}

.card-body { padding: 1rem; display: flex; flex-direction: column; flex: 1; }
.card-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.pill { padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }

.card-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; margin: 0.4rem 0 0.25rem; }
.card-title { font-size: 1.1rem; font-weight: 700; }

/* 版本号 / 近期更新标识 */
.version-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #2563EB;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: 6px;
  padding: 0 0.4rem;
  line-height: 1.4;
  white-space: nowrap;
}
.update-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: 6px;
  padding: 0 0.4rem;
  line-height: 1.4;
  white-space: nowrap;
}

/* 评分行 */
.card-rating { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.3rem; display: flex; align-items: center; gap: 0.15rem; }
.star { color: #D1D5DB; }
.star.filled { color: #F59E0B; }
.rating-num { font-weight: 700; }

.card-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.card-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 0.75rem; font-size: 0.8rem; color: var(--text-light); }
.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.85rem;
  border-top: 1px solid var(--border);
  padding-top: 0.85rem;
}
.actions-left { display: flex; align-items: center; gap: 0.5rem; }
.actions-right { display: flex; align-items: center; gap: 0.5rem; }

/* 点赞按钮 */
.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--tag-bg);
  color: var(--text);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  transition: background 0.2s ease, transform 0.15s ease;
}
.like-btn:hover { transform: scale(1.05); }
.like-btn.liked { background: rgba(249, 115, 22, 0.18); color: var(--primary); font-weight: 700; }

/* 评论按钮 */
.review-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--tag-bg);
  color: var(--text);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  transition: background 0.2s ease, transform 0.15s ease;
}
.review-btn:hover { background: rgba(37, 99, 235, 0.12); transform: scale(1.05); }

/* 访问按钮 */
.visit-btn {
  display: inline-flex;
  align-items: center;
  background: #2563EB;
  color: #fff;
  border-radius: 8px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.15s ease;
}
.visit-btn:hover { background: #1D4ED8; transform: translateY(-1px); }

/* ---------- 7.5 搜索横条结果 ---------- */
.result-list { display: flex; flex-direction: column; gap: 0.85rem; }
.result-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.result-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.result-thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--placeholder-bg); }
.result-thumb img { width: 100%; height: 100%; object-fit: cover; }
.result-thumb .img-placeholder { font-size: 1.6rem; }
.result-info { flex: 1; min-width: 0; }
.result-name { font-weight: 700; font-size: 1.02rem; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.result-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.3rem; }
.result-desc { color: var(--text-secondary); font-size: 0.85rem; margin-top: 0.25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-meta-line { color: var(--text-light); font-size: 0.78rem; margin-top: 0.25rem; }
.result-right { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.rating-text { font-size: 0.8rem; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 0.1rem; white-space: nowrap; }

/* ---------- 8. 骨架屏 ---------- */
.skeleton-card { background: var(--card-bg); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow); }
.skeleton-img { height: 200px; }
.skeleton-block { margin: 1rem; }
.skeleton-line { height: 14px; border-radius: 6px; margin-bottom: 10px; }
.skeleton-line.short { width: 40%; }
.skeleton-img, .skeleton-line {
  background: linear-gradient(90deg, var(--skeleton) 25%, rgba(128, 128, 128, 0.2) 50%, var(--skeleton) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- 9. 空状态 ---------- */
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--text-secondary); }
.empty-emoji { font-size: 4rem; display: block; margin-bottom: 0.75rem; }
.empty-state p { font-size: 1.05rem; margin-bottom: 1.25rem; }
.empty-state .nav-btn { display: inline-block; }

/* ---------- 10. Footer ---------- */
.site-footer {
  background: var(--secondary);
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  padding: 2rem 1.25rem;
  margin-top: auto;
}
.footer-brand { font-weight: 700; font-size: 1.05rem; color: #fff; }
.footer-slogan { font-size: 0.85rem; margin-top: 0.35rem; color: rgba(255, 255, 255, 0.6); }
.footer-by { font-size: 0.75rem; margin-top: 0.35rem; color: rgba(255, 255, 255, 0.45); }
.footer-icons { margin-top: 1rem; display: flex; justify-content: center; gap: 1.25rem; }
.footer-icons a { font-size: 1.2rem; opacity: 0.85; transition: color 0.2s ease, opacity 0.2s ease, transform 0.15s ease; }
.footer-icons a:hover { color: var(--primary); opacity: 1; transform: translateY(-2px); }

/* ---------- 11. Toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 2rem;
  transform: translateX(-50%) translateY(20px);
  background: var(--text); color: var(--bg);
  padding: 0.7rem 1.4rem; border-radius: 10px; font-size: 0.9rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 2000; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); max-width: 90vw;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 12. 表单 ---------- */
.page-title { text-align: center; margin: 2rem 0 0.5rem; font-size: 1.8rem; font-weight: 800; }
.page-subtitle { text-align: center; color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 2rem; }

.form-wrap {
  max-width: 720px; margin: 0 auto;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow);
}
.form-alert {
  background: rgba(239, 68, 68, 0.1); border: 1px solid var(--error);
  color: var(--error); padding: 0.8rem 1rem; border-radius: 8px;
  margin-bottom: 1.25rem; font-size: 0.9rem; display: none;
  max-width: 720px; margin-left: auto; margin-right: auto;
}
.form-alert.show { display: block; }

.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 0.45rem; }
.form-label .req { color: var(--error); margin-left: 0.15rem; }
.form-hint { font-size: 0.8rem; color: var(--text-light); margin-top: 0.35rem; }

.form-control {
  width: 100%; padding: 0.75rem 0.9rem;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 0.95rem; font-family: inherit;
  background: var(--bg); color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15); }
textarea.form-control { resize: vertical; min-height: 90px; }
.help-icon { font-size: 0.8rem; color: var(--text-light); margin-left: 0.3rem; }

/* 蜜罐（隐藏） */
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

.char-count { text-align: right; font-size: 0.8rem; color: var(--text-light); margin-top: 0.35rem; }
.char-count.over { color: var(--error); font-weight: 700; }

.checkbox-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
.checkbox-item {
  display: flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--border); border-radius: 8px;
  padding: 0.6rem 0.8rem; cursor: pointer; font-size: 0.9rem;
  transition: border-color 0.2s ease, background 0.2s ease;
  user-select: none;
}
.checkbox-item:hover { border-color: var(--primary); }
.checkbox-item input { accent-color: var(--primary); width: 16px; height: 16px; cursor: pointer; }
.checkbox-item.selected { border-color: var(--primary); background: rgba(249, 115, 22, 0.08); }

.submit-btn {
  width: 100%; background: var(--primary); color: #fff;
  font-size: 1.1rem; font-weight: 700; padding: 0.95rem;
  border-radius: 10px;
  transition: background 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
}
.submit-btn:hover:not(:disabled) { background: var(--primary-dark); transform: translateY(-1px); }
.submit-btn:disabled { opacity: 0.7; cursor: not-allowed; }
.submit-btn.loading { display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 13. 成功页 + 徽章 ---------- */
.success-view {
  display: none; text-align: center;
  position: relative;
  max-width: 560px; margin: 2rem auto;
  padding: 3rem 1.5rem 2.5rem;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.success-view.show { display: block; }
.success-emoji { font-size: 3.5rem; display: block; margin-bottom: 0.75rem; }
.success-view h2 { font-size: 1.7rem; font-weight: 800; margin-bottom: 0.4rem; }
.success-view > p { color: var(--text-secondary); margin-bottom: 1.5rem; }
.success-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* 专属徽章卡片 */
.badge-card {
  position: relative;
  width: 300px; margin: 0 auto 1.75rem;
  padding: 1.4rem 1.25rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #F97316, #FBBF24);
  color: #fff;
  box-shadow: 0 10px 30px rgba(249, 115, 22, 0.35);
  border: 2px dashed rgba(255, 255, 255, 0.6);
}
.badge-card.pop { animation: badgePop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes badgePop {
  0% { transform: scale(0.5) rotate(-4deg); opacity: 0; }
  60% { transform: scale(1.06) rotate(1deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.badge-icon { font-size: 2.6rem; margin-bottom: 0.4rem; }
.badge-title { font-size: 1rem; font-weight: 800; letter-spacing: 1px; }
.badge-code {
  font-family: "SF Mono", Consolas, Menlo, monospace;
  font-size: 1.35rem; font-weight: 800; letter-spacing: 1px;
  margin: 0.7rem 0 0.4rem;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 8px; padding: 0.4rem 0.6rem;
  word-break: break-all;
}
.badge-meta { font-size: 0.85rem; opacity: 0.95; }
.badge-note { font-size: 0.72rem; opacity: 0.85; margin-top: 0.7rem; }

/* 礼花 */
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; border-radius: var(--radius); }
.confetti-piece {
  position: absolute; top: -14px;
  width: 8px; height: 14px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
  opacity: 0.95;
}
@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0); opacity: 0.95; }
  100% { transform: translateY(340px) rotate(540deg); opacity: 0; }
}

/* ---------- 14. 弹窗 ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1500;
  background: rgba(0, 0, 0, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%; max-width: 520px;
  max-height: 86vh;
  overflow-y: auto;
  padding: 1.5rem;
  position: relative;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  animation: modalIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalIn { from { transform: translateY(20px) scale(0.97); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close {
  position: absolute; top: 0.75rem; right: 0.9rem;
  font-size: 1.1rem; color: var(--text-light);
  padding: 0.25rem; border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}
.modal-close:hover { background: var(--tag-bg); color: var(--text); }
.modal-title { font-size: 1.2rem; font-weight: 800; margin-bottom: 0.35rem; padding-right: 1.5rem; }
.modal-sub { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 0.75rem; }
.modal-rating-summary { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.15rem; }

/* 评价列表 */
.review-list { border-top: 1px solid var(--border); margin-bottom: 1rem; max-height: 240px; overflow-y: auto; }
.review-loading, .review-empty { color: var(--text-light); font-size: 0.85rem; padding: 1rem 0.25rem; text-align: center; }
.review-item { padding: 0.75rem 0.25rem; border-bottom: 1px dashed var(--border); }
.review-head { display: flex; align-items: center; justify-content: space-between; }
.review-author { font-weight: 700; font-size: 0.9rem; }
.review-stars { font-size: 0.85rem; }
.review-content { color: var(--text-secondary); font-size: 0.88rem; margin-top: 0.3rem; }
.review-time { color: var(--text-light); font-size: 0.72rem; margin-top: 0.3rem; }

/* 星级选择器 */
.star-picker { display: flex; gap: 0.15rem; margin-top: 0.4rem; }
.star-picker .star {
  font-size: 1.7rem; line-height: 1; padding: 0.1rem;
  color: #D1D5DB; transition: transform 0.1s ease, color 0.15s ease;
}
.star-picker .star:hover { transform: scale(1.2); }
.star-picker .star.filled { color: #F59E0B; }

/* ---------- 15. 排行榜页 ---------- */
.rank-tabs { display: flex; gap: 1.4rem; margin: 1.5rem 0 1.75rem; border-bottom: 1px solid var(--border); overflow-x: auto; }
.rank-tab { padding: 0.6rem 0.2rem; font-size: 1rem; font-weight: 600; color: var(--text-secondary); border-bottom: 3px solid transparent; transition: color 0.2s ease, border-color 0.2s ease; margin-bottom: -1px; white-space: nowrap; }
.rank-tab:hover { color: var(--text); }
.rank-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.rank-list { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.rank-row { display: flex; align-items: center; gap: 1rem; padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--border); transition: background 0.15s ease; }
.rank-row:last-child { border-bottom: none; }
.rank-row:hover { background: rgba(128, 128, 128, 0.06); }
.rank-num { width: 2.2rem; text-align: center; font-size: 1.1rem; font-weight: 800; color: var(--text-secondary); flex-shrink: 0; }
.rank-num.medal { font-size: 1.4rem; font-weight: 400; }
.rank-thumb { width: 48px; height: 48px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: var(--placeholder-bg); }
.rank-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rank-thumb .img-placeholder { font-size: 1.2rem; }
.rank-info { flex: 1; min-width: 0; }
.rank-name { font-weight: 700; font-size: 0.95rem; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.rank-desc { color: var(--text-secondary); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-side { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.rank-tool { font-size: 0.8rem; color: var(--text-light); white-space: nowrap; }
.rank-side .like-btn { padding: 0.3rem 0.75rem; }
.rank-visit { background: #2563EB; color: #fff; border-radius: 8px; padding: 0.3rem 0.75rem; font-size: 0.85rem; font-weight: 600; transition: background 0.2s ease; }
.rank-visit:hover { background: #1D4ED8; }

/* ---------- 16. 管理员页 ---------- */
.admin-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.5rem; }
.admin-hint { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 1rem; }
.admin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin: 2rem 0 1.25rem; flex-wrap: wrap; }
.admin-login { margin-top: 3rem; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.85rem; margin-bottom: 1.25rem; }
.stat-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; text-align: center; color: var(--text-secondary); font-size: 0.85rem; }
.stat-num { display: block; font-size: 1.7rem; font-weight: 800; color: var(--primary); }

.admin-table-wrap { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; box-shadow: var(--shadow); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 760px; }
.admin-table th, .admin-table td { padding: 0.75rem 0.9rem; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { color: var(--text-secondary); font-weight: 600; background: var(--bg); white-space: nowrap; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(128, 128, 128, 0.05); }
.admin-name { font-weight: 700; }
.admin-sub { font-size: 0.75rem; color: var(--text-light); margin-top: 0.15rem; }
.admin-loading { text-align: center; color: var(--text-light); padding: 2rem; }
.flag-btn { background: var(--tag-bg); color: var(--text); border-radius: 8px; padding: 0.35rem 0.7rem; font-size: 0.8rem; transition: background 0.15s ease; white-space: nowrap; }
.flag-btn:hover { opacity: 0.85; }
.flag-btn.on { background: rgba(249, 115, 22, 0.15); color: var(--primary); font-weight: 700; }
.del-btn { background: rgba(239, 68, 68, 0.12); color: var(--error); border-radius: 8px; padding: 0.35rem 0.7rem; font-size: 0.8rem; transition: background 0.15s ease; white-space: nowrap; }
.del-btn:hover { background: rgba(239, 68, 68, 0.25); }

/* ---------- 17. 响应式 ---------- */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .entry-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .product-grid { grid-template-columns: 1fr; }
  .entry-grid { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }

  .header-inner { flex-wrap: nowrap; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; align-items: stretch; gap: 0.5rem; width: 100%; margin-top: 0.75rem; }
  .hamburger { display: block; }
  .logo-main { font-size: 1.6rem; }

  .form-wrap { padding: 1.25rem; }
  .checkbox-grid { grid-template-columns: 1fr; }

  .result-row { flex-wrap: wrap; gap: 0.75rem; }
  .result-right { width: 100%; justify-content: flex-start; flex-wrap: wrap; }

  .rank-row { flex-wrap: wrap; gap: 0.6rem; padding: 0.8rem 1rem; }
  .rank-side { width: 100%; justify-content: flex-start; }

  .entry-grid.searching { grid-template-columns: repeat(3, auto); }
}
