/* ============ 仙途 · 修仙风格响应式样式 ============ */
:root {
  --bg: #0b1020;
  --bg2: #101831;
  --card: rgba(24, 34, 66, 0.72);
  --card2: rgba(30, 42, 82, 0.6);
  --gold: #d4af37;
  --gold2: #f5d76e;
  --gold-dim: #8a6d1f;
  --txt: #e8e6df;
  --txt2: #9aa3b5;
  --green: #4ade80;
  --red: #f87171;
  --blue: #60a5fa;
  --purple: #c084fc;
  --radius: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  background: radial-gradient(1200px 800px at 70% -10%, #1a2c5e 0%, var(--bg) 55%), var(--bg);
  color: var(--txt);
  font-size: 14px;
  overflow-x: hidden;
}
.hidden { display: none !important; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #2c3a6b; border-radius: 3px; }

.card {
  background: var(--card);
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}
.btn {
  border: none; cursor: pointer; border-radius: 10px; padding: 10px 18px;
  font-size: 14px; font-weight: 600; transition: all .15s; color: var(--txt);
  background: linear-gradient(180deg, #2c3a6b, #1c2748);
}
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-gold {
  background: linear-gradient(180deg, #f0d264, #c9a227 60%, #a8841a);
  color: #241a02; text-shadow: 0 1px 0 rgba(255,255,255,.35);
  box-shadow: 0 3px 12px rgba(212, 175, 55, 0.35);
}
.btn-gold:disabled { background: #5d5230; color: #aaa; box-shadow: none; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.btn-red { background: linear-gradient(180deg, #7f2a2a, #541c1c); }
.btn-green { background: linear-gradient(180deg, #1f7a45, #14522e); }
.inp {
  width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid #33417a;
  background: rgba(10, 15, 32, 0.8); color: var(--txt); font-size: 15px; outline: none;
}
.inp:focus { border-color: var(--gold); }
.inp::placeholder { color: #66708a; }

/* ========== 登录页（仙途 · 星辰山海） ========== */
#login-view {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; position: relative;
  background: linear-gradient(180deg, #05070f 0%, #0a1024 38%, #131c3a 68%, #0b1020 100%);
  overflow: hidden;
}
.login-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.lb-stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(255,255,255,.9), transparent 50%),
    radial-gradient(1px 1px at 28% 65%, rgba(255,255,255,.7), transparent 50%),
    radial-gradient(1.5px 1.5px at 36% 15%, rgba(212,175,55,.85), transparent 50%),
    radial-gradient(1px 1px at 48% 42%, rgba(255,255,255,.6), transparent 50%),
    radial-gradient(2px 2px at 55% 78%, rgba(255,255,255,.85), transparent 50%),
    radial-gradient(1px 1px at 63% 30%, rgba(212,175,55,.7), transparent 50%),
    radial-gradient(1.5px 1.5px at 71% 58%, rgba(255,255,255,.75), transparent 50%),
    radial-gradient(1px 1px at 80% 18%, rgba(255,255,255,.65), transparent 50%),
    radial-gradient(2px 2px at 86% 70%, rgba(212,175,55,.8), transparent 50%),
    radial-gradient(1px 1px at 92% 40%, rgba(255,255,255,.55), transparent 50%),
    radial-gradient(1.5px 1.5px at 8% 85%, rgba(255,255,255,.6), transparent 50%),
    radial-gradient(1px 1px at 20% 8%, rgba(212,175,55,.6), transparent 50%),
    radial-gradient(1.5px 1.5px at 68% 88%, rgba(255,255,255,.5), transparent 50%),
    radial-gradient(1px 1px at 42% 92%, rgba(255,255,255,.45), transparent 50%);
  animation: starTwinkle 5s ease-in-out infinite alternate;
}
@keyframes starTwinkle { from { opacity: .55; } to { opacity: 1; } }
.lb-moon {
  position: absolute; top: 9%; right: 12%; width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #fffbe8, #f5e6a8 45%, #e8d48a 70%, rgba(232,212,138,0) 72%);
  filter: drop-shadow(0 0 42px rgba(245, 230, 168, .45));
  animation: moonFloat 9s ease-in-out infinite;
}
@keyframes moonFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.lb-aura {
  position: absolute; top: 50%; left: 50%; width: 640px; height: 640px; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(212,175,55,.09) 0%, rgba(212,175,55,.03) 40%, transparent 70%);
  animation: auraPulse 7s ease-in-out infinite;
}
@keyframes auraPulse { 0%,100% { opacity: .7; transform: translate(-50%,-50%) scale(1); } 50% { opacity: 1; transform: translate(-50%,-50%) scale(1.08); } }
.lb-mountain { position: absolute; left: 0; width: 100%; pointer-events: none; }
.lb-mt-far { bottom: 0; height: 32vh; animation: mtDrift 26s ease-in-out infinite alternate; }
.lb-mt-near { bottom: 0; height: 24vh; animation: mtDrift 20s ease-in-out infinite alternate-reverse; }
@keyframes mtDrift { from { transform: translateX(-12px); } to { transform: translateX(12px); } }
.lb-cloud { position: absolute; border-radius: 50%; background: rgba(148,163,205,.08); filter: blur(2px); }
.lb-c1 { left: -8%; top: 22%; width: 42vw; height: 46px; animation: cloudDrift 34s linear infinite; }
.lb-c2 { left: 30%; top: 64%; width: 52vw; height: 30px; background: rgba(148,163,205,.06); animation: cloudDrift 46s linear infinite reverse; }
@keyframes cloudDrift { from { transform: translateX(-8vw); } to { transform: translateX(110vw); } }
.lb-fly { position: absolute; font-size: 22px; opacity: .35; animation: flyBy 12s ease-in-out infinite; filter: drop-shadow(0 0 8px rgba(212,175,55,.5)); }
.lb-f1 { top: 18%; left: -6%; animation-delay: 0s; }
.lb-f2 { top: 72%; left: -6%; font-size: 16px; animation-delay: 5s; animation-duration: 16s; }
@keyframes flyBy {
  0% { transform: translateX(-40px) translateY(0) rotate(-12deg); opacity: 0; }
  8% { opacity: .5; }
  55% { opacity: .4; }
  100% { transform: translateX(110vw) translateY(-48px) rotate(8deg); opacity: 0; }
}
.lb-petals {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(3px 3px at 15% 12%, rgba(255,215,120,.8), transparent 60%),
    radial-gradient(2.5px 2.5px at 32% 28%, rgba(255,215,120,.55), transparent 60%),
    radial-gradient(2px 2px at 58% 18%, rgba(255,215,120,.7), transparent 60%),
    radial-gradient(3px 3px at 74% 34%, rgba(255,215,120,.5), transparent 60%),
    radial-gradient(2px 2px at 88% 15%, rgba(255,215,120,.6), transparent 60%),
    radial-gradient(2.5px 2.5px at 45% 8%, rgba(255,215,120,.65), transparent 60%);
  animation: petalFall 8s linear infinite;
}
@keyframes petalFall {
  from { transform: translateY(-6vh); opacity: 0; }
  12% { opacity: .9; }
  85% { opacity: .5; }
  to { transform: translateY(106vh); opacity: 0; }
}
.login-box-wrap { position: relative; z-index: 2; width: 100%; max-width: 380px; animation: boxFloat 6s ease-in-out infinite; }
@keyframes boxFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.login-box {
  width: 100%; padding: 38px 30px 30px; text-align: center; position: relative;
  background: linear-gradient(165deg, rgba(26,35,62,.82) 0%, rgba(14,19,38,.9) 100%);
  border: 1px solid rgba(212,175,55,.32); border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0,0,0,.6), 0 0 46px rgba(212,175,55,.08), inset 0 1px 0 rgba(255,255,255,.07);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}
.login-box::before {
  content: ''; position: absolute; top: 0; left: 8%; right: 8%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240,210,100,.85), transparent);
}
.login-box::after {
  content: ''; position: absolute; bottom: -60px; left: 50%; transform: translateX(-50%);
  width: 240px; height: 120px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(212,175,55,.14), transparent 65%);
  pointer-events: none;
}
.lb-glow { position: absolute; top: -70px; left: 50%; transform: translateX(-50%); width: 220px; height: 130px; background: radial-gradient(ellipse at center, rgba(240,210,100,.22), transparent 70%); pointer-events: none; }
.login-logo {
  width: 74px; height: 74px; margin: 6px auto 14px; border-radius: 50%; position: relative;
  background: radial-gradient(circle at 35% 30%, #ffe9a8, #c9a227 60%, #7a5f14);
  color: #241a02; font-size: 40px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  font-family: "STKaiti", "KaiTi", serif;
  box-shadow: 0 0 38px rgba(212,175,55,.55), inset 0 -3px 8px rgba(0,0,0,.25);
  z-index: 1;
}
.login-logo::before, .login-logo::after {
  content: ''; position: absolute; inset: -13px; border-radius: 50%; pointer-events: none;
  border: 1px dashed rgba(240,210,100,.45);
}
.login-logo::before { animation: auraSpin 10s linear infinite; }
.login-logo::after { inset: -25px; border: 1px solid rgba(240,210,100,.14); border-style: dotted; animation: auraSpin 16s linear infinite reverse; }
@keyframes auraSpin { to { transform: rotate(360deg); } }
.login-title {
  font-size: 34px; letter-spacing: 14px; margin: 0; padding-left: 14px;
  font-family: "STKaiti", "KaiTi", serif; font-weight: 700;
  background: linear-gradient(100deg, #a9821f, #ffd76a 35%, #fff3c4 50%, #ffd76a 65%, #a9821f);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: titleShine 5s linear infinite;
}
@keyframes titleShine { to { background-position: -200% 0; } }
.login-sub { color: var(--txt2); margin: 8px 0 24px; font-size: 13px; letter-spacing: 2px; }
.login-tabs { display: flex; gap: 8px; margin-bottom: 18px; position: relative; }
.login-tabs button {
  flex: 1; padding: 10px; border-radius: 10px; border: 1px solid rgba(120,140,190,.28); background: rgba(255,255,255,.03); color: var(--txt2); cursor: pointer; font-size: 14px; transition: all .25s; letter-spacing: 3px;
}
.login-tabs button:hover { border-color: rgba(212,175,55,.4); color: #ffe9a8; }
.login-tabs button.active {
  background: linear-gradient(180deg, #f0d264, #c9a227 70%, #a9821f); color: #241a02; font-weight: 700;
  border-color: var(--gold); box-shadow: 0 3px 16px rgba(212,175,55,.35);
}
.login-box .inp {
  margin-bottom: 13px; text-align: center; width: 100%;
  background: rgba(255,255,255,.05); border: 1px solid rgba(120,140,190,.28); border-radius: 11px;
  padding: 12px 14px; color: #eef0f8; font-size: 14px; transition: all .25s; box-sizing: border-box;
}
.login-box .inp::placeholder { color: #5d6a8f; }
.login-box .inp:focus {
  outline: none; border-color: rgba(212,175,55,.75);
  box-shadow: 0 0 0 3px rgba(212,175,55,.14), 0 0 20px rgba(212,175,55,.22);
  background: rgba(255,255,255,.07);
}
#btn-submit {
  width: 100%; margin-top: 6px; border: none; border-radius: 12px; padding: 13px; cursor: pointer;
  font-size: 16px; font-weight: 800; letter-spacing: 8px; padding-left: 8px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #8a6a14, #d4af37 45%, #f0d078 55%, #b8860b);
  color: #241a02; box-shadow: 0 5px 20px rgba(212,175,55,.32); transition: transform .2s, box-shadow .2s;
}
#btn-submit:hover { transform: translateY(-2px); box-shadow: 0 9px 30px rgba(212,175,55,.5); }
#btn-submit:active { transform: translateY(0); }
#btn-submit::after {
  content: ''; position: absolute; top: 0; left: -70%; width: 42%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg); animation: btnShine 3.2s ease-in-out infinite;
}
@keyframes btnShine { 0% { left: -70%; } 55%,100% { left: 130%; } }
.login-msg { min-height: 20px; color: var(--red); font-size: 13px; margin-top: 10px; }
.login-msg:empty::before { content: '　'; }
.login-hint { color: #55617e; font-size: 12px; margin-top: 14px; letter-spacing: 1px; }
@media (max-width: 480px) {
  .lb-moon { width: 90px; height: 90px; top: 6%; right: 8%; }
  .login-box { padding: 30px 22px 24px; }
  .login-title { font-size: 30px; }
}

/* ---------- 游戏布局 ---------- */
#game-view { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px; background: rgba(11, 16, 32, 0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
}
.logo-sm {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, #ffe9a8, #c9a227 65%);
  color: #241a02; font-weight: 800; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.45);
}
.tb-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tb-id { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.tb-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 26vw; }
.tb-realm { font-size: 11px; color: var(--gold2); }
.tb-right { display: flex; gap: 10px; align-items: center; }
.tb-stat { display: flex; align-items: center; gap: 3px; font-size: 12px; color: var(--txt2); }
.tb-stat b { color: var(--txt); font-size: 13px; }
#tb-mail.has-mail { color: var(--gold2); font-weight: 700; }

.banner {
  background: linear-gradient(90deg, rgba(180, 60, 60, 0.9), rgba(120, 30, 30, 0.9));
  padding: 8px 14px; font-size: 13px; text-align: center; color: #ffe;
}

.layout { display: flex; flex: 1; gap: 14px; padding: 14px; max-width: 1360px; width: 100%; margin: 0 auto; align-items: flex-start; }

/* 侧边导航 */
.side-nav { width: 76px; flex: none; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 64px; }
.nav-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0; border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  background: transparent; color: var(--txt2); font-size: 11px;
}
.nav-btn .nav-ic { font-size: 19px; }
.nav-btn:hover { background: rgba(212, 175, 55, 0.08); color: var(--txt); }
.nav-btn.active { background: linear-gradient(180deg, rgba(212,175,55,.2), rgba(212,175,55,.08)); border-color: rgba(212, 175, 55, 0.4); color: var(--gold2); }

/* 主内容 */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding-bottom: 70px; }
.tab { display: flex; flex-direction: column; gap: 14px; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 右侧面板 */
.side-right { width: 250px; flex: none; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 64px; max-height: calc(100vh - 80px); overflow: auto; }
.rp-card { padding: 12px; }
.rp-title { font-size: 13px; color: var(--gold2); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.badge { background: rgba(212, 175, 55, 0.2); color: var(--gold2); border-radius: 20px; padding: 1px 8px; font-size: 11px; }
.rp-list { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow: auto; }
.rp-item { display: flex; justify-content: space-between; align-items: center; font-size: 12px; padding: 5px 8px; border-radius: 8px; background: var(--card2); }
.rp-item .nm { color: var(--txt); }
.rp-item .st { color: var(--gold2); font-size: 11px; }

/* 底部导航（手机） */
.bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: rgba(11, 16, 32, 0.96); backdrop-filter: blur(10px);
  border-top: 1px solid rgba(212, 175, 55, 0.25);
  padding: 5px 0 calc(5px + env(safe-area-inset-bottom));
}
.bn-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: none; border: none; color: var(--txt2); font-size: 10px; padding: 4px 0; cursor: pointer;
}
.bn-btn .bn-ic { font-size: 20px; }
.bn-btn.active { color: var(--gold2); }
.more-sheet {
  position: fixed; bottom: 62px; right: 10px; z-index: 59; background: rgba(16, 24, 49, 0.98);
  border: 1px solid rgba(212, 175, 55, 0.3); border-radius: 14px; padding: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}
.more-grid { display: grid; grid-template-columns: repeat(3, 72px); gap: 8px; }
.more-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px;
  background: var(--card2); border: none; border-radius: 10px; color: var(--txt); font-size: 12px; cursor: pointer;
}
.more-item span { font-size: 20px; }

/* ---------- 通用组件 ---------- */
.panel { padding: 16px; }
.panel h2 { font-size: 16px; color: var(--gold2); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.panel h2 .sub { font-size: 11px; color: var(--txt2); font-weight: 400; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bar-wrap { height: 12px; background: rgba(0, 0, 0, 0.4); border-radius: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,.06); }
.bar { height: 100%; border-radius: 8px; transition: width .3s; background: linear-gradient(90deg, #c9a227, #f5d76e); }
.bar.hp { background: linear-gradient(90deg, #c24040, #f87171); }
.bar.mp { background: linear-gradient(90deg, #2563a8, #60a5fa); }
.bar.xp { background: linear-gradient(90deg, #8a6d1f, #f5d76e); }
.bar.dandu { background: linear-gradient(90deg, #3f6212, #84cc16); }
.bar-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--txt2); margin-bottom: 4px; }
.bar-label b { color: var(--txt); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 600px) { .grid2 { grid-template-columns: 1fr; } .grid3 { grid-template-columns: 1fr 1fr; } }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; }
.stat-item { background: var(--card2); border-radius: 10px; padding: 8px 6px; text-align: center; }
.stat-item .v { font-size: 15px; font-weight: 700; color: var(--gold2); }
.stat-item .k { font-size: 11px; color: var(--txt2); margin-top: 2px; }

.list-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; background: var(--card2); border: 1px solid rgba(255,255,255,.04);
}
.list-item + .list-item { margin-top: 8px; }
.list-item .li-main { flex: 1; min-width: 0; }
.list-item .li-title { font-weight: 600; font-size: 14px; }
.list-item .li-sub { font-size: 12px; color: var(--txt2); margin-top: 2px; }

.q-gray { color: #5a6585; }
.q-凡品 { color: #9ca3af; } .q-黄阶 { color: #4ade80; } .q-玄阶 { color: #60a5fa; }
.q-地阶 { color: #c084fc; } .q-天阶 { color: #fb923c; } .q-仙品 { color: #facc15; }

/* 大按钮（修炼） */
.big-btn {
  width: 100%; max-width: 340px; margin: 0 auto; padding: 22px;
  border-radius: 18px; border: 1px solid rgba(212, 175, 55, 0.5); cursor: pointer;
  background: radial-gradient(circle at 50% 30%, #2a3a6e, #121b38);
  color: var(--gold2); font-size: 17px; font-weight: 700; letter-spacing: 4px;
  box-shadow: 0 0 24px rgba(212, 175, 55, 0.15), inset 0 0 30px rgba(212, 175, 55, 0.06);
  transition: all .15s; position: relative; overflow: hidden;
}
.big-btn:active { transform: scale(0.97); }
.big-btn:disabled { opacity: .5; }
.big-btn .cd-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 40px; color: rgba(245, 215, 110, 0.9); background: rgba(11, 16, 32, 0.55); }

.realm-banner {
  text-align: center; padding: 14px; border-radius: 14px;
  background: radial-gradient(circle at 50% 0%, rgba(212,175,55,.16), transparent 70%);
  border: 1px solid rgba(212, 175, 55, 0.3);
}
.realm-banner .r-name { font-size: 26px; font-weight: 800; color: var(--gold2); font-family: "STKaiti", "KaiTi", serif; letter-spacing: 6px; text-shadow: 0 0 18px rgba(212, 175, 55, 0.5); }
.realm-banner .r-power { color: var(--txt2); font-size: 12px; margin-top: 4px; }

.switch { position: relative; width: 44px; height: 24px; border-radius: 12px; background: #2c3a6b; cursor: pointer; border: none; transition: background .2s; flex: none; }
.switch.on { background: linear-gradient(90deg, #c9a227, #f0d264); }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .2s; }
.switch.on::after { left: 23px; }

.tag { display: inline-block; font-size: 10px; padding: 1px 7px; border-radius: 10px; background: rgba(212,175,55,.15); color: var(--gold2); margin-left: 6px; vertical-align: middle; }
.tag.green { background: rgba(74,222,128,.15); color: var(--green); }
.tag.red { background: rgba(248,113,113,.15); color: var(--red); }

/* 聊天 */
.chat-box { display: flex; flex-direction: column; height: calc(100vh - 210px); min-height: 320px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: rgba(6, 10, 22, 0.5); border-radius: 10px; border: 1px solid rgba(255,255,255,.05); }
.chat-msg { font-size: 13px; line-height: 1.5; }
.chat-msg .who { color: var(--blue); font-weight: 600; }
.chat-msg .txt { color: var(--txt); word-break: break-all; }
.chat-msg.sys { color: var(--gold2); text-align: center; font-size: 12px; background: rgba(212,175,55,.06); border-radius: 8px; padding: 4px 8px; }
.chat-input-row { display: flex; gap: 8px; margin-top: 10px; }
.chat-input-row .inp { flex: 1; }

/* 排行 */
.rank-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rank-table th { color: var(--txt2); font-weight: 500; font-size: 12px; padding: 8px 6px; text-align: left; border-bottom: 1px solid rgba(212,175,55,.2); }
.rank-table td { padding: 8px 6px; border-bottom: 1px solid rgba(255,255,255,.05); }
.rank-table tr.me td { background: rgba(212, 175, 55, 0.1); }
.rank-no { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; background: #2c3a6b; color: var(--txt2); }
.rank-no.top1 { background: linear-gradient(180deg, #f5d76e, #c9a227); color: #241a02; font-weight: 800; }
.rank-no.top2 { background: linear-gradient(180deg, #d8dbe0, #9aa3b5); color: #222; font-weight: 700; }
.rank-no.top3 { background: linear-gradient(180deg, #e0a878, #b06a3a); color: #2a1505; font-weight: 700; }

/* 探索 */
.region-card { cursor: pointer; border: 1px solid rgba(255,255,255,.07); }
.region-card.locked { opacity: 0.5; cursor: not-allowed; filter: grayscale(.6); }
.region-card .rc-name { font-weight: 700; font-size: 15px; color: var(--gold2); }
.region-card .rc-info { font-size: 12px; color: var(--txt2); margin-top: 4px; }

/* 事件日志 */
.event-log { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 10px; background: rgba(6,10,22,.5); border-radius: 10px; }
.event-line { font-size: 12px; color: var(--txt2); padding: 4px 8px; border-radius: 6px; background: rgba(255,255,255,.03); }
.event-line.win { color: var(--green); }
.event-line.lose { color: var(--red); }
.event-line.stones { color: var(--gold2); }
.event-line.equip { color: var(--purple); }

/* 商店 */
.shop-item { display: flex; align-items: center; gap: 10px; }
.shop-item .si-name { font-weight: 600; }
.shop-item .si-price { color: var(--gold2); font-size: 12px; }

/* 宗门 */
.sect-members { display: flex; flex-wrap: wrap; gap: 6px; }
.sect-member { font-size: 12px; padding: 4px 10px; border-radius: 20px; background: var(--card2); }
.sect-member.leader { border: 1px solid var(--gold); color: var(--gold2); }

/* 装备栏 */
.equip-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.equip-slot { text-align: center; padding: 10px 4px; border-radius: 10px; background: var(--card2); border: 1px dashed rgba(255,255,255,.12); }
.equip-slot .es-ic { font-size: 22px; }
.equip-slot .es-name { font-size: 12px; color: var(--txt); margin-top: 4px; word-break: break-all; }
.equip-slot .es-type { font-size: 10px; color: var(--txt2); }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(4, 7, 16, 0.7); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(3px); }
.modal { width: 100%; max-width: 480px; max-height: 82vh; overflow-y: auto; padding: 20px; position: relative; animation: fadeIn .18s; }
.modal h3 { color: var(--gold2); margin-bottom: 12px; font-size: 16px; }
.modal .close-x { position: absolute; top: 10px; right: 12px; background: none; border: none; color: var(--txt2); font-size: 20px; cursor: pointer; }
.battle-log { font-size: 12px; line-height: 1.7; color: var(--txt2); background: rgba(6,10,22,.6); padding: 10px; border-radius: 10px; max-height: 280px; overflow-y: auto; }
.battle-log .bl-hit { color: var(--txt); }
.battle-log .bl-crit { color: var(--gold2); }

/* Toast */
.toast {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 200;
  background: rgba(16, 24, 49, 0.96); border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--txt); padding: 10px 18px; border-radius: 12px; font-size: 13px;
  box-shadow: 0 6px 24px rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .25s;
  max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; }

/* 响应式 */
@media (max-width: 1024px) {
  .side-right { display: none; }
  .side-nav { width: 62px; }
  .nav-btn .nav-tx { display: none; }
  .nav-btn { padding: 12px 0; }
  .nav-btn .nav-ic { font-size: 22px; }
}
@media (max-width: 768px) {
  .side-nav { display: none; }
  .bottom-nav { display: flex; }
  .layout { padding: 10px; }
  .main { padding-bottom: 66px; }
  .panel { padding: 12px; }
}

/* ---------- 灵兽 ---------- */
.pet-card { position: relative; overflow: hidden; }
.pet-card::before { content: ''; position: absolute; top: -40px; right: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(212,175,55,.18), transparent 70%); pointer-events: none; }
.pet-head { display: flex; align-items: center; gap: 14px; }
.pet-icon { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; background: rgba(212,175,55,.08); border: 1px solid rgba(212,175,55,.25); border-radius: 50%; box-shadow: 0 0 18px rgba(212,175,55,.15); flex-shrink: 0; }
.pet-name { font-size: 16px; font-weight: 700; }
.pet-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
