/* ============ 佬盟 · 游戏化界面(重构) ============ */
/* 全屏地图/HUD/技能栏/任务面板/卷轴浮层,无传统页面 */

@font-face {
  font-family: 'Ma Shan Zheng';
  src: url('/public/fonts/MaShanZheng-Regular.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Noto Serif SC';
  src: url('/public/fonts/NotoSerifSC-Regular.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Serif SC';
  src: url('/public/fonts/NotoSerifSC-Bold.otf') format('opentype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'LXGW WenKai';
  src: url('/public/fonts/LXGWWenKai-Regular.ttf') format('truetype');
  font-display: swap;
}

:root {
  --bg: #0a0a0f;
  --bg-glow: radial-gradient(ellipse at 20% 20%, rgba(200,75,49,.08) 0%, transparent 50%),
             radial-gradient(ellipse at 80% 80%, rgba(212,175,55,.05) 0%, transparent 50%);
  --paper: #d4c4a8;
  --paper-dark: #b8a888;
  --ink: #1a1a1a;
  --seal: #c84b31;
  --seal-glow: rgba(200,75,49,.5);
  --gold: #d4af37;
  --gold-dim: #a88a2a;
  --gold-glow: rgba(212,175,55,.5);
  --rope: #8a6d3b;
  --rope-dark: #6a5a4a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  background: var(--bg);
  background-image: var(--bg-glow);
  color: var(--paper);
  font: 15px/1.8 'Noto Serif SC', 'LXGW WenKai', serif;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
a { color: var(--gold); text-decoration: none; transition: all .3s; }
a:hover { color: #f5e6d0; text-shadow: 0 0 8px var(--gold-glow); }

/* ============ 游戏 HUD:顶部状态栏 ============ */
.hud-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 20px;
  background: linear-gradient(180deg, rgba(10,10,15,.95), rgba(10,10,15,.85));
  border-bottom: 2px solid var(--rope);
  backdrop-filter: blur(10px);
}
.hud-logo {
  font-family: 'Ma Shan Zheng', serif; font-size: 26px; color: var(--gold);
  text-shadow: 0 0 12px var(--gold-glow);
  letter-spacing: 3px;
}
.hud-hp { /* 血条(名望) */
  flex: 1; max-width: 320px;
  background: rgba(0,0,0,.5); border: 2px solid var(--rope); border-radius: 12px;
  height: 26px; position: relative; overflow: hidden;
}
.hud-hp-fill {
  height: 100%; background: linear-gradient(90deg, var(--seal), var(--seal-dark));
  transition: width .5s;
  box-shadow: 0 0 12px var(--seal-glow);
}
.hud-hp-text {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #f5e6d0; font-weight: 700;
  text-shadow: 0 0 4px #000;
}
.hud-coin { /* 佬币 */
  display: flex; align-items: center; gap: 8px;
  font-size: 20px; color: var(--gold); font-weight: 900;
  text-shadow: 0 0 10px var(--gold-glow);
  font-family: 'Ma Shan Zheng', serif;
}
.hud-coin::before { content: '◈'; font-size: 22px; }
.hud-user {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--paper-dark);
}
.hud-user .wax {
  width: 26px; height: 26px; background: var(--seal);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #f5e6d0; font-size: 13px; font-weight: 700;
  box-shadow: 0 0 10px var(--seal-glow);
}
.badge-dot {
  display: inline-block; min-width: 18px; padding: 0 5px;
  background: var(--seal); color: #f5e6d0;
  font-size: 11px; text-align: center; font-weight: 700;
  border-radius: 50%; box-shadow: 0 0 8px var(--seal-glow);
}

/* ============ 游戏主界面:全屏地图 ============ */
.game-map {
  position: fixed; top: 60px; left: 0; right: 0; bottom: 80px;
  background:
    radial-gradient(circle at 30% 40%, rgba(212,196,168,.03) 0%, transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(212,196,168,.02) 0%, transparent 40%);
  overflow: hidden;
}
.map-location {
  position: absolute; cursor: pointer;
  transition: all .3s;
  text-align: center;
  z-index: 10;
}
.map-location:hover {
  transform: scale(1.15);
  filter: drop-shadow(0 0 24px var(--gold-glow));
  z-index: 20;
}
.map-location .icon {
  font-size: 52px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.6));
}
.map-location .name {
  margin-top: 10px; font-size: 15px; color: var(--gold);
  text-shadow: 0 0 10px var(--gold-glow);
  font-weight: 700; font-family: 'Ma Shan Zheng', serif;
}
.map-location .count {
  margin-top: 6px; font-size: 12px; color: var(--seal);
  background: rgba(0,0,0,.7); padding: 3px 10px; border-radius: 12px;
  border: 1px solid var(--seal);
  box-shadow: 0 0 8px var(--seal-glow);
}

/* 地点位置 */
.loc-inn { top: 22%; left: 18%; }
.loc-escort { top: 28%; right: 22%; }
.loc-hero { bottom: 32%; left: 22%; }
.loc-post { bottom: 28%; right: 18%; }
.loc-bank { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.loc-court { top: 18%; left: 50%; transform: translateX(-50%); }

/* ============ 游戏侧边栏:任务面板 ============ */
.quest-panel {
  position: fixed; right: 20px; top: 80px; bottom: 100px;
  width: 340px;
  background: linear-gradient(180deg, rgba(26,26,26,.95), rgba(10,10,15,.95));
  border: 2px solid var(--rope); border-radius: 8px;
  padding: 20px;
  overflow-y: auto;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
}
.quest-title {
  font-family: 'Ma Shan Zheng', serif; font-size: 22px; color: var(--gold); text-align: center;
  border-bottom: 2px solid var(--rope); padding-bottom: 14px; margin-bottom: 18px;
  text-shadow: 0 0 10px var(--gold-glow);
  letter-spacing: 2px;
}
.quest-item {
  background: rgba(212,196,168,.05); border: 1px solid var(--rope);
  border-radius: 6px; padding: 16px; margin-bottom: 14px;
  cursor: pointer; transition: all .3s;
}
.quest-item:hover {
  background: rgba(212,196,168,.1); border-color: var(--gold);
  box-shadow: 0 0 16px var(--gold-glow);
  transform: translateX(-4px);
}
.quest-item .q-title {
  font-size: 16px; color: var(--gold); margin-bottom: 8px;
  font-family: 'Ma Shan Zheng', serif;
}
.quest-item .q-desc {
  font-size: 13px; color: var(--paper-dark); line-height: 1.7;
}
.quest-item .q-reward {
  margin-top: 10px; font-size: 15px; color: var(--seal);
  font-weight: 700; font-family: 'Ma Shan Zheng', serif;
  text-shadow: 0 0 8px var(--seal-glow);
}

/* ============ 游戏底部:技能栏 ============ */
.skill-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
  display: flex; justify-content: center; gap: 14px;
  padding: 18px 20px;
  background: linear-gradient(0deg, rgba(10,10,15,.95), rgba(10,10,15,.85));
  border-top: 2px solid var(--rope);
  backdrop-filter: blur(10px);
}
.skill-slot {
  width: 70px; height: 70px;
  background: linear-gradient(180deg, #4a3a2a, #2a1f14);
  border: 2px solid var(--rope); border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; transition: all .3s;
  font-size: 28px;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
.skill-slot:hover {
  border-color: var(--gold); transform: translateY(-6px);
  box-shadow: 0 0 20px var(--gold-glow);
}
.skill-slot .key {
  position: absolute; bottom: 3px; right: 5px;
  font-size: 10px; color: var(--rope);
}
.skill-slot .label {
  font-size: 11px; color: var(--paper); margin-top: 6px;
  font-family: 'Ma Shan Zheng', serif;
}

/* ============ 游戏弹窗:卷轴浮层 ============ */
.scroll-modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 90%; max-width: 640px; max-height: 85vh;
  background: linear-gradient(180deg, var(--paper), var(--paper-dark));
  border: 4px solid var(--rope); border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0,0,0,.9), 0 0 40px var(--gold-glow);
  z-index: 2000;
  overflow-y: auto;
  display: none;
}
.scroll-modal.open { display: block; }
.scroll-header {
  background: var(--rope); color: #f5e6d0;
  padding: 18px 28px; font-size: 22px; font-weight: 700;
  text-align: center; letter-spacing: 3px;
  font-family: 'Ma Shan Zheng', serif;
  text-shadow: 0 0 8px rgba(0,0,0,.5);
}
.scroll-body {
  padding: 28px; color: var(--ink);
}
.scroll-close {
  position: absolute; top: 14px; right: 20px;
  background: none; border: none; font-size: 28px; color: #f5e6d0;
  cursor: pointer; font-family: inherit;
  text-shadow: 0 0 4px #000;
}

/* ============ 游戏按钮:朱砂印 ============ */
.game-btn {
  background: linear-gradient(135deg, var(--seal), var(--seal-dark));
  border: none; border-radius: 6px;
  padding: 14px 28px; color: #f5e6d0; font-size: 16px; font-weight: 700;
  cursor: pointer; box-shadow: 0 0 20px var(--seal-glow);
  transition: all .2s; font-family: 'Ma Shan Zheng', serif;
  letter-spacing: 2px;
}
.game-btn:hover {
  filter: brightness(1.2); transform: translateY(2px);
  box-shadow: 0 0 28px var(--seal-glow);
}
.game-btn:active {
  transform: translateY(3px);
}

/* ============ 表单:卷轴内 ============ */
.scroll-body input, .scroll-body textarea, .scroll-body select {
  width: 100%; padding: 12px 16px;
  background: rgba(255,255,255,.8); color: var(--ink);
  border: 2px solid var(--rope); border-radius: 4px;
  font: inherit; transition: all .3s;
}
.scroll-body input:focus, .scroll-body textarea:focus, .scroll-body select:focus {
  outline: none; border-color: var(--seal); box-shadow: 0 0 12px var(--seal-glow);
}
.scroll-body textarea { min-height: 100px; resize: vertical; }
.scroll-body label {
  display: block; margin: 14px 0 8px; font-size: 14px; color: var(--ink-light);
  font-family: 'LXGW WenKai', serif;
}

/* ============ 悬赏帖(卷轴内) ============ */
.bounty-in-scroll {
  background: rgba(255,255,255,.5); border: 2px solid var(--rope);
  border-radius: 6px; padding: 20px; margin-bottom: 16px;
}
.bounty-in-scroll .b-title {
  font-size: 18px; color: var(--ink); font-weight: 700;
  margin-bottom: 8px; font-family: 'Ma Shan Zheng', serif;
}
.bounty-in-scroll .b-desc {
  font-size: 14px; color: var(--ink-light); line-height: 1.8;
  margin-bottom: 12px;
}
.bounty-in-scroll .b-reward {
  font-size: 18px; color: var(--seal); font-weight: 900;
  font-family: 'Ma Shan Zheng', serif;
}

/* ============ 名册(卷轴内) ============ */
.xia-in-scroll {
  background: rgba(255,255,255,.5); border: 2px solid var(--rope);
  border-radius: 6px; padding: 16px; margin-bottom: 14px;
  display: flex; align-items: center; gap: 16px;
}
.xia-in-scroll .x-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--rope), var(--rope-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #f5e6d0; border: 2px solid var(--ink);
  font-family: 'Ma Shan Zheng', serif;
}
.xia-in-scroll .x-info { flex: 1; }
.xia-in-scroll .x-name {
  font-size: 17px; color: var(--ink); font-weight: 700;
  font-family: 'Ma Shan Zheng', serif;
}
.xia-in-scroll .x-tags {
  font-size: 12px; color: var(--ink-light); margin-top: 4px;
}
.xia-in-scroll .x-stats {
  text-align: right; font-size: 13px; color: var(--ink);
}
.xia-in-scroll .x-num {
  font-size: 18px; color: var(--seal); font-weight: 900;
  font-family: 'Ma Shan Zheng', serif;
}

/* ============ 响应式 ============ */
@media (max-width: 768px) {
  .quest-panel { display: none; }
  .map-location .icon { font-size: 40px; }
  .map-location .name { font-size: 13px; }
  .skill-slot { width: 56px; height: 56px; font-size: 24px; }
  .skill-slot .label { font-size: 10px; }
  .hud-hp { max-width: 200px; height: 22px; }
  .hud-coin { font-size: 16px; }
  .scroll-modal { width: 95%; max-height: 90vh; }
}

@media (max-width: 480px) {
  .loc-inn { top: 15%; left: 10%; }
  .loc-escort { top: 20%; right: 10%; }
  .loc-hero { bottom: 25%; left: 10%; }
  .loc-post { bottom: 20%; right: 10%; }
  .loc-bank { top: 50%; left: 50%; }
  .loc-court { top: 10%; left: 50%; }
}
