:root {
  --bg-obsidian: #070709;
  --bg-panel: rgba(10, 10, 14, 0.9);
  --border-dim: #33353e;
  --border-bright: #e6e8f0;
  --text-pure: #f5f6fa;
  --text-silver: #b4b8c6;
  --text-muted: #727785;

  /* 语义化点缀色 */
  --accent-red: #ff2a4b;
  --accent-gold: #ffbe2e;
  --accent-cyan: #38f6ff;
  --accent-violet: #b84dff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body, html {
  width: 100%;
  height: 100%;
  background-color: #030305;
  color: var(--text-pure);
  font-family: 'Microsoft YaHei', 'PingFang SC', 'Noto Sans SC', 'Heiti SC', 'Courier New', Consolas, monospace;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  max-width: 177.78vh;
  max-height: 56.25vw;
  background: var(--bg-obsidian);
  border: 1px solid #252730;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.95);
  overflow: hidden;
}

#game-canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  cursor: crosshair;
}

/* HUD 界面 */
#hud-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  padding: 16px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hud-top-left {
  position: absolute;
  top: 16px;
  left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hp-frame {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hp-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--text-silver);
}

.hp-bar-outer {
  position: relative;
  width: 245px;
  height: 19px;
  background: #101116;
  border: 2px solid var(--border-bright);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.hp-bar-trail {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: #ffffff;
  transition: width 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.hp-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #c81d38 0%, #ff2a4b 100%);
  transition: width 0.08s linear;
}

.hp-shield-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: rgba(56, 246, 255, 0.55);
  border-right: 2px solid var(--accent-cyan);
  transition: width 0.1s linear;
}

.hp-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 1px 3px #000, 0 0 5px #000;
}

.hud-stats-row {
  display: flex;
  gap: 7px;
  align-items: center;
}

.stat-pill {
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  padding: 3px 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-pure);
}

.hud-mini-btn {
  pointer-events: auto;
  background: #14161f;
  border: 1px solid #484c5c;
  color: var(--text-pure);
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.hud-mini-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.accent-cyan { color: var(--accent-cyan); }
.accent-gold { color: var(--accent-gold); }
.accent-red { color: var(--accent-red); }
.accent-violet { color: var(--accent-violet); }

/* 首领 HUD */
.hud-top-center {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 480px;
  text-align: center;
}

.boss-title {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--text-pure);
  text-shadow: 0 2px 6px #000;
}

.boss-subtitle {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--accent-red);
  margin: 2px 0 5px;
  font-weight: 700;
}

.boss-bar-outer {
  position: relative;
  width: 100%;
  height: 14px;
  background: #0d0d12;
  border: 2px solid var(--text-pure);
  box-shadow: 0 0 16px rgba(255, 42, 75, 0.35);
}

.boss-bar-trail {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: var(--accent-gold);
  transition: width 0.45s ease-out;
}

.boss-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #9e1128 0%, #ff2a4b 100%);
  transition: width 0.08s linear;
}

/* 右上角区域信息、小地图与十殿首领直达栏 */
.hud-top-right {
  position: absolute;
  top: 16px;
  right: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.stage-banner {
  text-align: right;
  background: var(--bg-panel);
  border-right: 3px solid var(--text-pure);
  padding: 5px 11px;
}

.stage-name {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 2px;
}

.stage-objective {
  font-size: 11px;
  color: var(--text-silver);
  margin-top: 2px;
}

#minimap-canvas {
  background: rgba(8, 8, 12, 0.9);
  border: 1px solid #3a3d48;
  image-rendering: pixelated;
}

.boss-rush-panel {
  pointer-events: auto;
  background: var(--bg-panel);
  border: 1px solid #353845;
  padding: 4px 7px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.boss-rush-label {
  font-size: 9.5px;
  color: var(--text-silver);
  font-weight: 800;
}

.boss-stage-buttons {
  display: flex;
  gap: 3px;
}

.boss-stage-btn {
  width: 21px;
  height: 20px;
  background: #14161f;
  border: 1px solid #444858;
  color: var(--text-silver);
  font-family: inherit;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
}

.boss-stage-btn:hover {
  border-color: var(--accent-gold);
  color: var(--text-pure);
  transform: translateY(-1px);
}

.boss-stage-btn.current {
  background: var(--text-pure);
  color: #050508;
  border-color: #fff;
}

.boss-stage-btn.final {
  width: 28px;
  border-color: var(--accent-red);
  color: var(--accent-gold);
}

.boss-stage-btn.final.current {
  background: var(--accent-red);
  color: #fff;
}

/* 左下角武器与技能槽 */
.hud-bottom-left {
  position: absolute;
  bottom: 16px;
  left: 22px;
  display: flex;
  gap: 10px;
}

.slot-card {
  position: relative;
  width: 162px;
  background: var(--bg-panel);
  border: 1px solid #454854;
  border-top: 2px solid var(--text-pure);
  padding: 7px 9px;
  overflow: hidden;
  transition: transform 0.1s ease, border-color 0.15s ease;
}

.slot-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slot-icon {
  width: 32px;
  height: 32px;
  background: #11131b;
  border: 1px solid #3c4050;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.slot-meta {
  min-width: 0;
  flex: 1;
}

.slot-key {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 1px;
}

.slot-name {
  font-size: 12.5px;
  font-weight: 900;
  color: var(--text-pure);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-crit {
  font-size: 10.5px;
  color: var(--accent-gold);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skill-slot {
  width: 146px;
  border-top-color: var(--accent-cyan);
}

.skill-slot .slot-crit {
  color: var(--accent-cyan);
}

.cooldown-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: rgba(5, 5, 8, 0.84);
  border-top: 1px solid var(--accent-cyan);
  transition: height 0.05s linear;
}

.cd-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
  color: var(--accent-cyan);
  text-shadow: 0 0 8px #000;
}

.ammo-dots {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.ammo-dot {
  width: 9px;
  height: 4px;
  background: #2b2d38;
  border: 1px solid #5a5e70;
}

.ammo-dot.ready {
  background: var(--text-pure);
  border-color: #fff;
  box-shadow: 0 0 4px rgba(255,255,255,0.6);
}

/* 右下角誓约与按键栏 */
.hud-bottom-right {
  position: absolute;
  bottom: 16px;
  right: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  max-width: 540px;
}

.relics-header {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 800;
}

.relics-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.empty-relics {
  font-size: 11px;
  color: var(--text-muted);
}

.relic-badge {
  background: rgba(16, 16, 22, 0.94);
  border: 1px solid var(--border-bright);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-pure);
  display: flex;
  align-items: center;
  gap: 5px;
}

.relic-badge .r-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
}

.controls-bar {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--text-silver);
  background: rgba(8, 8, 12, 0.85);
  padding: 4px 10px;
  border: 1px solid #282a34;
}

.controls-bar b {
  color: var(--text-pure);
}

/* 场景交互提示 */
.interact-prompt {
  position: absolute;
  bottom: 116px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(8, 8, 12, 0.95);
  border: 2px solid var(--text-pure);
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.92);
  pointer-events: none;
  animation: floatPulse 1.4s ease-in-out infinite;
}

.key-badge {
  background: var(--text-pure);
  color: #000;
  padding: 1px 7px;
  font-weight: 900;
  font-size: 12px;
}

@keyframes floatPulse {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-4px); }
}

/* 中央横幅 */
.center-banner {
  position: absolute;
  top: 28%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  background: rgba(5, 5, 8, 0.92);
  border-top: 2px solid var(--text-pure);
  border-bottom: 2px solid var(--text-pure);
  padding: 14px 52px;
  pointer-events: none;
  z-index: 20;
}

.banner-main {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 5px;
  color: var(--text-pure);
}

.banner-sub {
  font-size: 12px;
  letter-spacing: 2.5px;
  color: var(--accent-gold);
  margin-top: 5px;
  font-weight: 700;
}

/* 弹窗（三选一、标题、结算） */
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 7, 0.88);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal-box {
  width: 880px;
  max-width: 94%;
  background: #0b0c10;
  border: 2px solid var(--text-pure);
  padding: 28px 32px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.95);
}

.modal-header {
  text-align: center;
  margin-bottom: 22px;
}

.modal-tag {
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--accent-cyan);
  font-weight: 800;
  margin-bottom: 4px;
}

.modal-header h2 {
  font-size: 25px;
  letter-spacing: 4px;
  font-weight: 900;
}

.modal-header p {
  font-size: 12.5px;
  color: var(--text-silver);
  margin-top: 5px;
}

.choice-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.choice-card {
  background: #12131a;
  border: 1px solid #484b58;
  border-top: 3px solid var(--text-pure);
  padding: 18px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.choice-card:hover {
  transform: translateY(-4px);
  background: #191b24;
  border-color: var(--accent-gold);
}

.choice-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.choice-key {
  font-size: 11px;
  font-weight: 900;
  color: #000;
  background: var(--text-pure);
  display: inline-block;
  padding: 2px 8px;
}

.choice-icon-canvas {
  width: 36px;
  height: 36px;
  background: #0d0e14;
  border: 1px solid #353846;
  image-rendering: pixelated;
}

.choice-type {
  font-size: 11px;
  letter-spacing: 1px;
  font-weight: 800;
  margin-bottom: 4px;
}

.choice-name {
  font-size: 17px;
  font-weight: 900;
  color: var(--text-pure);
  margin-bottom: 8px;
}

.choice-desc {
  font-size: 12.5px;
  line-height: 1.55;
  color: #cfd2dc;
  margin-bottom: 12px;
}

.choice-synergy {
  font-size: 11px;
  padding-top: 8px;
  border-top: 1px dashed #323540;
  color: var(--accent-gold);
  font-weight: 700;
}

/* 标题与结算框 */
.title-box {
  width: 690px;
  max-width: 92%;
  background: #090a0e;
  border: 2px solid var(--text-pure);
  padding: 32px 36px;
  text-align: center;
  box-shadow: 0 0 70px rgba(0, 0, 0, 0.98);
}

.eclipse-emblem {
  position: relative;
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
}

.eclipse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid var(--text-pure);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.5), inset 0 0 10px rgba(255, 42, 75, 0.5);
}

.eclipse-core {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #050508;
}

.title-eyebrow {
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--text-silver);
  font-weight: 800;
}

.game-title {
  font-size: 38px;
  letter-spacing: 6px;
  font-weight: 900;
  margin: 5px 0;
  color: var(--text-pure);
}

.game-subtitle {
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--accent-gold);
  margin-bottom: 20px;
  font-weight: 700;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  text-align: left;
  margin-bottom: 18px;
}

.feature-item {
  background: #111218;
  border: 1px solid #2b2d38;
  padding: 9px 12px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-silver);
  line-height: 1.45;
}

.feature-item b {
  color: var(--text-pure);
}

.f-dot {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

.f-dot.red { background: var(--accent-red); box-shadow: 0 0 8px var(--accent-red); }
.f-dot.gold { background: var(--accent-gold); box-shadow: 0 0 8px var(--accent-gold); }
.f-dot.cyan { background: var(--accent-cyan); box-shadow: 0 0 8px var(--accent-cyan); }
.f-dot.violet { background: var(--accent-violet); box-shadow: 0 0 8px var(--accent-violet); }

.controls-guide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 14px;
  text-align: left;
  background: #0e0f14;
  border: 1px solid #282a34;
  padding: 12px 16px;
  font-size: 12px;
  color: var(--text-silver);
  margin-bottom: 22px;
}

kbd {
  background: #232530;
  border: 1px solid #555968;
  color: #fff;
  padding: 1px 5px;
  font-size: 10.5px;
  font-weight: 800;
}

.btn-primary {
  background: var(--text-pure);
  color: #050508;
  border: 2px solid var(--text-pure);
  padding: 12px 28px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary:hover {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  transform: translateY(-2px);
}

.btn-hint {
  font-size: 11.5px;
  font-weight: 700;
  opacity: 0.78;
}

.run-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.stat-card {
  background: #12131a;
  border: 1px solid #323542;
  padding: 10px;
}

.stat-card-val {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-pure);
}

.stat-card-label {
  font-size: 11px;
  color: var(--text-silver);
  letter-spacing: 1px;
  margin-top: 3px;
}

/* ==================== 命运抽卡祭坛（系统自动抽 3 张 · 六大品质：史诗/传说/神级/诅咒/噩梦/地狱） ==================== */
.fate-forced-banner {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 16px;
  background: rgba(18, 12, 24, 0.92);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 1.2px;
  line-height: 1.6;
}

.btn-fate-autopick {
  margin-left: 6px;
  padding: 3px 10px;
  background: linear-gradient(90deg, #ffbe2e, #ff6b2e);
  border: 1px solid #fff;
  color: #08060c;
  font-family: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.14s ease;
}

.btn-fate-autopick:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 0 14px rgba(255, 190, 46, 0.65);
}

@keyframes fateCardDeal {
  0% {
    opacity: 0;
    transform: translateY(22px) rotateY(75deg) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateY(0deg) scale(1);
  }
}

.fate-card-deal-0 {
  animation: fateCardDeal 0.34s cubic-bezier(0.22, 1, 0.36, 1) 0.02s both;
}
.fate-card-deal-1 {
  animation: fateCardDeal 0.34s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}
.fate-card-deal-2 {
  animation: fateCardDeal 0.34s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

.choice-card.fate-common-card {
  background: linear-gradient(180deg, #161b26 0%, #101219 65%);
  border: 2px solid #9aa4b8;
  box-shadow: 0 0 16px rgba(154, 164, 184, 0.20), inset 0 0 12px rgba(154, 164, 184, 0.08);
  position: relative;
}
.choice-card.fate-common-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 0 26px rgba(154, 164, 184, 0.42);
}

.choice-card.fate-rare-card {
  background: linear-gradient(180deg, #09241b 0%, #10141c 65%);
  border: 2px solid #38ff9c;
  box-shadow: 0 0 18px rgba(56, 255, 156, 0.24), inset 0 0 14px rgba(56, 255, 156, 0.10);
  position: relative;
}
.choice-card.fate-rare-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 0 30px rgba(56, 255, 156, 0.48);
}

.choice-card.fate-epic-card {
  background: linear-gradient(180deg, #091d28 0%, #10131c 65%);
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 20px rgba(56, 232, 255, 0.24), inset 0 0 14px rgba(56, 232, 255, 0.1);
  position: relative;
}
.choice-card.fate-epic-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 0 32px rgba(56, 232, 255, 0.48);
}

.choice-card.fate-legendary-card {
  background: linear-gradient(180deg, #241506 0%, #12121a 65%);
  border: 2px solid #ff9d2e;
  box-shadow: 0 0 22px rgba(255, 157, 46, 0.28), inset 0 0 16px rgba(255, 157, 46, 0.12);
  position: relative;
}
.choice-card.fate-legendary-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 0 34px rgba(255, 157, 46, 0.52);
}

.choice-card.fate-divine-card {
  background: linear-gradient(180deg, #261e07 0%, #111218 65%);
  border: 2px solid var(--accent-gold);
  box-shadow: 0 0 26px rgba(255, 190, 46, 0.34), inset 0 0 18px rgba(255, 190, 46, 0.14);
  position: relative;
}
.choice-card.fate-divine-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 0 38px rgba(255, 190, 46, 0.58);
}

.choice-card.fate-curse-card {
  background: linear-gradient(180deg, #1d0c28 0%, #100d18 65%);
  border: 2px solid var(--accent-violet);
  box-shadow: 0 0 22px rgba(184, 77, 255, 0.28), inset 0 0 16px rgba(184, 77, 255, 0.14);
  position: relative;
}
.choice-card.fate-curse-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 0 34px rgba(184, 77, 255, 0.52);
}

.choice-card.fate-nightmare-card {
  background: linear-gradient(180deg, #260816 0%, #110c16 65%);
  border: 2px solid var(--accent-red);
  box-shadow: 0 0 24px rgba(255, 42, 75, 0.30), inset 0 0 18px rgba(255, 42, 75, 0.15);
  position: relative;
}
.choice-card.fate-nightmare-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 0 36px rgba(255, 42, 75, 0.56);
}

.choice-card.fate-hell-card {
  background: linear-gradient(180deg, #2b0c04 0%, #14090c 65%);
  border: 2px solid #ff4500;
  border-top: 3px solid var(--accent-gold);
  box-shadow: 0 0 28px rgba(255, 69, 0, 0.36), inset 0 0 20px rgba(255, 69, 0, 0.18);
  position: relative;
}
.choice-card.fate-hell-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 0 40px rgba(255, 69, 0, 0.65);
}

.fate-arcana-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-silver);
  font-weight: 800;
  margin-bottom: 4px;
  opacity: 0.9;
}

/* ==================== 商业级暗影黑市商店弹窗 ==================== */
.shop-box {
  width: 960px;
  max-width: 95%;
  background: #0b0a12;
  border: 2px solid var(--accent-gold);
  padding: 22px 28px;
  box-shadow: 0 0 65px rgba(0, 0, 0, 0.96), 0 0 25px rgba(255, 190, 46, 0.18);
}

.shop-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #2e2b3d;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.shop-title-group h2 {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--accent-gold);
}

.shop-title-group p {
  font-size: 11.5px;
  color: var(--text-silver);
  margin-top: 3px;
}

.shop-wallet {
  display: flex;
  gap: 12px;
  align-items: center;
}

.wallet-pill {
  background: #161422;
  border: 1px solid var(--accent-gold);
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 900;
  color: var(--accent-gold);
}

.wallet-pill.forge-pill {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  font-size: 12.5px;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.shop-item-card {
  position: relative;
  background: #13121c;
  border: 1px solid #3f3c54;
  border-top: 3px solid var(--accent-gold);
  padding: 13px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.14s ease;
}

.shop-item-card:hover:not(.sold-out) {
  transform: translateY(-3px);
  background: #1b1928;
  border-color: var(--accent-gold);
  box-shadow: 0 4px 18px rgba(255, 190, 46, 0.22);
}

.shop-item-card.sold-out {
  opacity: 0.42;
  cursor: default;
  filter: grayscale(0.7);
}

.shop-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}

.shop-price-badge {
  background: rgba(255, 190, 46, 0.16);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  font-size: 12px;
  font-weight: 900;
  padding: 2px 9px;
}

.shop-price-badge.cant-afford {
  border-color: var(--accent-red);
  color: var(--accent-red);
  background: rgba(255, 42, 75, 0.12);
}

.shop-item-name {
  font-size: 15px;
  font-weight: 900;
  color: var(--text-pure);
  margin-bottom: 5px;
}

.shop-item-desc {
  font-size: 11.5px;
  line-height: 1.45;
  color: #c8cbd8;
  margin-bottom: 8px;
}

.shop-item-tag {
  font-size: 10.5px;
  color: var(--accent-cyan);
  font-weight: 800;
}

.shop-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #2e2b3d;
  padding-top: 14px;
}

.btn-shop-action {
  background: #1b1929;
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  padding: 9px 20px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.14s ease;
}

.btn-shop-action:hover {
  background: var(--accent-gold);
  color: #050508;
}

.fate-tier-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 1.5px;
  padding: 2px 8px;
  margin-bottom: 6px;
}

.fate-tier-badge.common {
  background: rgba(184, 196, 216, 0.16);
  border: 1px solid #9aa4b8;
  color: #cfd8ea;
}

.fate-tier-badge.rare {
  background: rgba(56, 255, 156, 0.16);
  border: 1px solid #38ff9c;
  color: #38ff9c;
}

.fate-tier-badge.epic {
  background: rgba(56, 232, 255, 0.18);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
}

.fate-tier-badge.legendary {
  background: rgba(255, 157, 46, 0.20);
  border: 1px solid #ff9d2e;
  color: #ff9d2e;
}

.fate-tier-badge.divine {
  background: rgba(255, 190, 46, 0.24);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
}

.fate-tier-badge.curse {
  background: rgba(184, 77, 255, 0.22);
  border: 1px solid var(--accent-violet);
  color: #d48aff;
}

.fate-tier-badge.nightmare {
  background: rgba(255, 42, 75, 0.22);
  border: 1px solid var(--accent-red);
  color: var(--accent-red);
}

.fate-tier-badge.hell {
  background: rgba(255, 69, 0, 0.26);
  border: 1px solid #ff4500;
  color: #ff6e38;
}

/* ==================== 商业级宽屏史诗大封面（开始大封面 / 通关与陨落大封面） ==================== */
.grand-cover-backdrop {
  background:
    radial-gradient(circle at 50% 35%, rgba(16, 12, 24, 0.84) 0%, rgba(4, 4, 8, 0.96) 78%),
    url('assets/cover-title.jpg') center center / cover no-repeat;
  backdrop-filter: blur(6px);
}

.grand-cover-box {
  width: 1080px;
  max-width: 96%;
  padding: 0;
  background: #08090e;
  border: 2px solid var(--accent-gold);
  box-shadow: 0 0 90px rgba(0, 0, 0, 0.98), 0 0 42px rgba(56, 232, 255, 0.22), 0 0 38px rgba(255, 42, 184, 0.22);
  overflow: hidden;
}

.grand-cover-box.gameover-box {
  width: 1000px;
  border-color: var(--accent-red);
}

.grand-cover-hero {
  position: relative;
  width: 100%;
  height: 310px;
  background: #050509 url('assets/cover-title.jpg') center center / cover no-repeat;
  border-bottom: 2px solid var(--accent-gold);
  overflow: hidden;
}

.end-cover-hero {
  height: 250px;
  background: #050509 url('assets/cover-end.jpg') center center / cover no-repeat;
  border-bottom-color: var(--accent-red);
}

.grand-cover-canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

.grand-cover-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent-gold);
  pointer-events: none;
  z-index: 3;
}
.grand-cover-corner.tl { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.grand-cover-corner.tr { top: 8px; right: 8px; border-left: none; border-bottom: none; }
.grand-cover-corner.bl { bottom: 8px; left: 8px; border-right: none; border-top: none; }
.grand-cover-corner.br { bottom: 8px; right: 8px; border-left: none; border-top: none; }

.grand-cover-badge {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(6, 6, 12, 0.85);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2.5px;
  padding: 3px 16px;
  z-index: 4;
  white-space: nowrap;
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.9);
}

.grand-cover-overlay {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 4;
  pointer-events: none;
  padding: 6px 26px 4px;
  background: radial-gradient(ellipse at center, rgba(5, 6, 12, 0.76) 0%, rgba(5, 6, 12, 0.35) 68%, rgba(5, 6, 12, 0) 100%);
  border-radius: 8px;
  width: 92%;
}

.grand-title-en {
  font-size: 10.5px;
  letter-spacing: 5px;
  color: var(--accent-cyan);
  font-weight: 900;
  text-shadow: 0 2px 8px #000, 0 0 10px rgba(0, 0, 0, 0.95);
}

.grand-title-main {
  font-size: 38px;
  letter-spacing: 9px;
  font-weight: 900;
  margin: 1px 0 3px;
  color: #ffffff;
  text-shadow: 0 3px 0 #000, 0 0 22px rgba(255, 56, 184, 0.85), 0 0 38px rgba(56, 232, 255, 0.65);
}

.grand-subtitle {
  margin-bottom: 0;
  font-size: 11.5px;
  color: var(--accent-gold);
  text-shadow: 0 2px 6px #000, 0 0 8px #000;
}

.grand-cover-body {
  padding: 14px 26px 18px;
  background: linear-gradient(180deg, #0b0c13 0%, #07080c 100%);
}

.grand-cover-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.btn-grand-start {
  background: #dce2ed;
  color: #090a0f;
  border: 2px solid #ffffff;
  padding: 13px 40px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 3px;
  box-shadow: 0 5px 0 #565d6e;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.1s ease;
}

.btn-grand-start:hover {
  background: #c8d0df;
  border-color: #e4eaf5;
  transform: translateY(1px);
  box-shadow: 0 4px 0 #484f5e, 0 6px 14px rgba(255, 42, 109, 0.35), 0 -3px 12px rgba(0, 242, 255, 0.35);
}

/* ==================== 《曜蚀：烬与刃》原创史诗断剑荒原与裂渊对峙开始界面 ==================== */
.eclipse-title-screen,
.greyfall-title-screen {
  position: absolute;
  inset: 0;
  background: #040508;
  display: block;
  overflow: hidden;
  backdrop-filter: none;
}

.greyfall-title-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  z-index: 1;
}

.eclipse-top-bar {
  position: absolute;
  top: 18px;
  right: 28px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-pill-btn {
  height: 36px !important;
  padding: 0 14px !important;
  font-size: 12.5px !important;
  gap: 8px;
}

.eclipse-title-header {
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  text-align: center;
  pointer-events: none;
  width: 760px;
  max-width: 92%;
}

.eclipse-eyebrow {
  display: inline-block;
  padding: 3px 14px;
  background: rgba(10, 13, 20, 0.85);
  border: 1px solid #3a4256;
  color: #98a2b8;
  font-family: "Courier New", Consolas, monospace;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2.5px;
  margin-bottom: 8px;
  box-shadow: 0 3px 0 #05060a;
}

.eclipse-main-logo {
  font-size: 52px;
  font-weight: 900;
  letter-spacing: 12px;
  color: #f2f5fc;
  margin: 0;
  text-shadow:
    0 4px 0 #05060a,
    -3px 0 0 #1e2433,
    3px 0 0 #1e2433,
    0 8px 28px rgba(0, 0, 0, 0.95);
}

.eclipse-main-logo .logo-divider {
  color: #7c869c;
  font-weight: 400;
}

.eclipse-sub-logo {
  font-family: "Courier New", Consolas, monospace;
  font-size: 15px;
  font-weight: 900;
  color: #8c96ab;
  letter-spacing: 6px;
  margin-top: 2px;
  text-shadow: 0 2px 0 #000;
}

.eclipse-poetic-line {
  font-size: 13px;
  color: #a8b2c6;
  letter-spacing: 1.5px;
  margin-top: 8px;
  font-weight: 700;
  text-shadow: 0 2px 4px #000, 0 0 10px #000;
}

/* 底部居中：黑曜石阶主控台（不遮挡左右悬崖上的封面骑士与封面巨像） */
.eclipse-command-dock {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 680px;
  max-width: 94%;
}

/* 主开始按键：厚重灰白石板，按下时深陷石槽，四周缝隙缓慢溢出彩色粘稠汁液 */
.eclipse-main-btn,
.greymenu-start-btn {
  width: 340px;
  height: 62px;
  background: linear-gradient(180deg, #eef2f9 0%, #cfd6e4 100%);
  color: #090b10;
  border: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  cursor: pointer;
  font-family: inherit;
  box-shadow:
    0 6px 0 #485063,
    0 10px 24px rgba(0, 0, 0, 0.9);
  transition: transform 0.09s cubic-bezier(0.2, 0.9, 0.3, 1), background 0.12s ease, box-shadow 0.12s ease;
  position: relative;
}

.eclipse-main-btn .start-emblem {
  font-size: 22px;
}

.eclipse-main-btn .start-label,
.greymenu-start-btn .start-label {
  font-size: 23px;
  font-weight: 900;
  letter-spacing: 5px;
  color: #080a0f;
}

.eclipse-main-btn .start-key-box,
.greymenu-start-btn .start-key-box {
  font-family: "Courier New", Consolas, monospace;
  font-size: 12px;
  font-weight: 900;
  color: #262b38;
  border: 2px solid #586175;
  padding: 2px 8px;
  background: #dce2ef;
}

.eclipse-main-btn:hover,
.greymenu-start-btn:hover {
  background: linear-gradient(180deg, #ffffff 0%, #dce3f0 100%);
  transform: translateY(-1px);
  box-shadow:
    0 7px 0 #566078,
    0 12px 28px rgba(0, 0, 0, 0.95);
}

.eclipse-sub-dock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.eclipse-dock-btn,
.greymenu-sub-btn {
  height: 42px;
  background: #12151f;
  color: #cfd6e6;
  border: 2px solid #3d4558;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 800;
  box-shadow: 0 5px 0 #07080d, 0 8px 18px rgba(0, 0, 0, 0.8);
  transition: transform 0.08s ease, background 0.1s ease, border-color 0.1s ease, box-shadow 0.1s ease;
  position: relative;
}

.eclipse-dock-btn kbd,
.greymenu-sub-btn kbd {
  font-family: "Courier New", Consolas, monospace;
  font-size: 11px;
  font-weight: 900;
  color: #b8c2d6;
  border: 1px solid #58627a;
  padding: 1px 6px;
  background: #1b202e;
}

.eclipse-dock-btn:hover,
.greymenu-sub-btn:hover,
.eclipse-dock-btn.active-drawer-btn {
  background: #1d2232;
  color: #ffffff;
  border-color: #8c96ab;
}

.eclipse-status-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 5px 18px;
  background: rgba(8, 10, 16, 0.86);
  border: 1px solid #262c3d;
  color: #848e9f;
  font-size: 12px;
  font-weight: 700;
}

.eclipse-status-strip strong {
  color: #eef2f9;
}

.eclipse-status-strip .strip-dot {
  color: #495268;
  font-size: 10px;
}

/* ==================== UI 灰石按压下陷 + 缝隙缓慢溢出彩色汁水状态 ==================== */
.juice-squish-btn:active,
.juice-squish-btn.juice-pressed,
.btn-primary:active,
.btn-shop-action:active,
.choice-card:active,
.shop-item-card:active {
  transform: translateY(5px) scale(0.985, 0.93) !important;
  background: #6e7688 !important;
  color: #07080c !important;
  border-color: #b8c2d6 !important;
  box-shadow:
    0 1px 0 #1b1e28,
    -6px 4px 0 var(--seam-juice-1, #ff2a6d),
    6px 4px 0 var(--seam-juice-2, #00f2ff),
    0 6px 0 var(--seam-juice-3, #ffbe2e),
    0 8px 22px var(--seam-juice-1, rgba(255, 42, 109, 0.85)) !important;
}

/* ==================== 开始界面中央多功能图鉴/指南/战绩石板抽屉 ==================== */
.eclipse-modal-drawer {
  position: absolute;
  top: 156px;
  left: 50%;
  transform: translateX(-50%);
  width: 820px;
  max-width: 92%;
  max-height: 375px;
  background: rgba(10, 12, 18, 0.96);
  border: 2px solid #58627a;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.96), 0 0 0 4px rgba(18, 22, 32, 0.9);
  z-index: 12;
  padding: 16px 20px;
  color: #cfd6e6;
  overflow-y: auto;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #2e3546;
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.drawer-title {
  font-size: 17px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 2px;
}

.drawer-close-btn {
  background: #1b202e;
  border: 1px solid #58627a;
  color: #dce2ef;
  padding: 4px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.drawer-close-btn:hover {
  background: #2d3548;
  color: #ffffff;
}

.drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.drawer-card {
  background: #141824;
  border: 1px solid #2f374a;
  border-left: 3px solid #7c869c;
  padding: 9px 12px;
  font-size: 12px;
  line-height: 1.5;
}

.drawer-card b {
  color: #ffffff;
  font-size: 13px;
}

.drawer-bgm-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.drawer-bgm-btn {
  background: #181d2b;
  border: 1px solid #495268;
  color: #cfd6e6;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.drawer-bgm-btn:hover {
  background: #283044;
  color: #ffffff;
  border-color: #9aa4b8;
}

.ui-juice-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  image-rendering: pixelated;
}

/* ==================== 奥术灵力条 (MP Bar) & 红蓝药水栏 & 命运轮盘动画 ==================== */
.mp-frame {
  margin-top: 4px;
}

.mp-label {
  color: #82b4ff;
}

.mp-bar-outer {
  height: 14px;
  border-color: #3b4f78;
}

.mp-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  background: linear-gradient(90deg, #1d56d8, #38e8ff);
  transition: width 0.14s ease-out;
}

.potion-btn {
  font-weight: 900;
  border-width: 1.5px;
}

.hp-potion-btn {
  border-color: #ff4b68 !important;
  color: #ffb8c4 !important;
}

.mp-potion-btn {
  border-color: #38e8ff !important;
  color: #b8f6ff !important;
}

.stage-progress-pill {
  margin-top: 6px;
  padding: 5px 12px;
  background: rgba(12, 14, 22, 0.88);
  border: 1px solid #3a4054;
  color: #cfd6e8;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 1px;
  text-align: right;
}

.choice-card.fate-roulette-disabled {
  pointer-events: none !important;
  cursor: default !important;
  opacity: 0.45;
  transform: scale(0.96);
  transition: all 0.12s ease;
}

.choice-card.fate-roulette-active {
  opacity: 1 !important;
  transform: translateY(-8px) scale(1.04) !important;
  box-shadow: 0 0 36px rgba(255, 210, 56, 0.85), inset 0 0 22px rgba(255, 255, 255, 0.35) !important;
  border-color: #ffffff !important;
  z-index: 4;
}

.choice-card.fate-roulette-locked {
  opacity: 1 !important;
  transform: translateY(-12px) scale(1.07) !important;
  box-shadow: 0 0 52px rgba(56, 232, 255, 0.95), 0 0 26px rgba(255, 210, 56, 0.9) !important;
  border-color: #ffd238 !important;
  z-index: 6;
}
