/* ============================================================
 * 文件：css/hall-shops.css（v3 新增）
 * 作用：贵族展厅子场景样式 ——【魔法高塔】【托奇宝库】
 * NPC动作全是CSS动画，想改动作直接改这里的 @keyframes
 * ============================================================ */

/* ============ 魔法高塔 ============ */
#magicTower {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 30%, #2a1a4a 0%, #120a24 60%, #070412 100%);
}
.tower-room {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 20px; box-sizing: border-box;
}
.tower-title {
  font-size: 30px; font-weight: bold; color: #b39ddb;
  text-shadow: 0 0 20px rgba(149,117,205,0.7), 0 2px 4px rgba(0,0,0,0.8);
  letter-spacing: 4px;
}
.tower-subtitle {
  font-size: 12px; color: #7e6ba8; font-style: italic; letter-spacing: 1px;
}
/* 女巫NPC：身体轻微上下浮动 + 水晶球呼吸发光 */
.witch-stage { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.witch-npc { position: relative; width: 110px; height: 110px; display: flex; align-items: center; justify-content: center; }
.witch-body {
  font-size: 64px;
  filter: drop-shadow(0 0 14px rgba(149,117,205,0.6));
  animation: witchFloat 3.2s ease-in-out infinite;
}
.witch-orb {
  position: absolute; right: 2px; top: 8px; font-size: 24px;
  animation: orbPulse 2.1s ease-in-out infinite;
}
.witch-glow {
  position: absolute; inset: -18px; border-radius: 50%;
  background: radial-gradient(circle, rgba(149,117,205,0.28) 0%, transparent 70%);
  animation: glowBreathe 3.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes witchFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}
@keyframes orbPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(209,196,233,0.8)); }
  50% { transform: scale(1.18); filter: drop-shadow(0 0 12px rgba(209,196,233,1)); }
}
@keyframes glowBreathe {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}
/* 黑暗之魂 + 薇拉名字 水平并排 */
.witch-info-row {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-top: 2px;
}
.tower-dark-souls {
  font-size: 13px; color: #b388ff;
  text-shadow: 0 0 10px rgba(179,136,255,0.5);
  letter-spacing: 1px;
}
.witch-name {
  font-size: 13px; color: #9575cd; letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(149,117,205,0.5);
}
/* 魔法货架 */
.magic-shelf {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  width: min(92%, 340px); margin-top: 6px;
}
.magic-slot {
  aspect-ratio: 3/4;
  background: linear-gradient(160deg, rgba(69,39,160,0.35), rgba(26,15,51,0.85));
  border: 2px solid rgba(149,117,205,0.45);
  border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer;
  box-shadow: inset 0 0 18px rgba(149,117,205,0.15);
  transition: transform 0.2s;
}
.magic-slot:active { transform: scale(0.95); }
.magic-lock { font-size: 26px; opacity: 0.8; filter: drop-shadow(0 0 6px rgba(149,117,205,0.8)); }
.magic-lock-text { font-size: 10px; color: #9575cd; letter-spacing: 1px; }

/* ============ 托奇的珍宝店 ============ */
#treasureShop {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 25%, #4a3410 0%, #241804 60%, #120b02 100%);
}
.treasure-room {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 20px; box-sizing: border-box;
}
.treasure-title {
  font-size: 28px; font-weight: bold; color: #ffd700;
  text-shadow: 0 0 20px rgba(255,215,0,0.6), 0 2px 4px rgba(0,0,0,0.8);
  letter-spacing: 3px;
}
.treasure-subtitle {
  font-size: 12px; color: #c9a44a; font-style: italic; letter-spacing: 1px;
}
/* 富翁NPC：身体轻晃 + 金币抛接 */
.tycoon-stage { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tycoon-npc { position: relative; width: 110px; height: 110px; display: flex; align-items: center; justify-content: center; }
.tycoon-body {
  font-size: 62px;
  filter: drop-shadow(0 0 14px rgba(255,215,0,0.5));
  animation: tycoonSway 2.8s ease-in-out infinite;
}
.tycoon-coin {
  position: absolute; right: 6px; top: 0; font-size: 22px;
  animation: coinToss 1.6s ease-in-out infinite;
}
.tycoon-glow {
  position: absolute; inset: -18px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,215,0,0.22) 0%, transparent 70%);
  animation: glowBreathe 2.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes tycoonSway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}
@keyframes coinToss {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(180deg); }
  100% { transform: translateY(0) rotate(360deg); }
}
.tycoon-name {
  font-size: 13px; color: #ffd54f; letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(255,213,79,0.5);
}
/* 金锁货架 */
.treasure-shelf {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  width: min(92%, 340px); margin-top: 6px;
}
.treasure-slot {
  aspect-ratio: 3/4;
  background: linear-gradient(160deg, rgba(255,215,0,0.16), rgba(60,42,6,0.9));
  border: 2px solid rgba(255,215,0,0.5);
  border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer;
  box-shadow: inset 0 0 18px rgba(255,215,0,0.12), 0 0 8px rgba(255,215,0,0.1);
  transition: transform 0.2s;
}
.treasure-slot:active { transform: scale(0.95); }
.treasure-lock { font-size: 26px; opacity: 0.85; filter: drop-shadow(0 0 6px rgba(255,215,0,0.8)); }
.treasure-lock-text { font-size: 10px; color: #ffd54f; letter-spacing: 1px; }

/* 返回按钮永远在最上层，避免被货架/NPC光圈盖住 */
.tower-room .menu-btn, .treasure-room .menu-btn {
  position: relative; z-index: 30; flex-shrink: 0;
}
.tower-room, .treasure-room { overflow-y: auto; }

/* ============ 匠魂熔炉 ============ */
#forge {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 30%, #5a1a1a 0%, #2a0a0a 60%, #120303 100%);
}
.forge-room {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 20px; box-sizing: border-box;
}
.forge-title {
  margin-top: 50px;
  font-size: 30px; font-weight: bold; color: #ef5350;
  text-shadow: 0 0 20px rgba(239,83,80,0.7), 0 2px 4px rgba(0,0,0,0.8);
  letter-spacing: 4px;
}
.forge-subtitle {
  font-size: 12px; color: #b07070; font-style: italic; letter-spacing: 1px;
}
/* 老铁匠NPC：身体轻微上下浮动 + 红色光晕 */
.smith-stage { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.smith-npc { position: relative; width: 110px; height: 110px; display: flex; align-items: center; justify-content: center; }
.smith-body {
  font-size: 64px;
  filter: drop-shadow(0 0 14px rgba(239,83,80,0.6));
  animation: smithFloat 3.2s ease-in-out infinite;
}
.smith-glow {
  position: absolute; inset: -18px; border-radius: 50%;
  background: radial-gradient(circle, rgba(239,83,80,0.28) 0%, transparent 70%);
  animation: glowBreathe 3.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes smithFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}
.smith-name {
  font-size: 13px; color: #ef5350; letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(239,83,80,0.5);
}
/* 旧日之血 + 老铁匠名字 水平并排 */
.smith-info-row {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-top: 2px;
}
.forge-blood {
  font-size: 13px; color: #ef5350;
  text-shadow: 0 0 10px rgba(239,83,80,0.5);
  letter-spacing: 1px;
}
/* 大卡牌槽（已缩小25%） */
.forge-slot {
  width: min(85%, 225px);
  aspect-ratio: 3/4;
  background: linear-gradient(160deg, rgba(239,83,80,0.18), rgba(60,10,10,0.9));
  border: 3px solid rgba(239,83,80,0.55);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: inset 0 0 30px rgba(239,83,80,0.15), 0 0 20px rgba(239,83,80,0.2);
  transition: transform 0.2s, box-shadow 0.2s;
  margin-top: 10px;
}
.forge-slot:active { transform: scale(0.96); }
.forge-slot:hover {
  box-shadow: inset 0 0 40px rgba(239,83,80,0.25), 0 0 30px rgba(239,83,80,0.35);
}
.forge-slot-inner {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.forge-slot-icon { font-size: 36px; opacity: 0.7; filter: drop-shadow(0 0 8px rgba(239,83,80,0.6)); }
.forge-slot-text { font-size: 12px; color: #ef9a9a; letter-spacing: 2px; }
.forge-lock-icon { font-size: 36px; opacity: 0.7; filter: drop-shadow(0 0 8px rgba(239,83,80,0.6)); }
.forge-lock-text { font-size: 12px; color: #ef9a9a; letter-spacing: 2px; margin-top: 4px; }
/* 返回按钮永远在最上层 */
.forge-room .menu-btn { position: relative; z-index: 30; flex-shrink: 0; }
.forge-room { overflow-y: auto; }

/* ============ GALGAME 对话框（托奇宝库） ============ */
.gal-dialog {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  width: min(92%, 380px);
  background: rgba(10, 6, 2, 0.94);
  border: 2px solid rgba(255, 215, 0, 0.5);
  border-radius: 14px;
  padding: 14px 16px;
  z-index: 250;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(255, 215, 0, 0.15), inset 0 0 30px rgba(255, 215, 0, 0.05);
  animation: galDialogIn 0.35s ease-out;
}
@keyframes galDialogIn {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.gal-dialog-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.gal-avatar {
  font-size: 44px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.4));
  animation: galAvatarPop 0.4s ease-out;
}
@keyframes galAvatarPop {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.gal-text-area {
  flex: 1;
  min-width: 0;
}
.gal-name {
  font-size: 13px;
  color: #ffd700;
  font-weight: bold;
  letter-spacing: 2px;
  margin-bottom: 6px;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}
.gal-text {
  font-size: 15px;
  color: #f5e6c8;
  line-height: 1.6;
  min-height: 24px;
  letter-spacing: 0.5px;
  white-space: pre-wrap;
}
.gal-cursor {
  display: inline-block;
  width: 2px;
  height: 16px;
  background: #ffd700;
  margin-left: 2px;
  animation: galCursorBlink 0.6s step-end infinite;
  vertical-align: middle;
}
@keyframes galCursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
