/* ============ 基础 (浅色主题) ============ */
:root {
  --bg: #f2f5f9;
  --bg-card: #ffffff;
  --bg-hover: #f7f9fc;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-dim: #64748b;
  --gold: #a8863e;
  --gold-light: #f5ecd8;
  --win: #2d9bf0;
  --lose: #e84057;
  --win-bg: rgba(45, 155, 240, 0.08);
  --lose-bg: rgba(232, 64, 87, 0.08);
  --shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}


/* ============ 暗黑主题 ============ */
[data-theme="dark"] {
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-hover: #26334a;
  --bg-soft: #334155;
  --border: #334155;
  --text: #e2e8f0;
  --text-dim: #94a3b8;
  --gold: #d9b45c;
  --gold-light: #3a3320;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hidden { display: none !important; }

/* ============ 顶栏 ============ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark { font-size: 26px; }
.logo h1 { font-size: 20px; font-weight: 700; letter-spacing: 1px; }
.theme-toggle {
  width: 36px;
  height: 36px;
  font-size: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--gold); }

/* ============ 主区域 ============ */
main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ============ 搜索 ============ */
/* 搜索区视口垂直居中 (op.gg 首页风格), 搜出结果后恢复顶部对齐 */
#tab-search {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
#tab-search.has-result { justify-content: flex-start; }
.search-section { margin: 0 0 10px; }
#search-form {
  display: flex;
  gap: 10px;
  max-width: 760px;
  margin: 0 auto;
}
.search-group {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 6px;
}
.search-sep {
  color: var(--text-dim);
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}
#search-input,
#search-tag {
  padding: 17px 20px;
  font-size: 17px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}
#search-input { flex: 1; min-width: 0; }
#search-tag { width: 120px; text-align: center; flex-shrink: 0; }
#search-input:focus,
#search-tag:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(168, 134, 62, 0.15); }
#search-btn {
  padding: 17px 38px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #c8aa6e, #a8863e);
  color: #fff;
  cursor: pointer;
  transition: filter 0.2s;
}
#search-btn:hover { filter: brightness(1.05); }
#search-btn:disabled { opacity: 0.5; cursor: wait; }
.hint {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 10px;
  min-height: 18px;
}
.hint.err { color: var(--lose); }

/* ============ 搜索历史 ============ */
.history-wrap {
  max-width: 640px;
  margin: 12px auto 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.history-label { font-size: 12px; color: var(--text-dim); }
.history-list { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.history-chip {
  font-size: 13px;
  padding: 5px 14px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}
.history-chip:hover { border-color: var(--gold); color: var(--gold); }
.history-clear {
  font-size: 12px;
  border: none;
  background: none;
  color: var(--text-dim);
  cursor: pointer;
}
.history-clear:hover { color: var(--lose); }

/* ============ 玩家卡片 (跨区) ============ */
.players-section h2,
.section-head h2,
.champions-section h2 {
  font-size: 17px;
  color: var(--gold);
  margin: 26px 0 14px;
  border-left: 3px solid var(--gold);
  padding-left: 10px;
}
.player-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.player-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  box-shadow: var(--shadow);
}
.player-card:hover { background: var(--bg-hover); transform: translateY(-2px); box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1); }
.player-card img { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--gold); }
.player-card .pc-name { font-weight: 600; font-size: 15px; }
.player-card .pc-meta { color: var(--text-dim); font-size: 12px; margin-top: 3px; }

/* ============ 玩家信息 ============ */
.profile-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.profile-icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  object-fit: cover;
}
.profile-name { font-size: 24px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.profile-area {
  font-size: 13px;
  color: var(--gold);
  background: var(--gold-light);
  padding: 3px 10px;
  border-radius: 10px;
  font-weight: 400;
}
.profile-meta { margin-top: 8px; color: var(--text-dim); font-size: 14px; display: flex; gap: 14px; align-items: center; }
.tier-badge {
  color: var(--gold);
  font-weight: 600;
  border: 1px solid var(--gold);
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
}

/* 骨架屏 */
.sk-block {
  background: linear-gradient(90deg, #eef2f7 25%, #f7f9fc 50%, #eef2f7 75%);
  background-size: 200% 100%;
  animation: sk-shimmer 1.2s infinite linear;
  border-radius: 8px;
}
@keyframes sk-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.sk-wrap { padding: 4px 0; }
.sk-battle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.sk-img { width: 58px; height: 58px; }
.sk-num { width: 70px; height: 26px; }
.sk-lines { flex: 1; display: flex; flex-direction: column; gap: 9px; }
.sk-line { height: 12px; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.sk-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.sk-gimg { width: 46px; height: 46px; flex-shrink: 0; }

/* 战绩模式筛选 */
.battle-filters { display: flex; gap: 8px; margin: 10px 0 4px; flex-wrap: wrap; }
.battle-filter {
  padding: 5px 16px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-card);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
}
.battle-filter:hover { border-color: var(--gold); color: var(--gold); }
.battle-filter.active { background: var(--gold); border-color: var(--gold); color: #fff; font-weight: 600; }

/* 战绩加载更多 */
.load-more-wrap { text-align: center; padding: 14px 0 4px; }
.btn-load-more {
  padding: 10px 30px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-load-more:hover { border-color: var(--gold); color: var(--gold); }
.btn-retry {
  margin-left: 6px;
  padding: 4px 14px;
  font-size: 12px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--gold);
  cursor: pointer;
}
.btn-retry:hover { background: var(--gold-light); }

/* 锐评分享图 */
.modal-share { max-width: 420px; width: 94%; }
.share-body { display: flex; flex-direction: column; align-items: center; gap: 14px; }
#share-img { max-width: 100%; border-radius: 8px; box-shadow: var(--shadow); }
.btn-share-download {
  padding: 9px 26px;
  font-size: 14px;
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: linear-gradient(135deg, #f5ecd8, #fff);
  color: var(--gold);
  text-decoration: none;
  cursor: pointer;
}
[data-theme="dark"] .btn-share-download { background: var(--gold-light); }
.btn-share-download:hover { box-shadow: var(--shadow); }

/* 装备/符文 tooltip */
.tip-box {
  position: fixed;
  z-index: 1000;
  max-width: 320px;
  padding: 10px 13px;
  background: rgba(18, 26, 42, 0.97);
  border: 1px solid #d9b45c;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 12px;
  line-height: 1.7;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}
.tip-name { color: #e8b93a; font-weight: 700; margin-bottom: 4px; }
.tip-price { color: #94a3b8; margin-bottom: 4px; }
.tip-desc { color: #cbd5e1; }

/* 对局荣誉徽章 (MVP/SVP/超神) */
.honour-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  padding: 1px 6px;
  border-radius: 6px;
  margin-left: 4px;
  vertical-align: middle;
  color: #fff;
}
.honour-tag.mvp { background: linear-gradient(135deg, #e8b93a, #c8901f); }
.honour-tag.svp { background: linear-gradient(135deg, #7a8ea8, #5a6f8a); }
.honour-tag.godlike { background: linear-gradient(135deg, #e05a5a, #b83838); }

/* AI 锐评 */
.btn-review {
  margin-left: auto;
  padding: 5px 13px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: linear-gradient(135deg, #f5ecd8, #fff);
  color: var(--gold);
  font-weight: 600;
  font-size: 12px;
  line-height: 1.6;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  white-space: nowrap; /* 图标+文字永不换行堆叠 (窄窗口挤压时按钮整体换行) */
}
.btn-review:hover { box-shadow: 0 2px 10px rgba(168, 134, 62, 0.3); }
.btn-review:disabled { opacity: 0.5; cursor: wait; }

.review-box {
  margin-top: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  padding: 14px 18px;
  box-shadow: var(--shadow);
}
.review-head {
  font-weight: 700;
  color: var(--gold);
  font-size: 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.review-loading {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 400;
}
.review-loading::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  vertical-align: -2px;
  border: 2px solid var(--gold);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.review-content {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text);
  white-space: pre-wrap;
}

/* 锐评按钮组 */
.profile-actions { margin-left: auto; display: flex; gap: 8px; flex-shrink: 0; }
.btn-ghost {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text-dim);
}
.btn-ghost:hover { box-shadow: var(--shadow); color: var(--text); }

/* 风格选择 / 深度思考 */
.review-style {
  margin-left: auto;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text);
  background: var(--bg-card);
}
.review-deep {
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.review-deep input { accent-color: var(--gold); }

/* 历史记录 */
.review-history { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 10px; }
.rh-loading, .rh-empty { font-size: 12px; color: var(--text-dim); padding: 8px 0; }
.rh-item {
  border-bottom: 1px dashed #eef2f7;
}
.rh-item:last-child { border-bottom: none; }
.rh-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}
.rh-head:hover { background: var(--gold-light); }
.rh-preview {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-dim);
  font-size: 12px;
}
.rh-arrow { color: var(--text-dim); font-size: 12px; flex-shrink: 0; }
.rh-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.rh-style {
  font-size: 11px;
  color: var(--gold);
  background: var(--gold-light);
  border-radius: 8px;
  padding: 2px 8px;
  font-weight: 600;
}
.rh-deep {
  font-size: 10px;
  color: #fff;
  background: #8b5cf6;
  border-radius: 8px;
  padding: 1px 6px;
}
.rh-time { font-size: 11px; color: var(--text-dim); margin-left: auto; }
.rh-text {
  font-size: 13px;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-box .stat-val { font-size: 20px; font-weight: 700; color: var(--gold); }
.stat-box .stat-label { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

/* ============ 战绩列表 ============ */
.section-head { display: flex; align-items: center; justify-content: space-between; }
.btn-refresh {
  padding: 7px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13px;
}
.btn-refresh:hover { color: var(--gold); border-color: var(--gold); }

.battle-list { display: flex; flex-direction: column; gap: 10px; }

/* 展开的对局详情面板 (行内下拉, lolso 风格) */
.battle-item.expanded { box-shadow: var(--shadow); border-left-width: 6px; }
.battle-detail-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 10px 10px;
  margin-top: -10px;
  padding: 16px 18px;
  animation: detail-in 0.18s ease;
}
.battle-detail-panel .loading,
.battle-detail-panel .empty { padding: 20px; }
@keyframes detail-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.battle-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  border-left: 4px solid var(--text-dim);
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.1s;
}
.battle-item:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.battle-item.win { border-left-color: var(--win); background: var(--win-bg); }
.battle-item.lose { border-left-color: var(--lose); background: var(--lose-bg); }

.battle-result { width: 44px; text-align: center; font-weight: 700; font-size: 14px; }
.battle-result .r-win { color: var(--win); }
.battle-result .r-lose { color: var(--lose); }

.battle-champ { position: relative; }
.battle-champ img { width: 58px; height: 58px; border-radius: 8px; }
.champ-honour {
  position: absolute;
  top: 2px;
  left: 2px;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  padding: 0 5px;
  border-radius: 5px;
  line-height: 1.6;
  z-index: 1;
}
.champ-honour.mvp { background: linear-gradient(135deg, #e8b93a, #c8901f); }
.champ-honour.svp { background: linear-gradient(135deg, #7a8ea8, #5a6f8a); }
.battle-champ .champ-level {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: var(--bg-card);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.battle-main { flex: 1; min-width: 0; }
.battle-mode { font-size: 12px; color: var(--text-dim); }
.battle-time { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.battle-champ-name { font-size: 13px; margin-top: 2px; }

.battle-kda { text-align: center; min-width: 110px; }
.battle-kda .kda-num { font-size: 17px; font-weight: 700; letter-spacing: 0.5px; }
.battle-kda .kda-ratio { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.battle-kda .kda-ratio.good { color: var(--blue, #0d9488); }

.battle-extra { text-align: right; font-size: 12px; color: var(--text-dim); min-width: 120px; }
.battle-extra .misc { margin-top: 3px; }
.battle-extra .mvp { color: var(--gold); font-weight: 600; }

/* 战绩卡片四项占比 (lolso 风格) */
.battle-pct {
  display: flex;
  gap: 12px;
  margin-top: 5px;
  font-size: 11px;
  color: var(--text-dim);
}
.battle-pct b { color: var(--text); font-weight: 600; }

/* ============ 英雄统计 ============ */
.champion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}
.champion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.champion-item:hover { border-color: var(--gold); box-shadow: 0 4px 14px rgba(168, 134, 62, 0.18); transform: translateY(-1px); }
.ci-mastery { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.m-label { font-size: 10px; color: var(--gold); flex-shrink: 0; }
.m-bar { flex: 1; height: 5px; background: var(--bg-soft); border-radius: 3px; overflow: hidden; }
.m-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, #d9b45c, #e8b93a); }
.champ-tip { font-size: 12px; color: var(--text-dim); font-weight: 400; margin-left: 8px; }
.champion-battles { margin-top: 16px; }
.champion-item img { width: 44px; height: 44px; border-radius: 8px; }
.champion-item .ci-name { font-size: 14px; font-weight: 600; }
.champion-item .ci-stat { font-size: 12px; color: var(--text-dim); margin-top: 3px; }
.champion-item .ci-rate { color: var(--gold); font-weight: 600; }

/* ============ 弹层 ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal {
  max-width: 540px;
  width: 90%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px 30px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
}
.modal-wide { max-width: 920px; width: 94%; max-height: 90vh; display: flex; flex-direction: column; padding: 20px 24px; }
.modal h2 { color: var(--gold); margin-bottom: 14px; font-size: 19px; }
.modal ol { padding-left: 20px; line-height: 2; font-size: 14px; color: var(--text); }
.modal code, .modal kbd {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12px;
  color: #0d9488;
}
.modal-actions { margin-top: 20px; text-align: right; }
.modal-actions button {
  padding: 9px 26px;
  border: none;
  border-radius: 8px;
  background: var(--gold);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.modal-head h2 { margin: 0; }
.modal-close {
  border: none;
  background: none;
  font-size: 18px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.modal-close:hover { background: var(--bg-soft); color: var(--text); }
.detail-content { overflow-y: auto; margin-top: 14px; }

/* ============ 对局详情 ============ */
.detail-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.detail-meta .dm-result { font-weight: 700; font-size: 16px; }
.detail-meta .dm-result.win { color: var(--win); }
.detail-meta .dm-result.lose { color: var(--lose); }
.detail-meta .dm-info { color: var(--text-dim); font-size: 13px; }

.self-panel {
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: var(--gold-light);
}
.self-panel .sp-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.self-panel .sp-head img { width: 44px; height: 44px; border-radius: 8px; }
.self-panel .sp-title { font-weight: 700; font-size: 16px; }
.self-panel .sp-sub { color: var(--text-dim); font-size: 12px; margin-top: 2px; }
.sp-kda { font-size: 15px; font-weight: 700; margin-left: auto; }
.sp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px 18px;
  font-size: 13px;
}
.sp-grid .sg-item { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--border); padding: 4px 0; }
.sp-grid .sg-item .sg-label { color: var(--text-dim); }
.sp-grid .sg-item .sg-val { font-weight: 600; }
.sp-grid .sg-item .sg-val.good { color: #0d9488; }
.sp-grid .sg-item .sg-val.bad { color: var(--lose); }

.icon-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.icon-row .ir-label { font-size: 12px; color: var(--text-dim); margin-right: 4px; }
.icon-box {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.icon-box img { width: 34px; height: 34px; }
.icon-box .ib-empty { color: #cbd5e1; font-size: 16px; }
.icon-box .ib-tag {
  position: absolute;
  bottom: -7px;
  right: -7px;
  font-size: 9px;
  color: #fff;
  background: var(--gold);
  border-radius: 4px;
  padding: 0 4px;
}

/* 四项占比指标卡 (lolso 风格) */
.pct-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 12px 0;
}
.pct-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
}
.pct-card .pc-val { font-size: 22px; font-weight: 700; color: var(--gold); }
.pct-card .pc-label { font-size: 12px; color: var(--text-dim); margin-top: 3px; }

/* 表格占比小字 */
.td-pct { color: var(--text-dim); font-size: 11px; }

/* ============ 对位对比 (lolso 风格) ============ */
.vs-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 14px 0;
  overflow: hidden;
}
.vs-head {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  font-weight: 700;
  font-size: 14px;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 10px;
}
.vs-head .vs-sub { font-weight: 400; font-size: 12px; color: var(--text-dim); }
.vs-body {
  display: grid;
  grid-template-columns: 140px 1fr 140px;
  gap: 0;
}
.vs-player {
  padding: 14px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.vs-player img { width: 56px; height: 56px; border-radius: 10px; border: 2px solid var(--border); }
.vs-player .vp-name { font-size: 12px; font-weight: 600; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-player .vp-champ { font-size: 11px; color: var(--text-dim); }
.vs-stats {
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 8px 12px;
}
.vs-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  text-align: center;
  font-size: 12px;
  padding: 5px 0;
  border-bottom: 1px dashed #eef2f7;
}
.vs-row:last-child { border-bottom: none; }
.vs-row .vs-label { color: var(--text-dim); }
.vs-row .vs-val { font-weight: 600; }
.vs-row .vs-val.good { color: #0d9488; }

.dmg-bar-wrap { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.dmg-bar { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-dim); }
.dmg-bar .db-label { width: 56px; flex-shrink: 0; text-align: right; }
.dmg-bar .db-track { flex: 1; height: 10px; background: var(--bg-soft); border-radius: 5px; overflow: hidden; }
.dmg-bar .db-fill { height: 100%; border-radius: 5px; }
.dmg-bar .db-fill.dmg { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.dmg-bar .db-fill.taken { background: linear-gradient(90deg, #3b82f6, #8b5cf6); }
.dmg-bar .db-val { width: 110px; flex-shrink: 0; }

.team-block { margin-bottom: 12px; }
.team-block .tb-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px 8px 0 0;
}
.team-block .tb-head.win { background: var(--win-bg); color: var(--win); }
.team-block .tb-head.lose { background: var(--lose-bg); color: var(--lose); }
.team-block table { width: 100%; border-collapse: collapse; font-size: 12px; }
.team-block th, .team-block td { padding: 6px 8px; text-align: center; border-bottom: 1px solid #f1f5f9; }
.team-block th { color: var(--text-dim); font-weight: 500; background: var(--bg-card); }
.team-block .td-player { text-align: left; display: flex; align-items: center; gap: 8px; }
.team-block .td-player img { width: 28px; height: 28px; border-radius: 6px; }
.team-block .td-player .tp-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-block .td-self { font-weight: 700; background: var(--gold-light); }
.td-player { display: flex; align-items: center; gap: 8px; }
.td-name-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.td-name-row { display: flex; align-items: center; white-space: nowrap; }
.td-honour-row { min-height: 14px; display: flex; align-items: center; }
.td-honour-row .honour-tag { margin-left: 0; margin-right: 4px; }
.td-bar { position: relative; min-width: 90px; height: 20px; border-radius: 5px; background: var(--bg-soft); overflow: hidden; }
.td-bar-fill { position: absolute; top: 0; left: 0; bottom: 0; border-radius: 5px; opacity: 0.85; }
.td-bar-fill.dmg { background: linear-gradient(90deg, #e05a5a, #d97b5a); }
.td-bar-text { position: relative; z-index: 1; font-size: 11px; padding: 0 6px; line-height: 20px; color: var(--text); }
.tp-link {
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
  color: inherit;
  transition: color 0.15s;
}
.tp-link:hover { color: var(--gold); }
.team-block .td-items { display: flex; gap: 3px; justify-content: center; }
.team-block .td-items img { width: 20px; height: 20px; border-radius: 3px; border: 1px solid #eef2f7; }
.team-block .td-items .ti-empty { width: 20px; height: 20px; border: 1px dashed #e2e8f0; border-radius: 3px; }

/* ============ 加载中 ============ */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-dim);
  font-size: 14px;
}
.loading::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 10px;
  vertical-align: -3px;
  border: 2px solid var(--gold);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ 空态 ============ */
.empty { text-align: center; color: var(--text-dim); padding: 30px; font-size: 14px; }

/* ============ 移动端适配 (≤640px) ============ */
@media (max-width: 640px) {
  body { -webkit-tap-highlight-color: transparent; }

  .topbar { padding: 12px 16px; }
  .logo-mark { font-size: 22px; }
  .logo h1 { font-size: 17px; }

  main { padding: 14px 14px 50px; }
  .search-section { margin: 20px 0 6px; }
  #search-form { gap: 8px; }
  #search-input,
  #search-tag { padding: 12px 10px; font-size: 16px; } /* ≥16px 防 iOS 聚焦自动放大 */
  #search-tag { width: 84px; }
  #search-btn { padding: 12px 14px; font-size: 14px; }
  .search-sep { font-size: 15px; }
  .hint { font-size: 12px; }

  .player-cards { grid-template-columns: 1fr; }

  /* 玩家信息: 头像名字一行, 按钮换行占满 */
  .profile-card { flex-wrap: wrap; gap: 12px; padding: 14px; }
  .profile-icon { width: 64px; height: 64px; }
  .profile-name { font-size: 19px; }
  .profile-actions { width: 100%; margin-left: 0; gap: 8px; flex-wrap: wrap; }
  .btn-review { margin-left: 0; flex: none; text-align: center; padding: 8px 12px; }
  .profile-meta { flex-wrap: wrap; gap: 8px; }

  .review-head { flex-wrap: wrap; }
  .review-style { margin-left: 0; }
  .review-deep { margin-left: auto; }

  .stats-row { grid-template-columns: repeat(2, 1fr); }

  /* 战绩卡片: 隐藏右侧金币列, 压缩 KDA */
  .battle-item { gap: 10px; padding: 10px 12px; }
  .battle-result { width: 36px; font-size: 13px; }
  .battle-champ img { width: 48px; height: 48px; }
  .battle-kda { min-width: 88px; }
  .battle-kda .kda-num { font-size: 15px; }
  .battle-extra { display: none; }
  .battle-pct { flex-wrap: wrap; gap: 8px; }

  .battle-detail-panel { padding: 12px; }

  /* 对位对比: 收窄左右玩家栏 */
  .vs-body { grid-template-columns: 104px 1fr 104px; }
  .vs-player img { width: 44px; height: 44px; }
  .vs-player .vp-name { max-width: 96px; }

  /* 详情队伍表格: 横向滚动 */
  .team-block table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .team-block .td-player .tp-name { max-width: 90px; }
  .team-block th, .team-block td { padding: 6px; }

  /* 四项占比卡 */
  .pct-cards { gap: 6px; }
  .pct-card .pc-val { font-size: 18px; }

  .dmg-bar .db-val { width: 80px; }

  /* 英雄统计: 窄屏两列 */
  .champion-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 8px; }

  .icon-box { width: 34px; height: 34px; }
  .icon-box img { width: 30px; height: 30px; }

  .modal { padding: 20px; }
  .modal ol { font-size: 13px; }

  /* 触屏禁用悬停位移 */
  .player-card:hover, .battle-item:hover, .history-chip:hover, .champion-item:hover { transform: none; }
  .champ-tip { display: none; }
}

/* ============ 英雄强度 (op.gg 韩服数据) ============ */
.top-tabs {
  display: flex;
  gap: 4px;
  margin-left: 24px;
}
.tab-btn {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s;
}
.tab-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.tab-btn.active { background: var(--gold); color: #fff; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }
.tier-section { padding: 4px 0 24px; }
.tier-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 14px 0 16px;
}
.tier-positions { display: flex; flex-wrap: wrap; gap: 6px; }
.tier-pos {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s;
}
.tier-pos:hover { border-color: var(--gold); color: var(--gold); }
.tier-pos.active { background: var(--gold); border-color: var(--gold); color: #fff; }
.tier-select {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 13px;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.tier-loading { color: var(--text-dim); font-size: 14px; padding: 18px 0; }

.tier-table-wrap { overflow-x: auto; }
.tier-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  font-size: 14px;
  min-width: 560px;
}
.tier-table thead th {
  background: var(--bg-card);
  color: var(--text-dim);
  font-weight: 600;
  font-size: 12px;
  padding: 10px 14px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.tier-table thead th.sortable { cursor: pointer; user-select: none; }
.tier-table thead th.sortable:hover { color: var(--gold); }
.tier-table thead th.num, .tier-table td.num { text-align: right; }
.tier-table tbody tr { border-bottom: 1px solid #f1f5f9; cursor: pointer; }
.tier-table tbody tr:last-child { border-bottom: none; }
.tier-table tbody tr:hover { background: var(--bg-card); }
.tier-row td { padding: 8px 14px; vertical-align: middle; }
.tier-rank { color: var(--text-dim); width: 36px; }
.tier-champ { display: flex; align-items: center; gap: 10px; }
.tier-champ img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
}
.tier-champ span { font-weight: 600; }
/* 强度榜徽章 (限定表格内, 避免覆盖 profile 的 .tier-badge 金色文字) */
.tier-table .tier-badge {
  display: inline-block;
  min-width: 30px;
  width: 30px;
  text-align: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  border-radius: 6px;
  padding: 2px 0;
}
.tier-error { color: var(--danger, #dc2626); font-size: 13px; padding: 12px 4px; text-align: center; }

/* ---------- build 弹层 ---------- */
.modal-build {
  max-width: 640px;
  width: 94%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 22px 26px;
}
.build-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.build-head h2 { margin: 0; font-size: 18px; }
.build-loading { color: var(--text-dim); font-size: 14px; padding: 20px 0; }
.build-block { margin-top: 16px; }
.build-block h3 {
  font-size: 14px;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 10px;
  padding-left: 9px;
  border-left: 3px solid var(--gold);
}
.rune-grid { display: flex; flex-direction: column; gap: 10px; }
.rune-keystone {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
}
.rune-keystone img { width: 40px; height: 40px; border-radius: 8px; }
.rune-style { color: var(--text-dim); font-size: 12px; font-weight: 500; }
.rune-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rune-label {
  font-size: 12px;
  color: var(--text-dim);
  min-width: 34px;
  font-weight: 600;
}
.rune-item {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-card);
  border: 1px solid #eef2f7;
  border-radius: 8px;
  padding: 3px 9px 3px 4px;
  font-size: 12px;
}
.rune-item img { width: 26px; height: 26px; border-radius: 5px; }
.spell-skill-row { display: flex; flex-wrap: wrap; gap: 14px; }
.spell-skill-block { background: var(--bg-card); border-radius: 10px; padding: 10px 12px; flex: 1; min-width: 220px; }
.block-label { font-size: 12px; color: var(--text-dim); display: block; margin-bottom: 7px; font-weight: 600; }
.img-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.small-img { width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--border); }
.rate { font-size: 12px; color: var(--text-dim); margin-top: 7px; display: block; }
.skill-seq { display: flex; gap: 4px; flex-wrap: wrap; }
.skill-char {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
}
.skill-char.skill-r { background: var(--gold); color: #fff; }
.item-block { margin-bottom: 12px; }
.item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 7px 0;
  border-bottom: 1px dashed #eef2f7;
}
.item-row:last-child { border-bottom: none; }

@media (max-width: 640px) {
  .top-tabs { margin-left: 0; width: 100%; justify-content: center; }
  .tab-btn { font-size: 13px; padding: 5px 12px; }
  .tier-table { min-width: 480px; }
  .tier-table thead th, .tier-row td { padding: 7px 10px; }
  .tier-champ img { width: 28px; height: 28px; }
  .modal-build { padding: 18px; }
  .rune-grid { gap: 8px; }
}

/* ---------- 对位克制 (build 弹层 tab) ---------- */
.build-tabs {
  display: flex;
  gap: 8px;
  margin: 10px 0 4px;
}
.btab {
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
}
.btab.active { background: var(--gold); border-color: var(--gold); color: #fff; font-weight: 600; }
.counters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.counters-desc { font-size: 12px; color: var(--text-dim); }
.counters-table-wrap { overflow-x: auto; }
#counters-table { min-width: 420px; }
#counters-table tbody tr { cursor: pointer; }
.rate-win { color: #16a34a; font-weight: 700; }
.rate-lose { color: #dc2626; font-weight: 700; }
.tier-counters { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.tier-counters b { color: var(--text); }
.counter-advice-box {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-line;
}
.counter-advice-title { font-weight: 700; margin-bottom: 6px; color: var(--gold); }
.counter-advice .loading, .counter-advice .empty { padding: 8px 0; font-size: 13px; }

/* ---------- 最近同队 ---------- */
.teammates-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.mate-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.mate-card:hover { border-color: var(--gold); transform: translateY(-1px); }
.mate-name { font-weight: 700; font-size: 14px; }
.mate-stat { font-size: 13px; margin-top: 4px; color: var(--text); }
.mate-sub { font-size: 12px; color: var(--text-dim); margin-top: 3px; }

/* ---------- 客户端下载按钮 ---------- */
.download-btn {
  margin-right: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.download-btn:hover { background: var(--gold); color: #fff; }

/* ---------- 英雄强度: 左列表右详情 ---------- */
.tier-layout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.tier-sidebar {
  width: 340px;
  min-width: 300px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.sidebar-head h2 { margin: 0; font-size: 16px; }
.tier-search {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 13px;
  margin-bottom: 8px;
  box-sizing: border-box;
}
.tier-search:focus { outline: none; border-color: var(--gold); }
.tier-filters { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.tier-positions { display: flex; flex-wrap: nowrap; gap: 4px; }
.tier-pos {
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.tier-pos img {
  width: 16px;
  height: 16px;
  display: block;
}
.tier-pos.active { background: var(--gold); border-color: var(--gold); color: #fff; font-weight: 600; }
.tier-pos.active img { filter: invert(1); }
html[data-theme="dark"] .tier-pos img { filter: invert(1); }
html[data-theme="dark"] .tier-pos.active img { filter: none; }
.tier-select { width: 100%; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--text); font-size: 13px; }

.hero-list {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 200px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  align-content: start;
}
.hero-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px 1px 4px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.12s;
}
.hero-item:hover { background: var(--bg-soft); }
.hero-item.selected { background: color-mix(in srgb, var(--gold) 14%, transparent); }
.hero-item img { width: 100%; max-width: 42px; aspect-ratio: 1; border-radius: 6px; object-fit: cover; background: var(--bg-soft); }
.hi-name {
  font-size: 10px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-dim);
}

.tier-main { flex: 1; min-width: 0; }
.hero-detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.hd-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hd-img { width: 84px; height: 84px; border-radius: 14px; object-fit: cover; border: 2px solid var(--border); }
.hd-info { flex: 1; min-width: 240px; }
.hd-name { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.hd-pos { font-size: 12px; color: var(--text-dim); border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; }
.hd-stats { display: flex; gap: 14px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
.hd-tier { border-radius: 6px; color: #fff; font-weight: 700; font-size: 13px; padding: 3px 10px; }
.hd-num { font-size: 13px; color: var(--text-dim); }
.hd-num b { color: var(--text); }
.hd-counters { margin-top: 8px; font-size: 12px; color: var(--text-dim); }
.hd-counters b { color: var(--gold); }

@media (max-width: 800px) {
  .tier-layout { flex-direction: column; }
  .tier-sidebar { width: 100%; position: static; max-height: none; }
  .hero-list { max-height: 320px; }
}

/* 右侧表格头部 (标题 + 段位下拉) */
.tier-main-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.tier-main-head h2 { margin: 0; font-size: 16px; }
.tier-main-head .tier-select { width: auto; }

/* 右侧表格头部分路组与标题同行 */
.tier-main-head .tier-positions { flex: 1; justify-content: center; }
.tier-main-head .tier-positions .tier-pos { font-size: 13px; }

/* 克星列限宽, 防止撑大表格导致列视觉失衡 */
.tier-counters {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 强度表格: 固定列宽布局, 各列均衡 (克星列不再被剩余空间撑大) */
#tier-table { table-layout: fixed; }
#tier-table th:nth-child(1), #tier-table td:nth-child(1) { width: 44px; }
#tier-table th:nth-child(2), #tier-table td:nth-child(2) { width: 200px; }
#tier-table th:nth-child(3), #tier-table td:nth-child(3) { width: 56px; }
#tier-table th:nth-child(4), #tier-table td:nth-child(4) { width: 112px; }
#tier-table th:nth-child(5), #tier-table td:nth-child(5),
#tier-table th:nth-child(6), #tier-table td:nth-child(6),
#tier-table th:nth-child(7), #tier-table td:nth-child(7) { width: 90px; }
#tier-table th:nth-child(8), #tier-table td:nth-child(8) { width: 130px; }

/* 克星项: 图标 + 名字 */
.ct-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 10px;
  white-space: nowrap;
}
.ct-item img {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  object-fit: cover;
  background: var(--bg-soft);
  vertical-align: middle;
}
.ct-item span { font-size: 12px; color: var(--text-dim); }
.ct-item b { color: var(--text); }

/* 位置标签 */
.pos-tag {
  display: inline-block;
  font-size: 11px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  margin-right: 3px;
  background: var(--bg-soft);
}
/* 劣势对抗: 纯图标 */
.ct-icon {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  object-fit: cover;
  margin-right: 4px;
  vertical-align: middle;
  background: var(--bg-soft);
}

/* 位置图标标签 */
.pos-tag {
  display: inline-block;
  margin-right: 4px;
  cursor: default;
  vertical-align: middle;
}
.pos-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: 5px;
  border-radius: 7px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  cursor: default;
  vertical-align: middle;
}
.pos-tag svg {
  width: 100%;
  height: 100%;
  fill: var(--text);
  display: block;
}
.pos-tag:hover svg { fill: var(--gold); }
/* img 加载的位置图标: 尺寸 CSS 控制, 深色主题反色 */
img.pos-tag {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 7px;
}
html[data-theme="dark"] img.pos-tag { filter: invert(1); }

/* 强度表数字列居中 (与 op.gg 一致) */
#tier-table thead th.num, #tier-table td.num { text-align: center; }

/* ---------- 线性图标 (Lucide) ---------- */
.ic {
  display: inline-flex;
  width: 16px;
  height: 16px;
  vertical-align: -2px;
  flex-shrink: 0;
}
.ic svg { width: 100%; height: 100%; display: block; }
.ic svg * { stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.logo-mark.ic { width: 22px; height: 22px; vertical-align: -4px; }
.tab-btn .ic, .download-btn .ic, .btn-review .ic, .btn-refresh .ic { margin-right: 4px; }

/* ---------- 备案号页脚 ---------- */
.site-footer {
  text-align: center;
  padding: 18px 0 24px;
  color: var(--text-dim);
  font-size: 12px;
}
.site-footer a {
  color: var(--text-dim);
  text-decoration: none;
}
.site-footer a:hover { color: var(--text); }

/* ---------- 法律页 (免责声明/用户服务协议) ---------- */
.legal-page {
  max-width: 900px;
  padding: 28px 20px 60px;
}
.legal-page h1 { font-size: 24px; margin-bottom: 6px; }
.legal-date { color: var(--text-dim); font-size: 13px; margin-bottom: 24px; }
.legal-page h2 { font-size: 16px; margin: 22px 0 10px; }
.legal-page p { line-height: 1.9; color: var(--text); margin-bottom: 10px; }
.legal-page ul { padding-left: 24px; margin-bottom: 10px; line-height: 1.9; }
.legal-page li { margin-bottom: 4px; }
.btn-back {
  display: inline-block;
  margin-right: 14px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
}
.btn-back:hover { border-color: var(--gold); color: var(--gold); }
.ft-sep { margin: 0 10px; color: var(--text-dim); }
