/* ============ 海克斯大乱斗页 (augments.html) ============ */
/* 复用 style.css 主题变量; 稀有度: 8=棱彩 4=黄金 1=白银 */

.aug-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  position: sticky;
  top: 0;
  z-index: 20;
}
.aug-topbar h1 { font-size: 17px; font-weight: 700; }
.aug-meta { font-size: 12px; color: var(--text-dim); margin-left: auto; }
.aug-meta.stale { color: var(--gold); }
.theme-toggle {
  background: var(--bg-hover);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-hover);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}
.btn-back:hover { background: var(--gold-light); }

.aug-page { max-width: 1200px; margin: 0 auto; padding: 16px; width: 100%; }

/* 两栏布局: 左栏英雄列表 + 右侧主区 */
.aram-layout { display: flex; gap: 16px; align-items: flex-start; }
.aram-side {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
}
.aram-side input {
  width: 100%;
  background: var(--bg-hover);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 12px;
  margin-bottom: 8px;
}
/* 图标网格导航 (学 op.gg 左栏: 46px 头像在上名字在下, 横排多列) */
.aram-champs { display: flex; flex-wrap: wrap; gap: 8px 4px; }
.aram-champ-count { font-size: 11px; color: var(--text-dim); padding: 0 6px 4px; width: 100%; }
.aram-champ {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 60px;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 4px 2px;
  cursor: pointer;
  color: var(--text);
  text-align: center;
}
.aram-champ:hover { background: var(--bg-hover); }
.aram-champ.active { background: var(--gold-light); }
.aram-champ img { width: 46px; height: 46px; border-radius: 8px; background: var(--bg-hover); }
.aram-champ-name {
  width: 54px;
  font-size: 11px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aram-side-err { font-size: 12px; color: var(--text-dim); padding: 8px 4px; width: 100%; }
.aram-main { flex: 1; min-width: 0; }

/* 英雄详情视图 */
.aram-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}
.aram-hero-head { display: flex; align-items: center; gap: 14px; }
.aram-hero-img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: var(--bg-hover);
}
.aram-hero-head h2 { font-size: 20px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.aram-hero-mode { font-size: 13px; font-weight: 400; color: var(--text-dim); }
.aram-tier-pill {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 6px;
  background: var(--gold-light);
  color: var(--gold);
  border: 1px solid var(--gold);
}
.aram-hero-loading { font-size: 13px; color: var(--text-dim); }
.aram-section { margin-bottom: 12px; }
.aram-section-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.aram-section-hint { font-size: 11px; font-weight: 400; color: var(--text-dim); }
.aram-aug-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.aram-aug-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: none;
  border-top: 1px solid var(--border);
  padding: 5px 12px;  /* 行高 47px, 图标占行高 77% (原 53px 偏高图标显"陷") */
  cursor: pointer;
  color: var(--text);
  text-align: left;
  font-size: 14px;
}
.aram-aug-row:first-child { border-top: none; }
.aram-aug-row:hover { background: var(--bg-hover); }
.aram-aug-row strong { font-weight: 500; }  /* 常规字重, 原 700 在窄行里显沉 */
.aram-aug-icon-wrap { position: relative; width: 36px; height: 36px; flex-shrink: 0; }
.aram-aug-icon-wrap img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid rgba(234, 179, 8, 0.45);
  background: radial-gradient(circle at 30% 25%, #232c3d, #10131a 70%);
}
.aram-aug-icon-wrap .aug-rarity-tag { width: 15px; height: 15px; line-height: 15px; font-size: 10px; }
.aram-aug-row strong { flex: 1; }
.aram-s-shield { flex-shrink: 0; }
.aram-spell-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
}
.aram-spell { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.aram-spell img { width: 32px; height: 32px; border-radius: 6px; background: var(--bg-hover); }

@media (max-width: 760px) {
  .aram-layout { flex-direction: column; }
  .aram-side { width: 100%; position: static; max-height: 220px; }
}

/* 工具栏 (sticky 常驻, 229 卡长页滚动后筛选不丢) */
.aug-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  position: sticky;
  top: 45px;
  z-index: 15;
  background: var(--bg);
  padding: 8px 0;
}
/* 稀有度分段 tab (学 op.gg: 低基数枚举用分段控件, 一眼看全) */
.seg-tabs {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-card);
}
.seg-tabs .seg {
  border: none;
  background: transparent;
  color: var(--text-dim);
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
}
.seg-tabs .seg.active {
  background: var(--gold);
  color: #fff;
}
.seg-tabs .seg:not(:last-child) { border-right: 1px solid var(--border); }
.aug-toolbar input {
  flex: 1;
  min-width: 180px;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
}
.aug-filters { display: flex; gap: 8px; }
.aug-filters select {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
}
.aug-hint { margin-top: 10px; font-size: 12px; color: var(--text-dim); }
.aug-count { margin-top: 4px; font-size: 12px; color: var(--text-dim); }

/* 卡片网格 (深色卡 + 居中构图, 学 op.gg aram-mayhem: 图标同色融合+金色唯一高亮) */
.aug-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}
.aug-card {
  /* 卡片跟随主题 (用户明确: 只要图标是黑的, 卡片正常白卡) */
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 12px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
/* 深色主题: 卡面提亮, 与页底 #0b0d12 拉开分离度 (否则几乎贴色) */
html[data-theme="dark"] .aug-card {
  background: #151a25;
  border-color: #303c4e;
}
.aug-card:hover {
  border-color: rgba(234, 179, 8, 0.55);  /* 金色描边呼应角标 */
  transform: translateY(-2px);
}
.aug-card-icon-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  border: 1px solid rgba(234, 179, 8, 0.45);  /* 金色细边 */
  /* 黑色瓦片衬底: 用户要的"黑图标块" (op.gg 同款黑底金色纹样), 两主题一致 */
  background: radial-gradient(circle at 30% 25%, #232c3d, #10131a 70%);
}
.aug-card-icon-wrap::after {
  content: "?";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: rgba(234, 179, 8, 0.5);
  z-index: 0;
}
.aug-card-icon {
  width: 100%;
  height: 100%;
  border-radius: 7px;
  display: block;
  position: relative;
  z-index: 1;
  /* 不加压暗滤镜: 黑底金字图标本身对比度正好 (08-31 滤镜致"发暗发闷"投诉) */
}
.aug-rarity-tag {
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 17px;
  height: 17px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 17px;
  text-align: center;
  color: #fff;
  font-weight: 700;
  border: 1px solid rgba(0, 0, 0, 0.4);
}
.aug-rarity-tag.r8 { background: linear-gradient(135deg, #a78bfa, #7c3aed); }  /* 棱彩 */
.aug-rarity-tag.r4 { background: linear-gradient(135deg, #f5c542, #d99a1b); }  /* 黄金 */
.aug-rarity-tag.r1 { background: linear-gradient(135deg, #b9c0cc, #8b93a3); }  /* 白银 */
.aug-card-name {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);  /* 跟随主题 (卡片底色跟随主题) */
  line-height: 1.3;
}
.aug-card-desc {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px; /* 固定两行高度, 卡片等高 */
  width: 100%;
}
.aug-card-champs {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  align-items: center;
}
.aug-card-champs img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: var(--bg-hover);
}
.aug-champs-empty { font-size: 11px; color: var(--text-dim); }

/* 徽章 (弹层用; 卡片上不显示, 学 op.gg 压信息密度) */
.badge {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 4px;
  border: 1px solid;
  white-space: nowrap;
}
.badge-r8  { color: #c084fc; border-color: #c084fc; background: rgba(192, 132, 252, 0.1); }
.badge-r4  { color: #eab308; border-color: #eab308; background: rgba(234, 179, 8, 0.1); }
.badge-r1  { color: #94a3b8; border-color: #94a3b8; background: rgba(148, 163, 184, 0.1); }
/* T 级统一金色系 (与全页金色唯一高亮一致) */
.badge-t0  { color: #eab308; border-color: #eab308; background: rgba(234, 179, 8, 0.12); font-weight: 700; }
.badge-t1  { color: #f5c542; border-color: rgba(245, 197, 66, 0.5); background: rgba(245, 197, 66, 0.08); }
.badge-t2  { color: #eab308; border-color: rgba(234, 179, 8, 0.5); background: rgba(234, 179, 8, 0.08); }
.badge-t3  { color: #d9a520; border-color: rgba(217, 165, 32, 0.5); background: rgba(217, 165, 32, 0.08); }
.badge-t4  { color: #b98a1a; border-color: rgba(185, 138, 26, 0.5); background: rgba(185, 138, 26, 0.08); }
.badge-t5  { color: #8b93a3; border-color: rgba(139, 147, 163, 0.5); background: rgba(139, 147, 163, 0.08); }
.champ-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-hover);
  border-radius: 6px;
  padding: 3px 7px 3px 3px;
  font-size: 11px;
  color: var(--text-dim);
}
.champ-chip img {
  width: 24px;
  height: 24px;
  border-radius: 4px;
}
.champ-chip .chip-tier { font-weight: 700; color: var(--text); }

.aug-empty { margin-top: 40px; text-align: center; color: var(--text-dim); }
.hidden { display: none !important; }

/* 回到顶部 */
.aug-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 50;
}

/* 详情弹层 */
.aug-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.aug-modal-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  max-width: 640px;
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  box-shadow: var(--shadow-hover);
}
.aug-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: var(--bg-hover);
  color: var(--text-dim);
  border: none;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.aug-modal-close:hover { color: var(--text); background: var(--border); }
.aug-modal-head { display: flex; align-items: center; gap: 14px; }
.aug-modal-head img { width: 72px; height: 72px; border-radius: 8px; background: var(--bg-hover); }
.aug-modal-title { font-size: 18px; font-weight: 700; }
.aug-modal-sub { display: flex; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--text-dim); flex-wrap: wrap; }
.aug-modal-text { margin-top: 12px; font-size: 13px; line-height: 1.7; color: var(--text); }
.aug-modal-text .label { color: var(--text-dim); font-size: 12px; margin-bottom: 2px; }
.aug-modal-champs { margin-top: 14px; }
.aug-modal-champs h4 { font-size: 13px; margin-bottom: 8px; color: var(--text-dim); font-weight: 600; }
.champ-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
}
.champ-row:hover { background: var(--bg-hover); }
.champ-row img { width: 32px; height: 32px; border-radius: 4px; }
.champ-row .cname { width: 90px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.champ-row .cbar { flex: 1; }
.cbar-track { height: 4px; background: var(--bg-hover); border-radius: 2px; overflow: hidden; margin-bottom: 3px; }
.cbar-fill { height: 100%; background: var(--gold); border-radius: 2px; }
.champ-row .cnum { font-size: 11px; color: var(--text-dim); width: 110px; text-align: right; }

@media (max-width: 640px) {
  .aug-grid { grid-template-columns: 1fr; }
  .aug-filters { width: 100%; }
  .aug-filters select { flex: 1; }
}

/* ---- 动效 (motion.css 基座之上, 海克斯专用: 筛选/切 hero 时自动重跑) ---- */
.aug-card {
  animation: cardPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  animation-delay: calc(var(--i, 0) * 0.02s);
}
/* 搜索击键高频重渲时抑制入场动画 (见 augments.js suppressAnim) */
.aug-grid.no-anim .aug-card, .aram-champs.no-anim .aram-champ { animation: none; }
.aram-champ {
  animation: riseIn 0.3s ease backwards;
  animation-delay: calc(var(--i, 0) * 0.012s);
}
.aram-aug-row {
  animation: riseIn 0.3s ease backwards;
  animation-delay: calc(var(--i, 0) * 0.04s);
}
.aram-spell {
  animation: riseIn 0.3s ease backwards;
  animation-delay: calc(var(--i, 0) * 0.05s);
}
.aram-hero { animation: riseIn 0.3s ease backwards; }
.aug-modal { animation: overlayIn 0.18s ease; }
.aug-modal-card { animation: modalIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1); }
.aug-empty { animation: riseIn 0.25s ease backwards; }
