/* ============================================================
 * 精灵王座 —— 样式
 * ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-user-select: none; user-select: none; }
.hidden { display: none !important; }
:root {
  --bg0: #0a0612; --bg1: #140b22; --panel: rgba(255,255,255,.05);
  --gold: #ffd54f; --orange: #ffb347; --line: rgba(255,255,255,.12);
  --good: #7dff9b; --bad: #ff5252;
}
html, body { height: 100%; }
body {
  background:
    radial-gradient(1200px 700px at 20% -10%, #2a1445 0%, transparent 60%),
    radial-gradient(1000px 600px at 90% 110%, #0e2a45 0%, transparent 55%),
    var(--bg0);
  color: #eee;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  overflow: hidden;
}
#app { height: 100vh; }
svg { display: block; }

/* ---------- 屏幕 ---------- */
.screen { display: none; height: 100vh; overflow: auto; }
.screen.active { display: block; animation: screenIn .3s ease; }
@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; } }
.page-wrap { max-width: 1080px; margin: 0 auto; padding: 22px 20px 60px; }

/* ---------- 按钮 ---------- */
.btn {
  border: none; cursor: pointer; color: #fff; font-family: inherit;
  padding: 11px 22px; border-radius: 12px; font-size: 15px; font-weight: bold;
  background: rgba(255,255,255,.1); transition: transform .12s, box-shadow .12s, filter .12s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.15); }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .38; cursor: not-allowed; transform: none; filter: none; }
.btn-primary { background: linear-gradient(135deg, #7c4dff, #536dfe); box-shadow: 0 4px 18px rgba(124,77,255,.4); }
.btn-gold { background: linear-gradient(135deg, #ff9800, #ffc107); box-shadow: 0 4px 18px rgba(255,152,0,.4); }
.btn-ghost { background: rgba(255,255,255,.08); border: 1px solid var(--line); }
.btn.small { padding: 7px 14px; font-size: 13px; }

/* ---------- 主基地 ---------- */
.hub-wrap { max-width: 1080px; margin: 0 auto; padding: 26px 20px 40px; }
.hub-top { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; }
.hub-title h1 {
  font-size: 42px; letter-spacing: 6px;
  background: linear-gradient(120deg, #ffd54f, #ff6b9d 45%, #7c9dff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 12px rgba(255,213,79,.25));
}
.hub-title p { color: #9d8fb8; letter-spacing: 3px; margin-top: 4px; }
.hub-res { display: flex; gap: 10px; flex-wrap: wrap; }
.res-chip {
  background: var(--panel); border: 1px solid var(--line); padding: 8px 14px;
  border-radius: 999px; font-size: 14px; backdrop-filter: blur(6px);
}
.res-chip b { color: var(--gold); }
.res-chip .hot { color: var(--bad); animation: hotPulse 1s infinite alternate; }
@keyframes hotPulse { to { text-shadow: 0 0 12px #ff5252; } }
.hub-rank { display: flex; align-items: center; gap: 14px; margin: 22px 0; }
.rank-badge {
  --rc: #cd7f32;
  padding: 6px 16px; border-radius: 10px; font-weight: bold; font-size: 15px; color: #120b1e;
  background: linear-gradient(135deg, var(--rc), #fff6);
  box-shadow: 0 0 18px color-mix(in srgb, var(--rc) 55%, transparent);
}
.rank-badge.big { font-size: 20px; padding: 9px 22px; }
.rank-bar {
  flex: 1; height: 14px; border-radius: 999px; overflow: hidden;
  background: rgba(255,255,255,.08); border: 1px solid var(--line); position: relative;
}
.rank-bar i {
  display: block; height: 100%; border-radius: 999px;
  transition: width .8s cubic-bezier(.2,.8,.2,1);
  background-size: 200% 100%; animation: barFlow 2.2s linear infinite;
}
@keyframes barFlow { to { background-position: -200% 0; } }
.rank-pts { color: #b9a8d6; font-size: 13px; min-width: 64px; }

.hub-menu { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.menu-btn {
  position: relative; overflow: hidden; text-align: left; cursor: pointer; color: #fff;
  font-family: inherit; padding: 20px 18px 16px; border-radius: 18px;
  border: 1px solid var(--line); background: linear-gradient(150deg, rgba(255,255,255,.09), rgba(255,255,255,.02));
  transition: transform .15s, box-shadow .15s;
  display: flex; flex-direction: column; gap: 5px;
}
.menu-btn:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.menu-btn b { font-size: 18px; letter-spacing: 2px; }
.menu-btn i { font-style: normal; color: #9d8fb8; font-size: 12px; }
.menu-btn .mb-ico { font-size: 26px; font-style: normal; }
.mb-battle:hover { box-shadow: 0 10px 30px rgba(255,82,82,.35); }
.mb-gacha:hover { box-shadow: 0 10px 30px rgba(124,77,255,.4); }
.mb-battle::after, .mb-gacha::after, .mb-up::after, .mb-team::after, .mb-evo::after, .mb-shop::after {
  content: ''; position: absolute; inset: 0; opacity: .13; pointer-events: none;
}
.mb-battle::after { background: radial-gradient(circle at 85% 15%, #ff5252, transparent 55%); }
.mb-gacha::after { background: radial-gradient(circle at 85% 15%, #7c4dff, transparent 55%); }
.mb-up::after { background: radial-gradient(circle at 85% 15%, #4fc94f, transparent 55%); }
.mb-team::after { background: radial-gradient(circle at 85% 15%, #3aa7ff, transparent 55%); }
.mb-shop::after { background: radial-gradient(circle at 85% 15%, #ffb347, transparent 55%); }
.mb-evo::after { background: radial-gradient(circle at 85% 15%, #c084fc, transparent 55%); }

.hub-team { margin-top: 24px; }
.hub-team h3 { color: #b9a8d6; margin-bottom: 10px; letter-spacing: 2px; }
.hub-team-row { display: flex; gap: 14px; flex-wrap: wrap; }
.hub-team-card {
  width: 128px; aspect-ratio: 5/7; border-radius: 12px; overflow: hidden; cursor: pointer;
  border: 2px solid var(--line); transition: transform .15s, box-shadow .15s;
  box-shadow: 0 6px 18px rgba(0,0,0,.45);
}
.hub-team-card:hover { transform: translateY(-4px) scale(1.04); }
.hub-team-card svg { width: 100%; height: 100%; }
.hub-foot { margin-top: 26px; display: flex; gap: 10px; }

/* ---------- 通用头部 ---------- */
.gacha-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.gacha-head h2 { font-size: 24px; letter-spacing: 2px; }
.gacha-head h2 small { color: #9d8fb8; font-size: 14px; }
.gacha-head .back { margin-right: auto; }
.gacha-head .res-chip { margin-left: auto; }
.gacha-head h2 + .res-chip { margin-left: 0; }

/* ---------- 抽卡 ---------- */
.gacha-body { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.gacha-stage {
  width: 100%; min-height: 380px; border-radius: 20px; border: 1px dashed var(--line);
  background: radial-gradient(600px 300px at 50% 0%, rgba(124,77,255,.15), transparent);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 24px; text-align: center; color: #9d8fb8;
}
.gacha-hint { font-size: 13px; color: #b9a8d6; }
.gacha-orb {
  width: 120px; height: 120px; border-radius: 50%; font-size: 54px; line-height: 120px;
  background: radial-gradient(circle at 35% 30%, #a97fff, #4a1d9e 70%);
  box-shadow: 0 0 50px rgba(124,77,255,.5), inset 0 0 30px rgba(0,0,0,.4);
  animation: orbFloat 3s ease-in-out infinite;
}
@keyframes orbFloat { 50% { transform: translateY(-12px); box-shadow: 0 14px 60px rgba(124,77,255,.65), inset 0 0 30px rgba(0,0,0,.4); } }
.gacha-btns { display: flex; gap: 14px; }
.gacha-btns .btn { font-size: 17px; padding: 14px 30px; }

.pull-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; perspective: 900px; }
.pull-card { width: 108px; aspect-ratio: 5/7; cursor: pointer; }
.pull-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .5s cubic-bezier(.3,1.4,.5,1); }
.pull-card.flip-open .pull-inner { transform: rotateY(180deg); }
.pull-face {
  position: absolute; inset: 0; backface-visibility: hidden; border-radius: 10px; overflow: hidden;
  border: 2px solid #5a3a9e; box-shadow: 0 6px 20px rgba(0,0,0,.5);
}
.pull-face svg { width: 100%; height: 100%; }
.pull-front { transform: rotateY(180deg); }
.pull-card.flip-pending { animation: cardBob 2s ease-in-out infinite; }
@keyframes cardBob { 50% { transform: translateY(-6px); } }
.pull-front.is-new { border-color: var(--gold); box-shadow: 0 0 24px rgba(255,213,79,.6); }
.new-tag, .dup-tag {
  position: absolute; top: 8px; left: 8px; padding: 3px 10px; border-radius: 8px;
  font-size: 12px; font-weight: bold; z-index: 3;
}
.new-tag { background: linear-gradient(135deg, #ffd54f, #ff9800); color: #201; animation: tagPulse 1s infinite alternate; }
@keyframes tagPulse { to { box-shadow: 0 0 16px #ffd54f; } }
.dup-tag { background: rgba(20,12,34,.85); border: 1px solid var(--line); color: #b9a8d6; }
.pull-tip { color: #b9a8d6; }

/* ---------- 图鉴 ---------- */
.col-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 14px; }
.col-card {
  position: relative; border-radius: 14px; overflow: hidden; cursor: pointer;
  border: 2px solid var(--line); aspect-ratio: 5/7; transition: transform .15s, box-shadow .15s;
  background: #140b22;
}
.col-card:hover { transform: translateY(-4px) scale(1.03); box-shadow: 0 10px 26px rgba(0,0,0,.55); }
.col-art { position: absolute; inset: 0; }
.col-art svg { width: 100%; height: 100%; }
.col-card.col-locked .col-art { filter: brightness(.12) grayscale(1); }
.col-card.col-locked:hover { transform: none; box-shadow: none; }
.col-lv {
  position: absolute; top: 8px; right: 8px; background: rgba(10,6,18,.85); border: 1px solid var(--gold);
  color: var(--gold); font-size: 12px; font-weight: bold; padding: 3px 8px; border-radius: 8px; z-index: 2;
}
.col-unknown {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 900; color: rgba(255,255,255,.25); z-index: 2;
}
.col-name {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 6px; text-align: center; z-index: 2;
  background: linear-gradient(transparent, rgba(5,3,10,.92) 55%); font-size: 14px; font-weight: bold;
}

/* ---------- 详情弹窗 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 9000; background: rgba(4,2,10,.72);
  display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px);
  animation: screenIn .2s ease;
}
.modal.hidden, #ult-overlay.hidden { display: none; }
.modal-box {
  background: linear-gradient(160deg, #1c1230, #120b22); border: 1px solid var(--line);
  border-radius: 20px; padding: 24px; max-width: 92vw; max-height: 90vh; overflow: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.modal-box h3 { margin-bottom: 14px; }
.switch-list { display: flex; flex-direction: column; gap: 10px; max-height: 55vh; overflow: auto; }
.switch-item {
  display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); transition: background .12s, transform .12s;
}
.switch-item:hover { background: rgba(255,255,255,.07); transform: translateX(4px); }
.sw-art { width: 64px; aspect-ratio: 5/7; border-radius: 8px; overflow: hidden; }
.sw-art svg { width: 100%; height: 100%; }
.sw-hp { color: #b9a8d6; font-size: 13px; margin-top: 3px; }
.sw-good { color: var(--good); } .sw-bad { color: var(--bad); }
.modal-box .btn-ghost { margin-top: 14px; }

.detail-box { display: flex; gap: 22px; position: relative; max-width: 720px; }
.detail-close {
  position: absolute; top: 10px; right: 12px; background: none; border: none; color: #9d8fb8;
  font-size: 20px; cursor: pointer;
}
.detail-art { width: 230px; flex-shrink: 0; border-radius: 14px; overflow: hidden; position: relative; border: 2px solid var(--line); }
.detail-art svg { width: 100%; height: auto; }
.detail-lv {
  position: absolute; top: 10px; right: 10px; background: rgba(10,6,18,.85); border: 1px solid var(--gold);
  color: var(--gold); font-weight: bold; padding: 4px 10px; border-radius: 8px; font-size: 14px;
}
.detail-art.max-lv { border-color: var(--gold); box-shadow: 0 0 26px rgba(255,213,79,.35); }
.detail-info { flex: 1; }
.detail-info h3 { font-size: 22px; }
.detail-stats { display: flex; gap: 24px; margin: 12px 0 16px; color: #cfc3e8; }
.detail-stats b { color: #fff; font-size: 18px; }
.detail-stats i { color: var(--good); font-style: normal; font-size: 13px; margin-left: 5px; }
.detail-move { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.detail-move p { color: #b9a8d6; font-size: 13px; margin-top: 5px; }
.detail-actions { margin-top: 14px; }
.max-tag { color: var(--gold); font-weight: bold; }

/* ---------- 队伍 ---------- */
.team-slots { display: flex; gap: 16px; margin-bottom: 18px; }
.team-slot {
  width: 132px; aspect-ratio: 5/7; border-radius: 14px; overflow: hidden; position: relative;
  border: 2px solid var(--gold); box-shadow: 0 0 18px rgba(255,213,79,.3);
}
.team-slot svg { width: 100%; height: 100%; }
.team-lv {
  position: absolute; bottom: 6px; left: 6px; background: rgba(10,6,18,.85);
  padding: 2px 8px; border-radius: 6px; font-size: 12px; color: var(--gold);
}
.team-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.team-pick {
  position: relative; border-radius: 12px; overflow: hidden; cursor: pointer; border: 2px solid var(--line);
  aspect-ratio: 5/7; transition: transform .12s;
}
.team-pick:hover { transform: scale(1.04); }
.team-pick.in-team { border-color: var(--good); box-shadow: 0 0 14px rgba(125,255,155,.35); }
.tp-art { position: absolute; inset: 0; } .tp-art svg { width: 100%; height: 100%; }
.tp-name {
  position: absolute; bottom: 0; left: 0; right: 0; text-align: center; font-size: 13px; font-weight: bold;
  background: linear-gradient(transparent, rgba(5,3,10,.92) 60%); padding: 8px 4px 6px;
}
.tp-name small { color: #b9a8d6; font-weight: normal; }
.tp-check {
  position: absolute; top: 6px; right: 6px; background: var(--good); color: #08130a;
  font-size: 11px; font-weight: bold; padding: 2px 7px; border-radius: 6px;
}

/* ---------- 商店 ---------- */
.shop-body { display: flex; flex-direction: column; gap: 14px; }
.shop-item {
  display: flex; align-items: center; gap: 18px; padding: 18px; border-radius: 16px;
  background: var(--panel); border: 1px solid var(--line); flex-wrap: wrap;
}
.shop-item.disabled { opacity: .45; }
.shop-ico { font-size: 42px; }
.shop-info { flex: 1; min-width: 220px; }
.shop-info p { color: #9d8fb8; font-size: 13px; margin-top: 4px; }
.shop-own { color: var(--gold); font-weight: bold; }

/* ---------- 元素色 ---------- */
.elem-yan   { --ec: #ff6b35; --ec2: #ffd23f; }
.elem-shui  { --ec: #3aa7ff; --ec2: #7de3ff; }
.elem-cao   { --ec: #4fc94f; --ec2: #c6ff6e; }
.elem-lei   { --ec: #ffd23f; --ec2: #fff59d; }
.elem-yan2  { --ec: #c9924f; --ec2: #e8c896; }
.elem-guang { --ec: #ffe98a; --ec2: #fffbe6; }
.elem-an    { --ec: #a86bff; --ec2: #e0c3ff; }

/* ---------- 战斗 ---------- */
#screen-battle { position: relative; background: radial-gradient(900px 500px at 50% -10%, #33204f 0%, transparent 60%), radial-gradient(700px 400px at 50% 115%, #10263d 0%, transparent 55%), var(--bg0); }
.battle-wrap {
  height: 100vh; display: flex; flex-direction: column; padding: 10px 14px 12px; max-width: 1150px; margin: 0 auto;
}
.arena-top, .arena-bottom { flex: 1; display: flex; align-items: center; justify-content: space-between; min-height: 0; }
.arena-top { padding-top: 30px; }
/* 敌方意图气泡 */
.intent-badge {
  position: absolute; top: -28px; left: 50%; transform: translateX(-50%); z-index: 6;
  background: rgba(10,6,18,.94); border: 1px solid rgba(255,255,255,.2); border-radius: 999px;
  padding: 3px 12px; font-size: 12px; font-weight: bold; white-space: nowrap; color: #cfc3e8;
  display: flex; gap: 5px; align-items: center; pointer-events: none;
}
.intent-badge.it-ult { border-color: #ff5252; color: #ffd54f; box-shadow: 0 0 16px rgba(255,82,82,.45); animation: hotPulse .7s infinite alternate; }
.intent-badge.it-skill { border-color: rgba(79,201,79,.65); color: #a5d6a7; }
.intent-badge.it-switch { border-color: rgba(58,167,255,.65); color: #7dc3ff; }
.it-ico { font-size: 13px; }
.buff-counter { color: #ff8a80; } .buff-protect { color: #7de3ff; }
.buff-silence { color: #ce93d8; animation: hotPulse .8s infinite alternate; }
.silence-tag { color: #ce93d8; }
.active-slot { width: clamp(160px, 24vh, 250px); aspect-ratio: 5/7; position: relative; z-index: 5; }
.slot-e { margin-left: auto; }
.slot-p { margin-right: auto; }

/* 战斗卡牌 */
.bcard {
  position: relative; width: 100%; height: 100%; border-radius: 14px; overflow: hidden;
  border: 2px solid var(--ec, #888); box-shadow: 0 0 24px color-mix(in srgb, var(--ec, #888) 40%, transparent), 0 10px 30px rgba(0,0,0,.55);
  transition: transform .18s;
}
.bcard-art { position: absolute; inset: 0; }
.bcard-art svg { width: 100%; height: 100%; }
.bcard-top {
  position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between;
  padding: 7px 9px; z-index: 3; font-size: 12px; font-weight: bold;
  background: linear-gradient(rgba(6,3,12,.85), transparent);
}
.bcard-elem { color: var(--ec2); }
.bcard-lv { color: #fff; background: rgba(0,0,0,.45); padding: 2px 7px; border-radius: 6px; }
.bcard-hp {
  position: absolute; left: 8px; right: 8px; bottom: 34px; height: 18px; z-index: 3;
  background: rgba(6,3,12,.8); border: 1px solid rgba(255,255,255,.25); border-radius: 999px; overflow: hidden;
}
.hp-ghost { position: absolute; inset: 0; width: 100%; background: #fff; opacity: .65; transition: width 1s ease .35s; }
.hp-fill { position: absolute; inset: 0; width: 100%; transition: width .32s cubic-bezier(.2,.8,.3,1); }
.hp-num {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900; color: #fff; text-shadow: 0 1px 3px #000; z-index: 2; letter-spacing: 1px;
}
.bcard-buffs { position: absolute; left: 6px; bottom: 6px; display: flex; gap: 5px; z-index: 3; flex-wrap: wrap; }
.buff {
  font-size: 11px; font-weight: bold; padding: 2px 6px; border-radius: 6px;
  background: rgba(6,3,12,.85); border: 1px solid var(--line);
}
.buff-burn { color: #ff8a50; } .buff-atk { color: #ff8a50; } .buff-def { color: #e0c3ff; }
.buff-shield { color: #7de3ff; } .buff-stun { color: #ffd23f; animation: hotPulse .8s infinite alternate; }
.buff-atkdown { color: #9aa7c0; } .buff-regen { color: #69f0ae; }
.buff-thorns { color: #8bc34a; } .buff-dodge { color: #7de3ff; }

/* ---------- 稀有度 ---------- */
.tt-rar {
  display: inline-block; font-size: 11px; font-weight: 900; padding: 1px 7px; border-radius: 6px;
  color: #1a0f22; background: linear-gradient(135deg, var(--rc, #9fb4c7), #fff5 70%);
  box-shadow: 0 0 10px color-mix(in srgb, var(--rc, #9fb4c7) 55%, transparent);
  vertical-align: middle; letter-spacing: 1px;
}
.col-card.rar-R { border-color: rgba(159,180,199,.55); }
.col-card.rar-SR { border-color: rgba(77,163,255,.7); }
.col-card.rar-SSR { border-color: rgba(255,213,79,.8); box-shadow: 0 0 12px rgba(255,213,79,.18); }
.col-card.rar-UR { border-color: rgba(255,90,180,.85); box-shadow: 0 0 16px rgba(255,90,180,.28); }
.col-card.rar-UR:hover { box-shadow: 0 10px 26px rgba(0,0,0,.55), 0 0 22px rgba(255,90,180,.4); }
.rar-stats { display: flex; gap: 8px; margin-left: 4px; }
.rar-stat {
  font-size: 12px; font-weight: bold; padding: 3px 10px; border-radius: 8px;
  color: var(--rc); border: 1px solid color-mix(in srgb, var(--rc) 55%, transparent);
  background: color-mix(in srgb, var(--rc) 12%, transparent);
}
.support-tag { color: #7de3ff; }
.silence-tag { color: #ce93d8; }

/* ---------- 卡池页签 ---------- */
.banner-tabs { display: flex; gap: 14px; margin-bottom: 16px; }
.banner-tab {
  flex: 1; text-align: left; cursor: pointer; color: #fff; font-family: inherit;
  padding: 14px 18px; border-radius: 16px; border: 1px solid var(--line);
  background: rgba(255,255,255,.04); display: flex; flex-direction: column; gap: 4px;
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.banner-tab:hover { transform: translateY(-2px); }
.banner-tab.active { border-color: var(--gold); box-shadow: 0 0 18px rgba(255,213,79,.25); background: linear-gradient(150deg, rgba(255,213,79,.12), rgba(255,255,255,.03)); }
.banner-tab b { font-size: 17px; }
.banner-tab b s { text-decoration: none; font-size: 12px; color: var(--bad); border: 1px solid var(--bad); border-radius: 6px; padding: 1px 6px; margin-left: 6px; }
.banner-tab i { font-style: normal; color: #9d8fb8; font-size: 12px; }
.banner-tab em { font-style: normal; color: #b9a8d6; font-size: 12px; line-height: 1.6; }

/* 物品揭示卡面 */
.item-face { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: linear-gradient(160deg, #241536, #120a20); }
.item-ico { font-size: 52px; filter: drop-shadow(0 0 14px rgba(255,255,255,.35)); }
.item-name { font-size: 15px; font-weight: bold; color: #eee; }
.item-amt { font-size: 20px; font-weight: 900; }
.it-shard { border-color: #7de3ff; } .it-shard .item-amt { color: #7de3ff; }
.it-gold { border-color: #ffd54f; } .it-gold .item-amt { color: #ffd54f; }
.it-orb { border-color: #ffb347; } .it-orb .item-amt { color: #ffb347; }
.it-evo { border-color: #c084fc; box-shadow: 0 0 20px rgba(192,132,252,.4); } .it-evo .item-amt { color: #c084fc; }

/* ---------- 进化面板 ---------- */
.evo-section { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.evo-section h4 { font-size: 16px; margin-bottom: 4px; }
.evo-section h4 small { color: #9d8fb8; font-size: 12px; margin-left: 8px; font-weight: normal; }
.evo-opts { display: flex; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.evo-opt {
  flex: 1; min-width: 180px; text-align: center; padding: 12px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.evo-opt.evo-chosen { border-color: var(--gold); }
.evo-arrow { color: var(--gold); font-size: 12px; font-weight: bold; letter-spacing: 2px; }
.evo-art { width: 108px; border-radius: 10px; overflow: hidden; }
.evo-art svg { width: 100%; height: auto; }
.evo-opt b { font-size: 15px; }
.evo-desc { color: #b9a8d6; font-size: 12px; }
.evo-stats { color: var(--good); font-size: 12px; }
.evo-btn { margin-top: 4px; font-size: 13px; padding: 8px 14px; }
.evo-lock { color: #9d8fb8; font-size: 12px; }
.evo-orb-count { color: #b9a8d6; font-size: 12px; }
.shop-exchange { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 进化圣树 ---------- */
.evo-selector { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; padding: 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.evo-sel {
  width: 64px; border-radius: 10px; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; transition: transform .12s, border-color .12s; opacity: .85;
}
.evo-sel:hover { transform: translateY(-3px); opacity: 1; }
.evo-sel.active { border-color: var(--gold); box-shadow: 0 0 12px rgba(255,213,79,.35); opacity: 1; }
.evo-sel svg { width: 100%; height: auto; display: block; }

.evo-tree { display: flex; gap: 22px; align-items: flex-start; }
.evo-current {
  flex-shrink: 0; width: 210px; text-align: center; padding: 16px; border-radius: 18px;
  background: linear-gradient(165deg, rgba(30,18,52,.9), rgba(12,7,24,.9));
  border: 1px solid var(--gold); box-shadow: 0 0 24px rgba(255,213,79,.18);
  display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.ec-art { width: 100%; border-radius: 12px; overflow: hidden; }
.ec-art svg { width: 100%; height: auto; display: block; }
.evo-current b { font-size: 16px; }
.evo-branches { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.evo-col { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.evo-col.locked { opacity: .38; }
.evo-link { color: var(--gold); font-size: 12px; font-weight: bold; letter-spacing: 3px; opacity: .8; }
.evo-node {
  width: 100%; max-width: 240px; text-align: center; padding: 12px; border-radius: 16px;
  background: var(--panel); border: 2px solid var(--line);
  display: flex; flex-direction: column; gap: 5px; align-items: center;
  transition: border-color .15s, box-shadow .15s;
}
.evo-node.cur { border-color: var(--good); }
.evo-node.next { border-color: var(--gold); box-shadow: 0 0 18px rgba(255,213,79,.28); }
.evo-node.locked { filter: saturate(.4); }
.evo-node b { font-size: 14px; }
.en-art { width: 96px; border-radius: 10px; overflow: hidden; }
.en-art svg { width: 100%; height: auto; display: block; }
.evo-cur-tag { color: var(--good); font-size: 12px; font-weight: bold; }
.evo-node .evo-btn { font-size: 13px; padding: 7px 14px; }

/* 进化形态呼吸光效 */
.ev-1 { animation: evoPulse1 2.4s ease-in-out infinite alternate; }
@keyframes evoPulse1 {
  from { box-shadow: 0 0 8px rgba(255,213,79,.18), 0 10px 30px rgba(0,0,0,.5); }
  to { box-shadow: 0 0 24px rgba(255,213,79,.5), 0 10px 30px rgba(0,0,0,.5); }
}
.ev-2 { animation: evoPulse2 2s ease-in-out infinite alternate; }
@keyframes evoPulse2 {
  from { box-shadow: 0 0 10px rgba(192,132,252,.28), 0 10px 30px rgba(0,0,0,.5); }
  to { box-shadow: 0 0 32px rgba(192,132,252,.72), 0 10px 30px rgba(0,0,0,.5); }
}
.bcard.rar-SSR { box-shadow: 0 0 24px color-mix(in srgb, var(--ec, #888) 40%, transparent), 0 0 18px rgba(255,213,79,.35), 0 10px 30px rgba(0,0,0,.55); }
.bcard.rar-UR { box-shadow: 0 0 24px color-mix(in srgb, var(--ec, #888) 40%, transparent), 0 0 26px rgba(255,90,180,.5), 0 10px 30px rgba(0,0,0,.55); animation: urGlow 1.6s ease-in-out infinite alternate; }
@keyframes urGlow { to { box-shadow: 0 0 24px color-mix(in srgb, var(--ec, #888) 40%, transparent), 0 0 42px rgba(255,90,180,.75), 0 10px 30px rgba(0,0,0,.55); } }
.pull-front.is-new-UR { border-color: #ff5ab4; box-shadow: 0 0 30px rgba(255,90,180,.7); }
.pull-front.is-new-SSR { border-color: #ffd54f; box-shadow: 0 0 24px rgba(255,213,79,.6); }
.pull-front.is-new-SR { border-color: #4da3ff; box-shadow: 0 0 18px rgba(77,163,255,.5); }
.pull-front.is-new-R { border-color: #9fb4c7; }

/* 备战区 */
.bench { display: flex; gap: 10px; align-items: center; }
.bench-e { flex-direction: row; }
.bench-card {
  width: clamp(64px, 9vh, 92px); aspect-ratio: 5/7; border-radius: 9px; overflow: hidden; position: relative;
  border: 2px solid rgba(255,255,255,.22); cursor: pointer; opacity: .92; transition: transform .12s, border-color .12s;
}
.bench-card:hover { transform: scale(1.07); border-color: var(--gold); }
.bench-art { position: absolute; inset: 0; } .bench-art svg { width: 100%; height: 100%; }
.bench-hp { position: absolute; bottom: 0; left: 0; right: 0; height: 6px; background: rgba(0,0,0,.6); }
.bench-hp i { display: block; height: 100%; background: linear-gradient(90deg,#3ddc6a,#8dff5a); transition: width .3s; }
.bench-dead {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(5,3,10,.72); color: var(--bad); font-size: 30px; font-weight: 900; z-index: 3;
}

/* 中部 HUD */
.battle-mid { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 8px; min-height: 44px; }
.hud-chip { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px; white-space: nowrap; }
.hud-chip b { color: var(--orange); }
.hud-orbs { display: flex; gap: 8px; }
#battle-log {
  flex: 1; max-width: 480px; text-align: center; font-size: 13px; color: #cfc3e8; line-height: 1.5; max-height: 66px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-start;
}
#battle-log div:first-child { color: #fff; font-weight: bold; }
#battle-log div:not(:first-child) { opacity: .45; font-size: 12px; }
.battle-hint { text-align: center; color: #ffd54f; font-size: 13px; min-height: 20px; letter-spacing: 1px; }

/* 行动按钮 */
.action-bar { display: flex; gap: 12px; justify-content: center; padding-top: 8px; flex-wrap: wrap; }
.act-btn {
  position: relative; min-width: 168px; padding: 12px 16px; border-radius: 14px; cursor: pointer; color: #fff;
  font-family: inherit; border: 1px solid var(--line); background: linear-gradient(160deg, rgba(255,255,255,.1), rgba(255,255,255,.03));
  display: flex; flex-direction: column; gap: 3px; text-align: left; transition: transform .12s, box-shadow .12s, opacity .12s;
}
.act-btn:hover:not(:disabled) { transform: translateY(-3px); }
.act-btn:disabled { opacity: .38; cursor: not-allowed; }
.act-name { font-size: 15px; font-weight: bold; }
.act-sub { font-size: 12px; color: #b9a8d6; }
.act-sub .pips { color: var(--gold); letter-spacing: 2px; }
.act-basic { border-bottom: 3px solid #8d9bb5; }
.act-skill { border-bottom: 3px solid #4fc94f; }
.act-ult { border-bottom: 3px solid var(--orange); }
.act-ult.ready {
  background: linear-gradient(160deg, rgba(255,152,0,.28), rgba(255,111,0,.08));
  border-color: rgba(255,179,71,.55);
}
.act-ult.ready.pulse { animation: ultPulse 1.1s ease-in-out infinite; }
@keyframes ultPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(255,179,71,.35); }
  50% { box-shadow: 0 0 26px rgba(255,179,71,.75); }
}
.act-switch { border-bottom: 3px solid #3aa7ff; }

/* 战斗横幅 */
#battle-banner {
  position: fixed; top: 38%; left: 0; right: 0; text-align: center; z-index: 9500; pointer-events: none;
  font-size: 30px; font-weight: 900; letter-spacing: 8px; color: #fff; opacity: 0; transform: scale(.6);
  text-shadow: 0 0 30px rgba(255,255,255,.6), 0 4px 14px #000;
}
#battle-banner.show { animation: bannerIn .55s cubic-bezier(.2,1.4,.4,1) forwards; }
#battle-banner.show.big { font-size: 56px; letter-spacing: 16px; }
#battle-banner.win { color: #ffd54f; text-shadow: 0 0 40px rgba(255,213,79,.8), 0 4px 14px #000; }
#battle-banner.lose { color: #9aa7c0; }
@keyframes bannerIn { to { opacity: 1; transform: scale(1); } }

/* 大招演出 */
#ult-overlay { position: fixed; inset: 0; z-index: 9400; display: flex; align-items: center; justify-content: center; }
.ult-dim { position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(8,4,16,.55), rgba(4,2,8,.92)); animation: dimIn .3s ease; }
@keyframes dimIn { from { opacity: 0; } }
.ult-name { position: relative; text-align: center; animation: ultTitle .9s cubic-bezier(.2,1.3,.4,1); }
.ult-user { font-size: 22px; color: #cfc3e8; letter-spacing: 6px; margin-bottom: 8px; }
.ult-title {
  font-size: 52px; font-weight: 900; letter-spacing: 10px;
  background: linear-gradient(120deg, var(--ec2), var(--ec) 40%, #fff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 26px var(--ec));
}
@keyframes ultTitle { 0% { transform: scale(.4) translateY(30px); opacity: 0; } 60% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }

/* ---------- 战斗动画 ---------- */
@keyframes lungeUp { 0% { transform: none; } 45% { transform: translateY(-46px) scale(1.05); } 100% { transform: none; } }
@keyframes lungeDown { 0% { transform: none; } 45% { transform: translateY(46px) scale(1.05); } 100% { transform: none; } }
.anim-lunge-up { animation: lungeUp .26s ease-out; }
.anim-lunge-down { animation: lungeDown .26s ease-out; }
@keyframes hitFlash { 0% { filter: brightness(3) saturate(.3); transform: translateX(-8px); } 30% { transform: translateX(9px); } 60% { transform: translateX(-5px); } 100% { filter: none; transform: none; } }
.anim-hit { animation: hitFlash .34s ease-out; }
.just-hit .bcard-art { animation: hitFlash .3s ease-out; }
@keyframes chargeGlow { 50% { transform: scale(1.08); filter: brightness(1.6) saturate(1.4) drop-shadow(0 0 30px var(--ec)); } }
.anim-charge { animation: chargeGlow .38s ease-in-out 3; }
@keyframes koFall { to { transform: rotate(14deg) translateY(60px) scale(.6); opacity: .25; filter: grayscale(1); } }
.anim-ko { animation: koFall .8s ease-in forwards; }
@keyframes slotOut { to { transform: scale(.5); opacity: 0; } }
@keyframes slotIn { from { transform: scale(.5); opacity: 0; } }
.anim-out { animation: slotOut .24s ease-in forwards; }
.anim-in { animation: slotIn .24s ease-out; }

/* ---------- 悬停技能提示 ---------- */
#tooltip-root {
  position: fixed; z-index: 9800; width: 300px; padding: 14px; border-radius: 14px;
  background: linear-gradient(160deg, rgba(24,14,40,.97), rgba(12,7,24,.97));
  border: 1.5px solid var(--ec, #7c4dff); box-shadow: 0 14px 44px rgba(0,0,0,.65), 0 0 22px color-mix(in srgb, var(--ec, #7c4dff) 30%, transparent);
  display: none; font-size: 13px;
}
#tooltip-root.show { display: block; animation: screenIn .18s ease; }
#tooltip-root.loading { width: auto; padding: 10px 16px; display: flex; align-items: center; gap: 10px; }
.tt-ring { width: 34px; height: 34px; }
.tt-ring-txt { color: #b9a8d6; font-size: 12px; letter-spacing: 2px; }
.tt-head { display: flex; gap: 10px; align-items: center; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.tt-icon {
  width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 20px; background: color-mix(in srgb, var(--ec, #7c4dff) 30%, transparent);
  box-shadow: inset 0 0 12px color-mix(in srgb, var(--ec, #7c4dff) 45%, transparent);
}
.tt-lv { color: var(--gold); font-size: 12px; }
.tt-sub { color: #b9a8d6; font-size: 12px; }
.tt-sec { margin-top: 9px; }
.tt-sec b { color: #fff; }
.tt-sec p { color: #b9a8d6; margin-top: 4px; font-size: 12px; line-height: 1.55; }
.tt-uses { color: var(--gold); }
.tt-tag {
  display: inline-block; font-size: 11px; font-weight: bold; padding: 1.5px 8px; border-radius: 6px; margin-right: 7px;
}
.tag-s { background: rgba(79,201,79,.25); color: #8dff7d; border: 1px solid rgba(79,201,79,.5); }
.tag-u { background: rgba(255,152,0,.22); color: #ffcf7d; border: 1px solid rgba(255,152,0,.5); }

/* ---------- 结算 ---------- */
#screen-result { display: none; }
#screen-result.active { display: flex; align-items: center; justify-content: center; }
.result-box {
  text-align: center; padding: 44px 60px; border-radius: 24px; position: relative; overflow: hidden;
  background: linear-gradient(165deg, rgba(30,18,52,.95), rgba(12,7,24,.95));
  border: 1px solid var(--line); box-shadow: 0 24px 80px rgba(0,0,0,.6);
  animation: resultIn .5s cubic-bezier(.2,1.3,.4,1);
}
@keyframes resultIn { from { transform: scale(.7); opacity: 0; } }
.result-title { font-size: 54px; letter-spacing: 12px; }
.r-win .result-title { color: var(--gold); text-shadow: 0 0 40px rgba(255,213,79,.6); }
.r-lose .result-title { color: #9aa7c0; }
.result-sub { color: #b9a8d6; margin: 10px 0 26px; font-size: 16px; }
.result-rewards { display: flex; gap: 30px; justify-content: center; margin-bottom: 26px; }
.rw { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rw-ico { font-size: 30px; }
.rw-val { font-size: 26px; font-weight: 900; color: var(--gold); }
.rw-lab { color: #9d8fb8; font-size: 12px; }
.result-rank { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; }
.result-btns { display: flex; gap: 14px; justify-content: center; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; bottom: 34px; left: 50%; transform: translateX(-50%) translateY(20px); z-index: 9900;
  background: rgba(18,10,32,.95); border: 1px solid var(--line); border-radius: 999px;
  padding: 11px 24px; font-size: 14px; opacity: 0; transition: all .25s; pointer-events: none;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- FX 层 ---------- */
#fx-canvas { position: fixed; inset: 0; z-index: 9990; pointer-events: none; }

/* ---------- 窄屏适配 ---------- */
@media (max-width: 760px) {
  .hub-title h1 { font-size: 30px; }
  .act-btn { min-width: 46%; }
  .detail-box { flex-direction: column; align-items: center; }
  .detail-art { width: 180px; }
  .bench-card { width: 56px; }
  .active-slot { width: clamp(130px, 21vh, 200px); }
  .result-rewards { gap: 16px; }
  .result-box { padding: 30px 20px; }
  #battle-log { display: none; }
}
