/* ============================================================
 * 《深海回信：共情层幸存者》— 样式 v2（明日方舟式 2D 界面）
 * 语言：斜切多边形 / 粗描边 / 硬影 / 米白+石墨灰+青 / 顶条
 * 字体：得意黑（标题）+ 微软雅黑（正文）
 * ============================================================ */
@font-face {
  font-family: "SmileySans";
  src: url("assets/fonts/SmileySans-Oblique.otf") format("opentype");
  font-weight: 400; font-display: swap;
}

:root {
  /* 方舟色阶（v2 配色协调化：卡片与画布同色相蓝灰系，消除中性灰突兀感） */
  --ink: #161919;            /* 近黑 */
  --canvas: #0e1215;         /* 深海画布底（蓝黑） */
  --panel: #fdfdfb;          /* 米白面板 */
  --panel-muted: #e9ebee;
  --graphite: #273243;       /* 深蓝灰卡片（与画布同色相） */
  --graphite2: #334054;
  --graphite3: #202939;
  --line-black: #0a0c0e;
  /* 强调（柔和化：降低荧光感） */
  --cyan: #2fa8e4;
  --orange: #ff6b2c;
  --gold: #f1c644;
  --red: #e33b3b;
  --green: #46c47c;
  /* 文字 */
  --text-hi: #f8f8f5;
  --text-dim: #9fb0bf;
  --text-faint: #6d767b;
  /* 几何 */
  --cut-sm: 6px;
  --cut-md: 12px;
  --cut-lg: 22px;
  --radius-subtle: 2px;
  /* 动效 */
  --m-fast: 120ms;
  --m-base: 200ms;
  --m-slow: 420ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  /* 字体 */
  --font-title: "SmileySans", "Microsoft YaHei", sans-serif;
  --font-body: "Microsoft YaHei", "PingFang SC", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; background: #07090b; overflow: hidden; font-family: var(--font-body); }
#stage-wrap { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
#stage { position: relative; width: 1280px; height: 720px; background: var(--canvas); overflow: hidden; flex: none; box-shadow: 0 0 90px rgba(0,0,0,.6); }

/* ============================================================
 * 通用层 / 剧情
 * ============================================================ */
.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s ease; }
#bg-a, #bg-b { z-index: 1; }
#cg-layer { z-index: 12; transition: opacity .6s ease; }
#black-overlay { position: absolute; inset: 0; background: #000; opacity: 0; transition: opacity .8s ease; z-index: 40; pointer-events: none; }
#flash-overlay { position: absolute; inset: 0; background: #fff; opacity: 0; transition: opacity .15s ease; z-index: 41; pointer-events: none; }
#chapter-title { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 45; opacity: 0; pointer-events: none; }
#chapter-title.show { opacity: 1; }
#chapter-title.fade-out { opacity: 0; transition: opacity .9s ease; }
#chapter-text { font-size: 42px; color: #f8f8f5; letter-spacing: 10px; font-family: var(--font-title); text-shadow: 0 4px 0 rgba(0,0,0,.6), 0 0 30px rgba(5,167,220,.85); }

#textbox { position: absolute; left: 60px; right: 60px; bottom: 42px; min-height: 118px; background: rgba(14,18,21,.92); border: 1px solid rgba(248,248,245,.16); border-radius: 2px; padding: 18px 26px 26px; z-index: 30; opacity: 0; transform: translateY(14px); transition: all .35s ease; backdrop-filter: blur(4px); border-top: 4px solid var(--cyan); }
#textbox.show { opacity: 1; transform: translateY(0); }
#name-tag { display: none; position: absolute; top: -18px; left: 24px; padding: 3px 14px; font-size: 14px; font-family: var(--font-title); color: #081018; background: var(--cyan); clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 100%, 10px 100%); }
#text-content { color: #eef3f6; font-size: 19px; line-height: 1.85; min-height: 66px; }
#text-content.narr { color: #a8b0b5; font-style: italic; }
#advance-hint { position: absolute; right: 24px; bottom: 10px; color: var(--cyan); font-size: 16px; opacity: 0; animation: bob 1.2s infinite; }
#skip-hint { position: absolute; right: 24px; top: 10px; color: #5a666c; font-size: 11px; opacity: .8; }
#advance-hint.show { opacity: 1; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ============================================================
 * 战斗层
 * ============================================================ */
#battle-screen { position: absolute; inset: 0; z-index: 10; display: none; }
#game { width: 1280px; height: 720px; display: block; background: #0a1116; }
#boss-bar { position: absolute; top: 66px; left: 50%; transform: translateX(-50%); width: 720px; display: none; text-align: center; z-index: 20; }
#boss-name { color: #ffd9a8; font-size: 20px; font-family: var(--font-title); text-shadow: 0 3px 0 rgba(0,0,0,.65), 0 0 14px rgba(255,120,60,.8); letter-spacing: 3px; margin-bottom: 6px; }
#boss-sub { color: #9fb6c4; font-size: 13px; margin-top: 4px; text-shadow: 0 1px 3px #000; }
#boss-hp { height: 14px; background: rgba(0,0,0,.6); border: 2px solid #0a0c0e; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); overflow: hidden; }
#boss-hp-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #ff5e19, #ffb84d); transition: width .2s linear; }
#loop-clock { position: absolute; top: 66px; right: 24px; color: #ffd9a8; font-size: 18px; font-family: var(--font-title); text-shadow: 0 2px 0 rgba(0,0,0,.6), 0 0 10px rgba(255,150,60,.9); display: none; z-index: 20; letter-spacing: 2px; }
/* 大招演出（DNF 式：右下角立绘 + 名字，不挡战斗画面） */
#ult-fx { position: absolute; inset: 0; display: none; z-index: 15; pointer-events: none; background: radial-gradient(ellipse at 78% 95%, rgba(140,220,255,.16), transparent 55%); }
#ult-frame { position: absolute; right: 22px; bottom: 14px; display: flex; flex-direction: column; align-items: flex-end; }
#ult-name { margin-top: 6px; font-size: 22px; color: #fff; letter-spacing: 5px; font-family: var(--font-title); text-shadow: 0 3px 0 rgba(0,0,0,.65), 0 0 16px #5aa2ff; padding: 3px 14px; background: rgba(10,14,17,.55); border-left: 4px solid var(--cyan); }
#ult-portrait { height: 440px; filter: drop-shadow(0 0 34px rgba(120,200,255,.9)); animation: ultin .55s cubic-bezier(.2,.9,.3,1.15); }
@keyframes ultin { 0% { transform: translateX(90px) scale(.92); opacity: 0; } 100% { transform: none; opacity: 1; } }
#tutorial-hint { position: absolute; left: 50%; bottom: 90px; transform: translateX(-50%); color: #d6e4ee; font-size: 14px; background: rgba(14,18,21,.85); border: 1px solid rgba(248,248,245,.2); border-top: 3px solid var(--cyan); padding: 6px 18px; display: none; z-index: 20; white-space: nowrap; clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 100%, 0 100%); }
#fps-note { position: absolute; left: 16px; top: 16px; color: #5a666c; font-size: 12px; z-index: 20; }

/* ============================================================
 * HUD（方舟式状态条 + 斜切格子）
 * ============================================================ */
#hud { position: absolute; top: 14px; left: 16px; right: 16px; display: none; z-index: 25; pointer-events: none; }
#hud-hp, #hud-energy, #hud-xp { position: relative; height: 22px; background: rgba(0,0,0,.55); border: 2px solid #0a0c0e; overflow: hidden; margin-bottom: 6px; clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); }
#hud-hp { width: 320px; }
#hud-energy { width: 320px; }
#hud-xp { width: 320px; }
#hud-hp::before, #hud-energy::before, #hud-xp::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.25), transparent 40%); pointer-events: none; z-index: 2; }
#hud-hp-fill { height: 100%; background: linear-gradient(90deg, #e33b3b, #ff7a5e); transition: width .15s; }
#hud-energy-fill { height: 100%; background: linear-gradient(90deg, #05a7dc, #7fd4ff); transition: width .15s; }
#hud-xp-fill { height: 100%; background: linear-gradient(90deg, #3c3c3c, #7a848a); transition: width .15s; }
#hud-hp-text, #hud-energy-text, #hud-xp-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: bold; text-shadow: 0 1px 2px #000; z-index: 3; letter-spacing: 1px; }
#hud-energy.full #hud-energy-fill { animation: en-full 1s infinite; }
@keyframes en-full { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.5); } }
/* 右上仪表组：金币 + 时间 */
#hud-meta { position: absolute; top: 0; right: 8px; display: flex; align-items: center; gap: 14px; background: rgba(14,18,21,.72); border: 2px solid #0a0c0e; border-top: 4px solid var(--cyan); padding: 6px 16px; clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 100%, 0 100%); }
#hud-gold { color: var(--gold); font-size: 18px; font-family: var(--font-title); text-shadow: 0 2px 0 rgba(0,0,0,.6); }
#hud-time { color: #dbe7ee; font-size: 18px; font-family: var(--font-title); text-shadow: 0 2px 0 rgba(0,0,0,.6); }
/* 武器/被动格：斜切格 + 凹槽 */
#hud-weapons { position: absolute; top: 104px; left: 0; display: flex; gap: 8px; }
#hud-weapons .hw { position: relative; width: 36px; height: 36px; background: rgba(14,18,21,.85); border: 2px solid #0a0c0e; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #dbe7ee; clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px); box-shadow: inset 0 0 0 1px rgba(248,248,245,.08); }
#hud-weapons .hw i { position: absolute; right: -3px; bottom: -3px; background: var(--graphite3); border: 2px solid #0a0c0e; font-size: 10px; font-style: normal; width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; font-family: var(--font-title); }
#hud-weapons .hw.hw-evolved { border-top: 4px solid var(--cyan); color: #7fd4ff; }
#hud-weapons .hw.hw-transcend { border-top: 4px solid var(--gold); color: #ffe9a8; box-shadow: inset 0 0 0 1px rgba(241,198,68,.5), 0 0 12px rgba(241,198,68,.55); animation: hw-pulse 1.2s infinite; }
#hud-weapons .hw.hw-transcend i { background: #3a2c05; color: var(--gold); }
#hud-passives { position: absolute; top: 146px; left: 0; display: flex; gap: 6px; }
#hud-passives .hpv { position: relative; width: 32px; height: 32px; background: rgba(14,18,21,.8); border: 2px solid #0a0c0e; display: flex; align-items: center; justify-content: center; font-size: 15px; color: #a8c4d4; clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px); }
#hud-passives .hpv i { position: absolute; right: -3px; bottom: -3px; background: #0a1c30; border: 2px solid #0a0c0e; font-size: 9px; font-style: normal; width: 14px; height: 14px; display: flex; align-items: center; justify-content: center; color: var(--cyan); }
/* BOSS 出场倒计时条 */
#hud-boss-in { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 380px; height: 14px; background: rgba(0,0,0,.6); border: 2px solid #0a0c0e; overflow: hidden; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
#hud-boss-in-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #05a7dc, #7fd4ff); transition: width .2s; }
#hud-boss-in.warn #hud-boss-in-fill { background: linear-gradient(90deg, #e33b3b, #ff8a9a); animation: bin-blink .6s infinite; }
@keyframes bin-blink { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
#hud-boss-in-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; text-shadow: 0 1px 2px #000; letter-spacing: 1px; }
@keyframes hw-pulse { 0%, 100% { box-shadow: inset 0 0 0 1px rgba(241,198,68,.5), 0 0 8px rgba(241,198,68,.4); } 50% { box-shadow: inset 0 0 0 1px rgba(241,198,68,.9), 0 0 18px rgba(241,198,68,.9); } }
#btn-spawnboss { position: absolute; top: 26px; right: 58px; pointer-events: auto; z-index: 30; }

/* 通用小按钮（斜切物理键） */
.tbtn { background: var(--graphite3); color: #dbe7ee; border: 2px solid #0a0c0e; padding: 5px 14px; font-size: 14px; cursor: pointer; font-family: var(--font-body); transition: all var(--m-fast) var(--ease); clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 100%, 0 100%); }
.tbtn:hover { filter: brightness(1.15); transform: translateY(-1px); }
.tbtn:active { transform: translateY(1px); filter: brightness(.9); }
.back-btn { position: absolute; top: 14px; left: 14px; z-index: 60; }

/* ============================================================
 * 深海商店（局外成长）
 * ============================================================ */
#shop-screen { position: absolute; inset: 0; background: var(--canvas); display: none; z-index: 55; overflow-y: auto; padding: 26px 44px; }
#shop-screen::before { content: ""; position: fixed; inset: 0; background: repeating-linear-gradient(-45deg, transparent 0 14px, rgba(248,248,245,.02) 14px 16px); pointer-events: none; }
.shop-head { font-size: 28px; color: var(--text-hi); font-family: var(--font-title); letter-spacing: 4px; display: flex; align-items: center; gap: 16px; margin-bottom: 4px; text-shadow: 0 3px 0 rgba(0,0,0,.55); }
.shop-head::before { content: ""; width: 10px; height: 34px; background: var(--orange); display: inline-block; }
.shop-head #shop-coins { font-size: 15px; color: var(--gold); font-family: var(--font-body); }
.shop-head .tbtn { margin-left: auto; }
.shop-sub { color: #8fa3af; font-size: 13px; margin-bottom: 20px; padding-left: 26px; border-left: 3px solid var(--cyan); }
.shop-item { display: flex; align-items: center; gap: 16px; background: var(--graphite); border: 3px solid #0a0c0e; padding: 14px 18px; margin-bottom: 12px; box-shadow: 4px 4px 0 rgba(0,0,0,.45); transition: all var(--m-base) var(--ease); }
.shop-item:hover { transform: translateY(-2px); box-shadow: 4px 6px 0 rgba(0,0,0,.5); }
.shop-item.maxed { opacity: .5; filter: grayscale(.7); }
.si-icon { font-size: 30px; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; background: var(--graphite3); border: 2px solid #0a0c0e; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); flex: none; }
.si-name { color: var(--text-hi); font-size: 16px; font-weight: bold; }
.si-lv { color: var(--gold); font-size: 12px; margin-left: 8px; font-family: var(--font-title); }
.si-desc { color: #a8b4bc; font-size: 12px; margin-top: 3px; }
.si-buy { margin-left: auto; min-width: 130px; background: var(--graphite3); }
.si-buy:not(:disabled) { border-top: 4px solid var(--gold); color: #ffe9a8; }
.si-buy:disabled { opacity: .5; cursor: not-allowed; }
.shop-ach { margin-top: 26px; }
.sa-title { color: var(--text-hi); font-size: 20px; font-family: var(--font-title); letter-spacing: 3px; margin-bottom: 12px; }
.sa-title::before { content: "◆ "; color: var(--orange); }
.sa-item { color: #8fa3af; font-size: 13px; padding: 6px 10px; border-bottom: 1px solid rgba(248,248,245,.1); }
.sa-item.got { color: var(--green); }
.sa-item span { color: var(--gold); float: right; font-family: var(--font-title); }
.title-meta { margin-top: 12px; color: #6d767b; font-size: 12px; letter-spacing: 1px; font-family: "Consolas", monospace; }
.menu-btns2 { display: flex; flex-direction: column; gap: 10px; justify-content: flex-start; align-items: flex-start; margin-top: 12px; }
.mbtn.test { background: rgba(40,20,60,.7); color: #d9b8ff; border-color: #0a0c0e; font-size: 12px; padding: 4px 14px; }
.mbtn.test.on { background: rgba(120,60,180,.8); color: #fff; box-shadow: 0 0 12px rgba(180,120,255,.6); }
.rs-meta { margin-top: 8px; color: var(--cyan); font-size: 13px; }
.rs-coin { color: var(--gold); font-family: var(--font-title); }

/* ============================================================
 * 升级三选一（方舟卡：类型顶条 + 粗描边 + 硬影）
 * ============================================================ */
#levelup-screen { position: absolute; inset: 0; background: rgba(7,9,11,.88); display: none; align-items: center; justify-content: center; flex-direction: column; z-index: 50; }
#levelup-screen::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, transparent 0 16px, rgba(248,248,245,.02) 16px 18px); pointer-events: none; }
.lu-title { font-size: 36px; color: var(--text-hi); font-family: var(--font-title); letter-spacing: 8px; text-shadow: 0 4px 0 rgba(0,0,0,.6), 0 0 24px rgba(5,167,220,.7); margin-bottom: 6px; }
.lu-sub { color: #8fa3af; font-size: 13px; margin-bottom: 30px; letter-spacing: 4px; }
#lu-cards { display: flex; gap: 28px; }
.lu-card { width: 310px; min-height: 210px; background: var(--graphite); border: 3px solid #0a0c0e; border-top: 8px solid var(--cyan); padding: 24px 22px 20px; cursor: pointer; text-align: center; transition: all var(--m-base) var(--ease); box-shadow: 6px 6px 0 rgba(0,0,0,.5); clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%); animation: lu-in .45s var(--ease) backwards; }
.lu-card:nth-child(2) { animation-delay: .08s; }
.lu-card:nth-child(3) { animation-delay: .16s; }
@keyframes lu-in { 0% { opacity: 0; transform: translateY(26px) scale(.94); } 100% { opacity: 1; transform: none; } }
.lu-card:hover { transform: translateY(-6px); box-shadow: 6px 12px 0 rgba(0,0,0,.55), 0 0 22px rgba(5,167,220,.35); filter: brightness(1.08); }
.lu-card.lu-passive { border-top-color: #b388ff; }
.lu-card.lu-stat { border-top-color: var(--gold); }
.lu-card.lu-transcend { border-top-color: var(--orange); background: linear-gradient(180deg, #4a3020, var(--graphite)); box-shadow: 6px 6px 0 rgba(0,0,0,.5), 0 0 22px rgba(255,94,25,.4); animation: lu-in .45s var(--ease) backwards, tr-glow 1.6s infinite alternate; }
@keyframes tr-glow { 0% { box-shadow: 6px 6px 0 rgba(0,0,0,.5), 0 0 14px rgba(255,94,25,.35); } 100% { box-shadow: 6px 6px 0 rgba(0,0,0,.5), 0 0 30px rgba(255,150,80,.75); } }
.lu-card .lc-icon { font-size: 40px; margin-bottom: 12px; display: inline-flex; width: 64px; height: 64px; align-items: center; justify-content: center; background: var(--graphite3); border: 2px solid #0a0c0e; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); box-shadow: inset 0 0 0 2px rgba(248,248,245,.06); }
.lu-card .lc-name { font-size: 19px; color: var(--text-hi); font-family: var(--font-title); margin-bottom: 10px; letter-spacing: 1px; }
.lu-card .lc-desc { font-size: 13px; color: #b8c4cc; line-height: 1.65; }
.lu-card .lc-desc .lc-line { display: block; }
.lu-card .lc-desc .lc-line:first-child { color: var(--gold); font-family: var(--font-title); letter-spacing: 1px; }
.lu-card .lc-desc .lc-quip { color: #8fa3af; font-style: italic; font-size: 11.5px; margin-top: 4px; }
.lu-card .lc-tag { margin-top: 12px; font-size: 12px; color: var(--gold); font-family: var(--font-title); letter-spacing: 2px; }
.lu-tip { margin-top: 28px; color: #5a666c; font-size: 12px; }

/* ============================================================
 * 标题画面（方舟主界面式：背景大图 + 右侧菜单 + 底部渐暗）
 * ============================================================ */
#title-screen { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 60; background: var(--canvas); }
#title-bg { position: absolute; inset: 0; z-index: 0; }
#title-bg img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.85) saturate(1.1); animation: title-zoom 40s ease-in-out infinite alternate; }
@keyframes title-zoom { 0% { transform: scale(1); } 100% { transform: scale(1.08); } }
#title-vignette { position: absolute; inset: 0; z-index: 1; pointer-events: none; background:
  linear-gradient(to bottom, rgba(7,9,11,.25), transparent 30%, transparent 65%, rgba(7,9,11,.85)),
  radial-gradient(ellipse at 30% 40%, transparent 30%, rgba(7,9,11,.55) 100%),
  linear-gradient(to right, rgba(7,9,11,.7), transparent 45%); }
.title-box { text-align: left; z-index: 2; position: absolute; left: 52px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: flex-start; }
.game-title { font-size: 78px; font-weight: normal; color: #f8f8f5; font-family: var(--font-title); letter-spacing: 12px; text-shadow: 4px 4px 0 rgba(0,0,0,.7), 0 0 44px rgba(5,167,220,.85); animation: title-glow 3s infinite; }
@keyframes title-glow { 0%,100% { text-shadow: 4px 4px 0 rgba(0,0,0,.7), 0 0 30px rgba(5,167,220,.7); } 50% { text-shadow: 4px 4px 0 rgba(0,0,0,.7), 0 0 60px rgba(90,190,240,.95); } }
.game-sub { font-size: 26px; color: var(--cyan); font-family: var(--font-title); letter-spacing: 16px; margin: 14px 0 2px; text-shadow: 2px 2px 0 rgba(0,0,0,.7); }
.game-tag { font-size: 13px; color: #8fa3af; letter-spacing: 6px; margin-bottom: 30px; }
.menu-btns { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.mbtn { background: var(--graphite); color: #dbe7ee; border: 3px solid #0a0c0e; border-top: 6px solid var(--cyan); padding: 10px 32px; font-size: 16px; cursor: pointer; transition: all var(--m-base) var(--ease); letter-spacing: 3px; font-family: var(--font-title); clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 100%, 0 100%); box-shadow: 4px 4px 0 rgba(0,0,0,.5); }
.mbtn:hover { filter: brightness(1.12); transform: translateY(-2px); box-shadow: 4px 6px 0 rgba(0,0,0,.55); }
.mbtn:active { transform: translateY(1px); box-shadow: 2px 2px 0 rgba(0,0,0,.5); }
.mbtn.main { background: linear-gradient(180deg, #0e5c7a, #0a3c52); border-top-color: #7fd4ff; color: #fff; }
.mbtn.main:hover { box-shadow: 4px 6px 0 rgba(0,0,0,.55), 0 0 24px rgba(5,167,220,.45); }
.tip { margin-top: 28px; color: #5a666c; font-size: 12px; letter-spacing: 1px; }

/* ============================================================
 * 选人画面（左侧竖排按钮列 + 中央插画 + 右上信息面板）
 * ============================================================ */
#select-screen, #map-screen { position: absolute; inset: 0; background: var(--canvas); display: none; z-index: 55; overflow: hidden; }
/* 插画背景层 */
#cd-bg { position: absolute; inset: 0; z-index: 1; overflow: hidden; }
#cd-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity .55s ease, transform .55s ease; }
#cd-bg img.on { opacity: 1; transform: scale(1); }
#cd-vignette { position: absolute; inset: 0; z-index: 2; pointer-events: none; background:
  linear-gradient(to right, rgba(7,9,11,.88) 0%, rgba(7,9,11,.5) 16%, transparent 30%),
  linear-gradient(to left, rgba(7,9,11,.88) 0%, rgba(7,9,11,.5) 14%, transparent 28%),
  linear-gradient(to bottom, rgba(7,9,11,.55), transparent 18%, transparent 82%, rgba(7,9,11,.7)); }
/* 顶部标题 */
.sc-head { position: absolute; top: 22px; left: 220px; z-index: 5; font-size: 24px; color: var(--text-hi); font-family: var(--font-title); letter-spacing: 6px; text-shadow: 0 3px 0 rgba(0,0,0,.6); }
.sc-head::before { content: ""; display: inline-block; width: 8px; height: 22px; background: var(--cyan); margin-right: 12px; }
.sc-head em { font-style: normal; color: #8fa3af; font-size: 13px; letter-spacing: 3px; margin-left: 10px; }
/* 左侧竖排按钮列 */
#char-list { position: absolute; left: 0; top: 86px; bottom: 0; width: 200px; z-index: 6; display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; }
.char-btn { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; background: rgba(22,25,25,.72); border: 2px solid #0a0c0e; color: #b8c4cc; cursor: pointer; text-align: left; font-family: var(--font-title); font-size: 15px; letter-spacing: 2px; transition: all var(--m-base) var(--ease); clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 100%, 0 100%); }
.char-btn::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: transparent; transition: background var(--m-base) var(--ease); }
.char-btn img { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.char-btn .cb-title { font-size: 10px; color: #6d767b; font-family: var(--font-body); letter-spacing: 1px; margin-top: -2px; }
.char-btn:hover { filter: brightness(1.15); transform: translateX(3px); }
.char-btn.sel { background: var(--panel); color: #1b1d1f; box-shadow: 0 0 18px rgba(5,167,220,.4); transform: translateX(4px); }
.char-btn.sel::before { background: var(--orange); }
.char-btn.sel .cb-title { color: #6a6f72; }
.char-btn.locked { opacity: .45; cursor: not-allowed; filter: grayscale(.9); }
.char-btn.locked .cb-lock { color: var(--red); font-size: 11px; margin-left: auto; font-family: var(--font-body); }
/* 右上信息面板（深色毛玻璃档案卡，插画透出不突兀） */
#cd-panel { position: absolute; right: 28px; top: 40px; width: 420px; z-index: 6; background: rgba(11,15,19,.62); backdrop-filter: blur(14px) saturate(1.25); -webkit-backdrop-filter: blur(14px) saturate(1.25); border: 4px solid #0a0c0e; box-shadow: 6px 6px 0 rgba(0,0,0,.5), inset 0 0 24px rgba(5,167,220,.06); clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%); }
#cd-panel::before { content: ""; display: block; height: 8px; background: linear-gradient(90deg, var(--cyan), #7fd4ff); }
#cd-info { padding: 18px 20px 14px; color: #e8edf0; }
.cd-name { font-size: 30px; font-family: var(--font-title); color: #f5f7f8; letter-spacing: 2px; text-shadow: 0 2px 0 rgba(0,0,0,.5); }
.cd-name .cd-title-tag { display: inline-block; vertical-align: middle; margin-left: 10px; padding: 2px 12px; font-size: 12px; font-family: var(--font-title); color: #fff; background: var(--orange); clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 100%, 0 100%); letter-spacing: 2px; }
.cd-desc { margin-top: 8px; font-size: 12px; color: #a8b4bc; line-height: 1.7; padding-left: 10px; border-left: 3px solid var(--cyan); }
.cd-line { height: 1px; margin: 12px 0; background: linear-gradient(90deg, rgba(245,247,248,.55) 10%, rgba(245,247,248,.15) 45%, transparent 60%); }
.cd-mods { display: flex; flex-direction: column; gap: 8px; }
.cd-mod { display: flex; gap: 10px; align-items: flex-start; background: rgba(26,34,40,.55); border: 2px solid #0a0c0e; padding: 8px 10px; transition: all var(--m-base) var(--ease); }
.cd-mod:hover { transform: translateX(-3px); box-shadow: 3px 3px 0 rgba(0,0,0,.3); background: rgba(34,44,52,.6); }
.cm-icon { flex: none; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 20px; background: var(--graphite3); color: #fff; border: 2px solid #0a0c0e; clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
.cd-mod.m-ult .cm-icon { background: #b388ff; }
.cm-name { font-size: 13px; font-weight: bold; color: #f0f3f5; font-family: var(--font-title); letter-spacing: 1px; }
.cm-name small { font-family: var(--font-body); font-size: 11px; color: var(--orange); margin-left: 6px; letter-spacing: 1px; }
.cm-desc { font-size: 11.5px; color: #9aa6ae; line-height: 1.55; margin-top: 2px; }
.cd-quip { margin-top: 10px; padding: 8px 12px; background: rgba(47,168,228,.14); border-left: 3px solid var(--cyan); font-size: 12px; color: #a8d8f0; font-style: italic; }
/* 信息面板入场 stagger */
#cd-panel.pop .cd-name { animation: cd-in .4s var(--ease) both; }
#cd-panel.pop .cd-desc { animation: cd-in .4s var(--ease) .06s both; }
#cd-panel.pop .cd-line { animation: cd-in .4s var(--ease) .1s both; }
#cd-panel.pop .cd-mod:nth-child(1) { animation: cd-in .4s var(--ease) .14s both; }
#cd-panel.pop .cd-mod:nth-child(2) { animation: cd-in .4s var(--ease) .2s both; }
#cd-panel.pop .cd-mod:nth-child(3) { animation: cd-in .4s var(--ease) .26s both; }
#cd-panel.pop .cd-quip { animation: cd-in .4s var(--ease) .32s both; }
@keyframes cd-in { 0% { opacity: 0; transform: translateY(14px); } 100% { opacity: 1; transform: none; } }
/* 左下确定按钮 */
#btn-select-ok { position: absolute; left: 24px; bottom: 26px; z-index: 6; font-size: 18px; padding: 12px 40px; background: linear-gradient(180deg, #0e5c7a, #0a3c52); border: 3px solid #0a0c0e; border-top: 6px solid #7fd4ff; color: #fff; font-family: var(--font-title); letter-spacing: 4px; cursor: pointer; clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 100%, 0 100%); box-shadow: 4px 4px 0 rgba(0,0,0,.5); transition: all var(--m-base) var(--ease); }
#btn-select-ok:hover { filter: brightness(1.15); transform: translateY(-2px); box-shadow: 4px 6px 0 rgba(0,0,0,.55), 0 0 22px rgba(5,167,220,.5); }
#btn-select-ok:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.8); }
/* 角色插画切换提示 */
#cd-switch-hint { position: absolute; left: 24px; bottom: 84px; z-index: 6; color: #5a666c; font-size: 11px; letter-spacing: 2px; }

/* ============================================================
 * 地图（关卡选择）
 * ============================================================ */
.mp-head { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); font-size: 24px; color: var(--text-hi); font-family: var(--font-title); letter-spacing: 8px; text-shadow: 0 3px 0 rgba(0,0,0,.6); z-index: 5; }
#map-list { display: flex; flex-direction: column; gap: 10px; padding: 92px 150px 30px; }
.map-item { display: flex; align-items: center; gap: 18px; background: var(--graphite); border: 3px solid #0a0c0e; border-left: 8px solid var(--cyan); padding: 12px 22px; cursor: pointer; transition: all var(--m-base) var(--ease); box-shadow: 4px 4px 0 rgba(0,0,0,.45); }
.map-item:hover { transform: translateX(4px); filter: brightness(1.1); }
.map-item.locked { opacity: .38; cursor: not-allowed; filter: grayscale(.85); }
.map-item .mi-num { font-size: 26px; color: var(--cyan); font-family: var(--font-title); width: 52px; text-align: center; text-shadow: 2px 2px 0 rgba(0,0,0,.5); }
.map-item .mi-name { color: var(--text-hi); font-size: 17px; font-family: var(--font-title); letter-spacing: 2px; }
.map-item .mi-sub { color: #8fa3af; font-size: 12px; margin-top: 2px; }
.map-item .mi-reward { margin-left: auto; color: var(--gold); font-size: 13px; font-family: var(--font-title); }
.map-item .mi-clear { margin-left: auto; color: var(--green); font-size: 13px; }
#map-info { text-align: center; color: #5a666c; font-size: 13px; padding-bottom: 20px; }

/* ============================================================
 * 结算
 * ============================================================ */
#result-screen { position: absolute; inset: 0; background: var(--canvas); display: none; align-items: center; justify-content: center; flex-direction: column; z-index: 55; }
#result-screen::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, transparent 0 16px, rgba(248,248,245,.02) 16px 18px); pointer-events: none; }
#result-title { font-size: 46px; color: var(--text-hi); font-family: var(--font-title); letter-spacing: 10px; text-shadow: 4px 4px 0 rgba(0,0,0,.6), 0 0 30px rgba(5,167,220,.7); margin-bottom: 12px; }
#result-sub { color: #8fa3af; font-size: 15px; margin-bottom: 26px; letter-spacing: 2px; }
#result-stats { width: 460px; background: rgba(253,253,251,.92); border: 4px solid #0a0c0e; box-shadow: 6px 6px 0 rgba(0,0,0,.5); color: #2a2d30; font-size: 14px; line-height: 2.1; text-align: center; margin-bottom: 30px; padding: 20px 26px; clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%); }
#result-stats::before { content: ""; display: block; height: 6px; background: linear-gradient(90deg, var(--cyan), var(--orange)); margin-bottom: 10px; }

/* ============================================================
 * 画廊 / 图鉴
 * ============================================================ */
#gallery-screen, #wiki-screen { position: absolute; inset: 0; background: var(--canvas); display: none; z-index: 65; overflow-y: auto; }
.gallery-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 14px 26px; font-size: 22px; color: var(--text-hi); font-family: var(--font-title); letter-spacing: 6px; background: rgba(14,18,21,.96); border-bottom: 2px solid #0a0c0e; z-index: 3; }
.gallery-head::before { content: ""; width: 8px; height: 24px; background: var(--cyan); display: inline-block; margin-right: 12px; }
#gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 24px; }
.gcell { background: var(--graphite); border: 3px solid #0a0c0e; overflow: hidden; cursor: pointer; box-shadow: 4px 4px 0 rgba(0,0,0,.4); transition: all var(--m-base) var(--ease); }
.gcell:hover { transform: translateY(-4px); filter: brightness(1.1); box-shadow: 4px 8px 0 rgba(0,0,0,.45); }
.gcell img { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block; border-bottom: 3px solid #0a0c0e; }
.gcell span { display: block; padding: 9px; color: #b8c4cc; font-size: 12px; text-align: center; }
#gallery-viewer { position: absolute; inset: 0; background: rgba(0,0,0,.93); display: none; align-items: center; justify-content: center; flex-direction: column; z-index: 70; }
#gallery-viewer img { max-width: 92%; max-height: 80%; border: 3px solid #0a0c0e; }
#gallery-caption { color: #cfe0ea; margin-top: 12px; font-size: 14px; font-family: var(--font-title); letter-spacing: 2px; }
#gallery-close-hint { color: #5a666c; margin-top: 8px; font-size: 12px; }
/* 图鉴 */
#wiki-tabs { display: flex; gap: 10px; padding: 16px 26px 0; }
.wtab { background: var(--graphite3); color: #9fb0bb; border: 2px solid #0a0c0e; padding: 7px 24px; cursor: pointer; font-size: 14px; font-family: var(--font-title); letter-spacing: 2px; clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 100%, 0 100%); transition: all var(--m-base) var(--ease); }
.wtab.on { background: var(--cyan); color: #fff; box-shadow: 0 0 16px rgba(5,167,220,.5); }
#wiki-body { padding: 20px 26px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.wcell { background: var(--graphite); border: 3px solid #0a0c0e; border-top: 6px solid var(--cyan); padding: 16px; box-shadow: 4px 4px 0 rgba(0,0,0,.4); transition: all var(--m-base) var(--ease); }
.wcell:hover { transform: translateY(-3px); filter: brightness(1.08); }
.wcell .wc-title { color: var(--text-hi); font-weight: bold; font-size: 15px; margin-bottom: 6px; font-family: var(--font-title); letter-spacing: 1px; }
.wcell .wc-text { color: #a8b4bc; font-size: 12px; line-height: 1.7; }
.wcell .wc-ricon { font-size: 32px; margin-bottom: 6px; }
.wcell img { width: 68px; height: 68px; object-fit: contain; margin-bottom: 6px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.wcell .wc-cat { display: inline-block; font-size: 11px; color: var(--gold); border: 1px solid var(--gold); padding: 1px 10px; margin-bottom: 8px; letter-spacing: 1px; clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 100%, 0 100%); }

/* ============================================================
 * 片尾 / 暂停
 * ============================================================ */
#credits-screen { position: absolute; inset: 0; display: none; z-index: 80; background: #07090b; }
#credits-slides { position: absolute; inset: 0; opacity: .55; }
#credits-slides img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 2s ease; }
#credits-slides img.on { opacity: 1; }
#credits-scroll { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-hi); z-index: 2; }
.cr-title { font-size: 34px; font-family: var(--font-title); letter-spacing: 10px; margin-bottom: 6px; text-shadow: 0 4px 0 rgba(0,0,0,.6), 0 0 24px rgba(5,167,220,.8); }
.cr-sub { color: var(--cyan); font-size: 15px; margin-bottom: 30px; letter-spacing: 4px; font-family: var(--font-title); }
#credits-list { text-align: center; font-size: 15px; line-height: 2.4; color: #cfe0ea; }
#credits-list .role { color: var(--cyan); font-size: 12px; letter-spacing: 2px; }
.cr-end { margin-top: 30px; color: var(--gold); font-family: var(--font-title); letter-spacing: 4px; }
#btn-skip-credits { position: absolute; top: 16px; right: 16px; z-index: 5; }
#pause-screen { position: absolute; inset: 0; background: rgba(7,9,11,.9); display: none; align-items: center; justify-content: center; flex-direction: column; z-index: 58; }
.pa-title { font-size: 34px; color: var(--text-hi); font-family: var(--font-title); letter-spacing: 10px; margin-bottom: 16px; text-shadow: 0 4px 0 rgba(0,0,0,.6), 0 0 20px rgba(5,167,220,.7); }
#pause-screen .menu-btns { flex-direction: row; align-items: center; gap: 14px; margin-top: 16px; }

/* ---------- 角色状态面板（暂停页内嵌） ---------- */
#stats-panel { width: 940px; max-height: 440px; background: rgba(253,253,251,.96); border: 4px solid #0a0c0e; box-shadow: 8px 8px 0 rgba(0,0,0,.5); clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%); display: flex; flex-direction: column; }
#stats-panel::before { content: ""; height: 8px; background: linear-gradient(90deg, var(--cyan), var(--orange)); flex: none; }
#stats-head { display: flex; align-items: baseline; gap: 14px; padding: 12px 22px 6px; border-bottom: 1px solid rgba(10,12,14,.15); }
.st-char { font-size: 22px; font-family: var(--font-title); color: #161919; letter-spacing: 2px; }
.st-lv { font-size: 13px; color: var(--orange); font-family: var(--font-title); letter-spacing: 2px; }
#stats-body { padding: 12px 22px; overflow-y: auto; }
.st-cols { display: flex; gap: 18px; align-items: flex-start; }
.st-col { flex: 1; min-width: 0; }
.st-sec { font-size: 14px; font-family: var(--font-title); color: #161919; letter-spacing: 3px; margin-bottom: 8px; padding-left: 8px; border-left: 4px solid var(--cyan); }
.st-rows { display: flex; flex-direction: column; gap: 3px; }
.st-row { display: flex; justify-content: space-between; padding: 3px 8px; font-size: 12.5px; color: #5c6266; background: rgba(235,236,235,.6); border: 1px solid rgba(10,12,14,.1); }
.st-row b { color: #161919; font-family: var(--font-title); font-weight: normal; }
.st-item { display: flex; gap: 9px; align-items: flex-start; padding: 7px 8px; background: rgba(235,236,235,.6); border: 1px solid rgba(10,12,14,.12); margin-bottom: 6px; }
.st-ico { flex: none; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; font-size: 15px; background: var(--graphite3); color: #fff; border: 2px solid #0a0c0e; clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px); }
.st-name { font-size: 13px; font-weight: bold; color: #161919; font-family: var(--font-title); letter-spacing: 1px; }
.st-name small { font-family: var(--font-body); font-size: 11px; color: var(--orange); margin-left: 6px; }
.st-desc { font-size: 11px; color: #5c6266; line-height: 1.5; margin-top: 1px; }
.st-empty { color: #8fa3af; font-size: 12px; padding: 10px; }

/* ============================================================
 * 进关加载条（方舟式斜切 Loading）
 * ============================================================ */
#loading-screen { position: absolute; inset: 0; background: var(--canvas); display: none; align-items: center; justify-content: center; flex-direction: column; z-index: 90; }
#loading-screen::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, transparent 0 18px, rgba(248,248,245,.015) 18px 20px); pointer-events: none; }
#loading-title { font-size: 30px; color: var(--text-hi); font-family: var(--font-title); letter-spacing: 10px; margin-bottom: 26px; text-shadow: 0 3px 0 rgba(0,0,0,.6), 0 0 20px rgba(5,167,220,.6); }
#loading-bar { width: 420px; height: 18px; background: #c2c2c2; border: 3px solid #0a0c0e; clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 10px 100%, 0 50%); overflow: hidden; box-shadow: 4px 4px 0 rgba(0,0,0,.5); }
#loading-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #05a7dc, #7fd4ff); transition: width .25s linear; }
#loading-tip { margin-top: 18px; color: #5a666c; font-size: 12px; letter-spacing: 2px; }

/* 标题粒子（保留兼容） */
#title-particles { position: absolute; inset: 0; pointer-events: none; z-index: 1; }

/* 滚动条 */
#shop-screen::-webkit-scrollbar, #gallery-screen::-webkit-scrollbar, #wiki-screen::-webkit-scrollbar { width: 6px; }
#shop-screen::-webkit-scrollbar-thumb, #gallery-screen::-webkit-scrollbar-thumb, #wiki-screen::-webkit-scrollbar-thumb { background: rgba(248,248,245,.35); border: 2px solid #0a0c0e; }

/* 近战武器标签 */
.melee-tag { display: inline-block; font-style: normal; font-size: 10px; color: #fff; background: var(--orange); border: 1px solid #0a0c0e; padding: 0 5px; margin-left: 6px; vertical-align: 1px; clip-path: polygon(3px 0, calc(100% - 3px) 0, 100% 100%, 0 100%); }

/* 升级三选一刷新按钮 */
#btn-reroll { margin-top: 18px; background: var(--graphite3); border-top: 3px solid var(--gold); color: #ffe9a8; font-family: var(--font-title); letter-spacing: 2px; padding: 6px 22px; }
#btn-reroll:hover { filter: brightness(1.2); }
