/* ============================================================
 * 真·三國無雙 WEB —— 样式
 * ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #000;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  user-select: none;
}

#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------------- 全屏色调 ---------------- */
#vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 20;
  transition: box-shadow .3s;
}
#vignette.vigMusou { box-shadow: inset 0 0 180px rgba(60,120,255,.55); }
#vignette.vigFire  { box-shadow: inset 0 0 180px rgba(255,80,20,.6); }
#vignette.vigLow   { box-shadow: inset 0 0 140px rgba(255,0,0,.4); animation: lowPulse 1s infinite; }
@keyframes lowPulse { 50% { box-shadow: inset 0 0 90px rgba(255,0,0,.25); } }

#sorceryOverlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 19;
  background: radial-gradient(ellipse at 50% 0%, rgba(90,40,140,.28), rgba(30,10,50,.18));
}

/* ---------------- 伤害数字 ---------------- */
#dmgLayer { position: fixed; inset: 0; pointer-events: none; z-index: 30; }
.dmgNum {
  position: absolute;
  font: bold 20px/1 "Arial Black", sans-serif;
  color: #fff;
  text-shadow: 0 0 4px #000, 2px 2px 0 #a33;
  transform: translate(-50%, -50%);
}
.dmgNum.dmgBig { font-size: 28px; color: #ffd24a; text-shadow: 0 0 6px #000, 2px 2px 0 #c60; }

/* ---------------- HUD 顶部 ---------------- */
#hudTop { position: fixed; inset: 0; pointer-events: none; z-index: 40; }

#statusPanel {
  position: absolute; top: 14px; left: 16px; width: 340px;
  background: linear-gradient(135deg, rgba(20,16,8,.72), rgba(20,16,8,.4));
  border: 1px solid rgba(200,170,90,.55);
  border-radius: 4px;
  padding: 8px 12px 10px;
}
#playerName {
  font-size: 19px; font-weight: bold; color: #ffe9b0;
  text-shadow: 1px 1px 2px #000;
  margin-bottom: 5px; letter-spacing: 2px;
}
#playerName .pTitle { font-size: 12px; color: #c9b787; margin-left: 8px; letter-spacing: 0; }
.barWrap { display: flex; align-items: center; margin-top: 4px; }
.barLabel { width: 34px; font-size: 12px; color: #d8c9a0; }
.hpBar {
  flex: 1; height: 15px;
  background: #201808;
  border: 1px solid #6a5a30;
  border-radius: 2px; overflow: hidden;
}
.hpFill {
  height: 100%; width: 100%;
  background: linear-gradient(180deg, #ffe66a, #d9a821);
  transition: width .15s;
}
.hpFill.hpLow { background: linear-gradient(180deg, #ff7a5a, #c92e12); animation: hpBlink .5s infinite; }
@keyframes hpBlink { 50% { filter: brightness(1.5); } }
.barText { margin-left: 8px; font-size: 11px; color: #cbba90; min-width: 70px; text-align: right; }

.musouBar {
  flex: 1; height: 11px;
  background: #101820;
  border: 1px solid #3a5a7a;
  border-radius: 2px; overflow: hidden;
}
#musouFill {
  height: 100%; width: 0;
  background: linear-gradient(180deg, #7ac8ff, #1e6fd9);
  transition: width .15s;
}
.musouBar.musouFull #musouFill {
  background: linear-gradient(90deg, #7ac8ff, #ffffff, #7ac8ff);
  animation: musouFlash .6s infinite;
}
@keyframes musouFlash { 50% { filter: brightness(1.8); } }

#buffIcons { margin-top: 5px; height: 18px; }
.buff {
  display: inline-block; font-size: 11px; padding: 1px 7px; margin-right: 6px;
  border-radius: 3px; color: #fff; font-weight: bold;
}
.buffAtk { background: rgba(200,70,20,.85); }
.buffDef { background: rgba(30,100,200,.85); }

/* ---------------- 右侧面板 ---------------- */
#rightPanel { position: absolute; top: 14px; right: 16px; text-align: right; }
#timeBox {
  display: inline-block;
  font-size: 17px; font-weight: bold; color: #ffe9b0;
  text-shadow: 1px 1px 2px #000;
  background: rgba(20,16,8,.6);
  border: 1px solid rgba(200,170,90,.45);
  border-radius: 4px; padding: 2px 12px; margin-bottom: 6px;
}
#minimap {
  display: block;
  border: 2px solid rgba(200,170,90,.6);
  border-radius: 4px;
  box-shadow: 0 0 12px rgba(0,0,0,.6);
}
#objBox {
  margin-top: 6px; font-size: 11px; color: #c9b787;
  background: rgba(20,16,8,.6);
  border: 1px solid rgba(200,170,90,.35);
  border-radius: 4px; padding: 4px 8px;
  max-width: 180px; text-align: left; line-height: 1.5;
}
#objText { color: #ffe9b0; font-size: 12px; }

/* ---------------- 交战武将血条 ---------------- */
.targetBar {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 300px; text-align: center;
}
#targetName {
  font-size: 16px; font-weight: bold; color: #ffb0a0;
  text-shadow: 1px 1px 3px #000; letter-spacing: 2px;
}
#targetName .tTitle { font-size: 11px; color: #e8c880; margin-right: 8px; }
.targetTrack {
  height: 9px; margin-top: 3px;
  background: rgba(20,10,10,.75);
  border: 1px solid #8a4a3a; border-radius: 2px; overflow: hidden;
}
#targetFill { height: 100%; background: linear-gradient(180deg, #ff8a66, #c92e12); transition: width .12s; }
.targetBar.bossTarget #targetName { color: #ffdd66; font-size: 18px; }
.targetBar.bossTarget #targetFill { background: linear-gradient(180deg, #ffcc44, #cc5510); }

/* ---------------- 总大将血条 ---------------- */
#bossBar {
  position: absolute; top: 66px; left: 50%; transform: translateX(-50%);
  width: 420px; text-align: center;
}
#bossName {
  font-size: 15px; font-weight: bold; color: #ffdd66;
  text-shadow: 1px 1px 3px #000; letter-spacing: 3px;
}
.bossTrack {
  height: 12px; margin-top: 3px;
  background: rgba(20,10,10,.8);
  border: 1px solid #aa8830; border-radius: 2px; overflow: hidden;
}
#bossFill { height: 100%; background: linear-gradient(180deg, #ffd24a, #b8331a); transition: width .12s; }

/* ---------------- 战场信息 ---------------- */
#msgLog {
  position: absolute; left: 16px; top: 150px; width: 380px;
  font-size: 13px; line-height: 1.7;
}
.msg {
  color: #f0e8d0; text-shadow: 1px 1px 2px #000;
  background: linear-gradient(90deg, rgba(0,0,0,.55), transparent);
  padding: 1px 10px; margin-bottom: 2px;
  border-left: 3px solid rgba(200,170,90,.7);
  transition: opacity 1s;
}
.msg.msgFade { opacity: 0; }
.msg.msgWarn { border-left-color: #ff5533; color: #ffc9b8; }
.msg.msgGood { border-left-color: #55aaff; color: #cde4ff; }
.msg.msgMe { border-left-color: #ffe066; }
.msg.msgItem { border-left-color: #7dff9a; color: #d8ffe0; }
.msg.msgEnemy { border-left-color: #cc3322; }
.nMe { color: #ffe066; }
.nAlly { color: #7dabff; }
.nEnemy { color: #ff6650; }
.nItem { color: #7dff9a; }

/* ---------------- 连击数 ---------------- */
#comboBox {
  position: absolute; right: 40px; top: 42%;
  text-align: right; pointer-events: none;
}
#comboNum {
  display: block;
  font: italic bold 64px/1 "Arial Black", sans-serif;
  color: #ffd24a;
  text-shadow: 3px 3px 0 #7a2a00, 0 0 18px rgba(255,150,0,.5);
}
.comboHits {
  font: italic bold 20px/1 "Arial Black", sans-serif;
  color: #ffefc0; letter-spacing: 4px;
  text-shadow: 2px 2px 0 #7a2a00;
}

/* ---------------- HUD 底部 ---------------- */
#hudBottom { position: fixed; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 40; }
#koBox {
  position: absolute; left: 18px; bottom: 16px;
  font-size: 16px; color: #f0e0b8; text-shadow: 1px 1px 2px #000;
  background: rgba(20,16,8,.6);
  border: 1px solid rgba(200,170,90,.45);
  border-radius: 4px; padding: 3px 14px;
}
#koCount { font-size: 22px; font-weight: bold; color: #ffd24a; }

#moraleWrap {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.moraleTag {
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 20px; font-weight: bold;
  width: 30px; height: 30px; line-height: 28px; text-align: center;
  border-radius: 50%; color: #fff;
  text-shadow: 1px 1px 2px #000;
}
.moraleTagAlly { background: radial-gradient(#4a7ad8, #1a3a7a); border: 1px solid #8ab; }
.moraleTagEnemy { background: radial-gradient(#d8b53d, #7a5a10); border: 1px solid #ca6; }
#moraleBar {
  width: 300px; height: 12px;
  background: linear-gradient(180deg, #c8a030, #8a6a15);
  border: 1px solid #000; border-radius: 3px; overflow: hidden;
}
#moraleAlly {
  height: 100%; width: 50%;
  background: linear-gradient(180deg, #5a8ce8, #22448a);
  transition: width .5s;
}

#controlsHint {
  position: absolute; right: 14px; bottom: 14px;
  font-size: 11px; color: rgba(230,215,175,.6);
  text-shadow: 1px 1px 2px #000;
}

/* ---------------- 中央横幅 ---------------- */
.bannerWrap {
  position: fixed; left: 0; right: 0; top: 26%;
  text-align: center; pointer-events: none; z-index: 50;
}
#banner {
  display: inline-block;
  font-family: "KaiTi", "STKaiti", "SimSun", serif;
  font-size: 62px; font-weight: bold; letter-spacing: 14px;
  color: #ffe9b0;
  text-shadow: 0 0 24px rgba(255,200,80,.7), 3px 3px 4px #000;
  padding: 6px 46px;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,.72), transparent);
  border-top: 2px solid rgba(220,190,110,.8);
  border-bottom: 2px solid rgba(220,190,110,.8);
  animation: bannerIn .35s ease-out;
}
@keyframes bannerIn {
  from { transform: scale(1.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
#bannerSub {
  margin-top: 8px; font-size: 17px; color: #f0e0c0;
  text-shadow: 1px 1px 3px #000; letter-spacing: 3px;
}
.bannerWrap.bannerKill #banner { color: #ff6644; text-shadow: 0 0 26px rgba(255,60,20,.8), 3px 3px 4px #000; border-color: rgba(255,90,50,.8); }
.bannerWrap.bannerEvil #banner { color: #c88aff; text-shadow: 0 0 26px rgba(150,60,255,.8), 3px 3px 4px #000; border-color: rgba(170,90,255,.7); }
.bannerWrap.bannerGood #banner { color: #8ac8ff; text-shadow: 0 0 26px rgba(60,140,255,.8), 3px 3px 4px #000; border-color: rgba(90,160,255,.7); }
.bannerWrap.bannerGo #banner { color: #ffd24a; }
.bannerWrap.bannerStage #banner { font-size: 76px; }

/* ---------------- 无双演出 ---------------- */
#musouCut {
  position: fixed; inset: 0; z-index: 55; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(10,20,60,.85) 42%, rgba(10,20,60,.85) 58%, transparent 70%);
  display: flex; align-items: center; justify-content: center;
}
#musouCutText { text-align: center; }
#musouCut.mcAnim #musouCutText { animation: mcSlide 1.1s ease-out; }
@keyframes mcSlide {
  0% { transform: translateX(-500px); opacity: 0; }
  25% { transform: translateX(0); opacity: 1; }
  80% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(300px); opacity: 0; }
}
.mcName {
  display: block;
  font-family: "KaiTi", serif;
  font-size: 44px; font-weight: bold; color: #fff;
  letter-spacing: 10px; text-shadow: 0 0 16px #48f;
}
.mcSkill {
  display: block;
  font-size: 26px; color: #8ac8ff;
  letter-spacing: 6px; text-shadow: 0 0 10px #26c;
}

/* ---------------- 通用全屏界面 ---------------- */
.screen {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(28,22,12,.92), rgba(5,4,2,.97));
  color: #e8dcc0;
}
.screenDim { background: rgba(8,6,3,.82); }

/* 标题 */
.titleLogo { text-align: center; animation: titleIn 1.2s ease-out; }
@keyframes titleIn { from { opacity: 0; transform: translateY(30px); } }
.titleShin {
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 60px; color: #c92e12; font-weight: bold;
  text-shadow: 0 0 20px rgba(255,60,20,.6);
}
.titleMain {
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 110px; font-weight: bold; letter-spacing: 18px;
  color: #ffe9b0;
  text-shadow: 0 4px 0 #7a5a20, 0 0 40px rgba(255,200,80,.45), 4px 8px 12px #000;
}
.titleSub {
  font-size: 22px; letter-spacing: 10px; color: #c9b787; margin-top: 6px;
}
.titlePress {
  margin-top: 70px; font-size: 20px; letter-spacing: 6px; color: #ffe9b0;
  animation: pressBlink 1.2s infinite;
}
@keyframes pressBlink { 50% { opacity: .25; } }
.titleFoot { position: absolute; bottom: 20px; font-size: 12px; color: rgba(200,180,140,.5); }

/* 选将 */
.selTitle {
  font-family: "KaiTi", serif; font-size: 42px; letter-spacing: 16px;
  color: #ffe9b0; margin-bottom: 36px;
  text-shadow: 2px 2px 4px #000;
}
#heroCards { display: flex; gap: 26px; }
.heroCard {
  width: 250px; padding: 20px 20px 16px;
  background: linear-gradient(160deg, rgba(50,40,22,.9), rgba(25,20,10,.95));
  border: 1px solid rgba(200,170,90,.5);
  border-radius: 6px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  text-align: center;
}
.heroCard:hover {
  transform: translateY(-8px) scale(1.03);
  border-color: #ffd24a;
  box-shadow: 0 10px 30px rgba(255,190,60,.25);
}
.hcGlyph {
  width: 84px; height: 84px; margin: 0 auto 10px;
  border: 3px solid; border-radius: 50%;
  font-family: "KaiTi", serif; font-size: 52px; font-weight: bold;
  line-height: 80px; color: #ffe9b0;
  background: rgba(0,0,0,.4);
}
.hcName { font-size: 26px; font-weight: bold; color: #ffe9b0; letter-spacing: 4px; }
.hcZi { font-size: 12px; color: #c9b787; margin-left: 6px; letter-spacing: 0; }
.hcTitle { font-size: 13px; color: #e8b860; margin: 3px 0 6px; }
.hcWeapon { font-size: 13px; color: #c9c0a8; margin-bottom: 8px; }
.hcStats { text-align: left; margin: 0 6px 8px; }
.hcStat { display: flex; align-items: center; margin-bottom: 3px; }
.hcStat em { font-style: normal; font-size: 11px; color: #c9b787; width: 34px; }
.hcStat i {
  width: 13px; height: 7px; margin-right: 2px;
  background: rgba(255,255,255,.12); border-radius: 1px;
}
.hcStat i.on { background: linear-gradient(180deg, #ffd24a, #c8861a); }
.hcDesc { font-size: 11px; color: #b0a488; line-height: 1.6; text-align: left; }

/* 剧情 */
#introText { max-width: 640px; text-align: center; animation: titleIn 1s; }
#introText h2 {
  font-family: "KaiTi", serif; font-size: 52px; letter-spacing: 12px;
  color: #ffe9b0; margin-bottom: 4px;
}
#introText h3 { font-size: 16px; color: #c9b787; font-weight: normal; margin-bottom: 30px; }
#introText p { font-size: 16px; line-height: 2; color: #d8ccb0; }
.introHint {
  margin-top: 40px; font-size: 15px; color: #ffe9b0;
  animation: pressBlink 1.2s infinite; letter-spacing: 3px;
}

/* 结算 */
#resultTitle {
  font-family: "KaiTi", serif; font-size: 90px; letter-spacing: 30px;
  margin-bottom: 6px; animation: titleIn .8s;
}
#resultTitle.win { color: #ffd24a; text-shadow: 0 0 40px rgba(255,200,60,.6), 3px 3px 5px #000; }
#resultTitle.lose { color: #8a93a8; text-shadow: 3px 3px 5px #000; }
#resultSub { font-size: 18px; color: #c9b787; font-weight: normal; margin-bottom: 30px; }
#resultStats { width: 380px; }
.rRow {
  display: flex; justify-content: space-between;
  font-size: 17px; padding: 7px 10px;
  border-bottom: 1px solid rgba(200,170,90,.25);
}
.rRow b { color: #ffe9b0; }
.rankTxt { color: #ff8844; font-size: 22px; font-family: "KaiTi", serif; letter-spacing: 4px; }
.rankComment { margin-top: 14px; font-size: 14px; color: #c9b787; text-align: center; }

/* 暂停 */
.pauseTitle {
  font-family: "KaiTi", serif; font-size: 44px; letter-spacing: 14px;
  color: #ffe9b0; margin-bottom: 26px;
}
#pauseInfo { max-width: 620px; text-align: center; }
#pauseInfo h3 { font-size: 15px; color: #e8b860; margin: 18px 0 8px; font-weight: normal; letter-spacing: 4px; }
.pObj { font-size: 16px; color: #ffe9b0; }
.pOfficers span {
  display: inline-block; margin: 3px 5px; padding: 2px 10px;
  font-size: 13px; border-radius: 3px;
}
.pAlly { background: rgba(40,80,180,.4); color: #b8d0ff; }
.pEnemy { background: rgba(160,50,30,.4); color: #ffc0b0; }
.pDead { opacity: .35; text-decoration: line-through; }
.pCtrl { font-size: 13px; line-height: 2; color: #c9c0a8; }
