/* ============================================================
   游戏数据库 — 专属样式
   复用主站 style.css 设计令牌（深色、液态玻璃、品牌色）
   类名前缀 .db-*，主要适配桌面（≥1024px）
   ============================================================ */

/* 主容器 */
.db-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: calc(var(--navbar-height) + 1.5rem) 1.5rem 3rem;
}

/* 标题容器（图标 + 文字） */
.db-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.8rem;
}
.db-header .gensri-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-md);
}

/* 版本信息 */
.db-version {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.db-version .version-value { color: #fff; font-weight: 600; }

/* 主标签栏（角色 / 武器 / 圣遗物） */
.db-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}
.db-tab {
  padding: 0.45rem 1.4rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  transition: all var(--transition-fast);
}
.db-tab:hover { color: #fff; border-color: var(--glass-border-hover); }
.db-tab.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  cursor: default;
  pointer-events: none;
}

/* ============================================================
   筛选区
   ============================================================ */
.db-filters {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  margin-bottom: 1.2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}
.db-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}
.db-search i { color: var(--text-tertiary); font-size: 0.8rem; }
.db-search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: inherit;
  font-size: 0.8rem;
}
.db-search input::placeholder { color: var(--text-tertiary); }
.db-filter-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.db-filter-title {
  flex: 0 0 auto;
  width: 2.6rem;
  font-size: 0.78rem;
  color: var(--text-tertiary);
}
.db-filter-opts {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.db-filter-opt {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}
.db-filter-opt:hover { color: #fff; border-color: var(--glass-border-hover); }
.db-filter-opt.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.db-filter-opt img {
  width: 1.15rem;
  height: 1.15rem;
  object-fit: contain;
  display: block;
}

/* ============================================================
   卡片网格
   ============================================================ */
.db-grid {
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.7rem;
}
.db-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2.5rem 1rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.db-empty i { font-size: 1.8rem; }

/* 卡片通用 */
.db-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.8rem 0.6rem 0.7rem;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all var(--transition-normal);
}
.db-card:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  transform: translateY(-3px);
}

/* 卡片图片（图片加载失败时，底层 Font Awesome 图标作占位） */
.db-card-img {
  position: relative;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid var(--glass-border-hover);
  flex-shrink: 0;
}
.db-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* 占位图标：默认隐藏，仅无图或加载失败时显示 */
.db-card-img .db-img-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--text-tertiary);
}
.db-card-img.no-img .db-img-fallback {
  display: flex;
}

/* 武器图片（方形，不裁圆） */
.db-card-weapon .db-card-img {
  border-radius: var(--radius-md);
  border: none;
  background: rgba(255, 255, 255, 0.05);
}

/* 卡片名字 */
.db-card-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 星级（星串，不同星级配色） */
.db-star { letter-spacing: 0.05em; line-height: 1; font-size: 0.68rem; }
.db-star.star5 { color: #f7b733; }
.db-star.star4 { color: #b58ae6; }
.db-star.star3 { color: #6ea8fe; }

/* 角色卡片底部：元素图标 + 武器图标 */
.db-card-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  margin-top: 0.1rem;
}
.db-card-foot img {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
  display: block;
}
.db-card-foot .db-foot-divider {
  width: 1px;
  height: 1.15rem;
  background: rgba(255, 255, 255, 0.22);
}

/* 武器卡片元信息（攻击力 + 副属性） */
.db-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.66rem;
  color: var(--text-secondary);
  line-height: 1.35;
}
.db-card-meta b { color: #fff; font-weight: 600; }

/* 加载/错误提示 */
.db-status {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 1rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ============================================================
   背景（完整重写：绝对路径 + 去掉 background-attachment:fixed，
   修复部分浏览器在 fixed 定位下背景图不加载的问题）
   ============================================================ */
.background-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.background-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/png/index-background-7.1.1.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  opacity: 0.4;
  transition: opacity 0.6s ease;
}
.background-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 16, 0.35);
  transition: background 0.6s ease;
}
/* 沉浸式模式：背景图淡出，切换为单色 #404040 */
body.immersive .background-layer::before {
  opacity: 0;
}
body.immersive .background-layer::after {
  background: #262626;
}

/* 响应式：小屏压缩 */
@media (max-width: 768px) {
  .background-layer::before {
    background-image: url("/png/index-background-7.1.1(phone).jpg");
    background-attachment: scroll;
  }
  .db-tab {
    padding: 0.32rem 0.8rem;
    font-size: 0.74rem;
    white-space: nowrap;
  }
  .db-filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }
  .db-filter-title { width: auto; }
  .db-filter-opts { width: 100%; }
  /* 筛选项 grid：元素 4 列（火水雷冰/风岩草），武器 5 列，星级按页区分 */
  .db-filter-opts-element { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; }
  .db-filter-opts-weapon { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.4rem; }
  .db-filter-opts-star { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.4rem; }
  body[data-page="weapons"] .db-filter-opts-star { grid-template-columns: repeat(3, 1fr); }
  .db-filter-opt { padding: 0.3rem 0.3rem; font-size: 0.72rem; justify-content: center; }
  .db-filter-opt .db-opt-label { display: none; }
  .db-filter-opt img { width: 1.1rem; height: 1.1rem; }
  /* 列表居中；角色 3 列，武器 2 列 */
  .db-grid { justify-content: center; }
  body[data-page="characters"] .db-grid { grid-template-columns: repeat(3, 1fr); }
  body[data-page="weapons"] .db-grid { grid-template-columns: repeat(2, 1fr); }
  .db-card-img { width: 2.6rem; height: 2.6rem; }
  .db-card-name { font-size: 0.66rem; }
  .db-star { font-size: 0.58rem; }
  .db-card-meta { font-size: 0.58rem; }
  .db-card { gap: 0.22rem; padding: 0.45rem 0.3rem 0.4rem; }
  .db-card-foot img { width: 0.9rem; height: 0.9rem; }
  .db-main { padding-left: 0.6rem; padding-right: 0.6rem; }
}

/* 手机端顶部沉浸式按钮（桌面隐藏，手机端在 @media 内显示） */
.mobile-immersive { display: none; }

/* ============================================================
   角色详情页
   ============================================================ */
.cd-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: calc(var(--navbar-height) + 1.5rem) 1.5rem 3rem;
}

/* 返回按钮（叠加在导航上，轻微强调） */
.cd-back {
  margin-right: 0.3rem;
  color: var(--accent);
}

/* ============================================================
   主要信息
   ============================================================ */
.cd-hero {
  display: flex;
  gap: 1.5rem;
  padding: 1.3rem 1.4rem;
  /* 差异模式展开的版本下拉需要盖住下方内容区：
     .glass 的 backdrop-filter 会形成层叠上下文，这里显式提升整块的层叠顺序 */
  position: relative;
  z-index: 5;
}
.cd-hero-info { flex: 1; min-width: 0; }
.cd-hero-title {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.1rem;
}
/* 角色 ID：与称号同行、同为灰色，便于复制查询 */
.cd-hero-id {
  margin-left: 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
}
.cd-hero-name { font-size: 1.8rem; font-weight: 700; color: #fff; line-height: 1.2; }
.cd-name-divider {
  display: inline-block;
  width: 1px;
  height: 1.1em;
  background: rgba(255, 255, 255, 0.3);
  margin: 0 0.45rem;
  vertical-align: -0.12em;
}
.cd-name-en {
  font-size: 0.72em;
  font-weight: 500;
  color: var(--text-secondary);
}
.cd-hero-star { margin-top: 0.2rem; font-size: 0.9rem; }
.cd-hero-types {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0 0.2rem;
}
.cd-hero-type {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.cd-hero-type i { color: var(--accent); }
.cd-hero-type img {
  width: 1.1rem;
  height: 1.1rem;
  object-fit: contain;
  display: block;
}

.cd-hero-splash {
  flex: 0 0 46%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 220px;
}
.cd-hero-splash img {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.45));
  display: block;
}
.cd-hero-splash .db-img-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--text-tertiary);
}
.cd-hero-splash.no-img .db-img-fallback {
  display: flex;
}

/* 等级拖动条与数值 */
.cd-level { margin-top: 1rem; }
.cd-level-head {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}
.cd-level-head b { color: #fff; font-size: 1rem; margin-left: 0.2rem; }

.cd-slider {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.cd-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  cursor: pointer;
}
.cd-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  cursor: pointer;
}

.cd-stats {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 1rem;
}
.cd-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.28);
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.cd-stat b { color: #fff; font-weight: 600; }

/* ============================================================
   板块标题
   ============================================================ */
.cd-section {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.cd-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  padding-left: 0.6rem;
  border-left: 3px solid var(--accent);
}

/* ============================================================
   技能
   ============================================================ */
.cd-skill {
  padding: 1rem 1.1rem;
}
.cd-skill-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
}
.cd-skill-icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid var(--element-glow, var(--glass-border-hover));
  box-shadow: 0 0 8px var(--element-glow, rgba(110, 168, 254, 0.4));
  flex-shrink: 0;
}
.cd-skill-head-text { min-width: 0; }
.cd-skill-label {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  display: block;
}
.cd-skill-name { font-size: 1.05rem; font-weight: 700; color: #fff; }

.cd-skill-body {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.cd-skill-desc {
  flex: 1.4;
  min-width: 0;
  font-size: 0.78rem;
  color: #fff;
  line-height: 1.7;
}
.cd-skill-desc i { color: rgba(240, 240, 245, 0.78); }

.cd-skill-mult {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.28);
}
.cd-mult-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}
.cd-mult-head b { color: #fff; margin-left: 0.15rem; }
.cd-mult-head .cd-slider { width: 8rem; }
.cd-mult-rows {
  margin-top: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.cd-mult-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
  font-size: 0.74rem;
  color: #fff;
}
.cd-mult-row b { color: #fff; font-weight: 600; white-space: nowrap; }

/* ============================================================
   固有天赋 / 命之座（2 列网格）
   ============================================================ */
.cd-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}
.cd-talent {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.8rem 0.9rem;
}
.cd-talent-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cd-talent-icon {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid var(--element-glow, var(--glass-border-hover));
  box-shadow: 0 0 8px var(--element-glow, rgba(110, 168, 254, 0.4));
  flex-shrink: 0;
}
.cd-talent-name { font-size: 0.9rem; font-weight: 700; color: #fff; }
.cd-const-idx {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.02rem 0.3rem;
  border-radius: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: rgba(110, 168, 254, 0.14);
  border: 1px solid rgba(110, 168, 254, 0.35);
  vertical-align: 1px;
}
.cd-talent-desc {
  font-size: 0.74rem;
  color: #fff;
  line-height: 1.65;
}

/* ============================================================
   名词解释
   ============================================================ */
.cd-glossary {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.cd-term { padding: 0.8rem 0.9rem; }
.cd-term-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #FFD780;
  margin-bottom: 0.3rem;
}
.cd-term-desc {
  font-size: 0.74rem;
  color: #fff;
  line-height: 1.65;
}

/* ============================================================
   详情页响应式
   ============================================================ */
@media (max-width: 768px) {
  .cd-hero { flex-direction: column; }
  .cd-hero-splash { flex: none; min-height: 0; }
  .cd-skill-body { flex-direction: column; }
  .cd-grid-2 { grid-template-columns: 1fr; }
  .cd-stats { grid-template-columns: 1fr; }
  .cd-main { padding-left: 0.8rem; padding-right: 0.8rem; }
  /* 手机端整体缩小字体 */
  .cd-hero-title { font-size: 0.58rem; }
  .cd-hero-id { font-size: 0.52rem; margin-left: 0.35rem; }
  .cd-hero-name { font-size: 1rem; }
  .cd-hero-star { font-size: 0.62rem; }
  .cd-hero-type { font-size: 0.55rem; padding: 0.16rem 0.4rem; }
  .cd-level-head { font-size: 0.6rem; }
  .cd-stat { font-size: 0.58rem; padding: 0.24rem 0.4rem; }
  .cd-section-title { font-size: 0.76rem; }
  .cd-skill-label { font-size: 0.52rem; }
  .cd-skill-name { font-size: 0.72rem; }
  .cd-skill-desc { font-size: 0.58rem; }
  .cd-skill-icon { width: 1.4rem; height: 1.4rem; }
  .cd-mult-head { font-size: 0.58rem; }
  .cd-mult-row { font-size: 0.56rem; }
  .cd-talent-icon { width: 1.4rem; height: 1.4rem; }
  .cd-talent-name { font-size: 0.64rem; }
  .cd-const-idx { font-size: 0.52rem; margin-right: 0.25rem; padding: 0 0.2rem; }
  .cd-talent-desc { font-size: 0.56rem; }
  .cd-term-name { font-size: 0.62rem; }
  .cd-term-desc { font-size: 0.56rem; }
  /* 手机端：等级选择拖动条占满宽度 */
  .cd-mult-head { width: 100%; }
  .cd-mult-head .cd-slider { flex: 1; width: auto; }
  /* 手机端移除 tooltip，点击直接跳转 */
  .cd-tooltip { display: none; }
  /* 手机端顶部沉浸式按钮 */
  .mobile-immersive {
    display: inline-flex;
    position: fixed;
    top: 0.7rem;
    right: 0.8rem;
    z-index: 300;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    font-size: 0.72rem;
    color: var(--text-secondary);
  }
  .mobile-immersive.active { color: #FFD780; border-color: #FFD780; }
}

/* ============================================================
   名词解释链接与 tooltip
   ============================================================ */
.cd-term-link {
  color: #FFD780;
  cursor: pointer;
  border-bottom: 1px dashed #FFD780;
  transition: color var(--transition-fast);
}
.cd-term-link:hover { color: #FFE5A3; }

/* 技能名高亮（{LINK#Sxxx}） */
.cd-skill-link { color: var(--accent); }

/* 名词解释 tooltip */
.cd-tooltip {
  position: fixed;
  z-index: 999;
  max-width: 560px;
  padding: 0.6rem 0.8rem;
  background: rgba(18, 18, 28, 0.97);
  border: 1px solid var(--glass-border-hover);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  font-size: 0.72rem;
  color: var(--text-secondary);
  pointer-events: none;
}
.cd-tooltip b {
  display: block;
  color: #fff;
  font-size: 0.78rem;
  margin-bottom: 0.2rem;
}
.cd-tooltip p { line-height: 1.55; }

/* 名词解释锚点：跳转时避开固定导航栏 */
.cd-term { scroll-margin-top: calc(var(--navbar-height) + 1rem); }

/* ============================================================
   沉浸式按钮（替换原音乐按钮）
   ============================================================ */
.nav-immersive {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
  transition: all var(--transition-fast);
}
.nav-immersive:hover { color: #fff; border-color: var(--glass-border-hover); }
.nav-immersive.active { color: #FFD780; border-color: #FFD780; }
.nav-immersive.active i { color: #FFD780; }

/* ============================================================
   玻璃容器：加深色背景 + 边框柔和发光（减少透亮感）
   ============================================================ */
.glass {
  background: rgba(12, 12, 20, 0.55);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 8px rgba(110, 168, 254, 0.08), 0 4px 24px rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 10px color-mix(in srgb, var(--element-glow) 28%, transparent), 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* ============================================================
   武器详情页
   ============================================================ */
.wd-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: calc(var(--navbar-height) + 1.5rem) 1.5rem 3rem;
}

/* 武器属性栏（左信息 / 右武器图） */
.wd-hero {
  display: flex;
  gap: 1.5rem;
  padding: 1.3rem 1.4rem;
}
.wd-hero-info { flex: 1; min-width: 0; }
.wd-hero-name { font-size: 1.8rem; font-weight: 700; color: #fff; line-height: 1.2; }
.wd-hero-star { margin-top: 0.2rem; font-size: 0.9rem; }
.wd-hero-types {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0 0.2rem;
}
.wd-hero-type {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.wd-hero-type img {
  width: 1.1rem;
  height: 1.1rem;
  object-fit: contain;
  display: block;
}
/* 武器 ID：与武器类型同一行，样式与类型标签一致 */
.wd-hero-id {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
}

/* 武器图片（右侧） */
.wd-hero-img {
  flex: 0 0 34%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 200px;
}
.wd-hero-img img {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.45));
  display: block;
}
.wd-hero-img .db-img-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--text-tertiary);
}
.wd-hero-img.no-img .db-img-fallback { display: flex; }

/* 等级滑动条与数值 */
.wd-level { margin-top: 1rem; }
.wd-level-head {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}
.wd-level-head b { color: #fff; font-size: 1rem; margin-left: 0.2rem; }
.wd-stats {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 1rem;
}
.wd-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.28);
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.wd-stat b { color: #fff; font-weight: 600; }

/* 半透明分隔线 */
.wd-divider {
  border: none;
  height: 1px;
  margin: 0.2rem 0;
  background: rgba(255, 255, 255, 0.14);
}

/* 武器被动 */
.wd-passive { padding: 1.1rem 1.3rem; }
.wd-passive-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}
.wd-passive-name { font-size: 1.05rem; font-weight: 700; color: #fff; }
.wd-refine { display: flex; gap: 0.35rem; }
.wd-refine-btn {
  min-width: 2.1rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.wd-refine-btn:hover:not(:disabled) {
  color: #fff;
  border-color: var(--glass-border-hover);
}
.wd-refine-btn.active {
  color: #FFD780;
  border-color: #FFD780;
  background: rgba(255, 215, 128, 0.12);
}
.wd-refine-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.wd-passive-desc {
  font-size: 0.8rem;
  color: #fff;
  line-height: 1.75;
}

/* 强化材料 + 武器故事 */
.wd-section {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.wd-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  padding-left: 0.6rem;
  border-left: 3px solid var(--accent);
}
.wd-mats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.wd-mat {
  position: relative;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  overflow: hidden;
}
.wd-mat img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.wd-mat-count {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 0 0.22rem;
  border-top-left-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.72);
  font-size: 0.62rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
}

/* 武器故事（淡灰色文字） */
.wd-story {
  font-size: 0.76rem;
  color: rgba(240, 240, 245, 0.45);
  line-height: 1.8;
  padding-left: 0.6rem;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
}

/* 武器详情页响应式 */
@media (max-width: 768px) {
  .wd-main { padding-left: 0.8rem; padding-right: 0.8rem; }
  .wd-hero { flex-direction: column; }
  .wd-hero-img { flex: none; min-height: 0; }
  .wd-hero-name { font-size: 1rem; }
  .wd-hero-star { font-size: 0.62rem; }
  .wd-hero-type { font-size: 0.55rem; padding: 0.16rem 0.4rem; }
  .wd-hero-id { font-size: 0.55rem; padding: 0.16rem 0.4rem; }
  .wd-level-head { font-size: 0.6rem; }
  .wd-stats { grid-template-columns: 1fr; }
  .wd-stat { font-size: 0.58rem; padding: 0.24rem 0.4rem; }
  .wd-passive { padding: 0.8rem 0.9rem; }
  .wd-passive-name { font-size: 0.76rem; }
  .wd-refine-btn { font-size: 0.56rem; min-width: 1.6rem; padding: 0.2rem 0.35rem; }
  .wd-passive-desc { font-size: 0.58rem; }
  .wd-section-title { font-size: 0.76rem; }
  .wd-mat { width: 2.4rem; height: 2.4rem; }
  .wd-mat-count { font-size: 0.5rem; }
  .wd-story { font-size: 0.56rem; }
}

/* ============================================================
   圣遗物列表页
   ============================================================ */

/* 筛选条：搜索框 + 「显示效果」开关 */
.ar-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.ar-filter-bar .db-search { flex: 1; min-width: 12rem; }

/* 「显示效果」开关按钮 */
.ar-fx-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.ar-fx-toggle:hover {
  color: #fff;
  border-color: var(--glass-border-hover);
}
.ar-fx-toggle.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(110, 168, 254, 0.12);
}

/* 网格列数：「显示效果」开 / 关 两种排布 */
body.fx-off .db-grid { grid-template-columns: repeat(7, 1fr); }
body.fx-on .db-grid { grid-template-columns: repeat(2, 1fr); }

/* 圣遗物卡片 */
.ar-card { cursor: pointer; }

/* 套装图标：边框颜色由星级决定 */
.ar-icon {
  position: relative;
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ar-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.ar-icon.star5 { border-color: #F7B733; box-shadow: 0 0 12px rgba(247, 183, 51, 0.55); }
.ar-icon.star4 { border-color: #B58AE6; box-shadow: 0 0 12px rgba(181, 138, 230, 0.55); }
.ar-icon.star3 { border-color: #6EA8FE; box-shadow: 0 0 12px rgba(110, 168, 254, 0.55); }

/* 图标占位（无图标数据 / 加载失败） */
.ar-icon .db-img-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--text-tertiary);
}
.ar-icon.no-img .db-img-fallback { display: flex; }

/* 开启「显示效果」：容器左右拉长，左侧图标+名称，右侧套装效果 */
.ar-card-fx {
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  text-align: left;
  padding: 1rem 1.1rem;
}
.ar-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
  width: 5.2rem;
}
.ar-right { flex: 1; min-width: 0; }
.ar-bonus {
  font-size: 0.72rem;
  color: #fff;
  line-height: 1.6;
}
.ar-bonus-tag {
  color: var(--accent);
  font-weight: 700;
}
.ar-bonus-empty { color: var(--text-tertiary); }
.ar-divider {
  border: none;
  height: 1px;
  margin: 0.45rem 0;
  background: rgba(255, 255, 255, 0.14);
}

/* 圣遗物列表页响应式 */
@media (max-width: 768px) {
  body.fx-off .db-grid { grid-template-columns: repeat(3, 1fr); }
  body.fx-on .db-grid { grid-template-columns: 1fr; }
  .ar-icon { width: 2.9rem; height: 2.9rem; }
  .ar-icon .db-img-fallback { font-size: 1.1rem; }
  .ar-filter-bar .db-search { min-width: 0; }
  .ar-fx-toggle { font-size: 0.72rem; padding: 0.42rem 0.7rem; }
  /* 手机端开启效果时改为上下排布，文本占满宽度 */
  .ar-card-fx {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    padding: 0.7rem 0.8rem;
  }
  .ar-left {
    flex-direction: row;
    justify-content: flex-start;
    width: auto;
    gap: 0.5rem;
  }
  .ar-bonus { font-size: 0.6rem; }
}

/* ============================================================
   圣遗物详情页
   ============================================================ */
.ad-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: calc(var(--navbar-height) + 1.5rem) 1.5rem 3rem;
}

/* 头部：标题靠左、图片（花）靠右，星级在标题下方 */
.ad-hero {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.3rem 1.4rem;
}
.ad-hero-info { flex: 1; min-width: 0; }
.ad-hero-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.ad-hero-star { margin-top: 0.35rem; font-size: 0.9rem; }
/* 圣遗物 ID：星级下方、版本选择器上方，灰色小字 */
.ad-hero-id {
  margin-top: 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
}
.ad-hero-img {
  flex: 0 0 26%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 150px;
}
.ad-hero-img img {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.45));
  display: block;
}
.ad-hero-img .db-img-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--text-tertiary);
}
.ad-hero-img.no-img .db-img-fallback { display: flex; }

/* 套装效果 */
.ad-bonus { padding: 1.1rem 1.3rem; }
.ad-bonus-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}
/* 标题与内容之间的间隔 */
.ad-bonus-body { margin-top: 1.1rem; }
.ad-bonus-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.3rem;
}
.ad-bonus-desc {
  font-size: 0.8rem;
  color: #fff;
  line-height: 1.75;
}
.ad-bonus-empty { font-size: 0.8rem; color: var(--text-tertiary); }
.ad-divider {
  border: none;
  height: 1px;
  margin: 1rem 0;
  background: rgba(255, 255, 255, 0.14);
}

/* 套装部位 */
.ad-pieces { padding: 1.1rem 1.3rem; }
.ad-piece-list {
  margin-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.ad-piece {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--glass-border);
}
.ad-piece-img {
  position: relative;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ad-piece-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.ad-piece-img .db-img-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-tertiary);
}
.ad-piece-img.no-img .db-img-fallback { display: flex; }
.ad-piece-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
}

/* 圣遗物详情页响应式 */
@media (max-width: 768px) {
  .ad-main { padding-left: 0.8rem; padding-right: 0.8rem; }
  .ad-hero { gap: 0.8rem; padding: 0.9rem 1rem; }
  .ad-hero-name { font-size: 1rem; }
  .ad-hero-star { font-size: 0.62rem; }
  .ad-hero-id { font-size: 0.52rem; }
  .ad-hero-img { flex: 0 0 32%; min-height: 90px; }
  .ad-hero-img .db-img-fallback { font-size: 1.8rem; }
  .ad-bonus { padding: 0.8rem 0.9rem; }
  .ad-bonus-title { font-size: 0.8rem; }
  .ad-bonus-body { margin-top: 0.8rem; }
  .ad-bonus-label { font-size: 0.68rem; }
  .ad-bonus-desc { font-size: 0.6rem; }
  .ad-divider { margin: 0.7rem 0; }
  .ad-pieces { padding: 0.8rem 0.9rem; }
  .ad-piece { gap: 0.7rem; padding: 0.45rem 0.6rem; }
  .ad-piece-img { width: 2.6rem; height: 2.6rem; }
  .ad-piece-name { font-size: 0.66rem; }
}

/* ============================================================
   版本选择器（角色 / 武器 / 圣遗物 详情页共用）
   ============================================================ */
.ver-picker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
}
.ver-label {
  flex: 0 0 auto;
  font-size: 0.78rem;
  color: var(--text-tertiary);
}
.ver-opts {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.ver-opt {
  padding: 0.28rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.ver-opt:hover {
  color: #fff;
  border-color: var(--glass-border-hover);
}
.ver-opt.active {
  color: #FFD780;
  border-color: #FFD780;
  background: rgba(255, 215, 128, 0.12);
}

/* ============================================================
   角色详情页 · 版本差异模式
   ============================================================ */

/* 版本差异模式开关 */
.dfx-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
}
.dfx-toggle-label {
  flex: 0 0 auto;
  font-size: 0.78rem;
  color: var(--text-tertiary);
}
.dfx-toggle-btn {
  padding: 0.28rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.dfx-toggle-btn:hover { color: #fff; border-color: var(--glass-border-hover); }
.dfx-toggle-btn.on {
  color: #FFD780;
  border-color: #FFD780;
  background: rgba(255, 215, 128, 0.12);
}

/* 双版本选择：左右两栏，中间半透明分隔 */
.dfx-compare-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.dfx-compare {
  flex: 1 1 20rem;
  display: flex;
  align-items: stretch;
  min-width: 0;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  /* 这里不能用 overflow: hidden —— 展开的版本下拉列表会被容器裁掉，
     改为给两侧分别加圆角，效果等同 */
}
.dfx-side:first-child {
  border-top-left-radius: var(--radius-sm);
  border-bottom-left-radius: var(--radius-sm);
}
.dfx-side:last-child {
  border-top-right-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
}
.dfx-side {
  position: relative;
  flex: 1 1 50%;
  min-width: 0;
  padding: 0.6rem 0.7rem;
}
.dfx-side + .dfx-side {
  border-left: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.02);
}
.dfx-side-title {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-bottom: 0.35rem;
}

/* 版本下拉：深色液态玻璃 */
.dfx-select-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  font-size: 0.76rem;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.dfx-select-btn:hover { border-color: var(--glass-border-hover); }
.dfx-select-btn i { font-size: 0.62rem; color: var(--text-tertiary); }
.dfx-select-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dfx-select-list {
  position: absolute;
  z-index: 30;
  left: 0.7rem;
  right: 0.7rem;
  margin-top: 0.3rem;
  max-height: 16rem;
  overflow-y: auto;
  padding: 0.3rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border-hover);
  background: rgba(18, 20, 28, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.dfx-select-opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.36rem 0.5rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.dfx-select-opt:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.dfx-select-opt.active { color: #FFD780; background: rgba(255, 215, 128, 0.12); }

/* 提示条 */
.dfx-empty {
  flex: 1 1 20rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--glass-border);
  color: var(--text-secondary);
  font-size: 0.76rem;
}
.dfx-empty-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.6rem 1rem;
  border: 1px dashed var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8rem;
}
.dfx-empty-body i { color: #7BD88F; }

/* 左右对比骨架（桌面：新在左、旧在右） */
.dfx-pair {
  display: flex;
  align-items: stretch;
  margin-top: 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  overflow: hidden;
}
.dfx-col { flex: 1 1 50%; min-width: 0; }
.dfx-col + .dfx-col { border-left: 1px solid rgba(255, 255, 255, 0.09); }
.dfx-col-head {
  padding: 0.25rem 0.6rem;
  font-size: 0.66rem;
  color: var(--text-tertiary);
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--glass-border);
}
.dfx-col-body {
  padding: 0.55rem 0.65rem;
  font-size: 0.74rem;
  line-height: 1.7;
  color: #fff;
  word-break: break-word;
}

/* 改动高亮：新增 / 改动后为绿色，删除 / 改动前为红色（明显、便于快速扫读） */
.dfx-add {
  background: rgba(74, 222, 128, 0.48);
  border-radius: 2px;
  padding: 0 1px;
}
.dfx-del {
  background: rgba(248, 113, 113, 0.45);
  border-radius: 2px;
  padding: 0 1px;
}
.dfx-none { color: var(--text-tertiary); }

/* 对比列标题里的版本号 */
.dfx-col-ver {
  color: #FFD780;
  font-weight: 600;
}

/* 手机端倍率值前方的「新版本 / 旧版本」标签：桌面端隐藏 */
.dfx-mult-tag { display: none; }

/* 名称并排：新在前、旧在后 */
.dfx-name-pair {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.dfx-name {
  border-radius: 2px;
  padding: 0 2px;
}

/* 天赋 / 命座 / 词条：有改动的项各占一行 */
.dfx-skill .cd-skill-body { display: block; }
.dfx-talent { margin-bottom: 0.7rem; }
.dfx-talent:last-child { margin-bottom: 0; }

/* 倍率对比：表头与数据行统一为「左新右旧」两列
   （之前表头是「占位 + 两个标题」三列、配对行是两列，列数不一致导致标题对不上内容区） */
.dfx-mult-cols,
.dfx-mult-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.dfx-mult-cols {
  margin: 0.5rem 0 0.2rem;
  font-size: 0.66rem;
  color: var(--text-tertiary);
}
.dfx-mult-cols .dfx-col-head {
  flex: 1 1 0;
  min-width: 0;
  padding: 0;
  background: none;
  border: 0;
  text-align: center;
}
.dfx-mult-row {
  padding: 0.22rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
/* 每列内是「倍率项名称 + 数值」，名称与数值都可能是改动高亮 */
.dfx-mult-cell {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.2rem;
}
.dfx-mult-cell.dfx-col-old {
  border-left: 1px solid rgba(255, 255, 255, 0.07);
}
.dfx-mult-rn {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.72rem;
  color: #fff;   /* 与技能文案同色 */
  word-break: break-word;
}
.dfx-mult-rv {
  flex: 0 0 auto;
  font-size: 0.74rem;
  color: #fff;
  text-align: right;
}
/* 文案与倍率里的 <i> 诗句保持斜体 */
.dfx-col-body i,
.dfx-mult-cell i { font-style: italic; }

@media (max-width: 768px) {
  .ver-picker { margin-top: 0.6rem; gap: 0.4rem; }
  .ver-label { font-size: 0.6rem; }
  .ver-opt { font-size: 0.55rem; padding: 0.22rem 0.45rem; }

  /* 版本差异模式：竖向排布（新版本在上、旧版本在下） */
  .dfx-toggle { margin-top: 0.6rem; gap: 0.35rem; }
  .dfx-toggle-label { font-size: 0.6rem; }
  .dfx-toggle-btn { font-size: 0.55rem; padding: 0.22rem 0.5rem; }

  .dfx-compare { flex-direction: column; }
  .dfx-side { padding: 0.5rem 0.55rem; }
  .dfx-side + .dfx-side {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
  }
  /* 改为竖向排列后，圆角方向要跟着换 */
  .dfx-side:first-child {
    border-top-left-radius: var(--radius-sm);
    border-top-right-radius: var(--radius-sm);
    border-bottom-left-radius: 0;
  }
  .dfx-side:last-child {
    border-top-right-radius: 0;
    border-bottom-left-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
  }
  .dfx-side-title { font-size: 0.58rem; }
  .dfx-select-btn { font-size: 0.62rem; padding: 0.32rem 0.5rem; }
  .dfx-select-opt { font-size: 0.6rem; }
  .dfx-select-list { left: 0.55rem; right: 0.55rem; max-height: 13rem; }

  .dfx-pair { flex-direction: column; }
  .dfx-col { flex: 1 1 auto; }
  .dfx-col + .dfx-col {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
  }
  .dfx-col-head { font-size: 0.56rem; padding: 0.2rem 0.5rem; }
  .dfx-col-body { font-size: 0.6rem; padding: 0.45rem 0.5rem; line-height: 1.65; }

  .dfx-name-pair { gap: 0.3rem; }

  /* 倍率：两列改为上下两段，每段是「版本标签 + 名称 + 数值」 */
  .dfx-mult-cols { display: none; }
  .dfx-mult-row {
    display: block;
    padding: 0.4rem 0;
  }
  .dfx-mult-cell {
    display: block;
    padding: 0 0 0.25rem 0.7rem;
  }
  .dfx-mult-cell.dfx-col-old {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding-top: 0.25rem;
  }
  .dfx-mult-rn {
    display: block;
    font-size: 0.6rem;
  }
  .dfx-mult-rv {
    display: block;
    text-align: left;
    font-size: 0.6rem;
  }
  .dfx-mult-tag {
    display: block;
    margin-bottom: 0.1rem;
    font-size: 0.56rem;
    color: var(--text-tertiary);
  }
}

/* ============================================================
   「更新」页
   ============================================================ */
.up-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}
.up-ver {
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid #FFD780;
  background: rgba(255, 215, 128, 0.12);
  color: #FFD780;
  font-size: 0.85rem;
  font-weight: 600;
}
.up-total { font-size: 0.84rem; color: var(--text-secondary); }
.up-total b { color: #fff; }

.up-section { margin-bottom: 1.8rem; }
.up-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  padding-left: 0.6rem;
  border-left: 3px solid var(--accent);
  margin-bottom: 0.9rem;
}
.up-count {
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: rgba(110, 168, 254, 0.15);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
}
.up-more {
  margin-left: auto;
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--text-tertiary);
}
.up-more:hover { color: var(--accent); }
.up-none {
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.2);
  border: 1px dashed var(--glass-border);
  color: var(--text-tertiary);
  font-size: 0.82rem;
  text-align: center;
}
.up-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.7rem;
}
.up-empty { max-width: 520px; margin: 2rem auto; }

@media (max-width: 1024px) {
  .up-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 768px) {
  .up-grid { grid-template-columns: repeat(3, 1fr); }
  .up-head { gap: 0.5rem; }
  .up-ver { font-size: 0.7rem; padding: 0.25rem 0.6rem; }
  .up-total { font-size: 0.68rem; }
  .up-title { font-size: 0.8rem; }
  .up-none { font-size: 0.66rem; }
}
