/* ===== 猪猪侠·币安神话 UI —— 3A 大作风（极简 · 发丝线 · 电影字幕） ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #000; font-family: "PingFang SC", "Songti SC", "Microsoft YaHei", serif; }
#game { position: fixed; inset: 0; display: block; }
.hidden { display: none !important; }

/* ================= 高级战斗反馈 ================= */
/* 全屏闪光 */
#flash { position: fixed; inset: 0; z-index: 30; pointer-events: none; opacity: 0; background: #fff; }
/* 低血红晕警告 */
#lowhp { position: fixed; inset: 0; z-index: 13; pointer-events: none; opacity: 0; background: radial-gradient(ellipse, transparent 42%, rgba(200, 10, 10, .55)); transition: opacity .4s; }
#lowhp.on { opacity: 1; animation: lowPulse 1.2s infinite; }
@keyframes lowPulse { 50% { opacity: .4; } }
/* 伤害数字 */
#dmg-layer { position: fixed; inset: 0; z-index: 14; pointer-events: none; overflow: hidden; }
.dmg { position: absolute; transform: translate(-50%, -50%); font-family: 'Noto Serif SC', serif; font-weight: 900; font-size: 19px; color: #ffe9a0; text-shadow: 0 0 8px rgba(240,185,11,.95), 0 2px 4px #000; animation: dmgUp .85s ease-out forwards; white-space: nowrap; }
.dmg.crit { font-size: 30px; color: #ffcf3d; text-shadow: 0 0 16px rgba(255,190,40,1), 0 2px 6px #000; }
.dmg.hurt { font-size: 23px; color: #ff5a4a; text-shadow: 0 0 12px rgba(255,60,40,.95), 0 2px 4px #000; }
@keyframes dmgUp {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.55); }
  14% { opacity: 1; transform: translate(-50%, -65%) scale(1.18); }
  100% { opacity: 0; transform: translate(-50%, -190%) scale(.92); }
}
/* 连击计数 */
#combo { position: fixed; right: 4vw; top: 36vh; z-index: 14; text-align: center; pointer-events: none; }
#combo b { display: block; font-family: 'Noto Serif SC', serif; font-size: 58px; font-style: italic; font-weight: 900; color: #ffd75e; text-shadow: 0 0 20px rgba(240,185,11,.85), 0 3px 6px #000; line-height: 1; }
#combo span { display: block; margin-top: 4px; font-size: 13px; letter-spacing: .55em; text-indent: .55em; color: #e8cf8e; }
#combo.pop b { animation: comboPop .18s; }
/* 真实代币 Logo（开始界面卡片） */
.token-logo { width: 46px; height: 46px; margin: 0 auto 12px; display: block; border-radius: 50%; box-shadow: 0 0 18px rgba(240,185,11,.35), 0 4px 10px rgba(0,0,0,.6); }
/* 实时行情条 */
#ticker { position: fixed; top: 20px; left: 24px; z-index: 12; display: flex; gap: 18px; pointer-events: none; font-size: 12px; letter-spacing: .08em; color: #d8c88e; text-shadow: 0 2px 6px #000; }
#ticker span { padding-left: 10px; border-left: 1px solid rgba(184,150,62,.6); }
#ticker span:first-child { border-left: none; padding-left: 0; }
#ticker i { font-style: normal; margin-left: 5px; }
#ticker .up { color: #3ddc84; }
#ticker .dn { color: #ff5a4a; }
/* 电影胶片颗粒 */
#grain {
  position: fixed; inset: -120px; z-index: 8; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift .45s steps(4) infinite;
}
@keyframes grainShift { 0%{transform:translate(0,0)} 25%{transform:translate(-40px,25px)} 50%{transform:translate(25px,-40px)} 75%{transform:translate(-25px,-25px)} 100%{transform:translate(40px,40px)} }
/* 屏幕技能键 */
#actions { position: fixed; left: 26px; bottom: 96px; z-index: 12; width: 170px; height: 190px; pointer-events: auto; user-select: none; -webkit-user-select: none; }
.ap {
  position: absolute; padding: 0; letter-spacing: 0; text-indent: 0;
  font-family: 'Noto Serif SC', serif; font-weight: 900; font-size: 19px; color: #e8cf8e;
  background: rgba(10, 8, 5, .55); border: 1px solid rgba(232, 207, 142, .5); border-radius: 50%;
  backdrop-filter: blur(4px); animation: none; transition: all .12s; touch-action: none; cursor: pointer;
}
.ap::before { display: none; }
.ap.on, .ap:active { background: rgba(232, 207, 142, .85); color: #0a0906; box-shadow: 0 0 18px rgba(240, 185, 11, .7); transform: scale(1.1); }
.a-atk { width: 66px; height: 66px; right: 0; bottom: 46px; font-size: 24px; }        /* 主攻最大 */
.a-dodge { width: 48px; height: 48px; left: 22px; bottom: 12px; }
.a-jump { width: 48px; height: 48px; left: 0; bottom: 76px; }
.a-hq { width: 44px; height: 44px; right: 14px; top: 0; color: #b0c4ff; border-color: rgba(160,180,255,.5); }
.a-skill { width: 44px; height: 44px; left: 58px; bottom: 136px; color: #ffe9a0; }
.a-ult { width: 46px; height: 46px; left: 116px; bottom: 116px; color: #ff9a5e; border-color: rgba(255,120,60,.55); }
@media (max-width: 768px) {
  #actions { left: 18px; bottom: 110px; transform: scale(1.15); transform-origin: bottom left; }
}
/* 屏幕方向键 */
#dpad { position: fixed; right: 26px; bottom: 96px; z-index: 12; width: 150px; height: 150px; pointer-events: auto; user-select: none; -webkit-user-select: none; }
.dp {
  position: absolute; width: 48px; height: 48px; padding: 0; letter-spacing: 0; text-indent: 0;
  font-size: 17px; color: #e8cf8e; background: rgba(10, 8, 5, .55);
  border: 1px solid rgba(232, 207, 142, .5); border-radius: 10px;
  backdrop-filter: blur(4px); animation: none; transition: all .12s;
  touch-action: none; cursor: pointer;
}
.dp::before { display: none; }
.dp.on, .dp:active { background: rgba(232, 207, 142, .85); color: #0a0906; box-shadow: 0 0 18px rgba(240, 185, 11, .7); transform: scale(1.08); }
.d-up { left: 51px; top: 0; }
.d-left { left: 0; top: 51px; }
.d-right { right: 0; top: 51px; }
.d-down { left: 51px; bottom: 0; }
/* 手机端放大 */
@media (max-width: 768px) {
  #dpad { width: 190px; height: 190px; right: 18px; bottom: 110px; }
  .dp { width: 62px; height: 62px; font-size: 22px; }
  .d-up, .d-down { left: 64px; }
  .d-left, .d-right { top: 64px; }
}
@keyframes comboPop { 50% { transform: scale(1.28); } }
/* 技能就绪呼吸金光 */
#skill-icon.ready, #skill2-icon.ready, #skill3-icon.ready { border-color: #ffe9a0; box-shadow: 0 0 16px rgba(240,185,11,.55), inset 0 0 10px rgba(240,185,11,.25); animation: skillPulse 1.6s infinite; }
@keyframes skillPulse { 50% { box-shadow: 0 0 26px rgba(240,185,11,.95), inset 0 0 14px rgba(240,185,11,.4); } }
/* Boss 血条流光 */
#boss-fill { position: relative; overflow: hidden; }
#boss-fill::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.45) 50%, transparent 80%); animation: bossShimmer 1.5s infinite; transform: translateX(-100%); }
@keyframes bossShimmer { to { transform: translateX(100%); } }

/* 电影暗角（游戏中常驻） */
#vignette {
  position: fixed; inset: 0; z-index: 5; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.55) 100%);
}

/* ---------- 覆盖层（开始/结算/加载） ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  overflow-y: auto; padding: 4vh 20px 14vh;   /* 内容超高时可滚动，按钮永远够得着 */
  background: radial-gradient(ellipse at 50% 38%, rgba(14,12,6,.88), rgba(0,0,0,.97) 75%);
  color: #e8dcc0; text-align: center;
  animation: overlayIn .9s cubic-bezier(.2,.7,.2,1) both;
}
.overlay::-webkit-scrollbar { width: 0; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 标题区 ---------- */
.title-box { margin-bottom: 3vh; animation: riseIn 1.1s .1s cubic-bezier(.2,.7,.2,1) both; }
.title-ornament {
  display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 12px;
  font-size: 11px; letter-spacing: 8px; color: #9a8a5e;
}
.title-ornament i { display: block; width: 90px; height: 1px; background: linear-gradient(90deg, transparent, #b8963e); }
.title-ornament i:last-child { background: linear-gradient(90deg, #b8963e, transparent); }
.game-logo {
  font-size: clamp(34px, 5.5vw, 64px); font-weight: 900; letter-spacing: .18em; line-height: 1.1;
  background: linear-gradient(180deg, #fffbe8 0%, #e8cf8e 40%, #b8963e 78%, #f5e6b8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 30px rgba(184,150,62,.25));
}
.game-logo .dot { -webkit-text-fill-color: #b8963e; margin: 0 .1em; }
.game-sub { margin-top: 10px; font-size: 12px; letter-spacing: .5em; color: #8a7c58; text-indent: .5em; }

/* ---------- 神器选择（极简圣物位） ---------- */
.relic-select { animation: riseIn 1.1s .25s cubic-bezier(.2,.7,.2,1) both; }
.relic-title { font-size: 13px; letter-spacing: .45em; color: #9a8a5e; margin-bottom: 22px; text-indent: .45em; }
.token-grid { display: flex; gap: 12px; margin-bottom: 3vh; flex-wrap: wrap; justify-content: center; }
.token-card {
  width: 132px; padding: 14px 10px 12px; cursor: pointer; position: relative;
  background: linear-gradient(180deg, rgba(22,19,10,.55), rgba(8,7,4,.75));
  border: 1px solid rgba(184,150,62,.22);
  transition: all .28s cubic-bezier(.2,.7,.2,1);
}
.token-card::before, .token-card::after {  /* 四角发丝带 */
  content: ''; position: absolute; width: 12px; height: 12px; transition: all .28s;
}
.token-card::before { top: -1px; left: -1px; border-top: 1px solid rgba(232,207,142,.55); border-left: 1px solid rgba(232,207,142,.55); }
.token-card::after { bottom: -1px; right: -1px; border-bottom: 1px solid rgba(232,207,142,.55); border-right: 1px solid rgba(232,207,142,.55); }
.token-card:hover { transform: translateY(-5px); border-color: rgba(232,207,142,.6); background: linear-gradient(180deg, rgba(40,33,16,.6), rgba(14,11,6,.8)); }
.token-card.selected {
  border-color: #e8cf8e; transform: translateY(-5px);
  box-shadow: 0 12px 44px rgba(184,150,62,.28), inset 0 0 24px rgba(184,150,62,.12);
}
.token-card.selected::before, .token-card.selected::after { width: 100%; height: 100%; }
.token-icon {
  width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 900; color: #0a0906;
  box-shadow: 0 0 24px rgba(0,0,0,.5), 0 0 18px currentColor;
}
.token-name { font-size: 15px; font-weight: 700; letter-spacing: .2em; color: #f0e2b8; }
.token-tag { font-size: 11px; color: #b8963e; margin: 6px 0 10px; letter-spacing: .25em; }
.token-desc { font-size: 11px; color: #7d7154; line-height: 1.8; letter-spacing: .06em; }

/* ---------- 输入与按钮 ---------- */
#nickname {
  width: 300px; padding: 8px 6px; margin-bottom: 2.5vh; text-align: center;
  font-size: 14px; letter-spacing: .35em; color: #f0e2b8; text-indent: .35em;
  background: transparent; border: none; border-bottom: 1px solid rgba(184,150,62,.4);
  outline: none; transition: all .3s; animation: riseIn 1.1s .4s cubic-bezier(.2,.7,.2,1) both;
}
#nickname:focus { border-bottom-color: #e8cf8e; }
#nickname::placeholder { color: #5d5238; }

button {
  position: relative; padding: 15px 72px; font-size: 17px; font-weight: 700; letter-spacing: .5em; text-indent: .5em;
  color: #e8cf8e; background: transparent; border: 1px solid rgba(232,207,142,.5);
  cursor: pointer; overflow: hidden; transition: all .35s cubic-bezier(.2,.7,.2,1);
  animation: riseIn 1.1s .5s cubic-bezier(.2,.7,.2,1) both;
}
button::before {  /* 悬停填充扫过 */
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, #e8cf8e, #b8963e);
  transform: scaleX(0); transform-origin: left; transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
button:hover:not(:disabled) { color: #0a0906; border-color: #e8cf8e; box-shadow: 0 0 44px rgba(184,150,62,.35); }
button:hover:not(:disabled)::before { transform: scaleX(1); }
button:disabled { opacity: .3; cursor: not-allowed; }

.controls-help {
  position: static; margin-top: 3.5vh; display: flex; gap: 14px; align-items: center;
  font-size: 12px; color: #6d6146; letter-spacing: .15em; flex-wrap: wrap; justify-content: center;
  animation: riseIn 1.1s .65s cubic-bezier(.2,.7,.2,1) both;
}
.controls-help b { color: #c8b070; font-weight: 700; margin-right: 4px; }
.controls-help i { color: #3d3524; font-style: normal; }
@keyframes riseIn { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* ---------- 联机提示 ---------- */
#online-count {
  position: absolute; top: 22px; right: 26px; font-size: 11px; letter-spacing: .3em;
  color: #c8b070; text-shadow: 0 2px 8px #000; padding: 7px 0 7px 14px;
  border-left: 1px solid rgba(184,150,62,.5);
}
#online-count:empty { display: none; }
#toast {
  position: fixed; top: 84px; left: 50%; transform: translateX(-50%) translateY(-6px); z-index: 18;
  font-size: 13px; letter-spacing: .3em; color: #e8cf8e; text-shadow: 0 2px 10px #000;
  opacity: 0; pointer-events: none; transition: all .35s;
}
#toast::before, #toast::after { content: '—'; color: #b8963e; margin: 0 14px; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 战斗 HUD（战神式：细条 · 斜切 · 小字） ---------- */
/* ===== 现代游戏 HUD：玻璃拟态面板 + 圆角技能槽 ===== */
#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#player-bar {
  position: absolute; left: 26px; bottom: 24px; width: min(360px, 42vw);
  padding: 12px 16px 14px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(16,14,22,.78), rgba(8,7,12,.72));
  border: 1px solid rgba(232,207,142,.22);
  box-shadow: 0 8px 30px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.07);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.hero-name {
  font-size: 13px; font-weight: 700; letter-spacing: .24em; color: #f0e6cc;
  text-shadow: 0 2px 8px #000; margin-bottom: 8px; display: flex; align-items: baseline;
}
.hero-name::before { content: ''; width: 8px; height: 8px; border-radius: 2px; margin-right: 8px;
  background: linear-gradient(135deg, #f0b90b, #b8963e); box-shadow: 0 0 8px rgba(240,185,11,.8); transform: translateY(-1px); }
.hero-name span { color: #b8963e; font-size: 11px; margin-left: 10px; letter-spacing: .15em; }
.bar {
  position: relative; height: 13px; background: rgba(0,0,0,.6);
  border: 1px solid rgba(232,207,142,.3); border-radius: 4px; overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.6);
}
#hp-fill {
  height: 100%; width: 100%; border-radius: 3px;
  background: linear-gradient(180deg, #ffe9a8 0%, #f0c95e 45%, #c99a2e 100%);
  box-shadow: 0 0 14px rgba(240,201,94,.55); transition: width .18s;
}
#hp-num {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 10px; font-weight: 700; color: #fff; letter-spacing: .05em;
  font-variant-numeric: tabular-nums; text-shadow: 0 1px 3px #000; z-index: 2;
}
.skill-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
#skill-icon, #skill2-icon, #skill3-icon {
  position: relative; width: 52px; height: 52px; border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(232,207,142,.4); background: linear-gradient(180deg, rgba(30,26,18,.9), rgba(12,10,8,.9));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08);
}
#skill2-icon { border-color: rgba(140,160,255,.45); background: linear-gradient(180deg, rgba(24,26,44,.9), rgba(10,10,20,.9)); }
#skill3-icon { border-color: rgba(255,130,70,.5); background: linear-gradient(180deg, rgba(44,24,16,.9), rgba(20,10,8,.9)); }
#skill-key, #skill2-key, #skill3-key {
  position: absolute; top: 4px; left: 5px; min-width: 15px; height: 15px; line-height: 15px;
  font-size: 10px; font-weight: 800; text-align: center; color: #0a0908; border-radius: 4px;
  background: linear-gradient(180deg, #ffe9a8, #d8b45e); box-shadow: 0 1px 4px rgba(0,0,0,.5); z-index: 3;
}
#skill2-key { background: linear-gradient(180deg, #c8d4ff, #8aa0e8); }
#skill3-key { background: linear-gradient(180deg, #ffc898, #e88a4e); }
#skill-cd, #skill2-cd, #skill3-cd { position: absolute; left: 0; bottom: 0; width: 100%; height: 0%; background: rgba(4,4,8,.82); backdrop-filter: blur(2px); }
.hero-grid { margin-bottom: 3vh; }
#skill-name { font-size: 11px; letter-spacing: .12em; color: #9a8a68; text-shadow: 0 2px 6px #000; max-width: 260px; }

/* 关卡标题：电影式中央大字 */
#level-tip {
  position: absolute; top: 20%; width: 100%; text-align: center;
  font-size: clamp(26px, 3.4vw, 42px); font-weight: 900; letter-spacing: .45em; text-indent: .45em;
  color: #f0e2b8; text-shadow: 0 0 50px rgba(184,150,62,.5), 0 4px 14px #000;
  opacity: 0; transition: opacity .8s;
}

/* Boss 血条：顶部居中 + 分段刻度 + 名牌 */
#boss-bar { position: absolute; top: 40px; left: 50%; transform: translateX(-50%); width: min(640px, 64vw); }
#boss-name {
  text-align: center; font-size: 14px; font-weight: 700; letter-spacing: .5em; text-indent: .5em;
  color: #f0c0b0; text-shadow: 0 2px 12px #000; margin-bottom: 8px;
}
.bar.boss {
  height: 10px; border-radius: 5px; border-color: rgba(255,140,100,.4);
  background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(10% - 1px), rgba(0,0,0,.55) calc(10% - 1px), rgba(0,0,0,.55) 10%);
}
#boss-fill { height: 100%; width: 100%; border-radius: 4px; background: linear-gradient(180deg, #ffb08a 0%, #e85a32 55%, #b03018 100%); box-shadow: 0 0 14px rgba(255,100,60,.55); transition: width .18s; }

/* 剧情字幕：无框电影字幕 */
#dialog {
  position: absolute; bottom: 13%; width: 100%; text-align: center; padding: 0 8vw;
  font-size: clamp(15px, 1.5vw, 19px); letter-spacing: .12em; color: #f0e8d0; line-height: 1.9;
  text-shadow: 0 2px 4px #000, 0 0 24px rgba(0,0,0,.9);
}
#dialog b { color: #e8cf8e; font-weight: 700; margin-right: .4em; }

/* ---------- 结算 ---------- */
#end-title {
  font-size: clamp(40px, 6vw, 72px); font-weight: 900; letter-spacing: .3em; text-indent: .3em;
  margin: 20px 0 26px;
  background: linear-gradient(180deg, #fffbe8, #e8cf8e 55%, #b8963e);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 8px 40px rgba(184,150,62,.3));
  animation: riseIn 1.2s .2s cubic-bezier(.2,.7,.2,1) both;
}
.end-divider { width: 120px; height: 1px; background: linear-gradient(90deg, transparent, #b8963e, transparent); margin-bottom: 26px; }
#end-desc { font-size: 14px; letter-spacing: .18em; color: #9a8a68; line-height: 2.4; margin-bottom: 5vh; max-width: 640px; }
#end-desc b { color: #e8cf8e; }

.loading-text { font-size: 15px; letter-spacing: .6em; text-indent: .6em; color: #b8963e; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ===== DNF 风格底部快捷栏（覆盖旧技能槽样式） ===== */
#dnf-bar {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 7px; pointer-events: none;
}
#dnf-bar .hero-line { display: flex; align-items: baseline; gap: 10px; font-size: 12px; color: #e8dcc0; text-shadow: 0 1px 4px #000; letter-spacing: .12em; }
#dnf-bar .hero-line #skill-name { color: #b8963e; font-size: 11px; }
#dnf-bar .bars { display: flex; gap: 8px; }
.dnf-hpmp {
  position: relative; width: 210px; height: 15px; background: #07070d;
  border: 1px solid rgba(220,190,120,.45); border-radius: 3px; overflow: hidden;
  box-shadow: inset 0 2px 5px rgba(0,0,0,.8), 0 2px 10px rgba(0,0,0,.5);
}
.dnf-hpmp > div { height: 100%; transition: width .15s; }
#hp-fill { background: linear-gradient(180deg, #ff9a8a 0%, #e83a2a 50%, #a81505 100%); width: 100%; }
#mp-fill { background: linear-gradient(180deg, #8ac2ff 0%, #2a6ae8 50%, #0a34a0 100%); width: 100%; }
.dnf-hpmp span {
  position: absolute; inset: 0; text-align: center; font-size: 10px; font-weight: 700;
  line-height: 15px; color: #fff; text-shadow: 0 1px 2px #000; font-variant-numeric: tabular-nums; letter-spacing: .05em;
}
.slot-row { display: flex; gap: 7px; }
.slot {
  position: relative; width: 50px; height: 50px; border-radius: 7px; overflow: hidden;
  background: linear-gradient(180deg, #262636 0%, #12121c 100%);
  border: 2px solid #6a5a34;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), inset 0 -8px 14px rgba(0,0,0,.5), 0 4px 12px rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
}
.slot i { font-style: normal; font-size: 19px; color: #f0d890; text-shadow: 0 0 10px rgba(240,185,11,.55); }
.slot.basic { border-color: #3c3c4a; }
.slot.basic i { color: #b8b8c8; text-shadow: none; font-size: 15px; }
.slot .k {
  position: absolute; top: 2px; left: 3px; z-index: 3; padding: 0 4px; line-height: 13px;
  font-size: 9px; font-weight: 800; color: #14100a; border-radius: 2px;
  background: linear-gradient(180deg, #ffe9a8, #cfa450);
}
#skill-icon, #skill2-icon, #skill3-icon {
  position: relative; width: 50px; height: 50px; border-radius: 7px; overflow: hidden;
  background: linear-gradient(180deg, #262636 0%, #12121c 100%);
  border: 2px solid #6a5a34; transform: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), inset 0 -8px 14px rgba(0,0,0,.5), 0 4px 12px rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
}
#skill2-icon { border-color: #3a4a7a; }
#skill3-icon { border-color: #7a4a2a; }
#skill2-icon i { color: #9ab0ff; text-shadow: 0 0 10px rgba(120,140,255,.6); }
#skill3-icon i { color: #ffab7a; text-shadow: 0 0 10px rgba(255,130,70,.6); }
#skill-cd, #skill2-cd, #skill3-cd { position: absolute; left: 0; bottom: 0; width: 100%; height: 0%; background: rgba(4,4,10,.85); z-index: 2; }
#skill-icon.ready, #skill2-icon.ready, #skill3-icon.ready {
  border-color: #ffe9a0;
  box-shadow: 0 0 16px rgba(240,185,11,.75), inset 0 0 10px rgba(240,185,11,.3);
  animation: slotPulse 1.6s ease-in-out infinite;
}
@keyframes slotPulse { 50% { box-shadow: 0 0 6px rgba(240,185,11,.4), inset 0 0 6px rgba(240,185,11,.15); } }

/* ================= 网游化 UI：公告 / 聊天 / 排行榜 / 经验 / 警告 ================= */
/* 等级徽章 + 经验条 */
#lv-badge { position: fixed; right: 30px; top: 22px; z-index: 12; display: flex; align-items: center; gap: 7px; pointer-events: none; font-family: 'Noto Serif SC', serif; }
#lv-badge b { font-size: 24px; font-weight: 900; color: #ffd75e; text-shadow: 0 0 12px rgba(240,185,11,.9), 0 2px 4px #000; line-height: 1; }
#lv-badge span { font-size: 12px; color: #c8b070; letter-spacing: .2em; }
#xp-bar { width: 130px; height: 5px; background: rgba(20,16,8,.7); border: 1px solid rgba(184,150,62,.55); border-radius: 3px; overflow: hidden; }
#xp-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #b8963e, #ffe9a0); box-shadow: 0 0 8px rgba(240,185,11,.8); transition: width .3s; }

/* 全服公告横幅（顶部居中滚动播报） */
#announce {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%) translateY(-8px); z-index: 16;
  padding: 8px 34px; font-family: 'Noto Serif SC', serif; font-size: 15px; letter-spacing: .28em; text-indent: .28em;
  color: #ffe9a0; text-shadow: 0 0 10px rgba(240,185,11,.8), 0 2px 4px #000; white-space: nowrap;
  background: linear-gradient(90deg, transparent, rgba(10,8,5,.72) 18%, rgba(10,8,5,.72) 82%, transparent);
  border-top: 1px solid rgba(184,150,62,.5); border-bottom: 1px solid rgba(184,150,62,.5);
  opacity: 0; pointer-events: none; transition: opacity .35s, transform .35s;
}
#announce.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#announce.warn { color: #ff6a5a; text-shadow: 0 0 12px rgba(255,60,40,.9), 0 2px 4px #000; border-color: rgba(255,90,74,.55); }
#announce.lv { color: #a8ffc8; text-shadow: 0 0 12px rgba(80,255,150,.8), 0 2px 4px #000; border-color: rgba(120,255,170,.5); }

/* Boss 登场警告（全屏红色警报） */
#boss-warn {
  position: fixed; top: 34vh; left: 0; right: 0; z-index: 17; text-align: center; pointer-events: none;
  font-family: 'Noto Serif SC', serif; opacity: 0;
}
#boss-warn span { display: block; font-size: 17px; letter-spacing: .8em; text-indent: .8em; color: #ff5a4a; text-shadow: 0 0 14px rgba(255,40,30,.9); }
#boss-warn b { display: block; margin-top: 10px; font-size: 44px; font-weight: 900; letter-spacing: .3em; text-indent: .3em; color: #ffe9a0; text-shadow: 0 0 24px rgba(240,185,11,.95), 0 4px 8px #000; }
#boss-warn.show { animation: warnIn 2.4s ease-out forwards; }
@keyframes warnIn {
  0% { opacity: 0; transform: scale(1.35); } 8% { opacity: 1; transform: scale(1); }
  14% { opacity: .35; } 22% { opacity: 1; } 30% { opacity: .4; } 38% { opacity: 1; }
  82% { opacity: 1; } 100% { opacity: 0; }
}

/* 连杀播报 */
#streak {
  position: fixed; top: 24vh; left: 50%; transform: translateX(-50%); z-index: 16; pointer-events: none;
  font-family: 'Noto Serif SC', serif; font-size: 34px; font-weight: 900; font-style: italic;
  letter-spacing: .3em; text-indent: .3em; color: #ffcf3d; white-space: nowrap;
  text-shadow: 0 0 18px rgba(255,180,30,1), 0 3px 6px #000;
}
#streak.pop { animation: streakPop 1.5s ease-out forwards; }
@keyframes streakPop {
  0% { opacity: 0; transform: translateX(-50%) scale(2.1); } 12% { opacity: 1; transform: translateX(-50%) scale(1); }
  75% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) translateY(-18px); }
}

/* 世界聊天（左下角） */
#chat-box { position: fixed; left: 26px; bottom: 12px; z-index: 12; width: 320px; pointer-events: none; }
#chat-log { max-height: 148px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.chat-line {
  margin-top: 3px; padding: 3px 10px; font-size: 12.5px; line-height: 1.5; color: #e8dcc0;
  text-shadow: 0 1px 3px #000; background: rgba(8,6,4,.5); border-left: 2px solid rgba(184,150,62,.5);
  border-radius: 3px; word-break: break-all; animation: chatIn .25s ease-out;
}
.chat-line.sys { color: #9fd8a8; border-left-color: rgba(120,255,170,.5); font-style: italic; }
.chat-line.me { border-left-color: #f0b90b; }
@keyframes chatIn { from { opacity: 0; transform: translateX(-10px); } }
#chat-input {
  width: 100%; margin-top: 6px; padding: 6px 10px; font-size: 13px; color: #ffe9a0;
  background: rgba(8,6,4,.85); border: 1px solid rgba(240,185,11,.65); border-radius: 4px;
  outline: none; pointer-events: auto; font-family: inherit;
}
#chat-hint { margin-top: 4px; font-size: 10px; letter-spacing: .18em; color: rgba(200,176,112,.55); text-shadow: 0 1px 2px #000; }

/* 在线战力榜（按住 Tab） */
#rank {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 18;
  min-width: 380px; padding: 22px 26px 18px; pointer-events: none;
  background: rgba(8,6,4,.88); border: 1px solid rgba(184,150,62,.65); border-radius: 6px;
  box-shadow: 0 0 40px rgba(0,0,0,.8), inset 0 0 30px rgba(240,185,11,.06);
  font-family: 'Noto Serif SC', serif;
}
.rank-title { text-align: center; font-size: 15px; letter-spacing: .4em; text-indent: .4em; color: #ffe9a0; margin-bottom: 14px; }
.rank-row { display: flex; align-items: baseline; gap: 12px; padding: 6px 4px; font-size: 13.5px; color: #d8c8a0; border-bottom: 1px solid rgba(184,150,62,.18); }
.rank-row:last-child { border-bottom: none; }
.rank-row.me { color: #ffd75e; }
.rank-row .rk { width: 26px; color: #b8963e; font-weight: 900; }
.rank-row .rn { flex: 1; font-weight: 700; }
.rank-row .rh { color: #8a7c58; font-size: 12px; }
.rank-row .rl { width: 56px; text-align: right; color: #a8ffc8; }
.rank-row .rk2 { width: 74px; text-align: right; }

/* ================= 专业化精修：武器强化 / 称号 / 装饰边框 ================= */
/* 武器强化栏 */
#weapon-hud { margin-top: 5px; display: flex; align-items: baseline; gap: 10px; font-family: 'Noto Serif SC', serif; font-size: 12.5px; color: #c8b070; letter-spacing: .12em; }
#weapon-hud b { font-size: 16px; font-weight: 900; color: #ffd75e; text-shadow: 0 0 10px rgba(240,185,11,.85), 0 1px 3px #000; }
#weapon-hud em { font-style: normal; font-size: 10.5px; color: #8a7c58; border: 1px solid rgba(184,150,62,.45); border-radius: 3px; padding: 1px 7px; letter-spacing: .2em; text-indent: .2em; }
/* 称号 */
#lv-title { font-style: normal; font-size: 11px; color: #a8ffc8; letter-spacing: .22em; text-shadow: 0 0 8px rgba(80,255,150,.5), 0 1px 3px #000; }
/* 快捷栏专业边框：顶部发丝线 + 两侧金角 */
#dnf-bar { border-top: 1px solid rgba(184,150,62,.35); padding-top: 10px; }
#dnf-bar::before, #dnf-bar::after {
  content: ''; position: absolute; top: -1px; width: 34px; height: 5px;
  border-top: 2px solid rgba(240,185,11,.8);
}
#dnf-bar::before { left: 0; border-left: 2px solid rgba(240,185,11,.8); }
#dnf-bar::after { right: 0; border-right: 2px solid rgba(240,185,11,.8); }
/* Boss 血条两侧金饰 */
#boss-bar::before, #boss-bar::after {
  content: '◆'; position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 11px; color: #b8963e; text-shadow: 0 0 8px rgba(240,185,11,.8);
}
#boss-bar::before { left: -22px; }
#boss-bar::after { right: -22px; }

/* ================= 复活系统 ================= */
#revive-hud { color: #ff8a9a; text-shadow: 0 0 8px rgba(255,90,120,.6), 0 1px 3px #000; }
#revive {
  position: fixed; top: 38vh; left: 50%; transform: translateX(-50%); z-index: 19;
  text-align: center; pointer-events: none; font-family: 'Noto Serif SC', serif;
  animation: reviveIn .4s ease-out;
}
@keyframes reviveIn { from { opacity: 0; transform: translateX(-50%) scale(1.2); } }
.revive-title { font-size: 42px; font-weight: 900; letter-spacing: .5em; text-indent: .5em; color: #ff5a4a; text-shadow: 0 0 22px rgba(255,40,30,.9), 0 4px 8px #000; }
.revive-info { margin-top: 12px; font-size: 15px; letter-spacing: .3em; text-indent: .3em; color: #ffe9a0; text-shadow: 0 0 10px rgba(240,185,11,.7), 0 2px 4px #000; }
.revive-info b { font-size: 22px; color: #ffd75e; }
.revive-left { margin-top: 8px; font-size: 12.5px; letter-spacing: .28em; text-indent: .28em; color: #c8b070; text-shadow: 0 2px 4px #000; }
.revive-left b { color: #ff8a9a; }

/* ================= 故事序章：开场剧情介绍 ================= */
#intro {
  position: fixed; inset: 0; z-index: 60; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 42%, rgba(20,16,30,.93), rgba(3,3,8,.98));
  transition: opacity .9s;
}
#intro.out { opacity: 0; pointer-events: none; }
#intro-text { max-width: 660px; padding: 0 30px; text-align: center; }
.intro-line {
  font-family: 'Noto Serif SC', serif; font-size: 19px; line-height: 2.2;
  letter-spacing: .24em; color: #d8c8a0; text-shadow: 0 2px 8px #000;
  animation: introIn 1.2s ease-out;
}
.intro-line.hl { color: #ffd75e; text-shadow: 0 0 14px rgba(240,185,11,.7), 0 2px 6px #000; }
@keyframes introIn { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
#intro-hint { margin-top: 42px; font-size: 13px; letter-spacing: .5em; text-indent: .5em; color: #b8963e; animation: hintPulse 1.6s infinite; }
@keyframes hintPulse { 50% { opacity: .3; } }
#intro-skip {
  position: absolute; right: 34px; bottom: 30px; padding: 8px 18px;
  background: none; border: 1px solid rgba(184,150,62,.5); border-radius: 4px;
  color: #c8b070; font-size: 12px; letter-spacing: .3em; text-indent: .3em;
  cursor: pointer; transition: all .2s; font-family: inherit;
}
#intro-skip:hover { background: rgba(240,185,11,.15); color: #ffe9a0; }

/* ================= 链上参与：钱包连接 / 自定义代币 ================= */
.wallet-box { margin-top: 16px; width: min(560px, 86vw); text-align: center; }
#wallet-btn {
  padding: 10px 30px; background: linear-gradient(160deg, rgba(61,220,132,.12), rgba(240,185,11,.08));
  border: 1px solid rgba(61,220,132,.6); border-radius: 6px; color: #7dffb0;
  font-size: 14px; letter-spacing: .3em; text-indent: .3em; cursor: pointer;
  font-family: 'Noto Serif SC', serif; transition: all .25s;
  text-shadow: 0 0 8px rgba(61,220,132,.5);
}
#wallet-btn:hover { background: rgba(61,220,132,.2); box-shadow: 0 0 18px rgba(61,220,132,.35); }
#wallet-info { margin-top: 10px; font-size: 12px; color: #c8b070; letter-spacing: .12em; }
#wallet-info b { color: #ffe9a0; }
#custom-token-box { margin-top: 10px; }
.wallet-row { display: flex; gap: 8px; }
#token-addr {
  flex: 1; padding: 9px 14px; background: rgba(0,0,0,.5); border: 1px solid rgba(184,150,62,.5);
  border-radius: 4px; color: #ffe9a0; font-size: 12.5px; letter-spacing: .05em;
  font-family: inherit; outline: none;
}
#token-addr:focus { border-color: rgba(240,185,11,.8); box-shadow: 0 0 10px rgba(240,185,11,.25); }
#token-addr::placeholder { color: #6a5d40; }
#token-load {
  padding: 9px 18px; background: rgba(240,185,11,.14); border: 1px solid rgba(240,185,11,.6);
  border-radius: 4px; color: #ffd75e; font-size: 12.5px; letter-spacing: .2em; text-indent: .2em;
  cursor: pointer; font-family: 'Noto Serif SC', serif; white-space: nowrap; transition: all .2s;
}
#token-load:hover { background: rgba(240,185,11,.28); }
#token-msg { margin-top: 8px; font-size: 12px; color: #b0a080; min-height: 16px; letter-spacing: .08em; }
#token-msg.ok { color: #3ddc84; }
/* 自定义代币神器卡：翡翠色认证边框 */
.token-card.custom-token { border-color: rgba(61,220,132,.65); box-shadow: 0 0 14px rgba(61,220,132,.25); }
.token-card.custom-token .token-tag { color: #3ddc84; }

/* ================= 黑洞献祭：销毁复活 / 代币支付弹窗 ================= */
#burn-revive {
  position: fixed; top: 32vh; left: 50%; transform: translateX(-50%); z-index: 25;
  text-align: center; font-family: 'Noto Serif SC', serif;
  background: rgba(8,4,14,.9); border: 1px solid rgba(140,60,220,.55); border-radius: 8px;
  padding: 30px 46px; box-shadow: 0 0 30px rgba(90,20,160,.45), inset 0 0 24px rgba(0,0,0,.6);
  animation: reviveIn .4s ease-out;
}
#burn-revive .burn-title { font-size: 30px; font-weight: 900; letter-spacing: .4em; text-indent: .4em; color: #c86bff; text-shadow: 0 0 18px rgba(160,60,255,.9), 0 3px 6px #000; }
#burn-revive .burn-info { margin-top: 14px; font-size: 13.5px; line-height: 2; letter-spacing: .14em; color: #cbb8e8; }
#burn-revive .burn-info b { color: #ffd75e; }
.burn-btns { margin-top: 18px; display: flex; gap: 12px; justify-content: center; }
.burn-btns button {
  padding: 9px 22px; font-family: 'Noto Serif SC', serif; font-size: 13px;
  letter-spacing: .24em; text-indent: .24em; cursor: pointer; border-radius: 4px; transition: all .2s;
}
#burn-yes, #burn-ok {
  background: linear-gradient(160deg, rgba(140,60,220,.3), rgba(240,185,11,.15));
  border: 1px solid rgba(200,107,255,.7); color: #e8c8ff;
  text-shadow: 0 0 8px rgba(180,80,255,.6);
}
#burn-yes:hover, #burn-ok:hover { box-shadow: 0 0 16px rgba(160,60,255,.5); }
.burn-btns .ghost { background: none; border: 1px solid rgba(150,130,100,.5); color: #a89878; }
.burn-btns .ghost:hover { border-color: rgba(200,180,130,.8); color: #d8c8a0; }
#burn-modal {
  position: fixed; inset: 0; z-index: 28; display: flex; align-items: center; justify-content: center;
  background: rgba(2,2,6,.72); backdrop-filter: blur(3px);
}
#burn-modal .burn-box {
  background: rgba(10,6,16,.95); border: 1px solid rgba(140,60,220,.55); border-radius: 8px;
  padding: 28px 40px; text-align: center; font-family: 'Noto Serif SC', serif;
  box-shadow: 0 0 30px rgba(90,20,160,.4); max-width: min(460px, 86vw);
}
#burn-title { font-size: 20px; font-weight: 900; letter-spacing: .4em; text-indent: .4em; color: #c86bff; text-shadow: 0 0 14px rgba(160,60,255,.8); }
#burn-desc { margin-top: 14px; font-size: 13.5px; line-height: 2; letter-spacing: .12em; color: #cbb8e8; }
#burn-desc b { color: #ffd75e; }

/* ================= 移动端适配 ================= */
html, body { touch-action: none; overscroll-behavior: none; }
button { -webkit-tap-highlight-color: transparent; }

/* 虚拟摇杆（触屏） */
#joy {
  position: fixed; right: 30px; bottom: 110px; z-index: 12;
  width: 128px; height: 128px; border-radius: 50%;
  background: radial-gradient(circle, rgba(20,16,10,.35), rgba(10,8,6,.6));
  border: 1.5px solid rgba(240,185,11,.4);
  box-shadow: inset 0 0 24px rgba(0,0,0,.5), 0 0 18px rgba(240,185,11,.12);
  pointer-events: auto; user-select: none; -webkit-user-select: none;
}
#joy-knob {
  position: absolute; left: 50%; top: 50%; margin: -26px 0 0 -26px;
  width: 52px; height: 52px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,215,94,.9), rgba(240,185,11,.55) 55%, rgba(120,80,10,.7));
  border: 1px solid rgba(255,230,150,.7);
  box-shadow: 0 0 14px rgba(240,185,11,.45);
  pointer-events: none;
}
/* 屏幕功能键：强化/复活 */
#actions2 { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 12; display: flex; gap: 10px; pointer-events: auto; }
.ap2 {
  padding: 8px 16px; border-radius: 20px; font-family: 'Noto Serif SC', serif; font-size: 13px; letter-spacing: .2em; text-indent: .2em;
  background: rgba(12,10,8,.72); border: 1px solid rgba(240,185,11,.55); color: #ffd75e;
  box-shadow: 0 0 10px rgba(240,185,11,.15); cursor: pointer; user-select: none; -webkit-user-select: none;
}
.ap2:active { background: rgba(240,185,11,.25); }

/* 竖屏提示已移除：竖屏也可正常游玩 */

/* 小屏 HUD 缩放 */
@media (max-width: 820px) {
  #dnf-bar { transform: scale(.8); transform-origin: bottom center; bottom: 4px; }
  #boss-bar { width: 72vw; }
  #boss-warn span { font-size: 22px; }
  #announce h1 { font-size: 28px; }
  #announce p { font-size: 13px; }
  #lv-badge { transform: scale(.82); transform-origin: top right; }
  #weapon-hud { transform: scale(.85); transform-origin: bottom left; }
  #chat-box { transform: scale(.82); transform-origin: bottom left; }
  #chat-hint { display: none; }   /* 手机无键盘：隐藏聊天提示 */
  #rank { transform: scale(.85); transform-origin: top right; }
  #ticker { transform: scale(.78); transform-origin: top left; }
  #combo { transform: scale(.85); transform-origin: right center; }
  .revive-info, .revive-left { font-size: 13px; }
  #burn-revive { width: 86vw; padding: 22px 18px; }
  #burn-revive .burn-title { font-size: 22px; }
  #burn-modal .burn-box { padding: 22px 20px; }
}
/* 超小屏进一步压缩 */
@media (max-width: 480px) {
  #dnf-bar { transform: scale(.68); }
  #lv-badge, #weapon-hud, #chat-box { transform: scale(.7); }
  #joy { right: 18px; bottom: 96px; width: 112px; height: 112px; }
  #actions { transform: scale(1.0); }
}
