/* ========== 全局基础样式 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body, #root { width: 100%; height: 100%; overflow: hidden; }
body {
  font-family: 'Noto Serif SC', 'SimSun', serif;
  background: #0a0806;
  color: #d4c4a8;
  font-size: 14px;
  line-height: 1.5;
  user-select: none;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; }

/* 品质颜色 */
.q-white  { color: #e5e7eb; }
.q-blue   { color: #60a5fa; }
.q-purple { color: #c084fc; }
.q-orange { color: #fb923c; }
.q-red    { color: #ef4444; }

.bg-q-white  { border-color: #e5e7eb40; background: #e5e7eb08; }
.bg-q-blue   { border-color: #60a5fa60; background: #60a5fa0a; }
.bg-q-purple { border-color: #c084fc60; background: #c084fc0a; }
.bg-q-orange { border-color: #fb923c60; background: #fb923c0a; }
.bg-q-red    { border-color: #ef444480; background: #ef444410; }

/* 滚动条 */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #6b5a3a; border-radius: 2px; }


/* ========== App 容器 ========== */
.app-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  background:
    radial-gradient(ellipse at top, #1a1510 0%, #0a0806 70%),
    #0a0806;
}
.app-main {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.page {
  width: 100%;
  height: 100%;
}

/* 底部导航 */
.bottom-nav {
  height: 60px;
  display: flex;
  background: linear-gradient(180deg, #1a1510 0%, #0a0806 100%);
  border-top: 1px solid #3d3222;
  flex-shrink: 0;
  z-index: 50;
}
.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #6b5a3a;
  transition: all 0.2s;
  position: relative;
}
.nav-btn.active { color: #c9a96a; }
.nav-btn.active::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 2px;
  background: #c9a96a;
  border-radius: 0 0 2px 2px;
}
.nav-icon { font-size: 20px; }
.nav-label { font-size: 11px; }

/* 战斗日志 */
.battle-log {
  height: 100%;
  overflow-y: auto;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.8;
  font-family: 'SimSun', '宋体', serif;
}
.log-line {
  padding: 1px 0;
  border-bottom: 1px solid rgba(107, 90, 58, 0.1);
}

/* 底部日志面板（角色页） */
.bottom-log {
  position: absolute;
  bottom: 60px;
  left: 0; right: 0;
  height: 200px;
  background: rgba(10, 8, 6, 0.95);
  border-top: 1px solid #3d3222;
  z-index: 40;
}
.bottom-log-header {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #c9a96a;
  background: rgba(201, 169, 106, 0.1);
  border-bottom: 1px solid #3d3222;
}
.bottom-log-content {
  height: calc(100% - 30px);
  overflow: hidden;
}

/* 浮动日志 */
.floating-log {
  position: fixed;
  bottom: 70px;
  right: 10px;
  width: 280px;
  max-height: 180px;
  background: rgba(10, 8, 6, 0.95);
  border: 1px solid #3d3222;
  border-radius: 6px;
  z-index: 45;
  overflow: hidden;
}
.floating-log-header {
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #c9a96a;
  background: rgba(201, 169, 106, 0.1);
  border-bottom: 1px solid #3d3222;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
}
.log-toggle { font-size: 10px; color: #6b5a3a; }
.floating-log-content { height: 140px; overflow: hidden; }
.log-expand-btn {
  position: fixed;
  bottom: 70px;
  right: 10px;
  padding: 6px 12px;
  background: rgba(201, 169, 106, 0.2);
  border: 1px solid #c9a96a;
  border-radius: 20px;
  font-size: 12px;
  color: #c9a96a;
  z-index: 45;
}

/* 离线收益弹窗 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}
.offline-reward-modal {
  background: linear-gradient(180deg, #1a1510 0%, #0a0806 100%);
  border: 2px solid #c9a96a;
  border-radius: 10px;
  padding: 24px;
  width: 100%;
  max-width: 320px;
  text-align: center;
}
.offline-title {
  font-size: 20px;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 6px;
}
.offline-time {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 16px;
}
.offline-reward-list { margin-bottom: 20px; }
.offline-reward-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 6px;
  background: rgba(201, 169, 106, 0.08);
  border-radius: 4px;
}
.offline-reward-item .reward-icon { font-size: 18px; margin-right: 10px; }
.offline-reward-item .reward-label {
  flex: 1; text-align: left; font-size: 13px; color: #d4c4a8;
}
.offline-reward-item .reward-value {
  font-size: 15px; font-weight: 700; color: #fbbf24;
}
.claim-btn {
  width: 100%; padding: 12px;
  background: linear-gradient(135deg, #b45309, #f59e0b);
  border: 1px solid #fbbf24; border-radius: 6px;
  font-size: 15px; font-weight: 700; color: #1a1510;
  transition: all 0.2s;
}
.claim-btn:active { transform: scale(0.98); }

/* 桌面端居中 */
@media (min-width: 768px) {
  .app-container {
    max-width: 480px;
    margin: 0 auto;
    border-left: 1px solid #3d3222;
    border-right: 1px solid #3d3222;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
  }
  .bottom-log { max-width: 480px; left: 50%; transform: translateX(-50%); }
  .floating-log { right: calc(50% - 240px + 10px); }
  .log-expand-btn { right: calc(50% - 240px + 10px); }
}


/* ========== 角色页 ========== */
.character-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  padding-bottom: calc(70px + 220px);
  height: 100%;
  overflow-y: auto;
}
.char-header {
  display: flex; gap: 12px; padding: 14px;
  background: linear-gradient(135deg, #1a1510 0%, #2a2015 100%);
  border: 1px solid #6b5a3a; border-radius: 6px;
  position: relative;
}
.char-header::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #c9a96a, transparent);
}
.char-avatar-wrap { position: relative; flex-shrink: 0; }
.char-avatar-border {
  width: 70px; height: 70px;
  border: 2px solid #c9a96a; border-radius: 50%;
  padding: 2px; background: #0a0806;
  box-shadow: 0 0 10px rgba(201, 169, 106, 0.3);
}
.char-avatar { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.char-level-badge {
  position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%);
  background: #c9a96a; color: #1a1510;
  font-size: 11px; font-weight: 700;
  padding: 1px 8px; border-radius: 10px; white-space: nowrap;
}
.char-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.char-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.char-name { font-size: 18px; font-weight: 700; color: #f5e6c8; }
.char-class {
  font-size: 12px; color: #c9a96a;
  background: rgba(201, 169, 106, 0.15);
  padding: 2px 6px; border-radius: 3px;
}
.rebirth-tag {
  font-size: 11px; color: #fb923c;
  background: rgba(251, 146, 60, 0.15);
  padding: 2px 6px; border-radius: 3px; font-weight: 600;
}
.char-map {
  font-size: 12px; color: #9ca3af;
  display: flex; align-items: center; gap: 4px;
}
.map-icon { color: #ef4444; }
.char-bar-row { display: flex; gap: 8px; }
.mini-bar {
  flex: 1; height: 18px;
  background: #0a0806; border: 1px solid #3d3222;
  border-radius: 3px; position: relative; overflow: hidden;
}
.mini-bar-fill { height: 100%; transition: width 0.3s ease; }
.hp-bar .mini-bar-fill { background: linear-gradient(90deg, #dc2626, #ef4444); }
.mp-bar .mini-bar-fill { background: linear-gradient(90deg, #2563eb, #3b82f6); }
.mini-bar-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
.exp-bar-wrap { display: flex; flex-direction: column; gap: 2px; }
.exp-bar {
  height: 10px; background: #0a0806;
  border: 1px solid #3d3222; border-radius: 3px; overflow: hidden;
}
.exp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #b45309, #fbbf24);
  transition: width 0.3s ease;
}
.exp-text { font-size: 11px; color: #9ca3af; text-align: right; }

.stats-panel, .skill-panel {
  padding: 12px;
  background: rgba(26, 21, 16, 0.8);
  border: 1px solid #3d3222;
  border-radius: 6px;
}
.stats-title {
  font-size: 14px; font-weight: 600; color: #c9a96a;
  margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 1px solid #3d3222;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.stat-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 6px 8px;
  background: rgba(10, 8, 6, 0.6);
  border-radius: 4px;
}
.stat-label { font-size: 11px; color: #9ca3af; }
.stat-value { font-size: 14px; font-weight: 600; color: #f5e6c8; }
.gold-text { color: #fbbf24; }
.yuanbao-text { color: #60a5fa; }
.power-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid #3d3222;
}
.power-label { font-size: 12px; color: #9ca3af; }
.power-value {
  font-size: 20px; font-weight: 700; color: #fb923c;
  text-shadow: 0 0 10px rgba(251, 146, 60, 0.3);
}

.skill-item { display: flex; align-items: center; gap: 10px; }
.skill-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #b45309, #fbbf24);
  border-radius: 6px; font-size: 18px; color: #1a1510;
}
.skill-info { flex: 1; }
.skill-name { font-size: 14px; font-weight: 600; color: #f5e6c8; }
.skill-desc { font-size: 11px; color: #9ca3af; margin-top: 2px; }

.idle-control {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  background: rgba(26, 21, 16, 0.8);
  border: 1px solid #3d3222;
  border-radius: 6px;
}
.idle-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px;
  background: linear-gradient(135deg, #991b1b, #dc2626);
  border: 1px solid #ef4444; border-radius: 6px;
  color: #fff; font-size: 14px; font-weight: 600;
  transition: all 0.2s;
}
.idle-btn.active {
  background: linear-gradient(135deg, #166534, #16a34a);
  border-color: #22c55e;
}
.idle-btn:active { transform: scale(0.97); }
.idle-icon { font-size: 16px; }
.idle-status { font-size: 12px; color: #9ca3af; white-space: nowrap; }

.log-placeholder { flex-shrink: 0; height: 0; }


/* ========== 背包页 ========== */
.inventory-page {
  display: flex; flex-direction: column;
  height: 100%; padding-bottom: 70px;
}
.equip-panel, .settings-panel {
  padding: 12px;
  background: rgba(26, 21, 16, 0.8);
  border-bottom: 1px solid #3d3222;
}
.panel-title {
  font-size: 13px; font-weight: 600; color: #c9a96a;
  margin-bottom: 10px;
}
.equip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.equip-slot {
  aspect-ratio: 1;
  background: rgba(10, 8, 6, 0.8);
  border: 1px solid #3d3222;
  border-radius: 4px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative; cursor: pointer;
  transition: transform 0.15s;
}
.equip-slot:active { transform: scale(0.95); }
.slot-icon { font-size: 24px; }
.slot-empty { font-size: 10px; color: #6b5a3a; }
.slot-lv {
  position: absolute; bottom: 2px;
  font-size: 10px; color: #9ca3af;
}

.settings-panel { display: flex; flex-direction: column; gap: 8px; }
.setting-row {
  display: flex; align-items: center; justify-content: space-between;
}
.setting-label { font-size: 13px; color: #d4c4a8; }
.toggle-btn {
  width: 48px; padding: 4px 8px;
  background: #3d3222; border: 1px solid #6b5a3a;
  border-radius: 4px; font-size: 12px; color: #9ca3af;
  transition: all 0.2s;
}
.toggle-btn.on {
  background: #166534; border-color: #22c55e; color: #4ade80;
}
.recycle-row { gap: 8px; }
.recycle-select {
  padding: 4px 8px;
  background: #1a1510; border: 1px solid #6b5a3a;
  border-radius: 4px; color: #d4c4a8;
  font-size: 12px; font-family: inherit;
}
.recycle-btn {
  padding: 4px 12px;
  background: linear-gradient(135deg, #b45309, #d97706);
  border: 1px solid #f59e0b;
  border-radius: 4px; font-size: 12px;
  color: #fff; font-weight: 600;
}

.inv-tabs {
  display: flex; background: #0a0806;
  border-bottom: 1px solid #3d3222;
}
.inv-tab {
  flex: 1; padding: 10px; font-size: 13px; color: #9ca3af;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.inv-tab.active {
  color: #c9a96a; border-bottom-color: #c9a96a;
  background: rgba(201, 169, 106, 0.08);
}

.inv-list { flex: 1; overflow-y: auto; padding: 8px; }
.inv-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; margin-bottom: 6px;
  background: rgba(26, 21, 16, 0.6);
  border: 1px solid #3d3222;
  border-radius: 4px; cursor: pointer;
  transition: background 0.2s;
}
.inv-item:active { background: rgba(201, 169, 106, 0.1); }
.equip-item { border-left-width: 3px; }
.item-icon { font-size: 24px; width: 32px; text-align: center; }
.item-info { flex: 1; min-width: 0; }
.item-name { font-size: 13px; font-weight: 600; }
.item-sub { font-size: 11px; color: #9ca3af; margin-top: 2px; }
.stat-plus { color: #4ade80; }
.item-sell { font-size: 11px; color: #fbbf24; white-space: nowrap; }
.empty-tip {
  text-align: center; color: #6b5a3a;
  padding: 40px 20px; font-size: 13px;
}

/* 弹窗通用 */
.modal {
  background: #1a1510;
  border: 1px solid #6b5a3a;
  border-radius: 8px;
  padding: 20px;
  width: 100%;
  max-width: 320px;
  position: relative;
}
.modal-title {
  font-size: 16px; font-weight: 700;
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
}
.quality-tag {
  font-size: 10px; padding: 2px 6px;
  border-radius: 3px; font-weight: 600;
}
.detail-sub { font-size: 12px; color: #9ca3af; margin-bottom: 12px; }
.detail-attrs { margin-bottom: 16px; }
.attr-line {
  display: flex; justify-content: space-between;
  padding: 4px 0; font-size: 13px;
}
.attr-name { color: #9ca3af; }
.attr-val { color: #4ade80; font-weight: 600; }
.modal-btns { display: flex; gap: 10px; }
.modal-btn {
  flex: 1; padding: 10px;
  background: #3d3222; border: 1px solid #6b5a3a;
  border-radius: 4px; font-size: 13px;
  color: #d4c4a8; font-weight: 600;
  transition: all 0.2s;
}
.modal-btn.primary {
  background: linear-gradient(135deg, #166534, #16a34a);
  border-color: #22c55e; color: #fff;
}
.modal-btn.danger {
  background: linear-gradient(135deg, #991b1b, #dc2626);
  border-color: #ef4444; color: #fff;
}
.modal-close {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px;
  background: #3d3222; border-radius: 50%;
  color: #9ca3af; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.confirm-text {
  font-size: 13px; color: #d4c4a8;
  margin-bottom: 16px; line-height: 1.6;
}
.confirm-modal .modal-title { color: #c9a96a; }


/* ========== 任务页 ========== */
.quest-page {
  display: flex; flex-direction: column;
  height: 100%; padding-bottom: 70px;
}
.quest-header {
  padding: 12px;
  background: rgba(26, 21, 16, 0.8);
  border-bottom: 1px solid #3d3222;
}
.quest-tabs { display: flex; gap: 8px; margin-bottom: 8px; }
.quest-tab {
  flex: 1; padding: 8px;
  background: #0a0806; border: 1px solid #3d3222;
  border-radius: 4px; font-size: 13px; color: #9ca3af;
  transition: all 0.2s;
}
.quest-tab.active {
  background: rgba(201, 169, 106, 0.15);
  border-color: #c9a96a; color: #c9a96a;
}
.quest-hint { font-size: 11px; color: #6b5a3a; text-align: center; }
.quest-list { flex: 1; overflow-y: auto; padding: 12px; }
.quest-card {
  padding: 12px; margin-bottom: 10px;
  background: rgba(26, 21, 16, 0.6);
  border: 1px solid #3d3222;
  border-radius: 6px; position: relative;
}
.quest-card.completed {
  border-color: #22c55e60;
  background: rgba(34, 197, 94, 0.08);
}
.quest-card.done { opacity: 0.6; }
.quest-card-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.quest-type {
  font-size: 10px; padding: 2px 6px;
  border-radius: 3px; font-weight: 600;
}
.quest-title {
  font-size: 14px; font-weight: 600; color: #f5e6c8; flex: 1;
}
.quest-done-tag { font-size: 11px; color: #22c55e; }
.quest-desc { font-size: 12px; color: #9ca3af; margin-bottom: 10px; }
.quest-progress-wrap {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.quest-progress {
  flex: 1; height: 8px;
  background: #0a0806; border: 1px solid #3d3222;
  border-radius: 4px; overflow: hidden;
}
.quest-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #166534, #22c55e);
  transition: width 0.3s ease;
}
.quest-progress-text {
  font-size: 12px; color: #9ca3af; min-width: 50px; text-align: right;
}
.quest-reward {
  display: flex; flex-wrap: wrap; gap: 8px 12px;
  padding-top: 8px; border-top: 1px solid #3d3222;
}
.reward-label { font-size: 12px; color: #6b5a3a; margin-right: 4px; }
.reward-item {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; color: #d4c4a8;
}
.quest-status-badge {
  position: absolute; top: 10px; right: 10px;
  font-size: 11px; color: #22c55e;
  background: rgba(34, 197, 94, 0.15);
  padding: 3px 8px; border-radius: 3px;
}


/* ========== 地图页 ========== */
.map-page {
  display: flex; flex-direction: column;
  height: 100%; padding-bottom: 70px;
}
.map-list {
  display: flex; gap: 6px;
  padding: 10px 12px;
  background: rgba(26, 21, 16, 0.8);
  border-bottom: 1px solid #3d3222;
  overflow-x: auto; flex-shrink: 0;
}
.map-item {
  flex-shrink: 0; padding: 8px 12px;
  background: #0a0806; border: 1px solid #3d3222;
  border-radius: 4px; cursor: pointer;
  transition: all 0.2s; text-align: center; min-width: 70px;
}
.map-item.selected {
  border-color: #c9a96a; background: rgba(201, 169, 106, 0.15);
}
.map-item.current { border-color: #22c55e; }
.map-item.locked { opacity: 0.5; }
.map-item-name {
  font-size: 12px; font-weight: 600; color: #d4c4a8;
  display: flex; align-items: center; justify-content: center;
  gap: 4px; margin-bottom: 2px;
}
.current-dot {
  width: 6px; height: 6px;
  background: #22c55e; border-radius: 50%;
  display: inline-block;
}
.map-item-info {
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.map-rec-lv { font-size: 10px; color: #9ca3af; }
.lock-icon { font-size: 10px; }

.map-detail { flex: 1; overflow-y: auto; padding: 12px; }
.map-detail-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px;
}
.map-detail-name { font-size: 18px; font-weight: 700; color: #f5e6c8; }
.map-rec-tag {
  font-size: 11px; color: #c9a96a;
  background: rgba(201, 169, 106, 0.15);
  padding: 3px 8px; border-radius: 3px;
}
.map-desc {
  font-size: 12px; color: #9ca3af;
  margin-bottom: 14px; line-height: 1.5;
}

.section-title {
  font-size: 13px; font-weight: 600; color: #c9a96a;
  margin-bottom: 8px;
  display: flex; align-items: center; justify-content: space-between;
}
.boss-status {
  font-size: 11px; padding: 2px 6px;
  border-radius: 3px; font-weight: 500;
}
.boss-status.alive { color: #22c55e; background: rgba(34, 197, 94, 0.15); }
.boss-status.dead { color: #9ca3af; background: rgba(156, 163, 175, 0.15); }

.monster-section, .boss-section { margin-bottom: 16px; }
.monster-list { display: flex; flex-direction: column; gap: 6px; }
.monster-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: rgba(10, 8, 6, 0.6);
  border: 1px solid #3d3222;
  border-radius: 4px;
}
.monster-icon { font-size: 24px; }
.monster-info { flex: 1; }
.monster-name { font-size: 13px; font-weight: 600; color: #d4c4a8; }
.monster-stats { font-size: 11px; color: #9ca3af; margin-top: 2px; }
.monster-exp { text-align: center; }
.exp-val { font-size: 13px; font-weight: 600; color: #fbbf24; }
.exp-label { font-size: 10px; color: #9ca3af; }

.boss-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(251, 146, 60, 0.1));
  border: 1px solid #ef444440;
  border-radius: 6px;
}
.boss-icon { font-size: 40px; }
.boss-info { flex: 1; }
.boss-name { font-size: 15px; font-weight: 700; color: #fb923c; margin-bottom: 4px; }
.boss-stats { font-size: 12px; color: #d4c4a8; margin-bottom: 4px; }
.boss-reward { font-size: 11px; color: #9ca3af; }

.go-map-btn {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, #991b1b, #dc2626);
  border: 1px solid #ef4444; border-radius: 6px;
  font-size: 15px; font-weight: 700; color: #fff;
  transition: all 0.2s;
}
.go-map-btn:active:not(:disabled) { transform: scale(0.98); }
.go-map-btn.disabled {
  background: #3d3222; border-color: #6b5a3a;
  color: #6b5a3a; cursor: not-allowed;
}
.go-map-btn.current {
  background: linear-gradient(135deg, #166534, #16a34a);
  border-color: #22c55e;
}


/* ========== 系统页 ========== */
.system-page {
  display: flex; flex-direction: column; gap: 12px;
  height: 100%; padding: 12px;
  padding-bottom: 70px; overflow-y: auto;
}
.rebirth-panel, .settings-panel-sys, .save-panel {
  background: rgba(26, 21, 16, 0.8);
  border: 1px solid #3d3222;
  border-radius: 6px; overflow: hidden;
}
.panel-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: rgba(201, 169, 106, 0.1);
  border-bottom: 1px solid #3d3222;
}
.panel-icon { font-size: 16px; }
.panel-title { font-size: 14px; font-weight: 600; color: #c9a96a; }
.rebirth-info { padding: 14px 12px; }
.rebirth-count { font-size: 14px; color: #d4c4a8; margin-bottom: 6px; }
.rebirth-num { color: #fb923c; font-weight: 700; font-size: 16px; }
.rebirth-bonus { font-size: 13px; color: #9ca3af; margin-bottom: 10px; }
.bonus-num { color: #4ade80; font-weight: 600; }
.rebirth-require {
  font-size: 12px; color: #9ca3af;
  line-height: 1.6; margin-bottom: 12px;
}
.rebirth-btn {
  width: 100%; padding: 12px;
  background: linear-gradient(135deg, #b45309, #f59e0b);
  border: 1px solid #fbbf24; border-radius: 6px;
  font-size: 15px; font-weight: 700; color: #1a1510;
  transition: all 0.2s;
}
.rebirth-btn:active { transform: scale(0.98); }
.rebirth-progress { display: flex; align-items: center; gap: 10px; }
.rebirth-progress-bar {
  flex: 1; height: 10px;
  background: #0a0806; border: 1px solid #3d3222;
  border-radius: 4px; overflow: hidden;
}
.rebirth-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #b45309, #fbbf24);
  transition: width 0.3s ease;
}
.rebirth-progress-text {
  font-size: 12px; color: #9ca3af; min-width: 60px; text-align: right;
}

.setting-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #3d3222;
}
.setting-item:last-child { border-bottom: none; }

.save-buttons {
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px;
}
.save-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px;
  background: rgba(201, 169, 106, 0.1);
  border: 1px solid #6b5a3a; border-radius: 4px;
  font-size: 13px; color: #d4c4a8;
  transition: all 0.2s;
}
.save-btn:active { background: rgba(201, 169, 106, 0.2); }
.save-btn.danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef444460; color: #ef4444;
}
.save-btn-icon { font-size: 16px; }
.save-msg { margin-left: auto; font-size: 11px; color: #22c55e; }
.save-hint {
  font-size: 11px; color: #6b5a3a;
  text-align: center; padding: 0 12px 12px;
}

.version-info {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px; font-size: 11px; color: #6b5a3a;
}


/* ========== 创建角色页 ========== */
.create-char-page {
  width: 100%; height: 100%;
  position: relative; overflow-y: auto;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.create-bg {
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse at top, #1a1510 0%, #0a0806 60%),
    #0a0806;
  z-index: 0;
}
.create-bg::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #c9a96a, transparent);
}
.create-content {
  position: relative; z-index: 1;
  width: 100%; max-width: 400px;
  display: flex; flex-direction: column; gap: 16px;
}
.game-title {
  text-align: center;
  font-size: 36px; font-weight: 700; color: #f5e6c8;
  letter-spacing: 8px;
  text-shadow: 0 0 20px rgba(201, 169, 106, 0.5);
  margin-bottom: -4px;
}
.game-subtitle {
  text-align: center; font-size: 13px;
  color: #9ca3af; letter-spacing: 2px;
}
.name-input-wrap { margin-top: 8px; }
.name-label {
  display: block; font-size: 13px;
  color: #c9a96a; margin-bottom: 6px;
}
.name-input {
  width: 100%; padding: 12px 14px;
  background: rgba(10, 8, 6, 0.8);
  border: 1px solid #6b5a3a;
  border-radius: 6px; color: #f5e6c8;
  font-size: 14px; font-family: inherit;
  outline: none; transition: border-color 0.2s;
}
.name-input:focus { border-color: #c9a96a; }
.name-input::placeholder { color: #6b5a3a; }
.class-select-title { font-size: 13px; color: #c9a96a; margin-top: 8px; }
.class-options {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.class-option {
  padding: 12px 8px;
  background: rgba(26, 21, 16, 0.8);
  border: 2px solid #3d3222;
  border-radius: 6px; cursor: pointer;
  text-align: center; transition: all 0.2s;
}
.class-option.selected {
  border-color: #c9a96a;
  background: rgba(201, 169, 106, 0.1);
  box-shadow: 0 0 15px rgba(201, 169, 106, 0.2);
}
.class-avatar-wrap {
  display: flex; justify-content: center; margin-bottom: 8px;
}
.class-avatar-border {
  width: 50px; height: 50px;
  border: 2px solid #6b5a3a; border-radius: 50%;
  padding: 2px; background: #0a0806;
  transition: border-color 0.2s;
}
.class-option.selected .class-avatar-border { border-color: #c9a96a; }
.class-avatar {
  width: 100%; height: 100%;
  border-radius: 50%; object-fit: cover;
}
.class-name {
  font-size: 14px; font-weight: 700;
  color: #f5e6c8; margin-bottom: 4px;
}
.class-desc {
  font-size: 10px; color: #9ca3af;
  line-height: 1.4; margin-bottom: 4px; height: 28px;
}
.class-skill { font-size: 10px; color: #c9a96a; }

.create-btn {
  margin-top: 12px; padding: 14px;
  background: linear-gradient(135deg, #991b1b, #dc2626);
  border: 1px solid #ef4444; border-radius: 6px;
  font-size: 16px; font-weight: 700; color: #fff;
  letter-spacing: 4px; transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}
.create-btn:active { transform: scale(0.98); }
.create-tip { text-align: center; font-size: 12px; color: #6b5a3a; }

@media (max-height: 600px) {
  .game-title { font-size: 28px; }
  .class-desc { display: none; }
}


/* ========== 角色页技能列表 ========== */
.skill-list { display: flex; flex-direction: column; gap: 6px; }
.skill-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: rgba(10, 8, 6, 0.6);
  border: 1px solid #3d3222;
  border-radius: 4px;
  transition: all 0.2s;
}
.skill-row.learned { border-color: #22c55e40; background: rgba(34, 197, 94, 0.06); }
.skill-row.locked { opacity: 0.5; }
.skill-icon-sm {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(201, 169, 106, 0.15);
  border-radius: 4px;
  font-size: 16px;
  flex-shrink: 0;
}
.skill-info-sm { flex: 1; min-width: 0; }
.skill-name-sm {
  font-size: 13px; font-weight: 600; color: #f5e6c8;
  display: flex; align-items: center; gap: 6px;
}
.skill-lv {
  font-size: 10px; color: #6b5a3a;
  background: rgba(107, 90, 58, 0.2);
  padding: 1px 5px; border-radius: 3px;
  font-weight: 500;
}
.skill-desc-sm { font-size: 11px; color: #9ca3af; margin-top: 2px; }
.skill-status {
  font-size: 11px; padding: 3px 8px;
  border-radius: 3px;
  flex-shrink: 0;
}
.skill-status.ok { color: #22c55e; background: rgba(34, 197, 94, 0.15); }
.skill-status.lock { color: #6b5a3a; background: rgba(107, 90, 58, 0.2); }

.dead-btn { background: linear-gradient(135deg, #991b1b, #dc2626) !important; border-color: #ef4444 !important; }

.newbie-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 3px 10px;
  background: linear-gradient(135deg, #15803d, #22c55e);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  letter-spacing: 1px;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
}


/* ========== 死亡浮层 ========== */
.death-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex; align-items: center; justify-content: center;
  z-index: 300; padding: 20px;
  animation: deathFade 0.3s ease-out;
}
@keyframes deathFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.death-modal {
  background: linear-gradient(180deg, #1a0a0a 0%, #0a0505 100%);
  border: 2px solid #991b1b;
  border-radius: 10px;
  padding: 28px 24px;
  width: 100%; max-width: 320px;
  text-align: center;
  box-shadow: 0 0 40px rgba(239, 68, 68, 0.3);
}
.death-title {
  font-size: 28px; font-weight: 700; color: #ef4444;
  margin-bottom: 16px; letter-spacing: 4px;
  text-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}
.death-desc {
  font-size: 14px; color: #d4c4a8;
  line-height: 2; margin-bottom: 20px;
}
.death-btns { margin-bottom: 12px; }
.revive-btn {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, #b45309, #f59e0b);
  border: 1px solid #fbbf24;
  border-radius: 6px;
  font-size: 16px; font-weight: 700;
  color: #1a1510;
  letter-spacing: 2px;
  transition: all 0.2s;
}
.revive-btn:active { transform: scale(0.97); }
.death-hint {
  font-size: 11px; color: #6b5a3a;
}


/* ========== 背包技能书页 ========== */
.pages-banner {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px;
  background: rgba(201, 169, 106, 0.1);
  border-bottom: 1px solid #3d3222;
  font-size: 12px; color: #d4c4a8;
}
.pages-banner strong { color: #fbbf24; font-size: 14px; }
.pages-tip { color: #6b5a3a; font-size: 11px; }
.skill-book-item { border-left: 3px solid #c084fc !important; }
.inv-tabs { flex-wrap: nowrap; }
.inv-tabs .inv-tab { font-size: 12px; padding: 10px 4px; }


/* ========== 书页合成面板 ========== */
.craft-panel {
  background: rgba(26, 21, 16, 0.8);
  border: 1px solid #3d3222;
  border-radius: 6px; overflow: hidden;
}
.craft-panel .panel-header { justify-content: flex-start; }
.pages-count {
  margin-left: auto;
  font-size: 12px; color: #fbbf24;
  font-weight: 600;
}
.craft-hint {
  padding: 8px 12px;
  font-size: 11px; color: #9ca3af;
  background: rgba(10, 8, 6, 0.5);
  border-bottom: 1px solid #3d3222;
  line-height: 1.5;
}
.craft-list {
  max-height: 260px;
  overflow-y: auto;
  padding: 8px;
}
.craft-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  background: rgba(10, 8, 6, 0.6);
  border: 1px solid #3d3222;
  border-radius: 4px;
}
.craft-icon { font-size: 20px; width: 28px; text-align: center; }
.craft-info { flex: 1; min-width: 0; }
.craft-name { font-size: 12px; font-weight: 600; color: #c084fc; }
.craft-sub {
  font-size: 10px; color: #9ca3af;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.craft-cost { font-size: 12px; font-weight: 600; white-space: nowrap; }
.craft-btn {
  padding: 4px 10px;
  background: linear-gradient(135deg, #b45309, #d97706);
  border: 1px solid #f59e0b;
  border-radius: 4px;
  font-size: 11px; color: #fff;
  font-weight: 600;
  white-space: nowrap;
}
.craft-btn.disabled {
  background: #3d3222;
  border-color: #6b5a3a;
  color: #6b5a3a;
  cursor: not-allowed;
}
.craft-footer {
  padding: 8px 12px;
  border-top: 1px solid #3d3222;
}
.sell-pages-btn {
  width: 100%; padding: 8px;
  background: rgba(201, 169, 106, 0.1);
  border: 1px solid #6b5a3a;
  border-radius: 4px;
  font-size: 12px; color: #d4c4a8;
  transition: all 0.2s;
}
.sell-pages-btn:active { background: rgba(201, 169, 106, 0.2); }
.craft-footer .sell-pages-btn + .sell-pages-btn { margin-top: 8px; }


/* ========== 装备详情弹窗 - 技能书 ========== */
.modal .modal-btns .modal-btn { flex: 1; }

/* ========== 装备词条/极品/特戒 ========== */
.perfect-tag {
  display: inline-block;
  color: #fbbf24;
  margin-right: 2px;
  font-size: 13px;
  text-shadow: 0 0 4px rgba(251, 191, 36, 0.6);
}
.perfect-tag-lg {
  display: inline-block;
  color: #fbbf24;
  margin-right: 6px;
  font-weight: 700;
  text-shadow: 0 0 6px rgba(251, 191, 36, 0.6);
  letter-spacing: 1px;
}
.cross-class-tag {
  color: #ef4444 !important;
  font-size: 10px !important;
}
.detail-class-tag {
  color: #9ca3af;
  font-size: 11px;
}
.cross-class-hint {
  flex: 1 0 100%;
  text-align: center;
  font-size: 12px;
  color: #ef4444;
  margin-bottom: 8px;
}
.special-desc {
  padding: 8px;
  background: rgba(239, 68, 68, 0.1);
  border-left: 2px solid #ef4444;
  border-radius: 2px;
  font-size: 12px;
  color: #fca5a5;
  line-height: 1.6;
}

/* 元素词条 */
.detail-affixes {
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(10, 8, 6, 0.6);
  border: 1px solid #3d3222;
  border-radius: 4px;
}
.affix-title {
  font-size: 12px;
  color: #c9a96a;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: 1px;
}
.affix-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  line-height: 1.8;
  color: #86efac;
}
.affix-name { color: #86efac; }
.affix-val  { color: #4ade80; font-weight: 600; }

/* ========== 地图模式切换 ========== */
.map-mode-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  margin-bottom: 4px;
  background: rgba(10, 8, 6, 0.5);
  border: 1px solid #3d3222;
  border-radius: 4px;
}
.mode-switch-label {
  font-size: 12px;
  color: #c9a96a;
  font-weight: 600;
}
.mode-switch-btns {
  display: flex;
  gap: 0;
  border: 1px solid #6b5a3a;
  border-radius: 4px;
  overflow: hidden;
}
.mode-btn {
  padding: 5px 14px;
  font-size: 12px;
  color: #6b5a3a;
  background: transparent;
  transition: all 0.2s;
  border-right: 1px solid #6b5a3a;
}
.mode-btn:last-child { border-right: none; }
.mode-btn.active {
  background: linear-gradient(135deg, #b45309, #d97706);
  color: #fff;
}
.mode-btn.boss.active {
  background: linear-gradient(135deg, #991b1b, #dc2626);
}
.map-mode-tip {
  font-size: 11px;
  color: #9ca3af;
  padding: 0 12px 10px;
  line-height: 1.5;
}
.boss-hint-section .boss-hint-text {
  padding: 12px;
  text-align: center;
  color: #6b5a3a;
  font-size: 12px;
  background: rgba(10, 8, 6, 0.3);
  border-radius: 4px;
}
.boss-status.disabled {
  color: #6b5a3a;
  background: #3d3222;
}
.boss-special {
  margin-top: 4px;
  font-size: 11px;
  color: #fca5a5;
}

/* 角色页地图模式标签 */
.map-mode-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 10px;
  border-radius: 8px;
  font-weight: 600;
  vertical-align: middle;
}
.map-mode-tag.normal {
  background: rgba(96, 165, 250, 0.2);
  color: #60a5fa;
}
.map-mode-tag.boss {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* ========== 技能强化 ========== */
.strengthen-panel {
  background: rgba(26, 21, 16, 0.8);
  border: 1px solid #3d3222;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 12px;
}
.strengthen-list {
  max-height: 300px;
  overflow-y: auto;
  padding: 8px;
}
.strengthen-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  background: rgba(10, 8, 6, 0.6);
  border: 1px solid #3d3222;
  border-radius: 4px;
}
.strengthen-icon {
  font-size: 18px;
  width: 28px;
  text-align: center;
  color: #fbbf24;
}
.strengthen-info {
  flex: 1;
  min-width: 0;
}
.strengthen-name {
  font-size: 13px;
  font-weight: 600;
  color: #fbbf24;
}
.strengthen-lv {
  margin-left: 8px;
  font-size: 11px;
  color: #4ade80;
  font-weight: 600;
}
.strengthen-sub {
  font-size: 10px;
  color: #9ca3af;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 技能强化等级显示 */
.skill-str-lv {
  margin-left: 6px;
  font-size: 11px;
  color: #fbbf24;
  font-weight: 700;
  vertical-align: middle;
}
.skill-str-tip {
  color: #fbbf24;
  margin-left: 4px;
}

/* ========== 角色页折叠面板（2026-09-12 新增：属性/技能改成可展开窗口） ========== */
.collapse-panel { padding: 0; overflow: hidden; }
.collapse-head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 12px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.collapse-head:active { background: rgba(201, 169, 106, 0.06); }
.collapse-title { font-size: 14px; font-weight: 600; color: #c9a96a; white-space: nowrap; }
.collapse-summary {
  flex: 1; text-align: right;
  font-size: 12px; color: #9ca3af;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.power-inline { color: #fb923c; font-weight: 700; }
.collapse-arrow {
  font-size: 10px; color: #c9a96a; flex-shrink: 0;
  transition: transform 0.2s ease;
}
.collapse-arrow.open { transform: rotate(180deg); }
.collapse-body { padding: 0 12px 12px; }
.collapse-body .power-row { margin-top: 10px; }
.idle-control.running { border-color: rgba(34, 197, 94, 0.45); }

/* 角色页各面板不参与 flex 压缩（否则容器高度不够时会被压扁、内容被裁） */
.character-page > * { flex-shrink: 0; }

/* 召唤物徽章（2026-09-12 道士骷髅/神兽） */
.pet-badge {
  display: inline-block;
  margin: 4px 0 2px;
  padding: 2px 8px;
  font-size: 11px;
  color: #a3e635;
  background: rgba(163, 230, 53, 0.12);
  border: 1px solid rgba(163, 230, 53, 0.35);
  border-radius: 10px;
}

/* 药水 / 商店（2026-09-12） */
.potion-count { margin-left: 6px; font-size: 12px; color: #fbbf24; }
.use-btn {
  padding: 6px 12px; font-size: 12px;
  color: #052e16; font-weight: 600;
  background: linear-gradient(135deg, #4ade80, #16a34a);
  border-radius: 4px; flex-shrink: 0;
}
.use-btn:active { transform: scale(0.96); }
.shop-panel { margin-top: 14px; padding-top: 10px; border-top: 1px solid #3d3222; }
.shop-title { font-size: 13px; font-weight: 600; color: #c9a96a; margin-bottom: 8px; }
.shop-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; margin-bottom: 6px;
  background: rgba(10, 8, 6, 0.6); border-radius: 4px;
}
.shop-price { font-size: 12px; color: #fbbf24; margin-left: auto; }
.shop-btn {
  padding: 4px 8px; font-size: 11px; color: #f5e6c8;
  background: rgba(107, 90, 58, 0.35); border: 1px solid #6b5a3a; border-radius: 4px;
}
.shop-btn:active { transform: scale(0.95); }

/* 系统页布局修复（2026-09-12）：面板被 flex 压扁导致内容显示不出来 */
.system-page { overflow-x: hidden; }
.system-page > * { flex-shrink: 0; max-width: 100%; min-width: 0; }
.system-page .strengthen-item, .system-page .craft-item { flex-wrap: wrap; }
.system-page .panel-header { flex-wrap: wrap; gap: 6px; }
.system-page .rebirth-info, .system-page .save-buttons { word-break: break-word; }

/* 技能熟练度条 */
.prof-bar {
  height: 6px; margin: 4px 0 3px;
  background: rgba(10, 8, 6, 0.8);
  border: 1px solid #3d3222; border-radius: 3px; overflow: hidden;
}
.prof-fill {
  height: 100%;
  background: linear-gradient(90deg, #b45309, #fbbf24);
  transition: width 0.3s ease;
}
.strengthen-bonus { margin-left: 6px; font-size: 11px; color: #4ade80; }

/* 自动回收 + 装备对比（2026-09-12） */
.setting-hint { font-size: 10px; color: #6b7280; margin-left: auto; }
.compare-box {
  margin-top: 10px; padding: 8px 10px;
  background: rgba(10, 8, 6, 0.7);
  border: 1px solid #3d3222; border-radius: 5px;
}
.compare-title { font-size: 12px; color: #c9a96a; margin-bottom: 6px; }
.compare-row { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 1.7; }
.compare-name { width: 42px; color: #9ca3af; }
.compare-val { min-width: 46px; color: #f5e6c8; }
.compare-val.old { color: #6b7280; }
.compare-arrow { color: #4b5563; font-size: 11px; }
.compare-delta { margin-left: auto; font-weight: 600; }
.compare-verdict { margin-top: 8px; padding-top: 6px; border-top: 1px solid #3d3222; font-size: 12px; font-weight: 600; text-align: center; }

/* ========== 战斗画面（2026-09-12）========== */
.battle-scene {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 116px; padding: 10px 16px;
  background: radial-gradient(ellipse at center, #1c1610 0%, #0d0a07 75%);
  border: 1px solid #3d3222; border-radius: 6px; overflow: hidden;
}
.bs-side { display: flex; flex-direction: column; align-items: center; gap: 4px; z-index: 2; }
.bs-side-right { align-items: center; }
.bs-units { display: flex; align-items: flex-end; gap: 6px; }
.bs-avatar {
  width: 54px; height: 54px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #16120d; border: 2px solid #6b5a3a;
  font-size: 30px; line-height: 1;
}
.bs-avatar img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.bs-pet { width: 38px; height: 38px; font-size: 20px; border-color: #4d7c0f; background: #101a0c; }
.bs-monster { border-color: #7f1d1d; }
.bs-name { font-size: 11px; color: #d4c4a8; max-width: 110px; text-align: center; }
.bs-pet-name { color: #a3e635; }
.bs-tag { font-size: 9px; padding: 0 5px; border: 1px solid; border-radius: 8px; }
.bs-vs { font-size: 13px; font-weight: 700; color: #6b5a3a; letter-spacing: 1px; }
@keyframes bs-dash-r { 0% { transform: translateX(0); } 30% { transform: translateX(52px); } 55% { transform: translateX(52px); } 100% { transform: translateX(0); } }
@keyframes bs-dash-l { 0% { transform: translateX(0); } 30% { transform: translateX(-52px); } 55% { transform: translateX(-52px); } 100% { transform: translateX(0); } }
@keyframes bs-hit-flash { 0% { filter: none; } 25% { filter: brightness(2.4) saturate(2); } 100% { filter: none; } }
@keyframes bs-dead-anim { 0% { opacity: 1; transform: scale(1) rotate(0); } 100% { opacity: 0.15; transform: scale(0.75) rotate(-18deg); } }
@keyframes bs-dmg-anim { 0% { opacity: 1; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(-30px) scale(1.25); } }
.bs-dash-r { animation: bs-dash-r 0.17s ease-out, bs-hit-flash 0.17s ease-out; }
.bs-dash-l { animation: bs-dash-l 0.17s ease-out, bs-hit-flash 0.17s ease-out; }
.bs-dead { animation: bs-dead-anim 0.45s ease-out forwards; }
.bs-dmg {
  position: absolute; top: 14px; font-size: 15px; font-weight: 800; color: #fbbf24;
  text-shadow: 0 1px 3px #000; animation: bs-dmg-anim 0.55s ease-out forwards; z-index: 5;
}
.bs-dmg.left { left: 76px; }
.bs-dmg.right { right: 76px; color: #f87171; }

/* 怪物血条（2026-09-12） */
.bs-hpbar {
  position: relative; width: 108px; height: 11px;
  background: rgba(10, 8, 6, 0.85);
  border: 1px solid #7f1d1d; border-radius: 6px; overflow: hidden;
}
.bs-hpfill {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, #7f1d1d, #ef4444);
  transition: width 0.25s ease;
}
.bs-hptext {
  position: absolute; inset: 0;
  font-size: 9px; line-height: 11px; text-align: center; color: #f5e6c8;
  text-shadow: 0 1px 2px #000;
}

/* 战斗画面：地图标签 + 人物血蓝条（2026-09-12） */
.bs-map {
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  font-size: 10px; color: #c9a96a; white-space: nowrap;
}
.bs-map-mode { margin-left: 4px; font-size: 9px; color: #9ca3af; }
.bs-bars { display: flex; flex-direction: column; gap: 3px; }
.bs-php { border-color: #14532d; }
.bs-php .bs-hpfill { background: linear-gradient(90deg, #14532d, #22c55e); }
.bs-pmp { border-color: #1e3a8a; }
.bs-pmp .bs-hpfill { background: linear-gradient(90deg, #1e3a8a, #60a5fa); }
/* 头部精简后更紧凑 */
.char-header { align-items: center; }
.char-info { gap: 4px; display: flex; flex-direction: column; }

/* 怪物头像：名字 + 档位边框（2026-09-12） */
.bs-avatar-wrap { position: relative; border-radius: 50%; padding: 2px; }
.bs-avatar.bs-monster {
  font-size: 19px; font-weight: 700; color: #f5e6c8;
  letter-spacing: 0; border-width: 2px;
  background: radial-gradient(circle at 50% 35%, #241d15 0%, #0f0c08 80%);
}
.bs-avatar-wrap.tier-normal .bs-avatar { border-color: #e5e7eb; }
.bs-avatar-wrap.tier-elite .bs-avatar { border-color: #fbbf24; }
.bs-avatar-wrap.tier-idle .bs-avatar { border-color: #6b5a3a; }
.bs-avatar-wrap.tier-elite { box-shadow: 0 0 8px rgba(251, 191, 36, 0.45); }
.bs-avatar-wrap.tier-boss { animation: bs-boss-glow 1.5s ease-in-out infinite; }
.bs-avatar-wrap.tier-boss .bs-avatar { border-color: #ef4444; }
@keyframes bs-boss-glow {
  0%, 100% { box-shadow: 0 0 6px rgba(239, 68, 68, 0.55); }
  50% { box-shadow: 0 0 16px rgba(239, 68, 68, 0.95), 0 0 30px rgba(239, 68, 68, 0.45); }
}

/* 战斗日志盒子（2026-09-12：固定在战斗画面下面，约 4 行） */
.log-box {
  border: 1px solid #3d3222; border-radius: 6px;
  background: rgba(10, 8, 6, 0.85);
  overflow: hidden;
}
.log-box-head {
  padding: 4px 10px; font-size: 11px; font-weight: 600; color: #c9a96a;
  background: rgba(201, 169, 106, 0.1);
  border-bottom: 1px solid #3d3222;
}
.log-box-body { height: 104px; }   /* ≈4 行（3~5 行区间） */
/* 角色页底部不再需要给日志留那么大空间 */
.character-page { padding-bottom: 78px; }

/* 怪物低血预警（≤25% 时血条闪烁，2026-09-12） */
.bs-hpbar.low { border-color: #f87171; animation: bs-hp-low 0.7s ease-in-out infinite; }
.bs-hpbar.low .bs-hpfill { background: linear-gradient(90deg, #b91c1c, #fca5a5); }
@keyframes bs-hp-low {
  0%, 100% { box-shadow: 0 0 3px rgba(248, 113, 113, 0.4); }
  50% { box-shadow: 0 0 10px rgba(248, 113, 113, 0.95); }
}

/* ========== 增益状态行（2026-09-13 经验/攻速药水）：经验条下面，点击看剩余 ========== */
.buff-inline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-top: 5px; cursor: pointer;
}
.buff-chip {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; color: #86efac;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.35);
  border-radius: 9px; padding: 1px 7px; white-space: nowrap;
}
.buff-chip-icon { font-size: 11px; }
.buff-chip-time { color: #4ade80; font-variant-numeric: tabular-nums; margin-left: 2px; }
.buff-hint {
  font-size: 10px; color: #9ca3af;
  border-bottom: 1px dashed #6b5a3a; padding-bottom: 1px;
}
.buff-inline.open .buff-hint { color: #c9a96a; }

/* ========== 挂机设定（2026-09-13） ========== */
.idle-cfg-hint { font-size: 11px; color: #9ca3af; line-height: 1.6; margin-bottom: 8px; }
.idle-cfg-list { display: flex; flex-direction: column; gap: 5px; max-height: 260px; overflow-y: auto; }
.idle-skill {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 9px; border-radius: 5px;
  background: rgba(10, 8, 6, 0.6);
  border: 1px solid #2c2418; cursor: pointer;
}
.idle-skill.on { border-color: rgba(201, 169, 106, 0.5); background: rgba(201, 169, 106, 0.08); }
.idle-skill input { accent-color: #c9a96a; width: 15px; height: 15px; }
.idle-skill .is-name { flex: 1; font-size: 13px; color: #d4c4a8; }
.idle-skill.on .is-name { color: #f5e6c8; }
.is-tag { font-size: 10px; padding: 1px 6px; border-radius: 8px; border: 1px solid #6b5a3a; color: #9ca3af; }
.is-tag-summon { color: #a3e635; border-color: #4d7c0f; }
.is-tag-heal { color: #4ade80; border-color: #14532d; }
.is-tag-buff { color: #60a5fa; border-color: #1e3a8a; }
.is-tag-debuff { color: #c084fc; border-color: #6b21a8; }
.idle-cfg-footer { margin-top: 10px; }
.idle-cfg-btn {
  width: 100%; padding: 7px; font-size: 12px; color: #d4c4a8;
  background: rgba(201, 169, 106, 0.1); border: 1px solid #6b5a3a; border-radius: 4px;
}
.idle-cfg-btn:active { background: rgba(201, 169, 106, 0.2); }

/* 宝宝受击/血条（2026-09-13） */
.bs-pet.bs-hurt { animation: bs-hurt-flash 0.18s ease-out; }
@keyframes bs-hurt-flash {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.9); filter: brightness(1.8); }
  100% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); filter: brightness(1); }
}
.bs-petp { border-color: #4d7c0f; width: 92px; height: 9px; }
.bs-petp .bs-hpfill { background: linear-gradient(90deg, #3f6212, #a3e635); }
.bs-petp .bs-hptext { font-size: 8px; line-height: 9px; }

/* ========== 商店 Tab（2026-09-13） ========== */
.shop-tab { display: flex; flex-direction: column; gap: 12px; }
.shop-section { padding-top: 4px; }
.shop-section-title { font-size: 13px; font-weight: 600; color: #c9a96a; margin-bottom: 8px; }
.shop-hint { font-size: 11px; color: #9ca3af; margin-top: 6px; line-height: 1.5; }
.shop-btn.disabled { opacity: 0.45; cursor: not-allowed; }

/* ========== 本地 GM 面板（2026-09-13） ========== */
.gm-panel {
  width: 94%; max-width: 430px; max-height: 88vh; overflow: hidden;
  display: flex; flex-direction: column;
  background: #16120d; border: 1px solid #6b5a3a; border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
}
.gm-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-bottom: 1px solid #3d3222;
  font-size: 14px; font-weight: 600; color: #c9a96a;
}
.gm-sub { font-size: 10px; color: #9ca3af; font-weight: 400; margin-left: 6px; }
.gm-x {
  background: none; border: none; color: #9ca3af; font-size: 16px; padding: 2px 6px;
}
.gm-body { padding: 10px 12px 14px; overflow-y: auto; }
.gm-sec {
  font-size: 12px; color: #c9a96a; font-weight: 600;
  margin: 12px 0 7px; padding-left: 7px; border-left: 3px solid #6b5a3a;
}
.gm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.gm-field { display: flex; flex-direction: column; gap: 3px; }
.gm-field span { font-size: 11px; color: #9ca3af; }
.gm-field input {
  width: 100%; padding: 6px 8px; font-size: 13px;
  background: rgba(10, 8, 6, 0.8); border: 1px solid #3d3222;
  border-radius: 4px; color: #f5e6c8;
}
.gm-apply {
  width: 100%; margin-top: 9px; padding: 9px;
  font-size: 13px; font-weight: 600; color: #0a0806;
  background: linear-gradient(90deg, #c9a96a, #e0c98a);
  border: none; border-radius: 5px;
}
.gm-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.gm-btns button {
  flex: 1 1 30%; padding: 7px 4px; font-size: 12px; color: #d4c4a8;
  background: rgba(201, 169, 106, 0.1); border: 1px solid #6b5a3a; border-radius: 5px;
}
.gm-btns button:active { background: rgba(201, 169, 106, 0.25); }
.gm-json {
  width: 100%; height: 130px; margin-top: 8px; padding: 8px;
  font-family: monospace; font-size: 11px; line-height: 1.4;
  background: rgba(10, 8, 6, 0.85); border: 1px solid #3d3222;
  border-radius: 4px; color: #a3e635; resize: vertical;
}
.gm-msg { margin-top: 10px; text-align: center; font-size: 12px; color: #4ade80; }

/* ========== 聊天（2026-09-13）========== */
.cw-mini{position:fixed;left:8px;bottom:62px;width:54%;max-width:240px;z-index:60;
  background:rgba(16,13,9,.93);border:1px solid #3d3222;border-radius:8px;padding:5px 8px;
  cursor:pointer;box-shadow:0 4px 14px rgba(0,0,0,.5)}
.cw-mini-head{display:flex;align-items:center;gap:6px;font-size:11px;color:#c9a96a;margin-bottom:2px}
.cw-badge{background:#ef4444;color:#fff;border-radius:8px;padding:0 5px;font-size:10px;line-height:14px}
.cw-mini-body{display:flex;flex-direction:column;gap:1px}
.cw-mini-line{font-size:11px;color:#c8bda6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cw-mini-name{color:#7fb0ff}
.cw-dim{color:#6b7280}

.cw-panel{position:fixed;left:0;bottom:0;width:100%;max-width:430px;height:56vh;z-index:70;
  display:flex;flex-direction:column;background:#14100b;border-top:1px solid #6b5a3a;
  border-right:1px solid #3d3222;border-radius:0 10px 0 0;box-shadow:0 -6px 24px rgba(0,0,0,.6)}
.cw-head{display:flex;align-items:center;padding:6px 10px;border-bottom:1px solid #3d3222}
.cw-tabs{display:flex;gap:4px;flex:1}
.cw-tabs button{background:rgba(201,169,106,.08);border:1px solid #3d3222;color:#9ca3af;
  font-size:12px;padding:4px 12px;border-radius:14px;font-family:inherit}
.cw-tabs button.on{background:linear-gradient(90deg,#c9a96a,#e0c98a);color:#0a0806;font-weight:600;border-color:#c9a96a}
.cw-close{background:none;border:none;color:#9ca3af;font-size:12px;font-family:inherit}
.cw-list{flex:1;overflow-y:auto;padding:8px 10px;display:flex;flex-direction:column;gap:7px}
.cw-msg{display:flex;flex-direction:column;gap:2px;max-width:86%}
.cw-msg.mine{align-self:flex-end;align-items:flex-end}
.cw-meta{font-size:10px;color:#6b7280}
.cw-bubble{background:#1e1913;border:1px solid #33291c;border-radius:8px;padding:5px 9px;
  font-size:13px;color:#e2d6bd;line-height:1.5;word-break:break-word}
.cw-msg.mine .cw-bubble{background:linear-gradient(90deg,#4a3c22,#5c4a29);border-color:#7a6238;color:#f5e6c8}
.cw-inputbar{display:flex;gap:6px;padding:7px 10px;border-top:1px solid #3d3222}
.cw-input{flex:1;background:rgba(10,8,6,.8);border:1px solid #3d3222;border-radius:6px;
  color:#f5e6c8;padding:8px 10px;font-size:13px;font-family:inherit}
.cw-send{background:linear-gradient(90deg,#c9a96a,#e0c98a);color:#0a0806;border:none;
  border-radius:6px;padding:0 16px;font-weight:600;font-size:13px;font-family:inherit}
.cw-sec{font-size:11px;color:#c9a96a;padding:6px 4px 3px;border-bottom:1px solid #2a2318;margin-bottom:3px}
.cw-peer{display:flex;align-items:center;gap:8px;padding:7px 6px;font-size:13px;color:#d4c4a8;
  border-bottom:1px solid #241d13;cursor:pointer}
.cw-peer:active{background:#1b1712}
.cw-avatar{width:22px;height:22px;border-radius:50%;background:#3a2f1e;color:#c9a96a;
  display:flex;align-items:center;justify-content:center;font-size:12px;flex-shrink:0}
.cw-pmtop{display:flex;align-items:center;justify-content:space-between;padding:6px 12px;
  font-size:12px;color:#9ca3af;border-bottom:1px solid #2a2318}
.cw-mini-btn{background:rgba(201,169,106,.12);border:1px solid #6b5a3a;color:#d4c4a8;
  border-radius:5px;font-size:11px;padding:2px 8px;font-family:inherit}
.cw-dev{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:8px;color:#c9a96a;font-size:14px;text-align:center;padding:20px}
.cw-tip{position:absolute;left:0;right:0;bottom:56px;text-align:center;font-size:12px;color:#fca5a5}

/* 背包容量提示（2026-09-13） */
.bag-count{font-size:11px;color:#9ca3af;padding:5px 12px 0;letter-spacing:.5px}
.bag-count .bag-full{color:#fca5a5;font-weight:600}

/* 看别人装备弹窗（2026-09-13） */
.cw-name { cursor: pointer; border-bottom: 1px dashed #6b5a3a; }
.cw-name:active { color: #c9a96a; }
.cw-profile { position: relative; width: 92%; max-width: 380px; max-height: 80vh; overflow-y: auto;
  background: #16120d; border: 1px solid #6b5a3a; border-radius: 10px; padding: 14px 12px 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.7); }
.cw-pf-close { position: absolute; top: 6px; right: 8px; background: none; border: none;
  color: #9ca3af; font-size: 18px; padding: 2px 8px; font-family: inherit; }
.cw-pf-close:active { color: #c9a96a; }
.cw-pf-head { text-align: center; padding: 2px 26px 10px; border-bottom: 1px solid #3d3222; }
.cw-pf-name { font-size: 19px; font-weight: 700; color: #c9a96a; letter-spacing: 1px; }
.cw-pf-sub { font-size: 12px; color: #9ca3af; margin-top: 4px; }
.cw-pf-sec { font-size: 12px; color: #c9a96a; margin: 10px 0 7px; padding-left: 7px; border-left: 3px solid #6b5a3a; }
.cw-pf-list { display: flex; flex-direction: column; gap: 6px; }
.cw-pf-item { display: flex; align-items: center; gap: 9px; padding: 6px 8px;
  background: rgba(10,8,6,.6); border: 1px solid #3d322255; border-radius: 6px; }
.cw-pf-item.empty { opacity: .45; }
.cw-pf-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  background: #100d09; border-radius: 5px; font-size: 18px; flex-shrink: 0; }
.cw-pf-info { flex: 1; min-width: 0; }
.cw-pf-iname { font-size: 13px; font-weight: 600; }
.cw-pf-tag { font-size: 10px; color: #ef4444; border: 1px solid #7f1d1d; border-radius: 8px; padding: 0 5px; margin-left: 5px; }
.cw-pf-isub { font-size: 11px; color: #9ca3af; margin-top: 2px; }
