/* 炒股SkillTop10 — 排行榜样式 */

/* ===== 基础变量 ===== */
:root {
  --primary: #3B82F6;
  --primary-dark: #2563EB;
  --bg: #0F172A;
  --bg-card: #1E293B;
  --bg-card-hover: #334155;
  --text: #F1F5F9;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --border: #334155;
  --accent-green: #10B981;
  --accent-red: #EF4444;
  --accent-yellow: #F59E0B;
  --accent-purple: #8B5CF6;
  --gradient-start: #3B82F6;
  --gradient-end: #8B5CF6;
  --gold: #FFD700;
  --silver: #C0C0C0;
  --bronze: #CD7F32;
}

[data-theme="light"] {
  --bg: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F1F5F9;
  --text: #0F172A;
  --text-muted: #475569;
  --text-dim: #94A3B8;
  --border: #E2E8F0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== 导航栏 ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
}

[data-theme="light"] .navbar {
  background: rgba(248, 250, 252, 0.85);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold), var(--accent-yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { color: var(--text-muted); font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; }

.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}

.theme-toggle:hover { background: var(--bg-card-hover); }

/* ===== Hero区 ===== */
.hero {
  text-align: center;
  padding: 4rem 1.5rem 2.5rem;
  background: linear-gradient(180deg, rgba(255,215,0,0.06) 0%, transparent 100%);
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 1.25rem;
  background: linear-gradient(135deg, var(--gold), var(--accent-yellow));
  color: #0F172A;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--gold), #FFF, var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="light"] .hero h1 {
  background: linear-gradient(135deg, #B8860B, #0F172A, #B8860B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.disclaimer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #FCA5A5;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

[data-theme="light"] .disclaimer-badge {
  background: rgba(239, 68, 68, 0.05);
  color: #DC2626;
}

/* ===== 统计看板 ===== */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  padding: 1.5rem;
  flex-wrap: wrap;
}

.stat-item { text-align: center; }

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-yellow);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

/* ===== 通用标题 ===== */
.section-heading {
  font-size: 1.35rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-heading i { color: var(--accent-yellow); }

/* ===== 领奖台 Top3 ===== */
.podium-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem 1rem;
}

.podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1.25rem;
  margin-top: 2rem;
  padding-bottom: 1rem;
}

.podium-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem 1.5rem 1.5rem;
  text-align: center;
  position: relative;
  transition: all 0.3s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.podium-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  text-decoration: none;
  color: inherit;
}

/* 各名次尺寸与边框 — 第1名更高更突出 */
.podium-item.rank-1 {
  width: 290px;
  border-color: var(--gold);
  border-width: 2px;
  box-shadow: 0 0 30px rgba(255,215,0,0.15);
  padding-top: 2.5rem;
  padding-bottom: 2rem;
  margin-bottom: 1.5rem;
  z-index: 2;
}

.podium-item.rank-2 {
  width: 240px;
  border-color: var(--silver);
  margin-top: 2rem;
}

.podium-item.rank-3 {
  width: 240px;
  border-color: var(--bronze);
  margin-top: 2rem;
}

/* 排名徽章 */
.podium-medal {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1rem;
  color: #0F172A;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.podium-medal.gold { background: linear-gradient(135deg, #FFD700, #FFA500); }
.podium-medal.silver { background: linear-gradient(135deg, #E8E8E8, #A0A0A0); }
.podium-medal.bronze { background: linear-gradient(135deg, #CD7F32, #A0522D); color: #FFF; }

.podium-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0.5rem auto 0.75rem;
  color: #FFF;
}

.podium-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.podium-author {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.podium-type {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.podium-rating {
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 0.15rem;
}

.podium-rating-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.podium-stars {
  color: var(--accent-yellow);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.podium-meta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  font-size: 0.7rem;
  color: var(--text-dim);
}

.podium-meta .val { font-weight: 700; color: var(--text-muted); }

.podium-safety {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 0.75rem;
}

.podium-summary {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

/* ===== 排行榜区 ===== */
.leaderboard-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

.leaderboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.leaderboard-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.search-box {
  padding: 0.5rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
  width: 180px;
  transition: border-color 0.2s;
}

.search-box:focus { border-color: var(--primary); }

.sort-select {
  padding: 0.5rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

/* 筛选按钮 */
#filter-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.filter-btn {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.filter-btn:hover { border-color: var(--primary); color: var(--text); }
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ===== 排行榜表格 ===== */
.lb-table-header {
  display: flex;
  align-items: center;
  padding: 0.6rem 1rem;
  background: rgba(255,255,255,0.03);
  border-radius: 10px 10px 0 0;
  border: 1px solid var(--border);
  border-bottom: 2px solid var(--border);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

[data-theme="light"] .lb-table-header {
  background: rgba(0,0,0,0.02);
}

.lb-table-body {
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 10px 10px;
  overflow: hidden;
}

/* 列宽 */
.lb-col-rank { width: 60px; text-align: center; flex-shrink: 0; }
.lb-col-name { flex: 1; min-width: 180px; }
.lb-col-type { width: 80px; text-align: center; flex-shrink: 0; }
.lb-col-rating { width: 80px; text-align: center; flex-shrink: 0; }
.lb-col-safety { width: 70px; text-align: center; flex-shrink: 0; }
.lb-col-stats { width: 140px; text-align: center; flex-shrink: 0; }
.lb-col-actions { width: 200px; text-align: center; flex-shrink: 0; }

/* 排行榜行 */
.lb-row {
  display: flex;
  align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: all 0.2s;
  position: relative;
}

.lb-row:last-child { border-bottom: none; }

.lb-row:hover {
  background: var(--bg-card-hover);
}

/* 排名数字 */
.lb-rank-num {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--text-dim);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  margin: 0 auto;
}

.lb-rank-num.top3 {
  color: #FFF;
  font-size: 0.85rem;
  border-radius: 50%;
}

.lb-rank-num.r1 { background: linear-gradient(135deg, #FFD700, #FFA500); color: #0F172A; }
.lb-rank-num.r2 { background: linear-gradient(135deg, #E8E8E8, #A0A0A0); color: #0F172A; }
.lb-rank-num.r3 { background: linear-gradient(135deg, #CD7F32, #A0522D); }

/* 名称列 */
.lb-name-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lb-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #FFF;
  flex-shrink: 0;
}

.lb-name-text .lb-skill-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.lb-name-text .lb-skill-name a {
  color: var(--text);
  transition: color 0.2s;
}

.lb-name-text .lb-skill-name a:hover {
  color: var(--primary);
  text-decoration: none;
}

.lb-name-text .lb-skill-author {
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* 类型标签 */
.lb-type-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
}

/* 评分 */
.lb-rating-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-yellow);
}

.lb-rating-stars {
  font-size: 0.6rem;
  color: var(--accent-yellow);
}

/* 安全徽章 */
.lb-safety-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}

/* Stats */
.lb-stats-cell {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.lb-stats-cell .val { font-weight: 700; color: var(--text-muted); }

/* 操作按钮 */
.lb-actions-cell {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-sm-primary {
  background: var(--primary);
  color: #fff;
}
.btn-sm-primary:hover { background: var(--primary-dark); }

.btn-sm-green {
  background: var(--accent-green);
  color: #fff;
}
.btn-sm-green:hover { background: #059669; }

.btn-sm-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-sm-outline:hover { border-color: var(--accent-red); color: var(--accent-red); }
.btn-sm-outline.active { border-color: var(--accent-red); color: var(--accent-red); }

/* ===== 详情页 ===== */
.detail-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.detail-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.detail-info { flex: 1; }
.detail-title { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }
.detail-meta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.detail-meta span { font-size: 0.85rem; color: var(--text-dim); display: flex; align-items: center; gap: 0.3rem; }

.detail-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* 区块 */
.section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title i { color: var(--primary); }

.feature-list { list-style: none; }
.feature-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li i { color: var(--accent-green); margin-top: 0.2rem; flex-shrink: 0; }

.target-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.target-tag {
  padding: 0.3rem 0.75rem;
  background: rgba(59,130,246,0.1);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--primary);
}

/* 安全报告 */
.safety-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.safety-item {
  padding: 1rem;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  border: 1px solid var(--border);
}

[data-theme="light"] .safety-item { background: rgba(0,0,0,0.02); }

.safety-item .label { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 0.25rem; }
.safety-item .value { font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 0.3rem; }
.safety-item .value.pass { color: var(--accent-green); }

.safety-detail {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(16, 185, 129, 0.05);
  border-radius: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* 性能指标卡片 */
.perf-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.perf-card {
  text-align: center;
  padding: 1rem;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  border: 1px solid var(--border);
}

[data-theme="light"] .perf-card { background: rgba(0,0,0,0.02); }

.perf-card .perf-value { font-size: 1.5rem; font-weight: 800; }
.perf-card .perf-label { font-size: 0.75rem; color: var(--text-dim); margin-top: 0.25rem; }

.chart-container {
  position: relative;
  height: 250px;
  margin-top: 1rem;
}

/* 安装命令 */
.install-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #0D1117;
  border: 1px solid #30363D;
  border-radius: 10px;
  padding: 1rem;
  font-family: 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.85rem;
  color: #C9D1D9;
  overflow-x: auto;
}

.install-box code { flex: 1; white-space: nowrap; }

.copy-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  white-space: nowrap;
  transition: background 0.2s;
}

.copy-btn:hover { background: var(--primary-dark); }

/* 评分/评论 */
.review-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.star-input { display: flex; gap: 0.25rem; font-size: 1.5rem; cursor: pointer; }
.star-input i { color: var(--text-dim); transition: color 0.15s; }
.star-input i.active, .star-input i:hover { color: var(--accent-yellow); }

.review-textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
  color: var(--text);
  font-size: 0.9rem;
  resize: vertical;
  min-height: 80px;
  outline: none;
}

.review-textarea:focus { border-color: var(--primary); }

.review-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.review-item:last-child { border-bottom: none; }
.review-stars { color: var(--accent-yellow); font-size: 0.85rem; }
.review-text { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.25rem; }
.review-date { font-size: 0.75rem; color: var(--text-dim); margin-top: 0.25rem; }

/* 优缺点 */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.pros-list li, .cons-list li {
  padding: 0.4rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.pros-list li i { color: var(--accent-green); }
.cons-list li i { color: var(--accent-red); }

/* ===== 新增模块：使用成本 / 兼容平台 / 数据源 / 活跃度 / 风险提示 ===== */

/* 使用成本卡片 */
.cost-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.cost-card {
  text-align: center;
  padding: 1rem;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  border: 1px solid var(--border);
}

[data-theme="light"] .cost-card { background: rgba(0,0,0,0.02); }

.cost-card .cost-icon { font-size: 1.5rem; margin-bottom: 0.4rem; }
.cost-card .cost-value { font-size: 1.1rem; font-weight: 700; }
.cost-card .cost-label { font-size: 0.75rem; color: var(--text-dim); margin-top: 0.15rem; }
.cost-card .cost-note { font-size: 0.7rem; color: var(--text-dim); margin-top: 0.3rem; opacity: 0.7; }

/* 兼容平台 */
.platform-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.platform-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  transition: transform 0.15s;
}

[data-theme="light"] .platform-tag { background: rgba(0,0,0,0.02); }

.platform-tag:hover { transform: translateY(-1px); }
.platform-tag .dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}

.platform-tag.official .dot { background: #10B981; }
.platform-tag.supported .dot { background: #3B82F6; }
.platform-tag.community .dot { background: #F59E0B; }

/* 数据源卡片 */
.datasource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.datasource-item {
  padding: 1rem;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  border: 1px solid var(--border);
}

[data-theme="light"] .datasource-item { background: rgba(0,0,0,0.02); }

.datasource-item .ds-label { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 0.25rem; }
.datasource-item .ds-value { font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 0.3rem; }

/* 项目活跃度 */
.activity-bar {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1rem;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  border: 1px solid var(--border);
}

[data-theme="light"] .activity-bar { background: rgba(0,0,0,0.02); }

.activity-item { text-align: center; flex: 1; min-width: 100px; }
.activity-item .act-value { font-size: 1.1rem; font-weight: 700; }
.activity-item .act-label { font-size: 0.72rem; color: var(--text-dim); margin-top: 0.15rem; }

.activity-level {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.activity-level.high { background: rgba(16,185,129,0.15); color: #10B981; }
.activity-level.medium { background: rgba(245,158,11,0.15); color: #F59E0B; }
.activity-level.low { background: rgba(239,68,68,0.15); color: #EF4444; }

/* 风险提示 */
.risk-box {
  padding: 1rem 1.25rem;
  border-radius: 10px;
  border-left: 4px solid;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  line-height: 1.7;
}

.risk-box.risk-high {
  border-color: #EF4444;
  background: rgba(239,68,68,0.06);
  color: var(--text-muted);
}

.risk-box.risk-medium {
  border-color: #F59E0B;
  background: rgba(245,158,11,0.06);
  color: var(--text-muted);
}

.risk-box.risk-low {
  border-color: #10B981;
  background: rgba(16,185,129,0.06);
  color: var(--text-muted);
}

.risk-box .risk-title {
  font-weight: 700;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.risk-box.risk-high .risk-title { color: #EF4444; }
.risk-box.risk-medium .risk-title { color: #F59E0B; }
.risk-box.risk-low .risk-title { color: #10B981; }

/* 通用按钮 */
.btn {
  flex: 1;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-install { background: var(--accent-green); color: #fff; }
.btn-install:hover { background: #059669; }

.btn-fav { width: 40px; flex: none; padding: 0.6rem; }
.btn-fav.active { color: var(--accent-red); border-color: var(--accent-red); }

/* ===== CocoLoop 推荐入口 ===== */
.cocoloop-banner {
  display: block;
  position: relative;
  background: linear-gradient(135deg, #0F172A 0%, #1a1a3e 50%, #1E293B 100%);
  border: 2px solid transparent;
  border-image: linear-gradient(135deg, #10B981, #3B82F6, #8B5CF6) 1;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none !important;
  color: inherit !important;
  transition: all 0.3s ease;
}

/* 圆角 + 渐变边框 hack */
.cocoloop-banner {
  border-image: none;
  border-color: #10B981;
  background-clip: padding-box;
}

.cocoloop-banner::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  background: linear-gradient(135deg, #10B981, #3B82F6, #8B5CF6);
  z-index: -1;
}

.cocoloop-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #0F172A 0%, #1a1a3e 50%, #1E293B 100%);
  z-index: -1;
}

[data-theme="light"] .cocoloop-banner::after {
  background: linear-gradient(135deg, #1a2332 0%, #1a1a3e 50%, #1E293B 100%);
}

.cocoloop-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.2), 0 4px 16px rgba(59, 130, 246, 0.15);
  text-decoration: none !important;
}

.cocoloop-banner-glow {
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(16,185,129,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.cocoloop-banner-content {
  position: relative;
  z-index: 1;
}

.cocoloop-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(16,185,129,0.1));
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #10B981;
  letter-spacing: 0.05em;
  margin-bottom: 0.85rem;
}

.cocoloop-main {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.cocoloop-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #10B981, #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #FFF;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}

.cocoloop-text h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #F1F5F9;
  margin-bottom: 0.15rem;
}

.cocoloop-text p {
  font-size: 0.85rem;
  color: #CBD5E1;
  margin: 0;
}

/* banner始终深色底，文字始终用亮色 */

.cocoloop-features {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.cocoloop-features span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: #94A3B8;
  font-weight: 600;
}

/* banner内features始终亮色文字 */

.cocoloop-features span i {
  color: #10B981;
  font-size: 0.75rem;
}

.cocoloop-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFF;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(16,185,129,0.3);
}

.cocoloop-banner:hover .cocoloop-cta {
  background: linear-gradient(135deg, #34D399, #10B981);
  box-shadow: 0 4px 16px rgba(16,185,129,0.4);
}

.cocoloop-cta i {
  transition: transform 0.2s;
}

.cocoloop-banner:hover .cocoloop-cta i {
  transform: translateX(3px);
}

@media (max-width: 480px) {
  .cocoloop-banner { padding: 1.25rem; }
  .cocoloop-main { gap: 0.75rem; }
  .cocoloop-logo { width: 40px; height: 40px; font-size: 1.1rem; }
  .cocoloop-text h3 { font-size: 1rem; }
  .cocoloop-features { gap: 0.75rem; }
}

/* ===== 对比页 ===== */
.compare-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.compare-checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
}

.compare-checkbox:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.compare-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #FFF;
  flex-shrink: 0;
}

.compare-card-info {
  flex: 1;
  min-width: 0;
}

.compare-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

.compare-card-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
}

.compare-card-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: transparent;
  transition: all 0.2s;
  flex-shrink: 0;
}

.compare-checkbox.selected {
  border-color: var(--primary);
  background: rgba(59,130,246,0.08);
  box-shadow: 0 4px 16px rgba(59,130,246,0.15);
}

.compare-checkbox.selected .compare-card-check {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFF;
}

/* 详情链接 */
.compare-detail-link {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary) !important;
  background: rgba(59,130,246,0.1);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  transition: all 0.2s;
  text-decoration: none !important;
}

.compare-detail-link:hover {
  background: var(--primary);
  color: #FFF !important;
  text-decoration: none !important;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.compare-table th {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 2px solid var(--border);
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.8rem;
}

.compare-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.compare-table tr:hover td { background: rgba(59,130,246,0.03); }

.radar-container {
  max-width: 400px;
  margin: 2rem auto;
  position: relative;
}

/* ===== 关于页 ===== */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.about-content h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: var(--text);
}

.about-content p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.about-content ol, .about-content ul {
  color: var(--text-muted);
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.about-content li { margin-bottom: 0.5rem; }

.disclaimer-box {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.disclaimer-box h3 { color: #FCA5A5; margin-bottom: 0.75rem; }
[data-theme="light"] .disclaimer-box h3 { color: #DC2626; }
.disclaimer-box p { color: var(--text-muted); font-size: 0.9rem; }

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.footer a { color: var(--text-muted); }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--accent-green);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-dim);
}

.empty-state i { font-size: 3rem; margin-bottom: 1rem; }

/* ===== 动画 ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 第1名额外放大效果 */
.podium-item.rank-1 .podium-icon {
  width: 64px;
  height: 64px;
  font-size: 1.85rem;
}

.podium-item.rank-1 .podium-name {
  font-size: 1.25rem;
}

.podium-item.rank-1 .podium-rating {
  font-size: 1.85rem;
}

.podium-item.rank-1 .podium-medal {
  width: 42px;
  height: 42px;
  top: -21px;
  font-size: 1.15rem;
}

.podium-item { animation: fadeInUp 0.5s ease both; }
.podium-item:nth-child(1) { animation-delay: 0.15s; }
.podium-item:nth-child(2) { animation-delay: 0.05s; }
.podium-item:nth-child(3) { animation-delay: 0.25s; }

.lb-row { animation: fadeInUp 0.3s ease both; }
.lb-row:nth-child(1) { animation-delay: 0.05s; }
.lb-row:nth-child(2) { animation-delay: 0.08s; }
.lb-row:nth-child(3) { animation-delay: 0.11s; }
.lb-row:nth-child(4) { animation-delay: 0.14s; }
.lb-row:nth-child(5) { animation-delay: 0.17s; }
.lb-row:nth-child(6) { animation-delay: 0.20s; }
.lb-row:nth-child(7) { animation-delay: 0.23s; }
.lb-row:nth-child(8) { animation-delay: 0.26s; }
.lb-row:nth-child(9) { animation-delay: 0.29s; }
.lb-row:nth-child(10) { animation-delay: 0.32s; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .hero .subtitle { font-size: 1rem; }

  .podium {
    flex-direction: column;
    align-items: center;
  }
  .podium-item.rank-1,
  .podium-item.rank-2,
  .podium-item.rank-3 {
    width: 100%;
    max-width: 320px;
  }

  .leaderboard-header { flex-direction: column; align-items: stretch; }
  .leaderboard-controls { width: 100%; }
  .search-box { flex: 1; width: auto; }

  .lb-table-header { display: none; }
  .lb-row {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem;
  }
  .lb-col-rank { width: auto; }
  .lb-col-name { width: 100%; order: -1; }
  .lb-col-type { width: auto; }
  .lb-col-rating { width: auto; }
  .lb-col-safety { width: auto; }
  .lb-col-stats { display: none; }
  .lb-col-actions { width: 100%; }
  .lb-actions-cell { justify-content: flex-start; }

  .stats-bar { gap: 1rem; }
  .stat-value { font-size: 1.25rem; }
  .navbar-inner { gap: 0.5rem; }
  .nav-links { gap: 0.75rem; }
  .nav-links a { font-size: 0.8rem; }
  .detail-header { flex-direction: column; }
  .pros-cons { grid-template-columns: 1fr; }
  .safety-grid { grid-template-columns: 1fr; }
  .perf-cards { grid-template-columns: repeat(2, 1fr); }
  .compare-selector { flex-direction: column; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.5rem; }
  .detail-actions { flex-direction: column; }
  .perf-cards { grid-template-columns: 1fr; }
}

/* ===== 相关Skill推荐 ===== */
.related-skills {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.related-skill-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s ease;
}
.related-skill-card:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}
.related-skill-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.related-skill-info {
  flex: 1;
  min-width: 0;
}
.related-skill-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}
.related-skill-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.related-skill-arrow {
  color: var(--text-dim);
  font-size: 0.85rem;
  flex-shrink: 0;
}
.related-skill-card:hover .related-skill-arrow {
  color: var(--primary);
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }
