/* ========== MUD终端风格 - 纯文字武侠游戏 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'NSimSun', 'SimSun', 'Courier New', monospace;
  background: #000000;
  color: #c0c0c0;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow: hidden;
}

/* ========== 登录/创建界面 ========== */
.screen {
  display: none;
  width: 100vw;
  height: 100vh;
  justify-content: center;
  align-items: center;
}

.screen.active {
  display: flex;
}

/* 樱花飘落动效 */
#sakura-container {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.sakura-petal {
  position: absolute;
  top: -30px;
  pointer-events: none;
  animation: sakura-fall linear forwards;
  opacity: 0;
  font-size: 14px;
  text-shadow: 0 0 4px rgba(255, 150, 180, 0.5);
}

@keyframes sakura-fall {
  0% {
    opacity: 0;
    transform: translateX(0) rotate(0deg);
  }
  10% {
    opacity: 0.9;
  }
  90% {
    opacity: 0.7;
  }
  100% {
    opacity: 0;
    transform: translateX(var(--drift)) rotate(var(--spin));
    top: 105vh;
  }
}

.login-box {
  background: #000000;
  border: 1px solid #8b7355;
  padding: 30px 40px;
  width: 460px;
  text-align: center;
}

/* ASCII边框装饰 */
.ascii-border-top,
.ascii-border-bottom {
  color: #8b7355;
  font-size: 12px;
  letter-spacing: 0;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
}

.ascii-border-top {
  margin-bottom: 10px;
}

.ascii-border-bottom {
  margin-top: 10px;
}

.login-hint {
  color: #555;
  font-size: 12px;
  margin-top: 12px;
  font-style: italic;
}

/* ========== 记住账号密码复选框 ========== */
.remember-row {
  text-align: left;
  margin-top: 10px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 13px;
  color: #888;
  user-select: none;
}

/* 隐藏原生checkbox */
.checkbox-label input[type="checkbox"] {
  display: none;
}

/* 自定义复选框样式 */
.checkbox-label .checkmark {
  display: inline-block;
  width: 14px;
  height: 14px;
  line-height: 14px;
  text-align: center;
  border: 1px solid #666;
  color: #00ffff;
  font-size: 14px;
  margin-right: 6px;
  font-family: inherit;
  transition: border-color 0.2s;
}

/* 选中状态：勾选 + 高亮边框 */
.checkbox-label input[type="checkbox"]:checked + .checkmark {
  border-color: #00ffff;
  color: #00ffff;
  content: '☑';
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::before {
  content: '☑';
}

.checkbox-label input[type="checkbox"]:not(:checked) + .checkmark::before {
  content: '☐';
}

.checkbox-label:hover .checkmark {
  border-color: #00ffff;
}

.checkbox-label:hover .check-label {
  color: #c0c0c0;
}

.check-label {
  transition: color 0.2s;
}

.game-title {
  font-size: 28px;
  color: #ffff00;
  margin-bottom: 25px;
  letter-spacing: 8px;
  font-weight: normal;
}

.input-group {
  margin-bottom: 15px;
  text-align: left;
}

.input-group label {
  display: block;
  margin-bottom: 4px;
  color: #8b7355;
  font-size: 13px;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 6px 10px;
  background: #0a0a0a;
  border: 1px solid #444;
  color: #c0c0c0;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

.input-group input:focus,
.input-group select:focus {
  border-color: #8b7355;
}

/* 门派描述 */
.class-desc {
  margin-top: 10px;
  padding: 8px;
  border-left: 2px solid #8b7355;
  text-align: left;
  font-size: 12px;
  color: #888;
  line-height: 1.8;
}

.class-desc .desc-label {
  color: #8b7355;
}

/* 创建角色描述 */
.create-desc {
  margin-top: 15px;
  padding: 12px;
  border: 1px solid #444;
  text-align: center;
  font-size: 13px;
  color: #aaa;
  line-height: 2;
}

.create-desc p {
  margin: 5px 0;
}

.create-desc .create-hint {
  color: #666;
  font-size: 11px;
  margin-top: 10px;
  font-style: italic;
}

/* ========== 按钮 → 文字链接 ========== */
.btn {
  background: none;
  border: none;
  color: #00ffff;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  padding: 2px 4px;
  text-decoration: none;
}

.btn::before {
  content: '[';
  color: #666;
}

.btn::after {
  content: ']';
  color: #666;
}

.btn:hover {
  color: #ffffff;
  text-decoration: underline;
}

.btn-primary {
  color: #ffff00;
}

.btn-danger {
  color: #ff4444;
}

.btn-small {
  background: none;
  border: none;
  color: #00ffff;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  padding: 1px 3px;
}

.btn-small::before {
  content: '[';
  color: #555;
}

.btn-small::after {
  content: ']';
  color: #555;
}

.btn-small:hover {
  color: #ffffff;
}

.btn-add-stat {
  background: none;
  border: none;
  color: #00ff00;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  padding: 0 3px;
}

.btn-add-stat:hover {
  color: #ffffff;
}

/* ========== 游戏主界面 ========== */
#screen-game {
  flex-direction: column;
}

.game-container {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.game-header {
  background: #000000;
  padding: 8px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #8b7355;
}

.game-header .title {
  font-size: 18px;
  color: #ffff00;
  letter-spacing: 3px;
}

.header-buttons {
  display: flex;
  gap: 8px;
}

.game-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* 侧边栏 */
.sidebar {
  width: 260px;
  background: #000000;
  border-right: 1px solid #333;
  padding: 10px;
  overflow-y: auto;
}

.player-info {
  text-align: left;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #333;
}

.player-info .name {
  font-size: 16px;
  color: #ffff00;
  margin-bottom: 2px;
}

.player-info .class-level {
  font-size: 13px;
  color: #8b7355;
}

/* 称号 */
.player-title {
  font-size: 12px;
  margin-top: 4px;
}

.player-title .title-label {
  color: #666;
}

.player-title .title-value {
  color: #ff8800;
}

.player-gold {
  font-size: 14px;
  margin-top: 6px;
  padding: 4px 8px;
  background: #1a1a00;
  border: 1px solid #554400;
  border-radius: 3px;
  display: inline-block;
}

.player-gold .gold-icon {
  margin-right: 4px;
}

.player-gold .gold-value {
  color: #ffcc00;
  font-weight: bold;
  font-size: 15px;
}

.player-gold .gold-label {
  color: #998800;
  font-size: 12px;
  margin-left: 3px;
}

/* 分隔线 */
.section-divider {
  color: #8b7355;
  font-size: 12px;
  text-align: center;
  margin: 12px 0 6px;
  letter-spacing: 2px;
  border-top: 1px solid #555;
  padding-top: 6px;
}

/* 状态条 - 文字条 */
.stat-bars {
  margin: 10px 0;
}

.stat-bar {
  margin-bottom: 6px;
}

.stat-bar .label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 2px;
}

/* 文字进度条 */
.text-bar {
  font-family: inherit;
  letter-spacing: 1px;
  font-size: 13px;
}

.text-bar .filled {
  color: inherit;
}

.text-bar .empty {
  color: #333;
}

/* 隐藏原CSS进度条 */
.bar-track {
  display: none;
}

.bar-fill {
  display: none;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 8px 0;
}

.stat-item {
  background: none;
  padding: 3px 0;
  text-align: left;
  font-size: 13px;
}

.stat-item .label {
  color: #8b7355;
  font-size: 12px;
  display: inline;
}

.stat-item .value {
  color: #c0c0c0;
  display: inline;
  margin-left: 4px;
}

/* 主内容区 */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.content-area {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
}

.content-area h2 {
  color: #ffff00;
  font-weight: normal;
  font-size: 16px;
  margin-bottom: 15px;
  letter-spacing: 2px;
}

/* 欢迎文字 */
.welcome-text {
  color: #888;
  line-height: 2;
}

.welcome-text .cmd-hint {
  color: #00ffff;
}

/* 日志区头部 */
.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 10px;
  border-top: 1px solid #333;
  background: #000000;
}

.log-header span {
  color: #8b7355;
  font-size: 12px;
  letter-spacing: 1px;
}

/* 在线人数 */
.online-count {
  color: #44cc44;
  font-size: 11px;
  letter-spacing: 0;
  animation: onlinePulse 3s ease-in-out infinite;
}
.online-count.surge {
  color: #ffcc00;
  animation: none;
}
@keyframes onlinePulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

/* 日志区 */
.log-area {
  height: 200px;
  background: #000000;
  border-top: 1px solid #222;
  padding: 8px 10px;
  overflow-y: auto;
  margin-top: -5px;
  font-size: 13px;
}

.log-entry {
  margin-bottom: 2px;
  color: #888;
}

.log-entry.crit {
  color: #ff4444;
}

.log-entry.miss {
  color: #555;
}

.log-entry.poison {
  color: #00ff00;
}

.log-entry.levelup {
  color: #ffff00;
}

.log-entry.system {
  color: #00ffff;
}

.log-entry.heal {
  color: #33ff99;
}

.log-entry.ambient-street {
  color: #44cc44;
  font-family: 'NSimSun', 'SimSun', 'Courier New', monospace;
}

.log-entry.ambient-rumor {
  color: #cc66cc;
  font-family: 'NSimSun', 'SimSun', 'Courier New', monospace;
}

.log-entry.ambient-weather {
  color: #cccc44;
  font-family: 'NSimSun', 'SimSun', 'Courier New', monospace;
}

.log-entry.ambient-dialogue {
  color: #66cccc;
  font-family: 'NSimSun', 'SimSun', 'Courier New', monospace;
}

/* 模拟玩家事件 - 金橙色发光，醒目 */
.log-entry.player-event {
  color: #ffa500;
  text-shadow: 0 0 4px rgba(255, 165, 0, 0.5);
}
.log-entry.player-event-bossKill {
  color: #ffcc00;
  text-shadow: 0 0 6px rgba(255, 204, 0, 0.6);
  font-weight: bold;
}
.log-entry.player-event-rareDrop {
  color: #ff88ff;
  text-shadow: 0 0 5px rgba(255, 136, 255, 0.5);
}
.log-entry.player-event-levelUp {
  color: #00ffff;
  text-shadow: 0 0 4px rgba(0, 255, 255, 0.4);
}
.log-entry.player-event-title {
  color: #ffff00;
  text-shadow: 0 0 5px rgba(255, 255, 0, 0.5);
}

/* ========== 地图面板 ========== */
.map-item {
  padding: 8px 0;
  cursor: pointer;
  border-bottom: 1px solid #1a1a1a;
}

.map-item:hover {
  color: #ffffff;
}

.map-item.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.map-item.locked:hover {
  color: #c0c0c0;
}

/* 世界Boss入口按钮（顶部header） */
.btn-boss {
  background: linear-gradient(135deg, #1a0a00, #3a1a00) !important;
  border: 1px solid #ff6600 !important;
  color: #ff9900 !important;
  animation: boss-glow 2s ease-in-out infinite;
}

.btn-boss:hover {
  background: linear-gradient(135deg, #2a1a00, #4a2a00) !important;
  border-color: #ff9900 !important;
  box-shadow: 0 0 12px rgba(255, 102, 0, 0.5);
}

.boss-icon {
  font-size: 14px;
}

.boss-timer {
  font-size: 11px;
  color: #ff4444;
  margin-left: 4px;
}

@keyframes boss-glow {
  0%, 100% { box-shadow: 0 0 4px rgba(255, 102, 0, 0.3); }
  50% { box-shadow: 0 0 10px rgba(255, 102, 0, 0.6); }
}

/* 世界Boss面板 */
.world-boss-panel {
  padding: 10px;
}

.boss-lore {
  color: #cc9966;
  font-size: 13px;
  line-height: 1.6;
  padding: 10px;
  background: #1a1200;
  border-left: 3px solid #ff6600;
  margin: 10px 0;
}

.boss-hp-section {
  margin: 15px 0;
  text-align: center;
}

.boss-hp-label {
  color: #ff6600;
  font-size: 14px;
  margin-bottom: 5px;
}

.boss-hp-bar-container {
  background: #222;
  height: 24px;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.boss-hp-bar {
  height: 100%;
  background: linear-gradient(90deg, #ff0000, #ff4400, #ff6600);
  transition: width 0.3s;
  position: relative;
}

.boss-hp-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.15), transparent);
}

.boss-hp-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  text-shadow: 1px 1px 2px #000;
  z-index: 1;
}

.boss-actions {
  margin: 15px 0;
  text-align: center;
}

.boss-status-msg {
  color: #ff4444;
  font-size: 14px;
  text-align: center;
  margin: 20px 0;
}

.boss-damage-info {
  color: #aaa;
  font-size: 12px;
  text-align: center;
  margin-top: 10px;
}

/* Boss额外按钮区域 */
.boss-extra-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 12px;
}

.btn-boss-extra {
  background: linear-gradient(135deg, #1a1a00, #2a2a00) !important;
  border: 1px solid #886600 !important;
  color: #ffcc00 !important;
  font-size: 12px;
  padding: 4px 12px !important;
}

.btn-boss-extra:hover {
  background: linear-gradient(135deg, #2a2a00, #3a3a00) !important;
  border-color: #ffcc00 !important;
  box-shadow: 0 0 8px rgba(255, 204, 0, 0.3);
}

/* Boss弹窗遮罩 */
.boss-modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.boss-modal-box {
  background: #1a1a0a;
  border: 2px solid #ff6600;
  border-radius: 6px;
  padding: 20px;
  max-width: 420px;
  width: 90%;
  max-height: 70vh;
  overflow-y: auto;
  box-shadow: 0 0 30px rgba(255, 102, 0, 0.3);
}

.boss-modal-title {
  text-align: center;
  color: #ff9900;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 15px;
  font-family: NSimSun, monospace;
}

/* 排行列表 */
.boss-ranking-list {
  max-height: 45vh;
  overflow-y: auto;
  margin-bottom: 15px;
}

.ranking-row {
  display: flex;
  align-items: center;
  padding: 5px 8px;
  border-bottom: 1px solid #333;
  font-size: 13px;
  color: #ccc;
}

.ranking-row:nth-child(odd) {
  background: rgba(255, 255, 255, 0.02);
}

.ranking-player {
  color: #ffcc00 !important;
  background: rgba(255, 204, 0, 0.08) !important;
  font-weight: bold;
}

.ranking-rank {
  width: 35px;
  text-align: center;
  flex-shrink: 0;
}

.ranking-name {
  flex: 1;
  margin-left: 5px;
}

.ranking-damage {
  color: #ff6600;
  font-size: 12px;
  text-align: right;
  min-width: 100px;
}

/* 掉落说明 */
.boss-drops-list {
  margin-bottom: 15px;
}

.drops-tier {
  margin-bottom: 12px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid #ff6600;
}

.drops-tier-title {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 6px;
}

.drops-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.drop-item {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 3px;
  background: #222;
}

.drop-orange { color: #ff8800; border: 1px solid #ff8800; }
.drop-purple { color: #ff00ff; border: 1px solid #ff00ff; }
.drop-gold { color: #ffcc00; border: 1px solid #ffcc00; }

.btn-close-modal {
  display: block;
  margin: 0 auto;
  background: #333 !important;
  border: 1px solid #666 !important;
  color: #ccc !important;
  padding: 6px 24px !important;
}

.btn-close-modal:hover {
  background: #444 !important;
  border-color: #999 !important;
}

/* 五彩滚动公告 */
.world-boss-announce {
  font-size: 14px;
  font-weight: bold;
  padding: 4px 0;
  animation: rainbow-scroll 2s linear infinite;
  white-space: nowrap;
}

@keyframes rainbow-scroll {
  0%   { color: #ff0000; }
  16%  { color: #ff9900; }
  33%  { color: #ffff00; }
  50%  { color: #00ff00; }
  66%  { color: #0099ff; }
  83%  { color: #9900ff; }
  100% { color: #ff0000; }
}

.map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.map-name {
  font-size: 15px;
  color: #ffff00;
}

.map-level {
  font-size: 12px;
  color: #8b7355;
}

.map-desc {
  font-size: 13px;
  color: #ffffff;
  font-family: 'NSimSun', 'SimSun', 'Courier New', monospace;
  padding-left: 2em;
}

.map-item.locked .map-desc {
  color: #8a7a66;
}

/* 场景描述 */
.scene-desc {
  color: #ffffff;
  font-family: 'NSimSun', 'SimSun', 'Courier New', monospace;
  margin: 8px 0;
  padding: 10px;
  border-left: 2px solid #8b7355;
  line-height: 1.8;
  background: #0a0800;
}

/* ========== 怪物列表 ========== */
.monster-item {
  padding: 6px 0;
  cursor: pointer;
  border-bottom: 1px solid #1a1a1a;
}

.monster-item:hover {
  color: #ffffff;
}

.monster-item.boss {
  color: #ff4444;
}

.monster-item.boss .monster-name {
  color: #ff4444;
}

.monster-name {
  font-size: 14px;
  color: #ffff00;
  margin-bottom: 2px;
}

.monster-info {
  font-size: 12px;
  color: #666;
  padding-left: 2em;
}

/* ========== 战斗界面 ========== */
#screen-battle {
  flex-direction: column;
}

.battle-container {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #000000;
}

.battle-header {
  padding: 10px 15px;
  text-align: center;
  border-bottom: 1px solid #8b7355;
}

.battle-header h2 {
  color: #ffff00;
  font-size: 18px;
  font-weight: normal;
  letter-spacing: 5px;
}

/* 战斗状态区 - 文字布局 */
.battle-arena {
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid #333;
}

.battle-unit {
  width: 45%;
  font-size: 13px;
}

.unit-name {
  font-size: 16px;
  color: #ffff00;
  margin-bottom: 8px;
}

.unit-hp-bar {
  margin-bottom: 4px;
  font-size: 12px;
}

.unit-hp-bar .label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
  font-size: 12px;
}

/* 怪物观察文字 */
.monster-observe {
  font-size: 11px;
  color: #ffffff;
  font-family: 'NSimSun', 'SimSun', 'Courier New', monospace;
  margin-bottom: 6px;
}

.battle-vs {
  font-size: 14px;
  color: #ff4444;
  padding-top: 10px;
}

.battle-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 10px;
  border-bottom: 1px solid #333;
  flex-wrap: wrap;
}

.battle-log-area {
  flex: 1;
  background: #000000;
  padding: 10px 15px;
  overflow-y: auto;
  font-size: 13px;
}

.battle-log-area .log-entry {
  margin-bottom: 3px;
}

/* 战斗日志类型颜色 */
.battle-log-area .log-entry.monster_attack {
  color: #ffffff;
}

.battle-log-area .log-entry.monster_crit {
  color: #ff8888;
}

.battle-log-area .log-entry.encounter {
  color: #ffffff;
  font-family: 'NSimSun', 'SimSun', 'Courier New', monospace;
  margin-bottom: 6px;
}

.battle-log-area .log-entry.observe {
  color: #ffffff;
  font-family: 'NSimSun', 'SimSun', 'Courier New', monospace;
}

.battle-log-area .log-entry.death {
  color: #ffffff;
  font-family: 'NSimSun', 'SimSun', 'Courier New', monospace;
  margin: 4px 0;
}

.battle-log-area .log-entry.warning {
  color: #ff6600;
  font-style: italic;
}

.battle-log-area .log-entry.victory {
  color: #ffff00;
  margin-top: 6px;
}

.battle-log-area .log-entry.defeat {
  color: #ff4444;
  margin-top: 6px;
}

.battle-log-area .log-entry.skill {
  color: #66ccff;
}

.battle-log-area .log-entry.item {
  color: #99ff99;
}

.battle-log-area .log-entry.escape {
  color: #aaaaaa;
}

.battle-log-area .log-entry.mythic {
  color: #ff8800;
  font-weight: bold;
  margin: 6px 0;
  text-shadow: 0 0 8px rgba(255, 136, 0, 0.6);
}

/* 回合分隔 */
.battle-round-sep {
  color: #aaaaaa;
  margin: 6px 0 4px;
  font-size: 12px;
}

/* ========== 背包面板 ========== */
.equipment-slots {
  margin-bottom: 15px;
}

.equip-slot {
  padding: 4px 0;
  border-bottom: 1px solid #444;
  font-size: 13px;
}

.equip-slot .slot-label {
  color: #8b7355;
  display: inline;
  margin-right: 8px;
}

.equip-slot .slot-content {
  display: inline;
}

.bag-list {
  margin-top: 10px;
}

.bag-item {
  padding: 6px 0;
  border-bottom: 1px solid #444;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.bag-item .item-name {
  flex: 1;
}

.bag-item .item-actions {
  display: flex;
  gap: 5px;
}

/* ========== 商店面板 ========== */
.shopkeeper-text {
  color: #8b7355;
  font-style: italic;
  margin-bottom: 12px;
  padding: 6px;
  border-left: 2px solid #8b7355;
}

.shop-list {
  margin-top: 10px;
}

.shop-item {
  padding: 6px 0;
  border-bottom: 1px solid #1a1a1a;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.shop-item .item-name {
  width: 100px;
  color: #ffff00;
}

.shop-item .item-desc {
  flex: 1;
  color: #a89070;
  font-size: 12px;
}

.shop-item .item-price {
  color: #ffff00;
  width: 80px;
  text-align: right;
}

.shop-item-sold {
  opacity: 0.4;
}

.shop-item-sold .item-name {
  color: #666 !important;
}

.shop-item-sold .item-price {
  color: #666 !important;
}

.shop-item-sold button:disabled {
  background: #333 !important;
  border-color: #444 !important;
  color: #555 !important;
  cursor: not-allowed;
}

/* ========== 技能/物品弹窗 ========== */
.panel-popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #000000;
  border: 1px solid #8b7355;
  padding: 15px 20px;
  z-index: 100;
  min-width: 320px;
  max-height: 420px;
  overflow-y: auto;
}

.panel-popup h3 {
  color: #ffff00;
  margin-bottom: 12px;
  text-align: center;
  font-weight: normal;
  letter-spacing: 3px;
}

.skill-item,
.item-entry {
  padding: 6px 0;
  border-bottom: 1px solid #1a1a1a;
  cursor: pointer;
  font-size: 13px;
}

.drop-summary-popup {
  min-width: 280px;
  max-width: 400px;
}

.drop-summary-item {
  padding: 5px 10px;
  border-bottom: 1px solid #1a1a1a;
  color: #00ff00;
  font-size: 13px;
}

/* ========== 技能查看弹窗 ========== */
.skill-view-popup {
  min-width: 350px;
  max-width: 450px;
  max-height: 500px;
}

.skill-view-item {
  padding: 8px 10px;
  border-bottom: 1px solid #333;
}

.skill-view-item.skill-locked {
  opacity: 0.5;
}

.skill-toggle {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: #aaa;
  cursor: pointer;
  user-select: none;
}

.skill-toggle input[type="checkbox"] {
  cursor: pointer;
  accent-color: #ffff00;
}

.skill-view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.skill-view-name {
  font-size: 14px;
  font-weight: bold;
}

.skill-view-status {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 2px;
}

.skill-view-status.learned {
  color: #00ff00;
  border: 1px solid #00ff00;
}

.skill-view-status.locked {
  color: #666;
  border: 1px solid #444;
}

.skill-view-info {
  color: #8b7355;
  font-size: 12px;
  margin-bottom: 3px;
}

.skill-view-desc {
  color: #999;
  font-size: 12px;
  line-height: 1.4;
}

/* 技能分类Tab */
.skill-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 10px;
  border-bottom: 1px solid #444;
}

.skill-tab {
  flex: 1;
  padding: 6px 0;
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 13px;
  font-family: NSimSun, monospace;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}

.skill-tab:hover {
  color: #ccc;
}

.skill-tab.active {
  color: #ffcc00;
  border-bottom-color: #ffcc00;
}

/* 基础武学激活状态 */
.skill-basic-active {
  background: #1a1a00;
  border-left: 2px solid #ffff00;
}

/* 技能禁用状态（基础武学未激活） */
.skill-disabled {
  opacity: 0.4;
}

.skill-disabled .skill-view-name {
  color: #666 !important;
}

/* 武学类型标签 */
.skill-view-type {
  font-size: 11px;
  color: #888;
  margin-right: 4px;
}

/* 武学图标 */
.skill-view-icon {
  font-size: 16px;
  margin-right: 6px;
}

/* 战斗技能面板中的基础标签 */
.skill-tag-basic {
  font-size: 10px;
  color: #ffff00;
  border: 1px solid #ffff00;
  padding: 0 3px;
  margin-right: 4px;
  border-radius: 2px;
}

/* 学习按钮 */
.btn-learn {
  background: #0a2a0a;
  color: #00ff00;
  border: 1px solid #00ff00;
  padding: 2px 6px;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
}

.btn-learn:hover {
  background: #1a4a1a;
  color: #66ff66;
  border-color: #66ff66;
}

/* 战斗技能面板中的公共标签 */
.skill-tag-public {
  font-size: 10px;
  color: #00cccc;
  border: 1px solid #00cccc;
  border-radius: 2px;
  padding: 0 3px;
  margin-right: 4px;
  vertical-align: middle;
}

/* 合成学习按钮 */
.btn-synth {
  background: #1a1a00 !important;
  border: 1px solid #cc9900 !important;
  color: #ffcc00 !important;
}

.btn-synth:hover {
  background: #2a2a00 !important;
  border-color: #ffcc00 !important;
}

/* 公共武学学习按钮 */
.btn-learn-skill {
  background: #0a2a0a !important;
  border: 1px solid #00cc00 !important;
  color: #00ff00 !important;
  font-size: 11px;
  padding: 1px 8px !important;
  cursor: pointer;
}

.btn-learn-skill:hover {
  background: #1a3a1a !important;
  border-color: #00ff00 !important;
}

/* 遗忘技能按钮 */
.btn-forget-skill {
  background: #2a0a0a !important;
  border: 1px solid #884444 !important;
  color: #cc6666 !important;
  font-size: 11px;
  padding: 1px 8px !important;
  cursor: pointer;
  margin-left: 6px;
}

.btn-forget-skill:hover {
  background: #3a1a1a !important;
  border-color: #cc4444 !important;
  color: #ff4444 !important;
}

/* 游戏古风确认弹窗 */
.game-confirm-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.game-confirm-box {
  background: #0a0a00;
  border: 2px solid #8b7355;
  border-radius: 4px;
  padding: 20px 30px;
  min-width: 300px;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 0 30px rgba(139, 115, 85, 0.3);
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.game-confirm-title {
  color: #cc9966;
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 12px;
  font-family: NSimSun, monospace;
}

.game-confirm-msg {
  color: #d4c4a8;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 18px;
}

.game-confirm-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.btn-confirm-yes {
  background: linear-gradient(135deg, #2a1a00, #3a2a00) !important;
  border: 1px solid #8b7355 !important;
  color: #ffcc00 !important;
  padding: 6px 28px !important;
  font-size: 13px !important;
  cursor: pointer;
}

.btn-confirm-yes:hover {
  background: linear-gradient(135deg, #3a2a00, #4a3a00) !important;
  border-color: #cc9966 !important;
  box-shadow: 0 0 8px rgba(204, 153, 102, 0.4);
}

.btn-confirm-no {
  background: #1a1a1a !important;
  border: 1px solid #555 !important;
  color: #999 !important;
  padding: 6px 28px !important;
  font-size: 13px !important;
  cursor: pointer;
}

.btn-confirm-no:hover {
  background: #2a2a2a !important;
  border-color: #888 !important;
  color: #ccc !important;
}

/* ========== 称号查看弹窗 ========== */
.title-view-popup {
  min-width: 380px;
  max-width: 480px;
  max-height: 520px;
}

.title-current-status {
  color: #ccc;
  font-size: 13px;
  padding: 8px 10px;
  border-bottom: 1px solid #555;
  margin-bottom: 6px;
}

.title-current-name {
  color: #ffcc00;
  font-size: 15px;
  font-weight: bold;
}

.title-view-item {
  padding: 8px 10px;
  border-bottom: 1px solid #222;
}

.title-view-item.title-current {
  background: #1a1a00;
  border: 1px solid #554400;
}

.title-view-item.title-locked {
  opacity: 0.5;
}

.title-view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.title-view-name {
  font-size: 14px;
  font-weight: bold;
}

.title-view-status {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 2px;
}

.title-view-status.current {
  color: #ffcc00;
  border: 1px solid #ffcc00;
}

.title-view-status.achieved {
  color: #00ff00;
  border: 1px solid #00ff00;
}

.title-view-status.locked {
  color: #555;
  border: 1px solid #333;
}

.title-select-check {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: #aaa;
  cursor: pointer;
  flex-shrink: 0;
}
.title-select-check input[type="radio"] {
  accent-color: #ffcc00;
  cursor: pointer;
}

.title-view-desc {
  color: #999;
  font-size: 12px;
  margin-bottom: 3px;
}

.title-view-req {
  color: #8b7355;
  font-size: 11px;
}

.title-bonus {
  color: #00ff00;
  font-size: 12px;
}

/* ========== 活动限定怪物 ========== */
.monster-item.event-monster {
  border: 1px solid #ff8800;
  background: #1a1000;
  animation: event-glow 2s ease-in-out infinite;
}

@keyframes event-glow {
  0%, 100% { box-shadow: 0 0 5px rgba(255, 136, 0, 0.3); }
  50% { box-shadow: 0 0 15px rgba(255, 136, 0, 0.6); }
}

.event-tag {
  font-size: 11px;
  color: #ff8800;
  border: 1px solid #ff8800;
  padding: 0 4px;
  margin-left: 4px;
}

.title-progress {
  position: relative;
  height: 14px;
  background: #1a1a1a;
  border: 1px solid #333;
  margin-top: 5px;
  overflow: hidden;
}

.title-progress-bar {
  height: 100%;
  background: #335533;
  transition: width 0.3s;
}

.title-progress-text {
  position: absolute;
  top: 0;
  right: 4px;
  font-size: 10px;
  color: #999;
  line-height: 14px;
}

/* ========== 背包容量 ========== */
.bag-capacity {
  color: #8b7355;
  font-size: 12px;
  text-align: right;
  padding: 4px 0;
  border-bottom: 1px solid #333;
  margin-bottom: 6px;
}

.shop-bag-capacity {
  color: #00ff00;
  font-size: 12px;
  padding: 4px 10px;
  margin-bottom: 4px;
}

.item-expand {
  color: #00ff00;
  font-size: 12px;
  margin-left: 6px;
}

/* ========== 背包筛选 ========== */
.bag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  font-size: 12px;
}

.filter-check {
  cursor: pointer;
  color: #999;
  white-space: nowrap;
}

.filter-check input[type="checkbox"] {
  margin-right: 2px;
  cursor: pointer;
}

.bag-filter .btn-small {
  margin-left: 4px;
}

.btn-danger {
  color: #ff4444;
}

.skill-item:hover,
.item-entry:hover {
  color: #ffffff;
}

.skill-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.skill-name {
  color: #ffff00;
  margin-bottom: 2px;
}

.skill-info {
  font-size: 12px;
  color: #666;
}

.item-entry .item-name {
  color: #ffff00;
}

.item-entry .item-desc {
  font-size: 12px;
  color: #666;
}

/* ========== 装备详情浮层 ========== */
.equip-detail {
  margin: 8px 0;
  padding: 8px;
  border: 1px solid #333;
  font-size: 13px;
  line-height: 1.8;
}

.equip-detail .equip-lore {
  color: #c0a878;
  font-style: normal;
  font-family: NSimSun, SimSun, serif;
  margin-top: 4px;
  border-top: 1px solid #222;
  padding-top: 4px;
}

/* 装备等级需求 */
.req-level {
  color: #888;
  font-size: 12px;
}

/* ========== 调试控制台 ========== */
.debug-console {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #000000;
  border-top: 1px solid #8b7355;
  padding: 8px 10px;
  z-index: 200;
}

.console-input-group {
  display: flex;
  gap: 8px;
}

.console-input-group input {
  flex: 1;
  padding: 4px 8px;
  background: #0a0a0a;
  border: 1px solid #444;
  color: #c0c0c0;
  font-family: inherit;
  font-size: 13px;
}

.console-hint {
  font-size: 11px;
  color: #555;
  margin-top: 4px;
}

/* ========== 工具 ========== */
.empty {
  text-align: center;
  color: #555;
  font-style: italic;
  padding: 15px;
}

.back-btn {
  margin-bottom: 10px;
}

/* 受伤状态文字 */
.injury-status {
  font-size: 12px;
  margin-top: 2px;
}

.injury-status.critical {
  color: #ff4444;
}

.injury-status.wounded {
  color: #ff8800;
}

.injury-status.hurt {
  color: #ffff00;
}

.injury-status.healthy {
  color: #00ff00;
}

/* ========== 战斗buff显示 ========== */
.battle-buff {
  display: inline-block;
  background: linear-gradient(135deg, #1a3a4a, #0a2a3a);
  border: 1px solid #00ffff;
  color: #00ffff;
  font-size: 11px;
  padding: 1px 6px;
  margin-left: 4px;
  border-radius: 3px;
  font-weight: bold;
  text-shadow: 0 0 4px #00ffff88;
  box-shadow: 0 0 4px #00ffff44;
}

.log-entry.buff {
  color: #ffff00;
  font-style: italic;
}

/* ========== 打字机光标闪烁效果 ========== */
@keyframes cursor-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.typing-cursor::after {
  content: '▌';
  color: #c0c0c0;
  animation: cursor-blink 1s infinite;
  margin-left: 2px;
}

/* ========== 日志新条目淡入效果 ========== */
@keyframes log-fadein {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.log-area .log-entry:last-child,
.battle-log-area .log-entry:last-child {
  animation: log-fadein 0.3s ease;
}

/* ========== 扫描线效果（可选） ========== */
.scanline-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

/* ========== 任务系统 ========== */

.btn-quest {
  position: relative;
}

.quest-badge {
  background: #ff4444;
  color: #fff;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 8px;
  margin-left: 3px;
  vertical-align: middle;
}

.quest-popup {
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
}

.quest-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
  border-bottom: 1px solid #444;
  padding-bottom: 8px;
}

.quest-tab {
  background: #333;
  color: #888;
  border: 1px solid #555;
  padding: 4px 12px;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  font-size: 12px;
}

.quest-tab.active {
  background: #444;
  color: #00ff00;
  border-color: #00ff00;
}

.quest-item {
  background: #2a2a2a;
  border: 1px solid #444;
  padding: 10px;
  margin-bottom: 8px;
}

.quest-item.quest-active {
  border-left: 3px solid #00ff00;
}

.quest-item.quest-completed {
  border-left: 3px solid #888;
  opacity: 0.7;
}

.quest-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.quest-type {
  font-size: 11px;
  padding: 1px 4px;
  border-radius: 3px;
}

.quest-type.main {
  background: #ff8800;
  color: #000;
}

.quest-type.side {
  background: #5555ff;
  color: #fff;
}

.quest-name {
  color: #ffff00;
  font-weight: bold;
  font-size: 14px;
}

.quest-status {
  margin-left: auto;
  font-size: 12px;
}

.quest-status.active {
  color: #00ff00;
}

.quest-status.completed {
  color: #888;
}

.quest-desc {
  color: #aaa;
  font-size: 12px;
  margin-bottom: 5px;
}

.quest-step {
  color: #00ffff;
  font-size: 12px;
  margin-bottom: 3px;
}

.quest-step-label {
  color: #888;
}

.quest-progress-detail {
  color: #ffff00;
  margin-left: 5px;
}

.quest-hint {
  color: #888;
  font-size: 11px;
  font-style: italic;
  margin-bottom: 5px;
}

.quest-progress-bar {
  background: #333;
  height: 6px;
  margin: 5px 0;
  border: 1px solid #555;
}

.quest-progress-fill {
  background: #00ff00;
  height: 100%;
  transition: width 0.3s;
}

.quest-step-count {
  color: #666;
  font-size: 11px;
  text-align: right;
}

.quest-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.btn-abandon-quest {
  background: #333;
  color: #ff6666;
  border: 1px solid #666;
  padding: 2px 8px;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
}

.btn-abandon-quest:hover {
  background: #441111;
  border-color: #ff6666;
  color: #ff9999;
}

.quest-rewards {
  color: #ffcc00;
  font-size: 11px;
  margin-top: 3px;
}

.quest-daily-info {
  background: #2a2a2a;
  border: 1px solid #555;
  padding: 8px;
  text-align: center;
  color: #ffff00;
  font-size: 12px;
  margin-top: 10px;
}

.quest-hint {
  background: #2a2a2a;
  border: 1px dashed #555;
  padding: 10px;
  text-align: center;
  color: #888;
  font-size: 12px;
  margin-top: 10px;
}

/* 任务相关日志 */
.log-entry.quest {
  color: #00ffff;
}

.log-entry.quest-complete {
  color: #ffff00;
  font-weight: bold;
}

/* ========== 设置系统 ========== */

.settings-popup {
  max-width: 400px;
}

.settings-content {
  margin-top: 10px;
}

.settings-section {
  margin-bottom: 15px;
  border: 1px solid #444;
  padding: 10px;
}

.settings-title {
  color: #ffcc00;
  text-align: center;
  margin-bottom: 10px;
  font-size: 13px;
}

.settings-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 0;
}

.settings-label {
  color: #fff;
  font-size: 14px;
}

.settings-desc {
  color: #888;
  font-size: 11px;
}

.settings-value {
  color: #aaa;
  font-size: 12px;
}

.btn-danger {
  background: #660000;
  color: #ff4444;
  border: 1px solid #ff4444;
  margin-top: 5px;
}

.btn-danger:hover {
  background: #880000;
}

/* ========== 响应式 - 手机适配 ========== */
@media (max-width: 768px) {
  /* 登录界面 */
  .login-box {
    width: 95%;
    padding: 20px 15px;
  }

  .game-title {
    font-size: 20px;
    letter-spacing: 4px;
  }

  .ascii-border-top,
  .ascii-border-bottom {
    font-size: 10px;
    overflow: hidden;
  }

  /* 游戏头部按钮 - 手机紧凑布局 */
  .game-header {
    padding: 6px 8px;
    border-bottom: 1px solid #8b7355;
  }

  .game-header .title {
    font-size: 14px;
    margin-bottom: 4px;
    display: block;
    text-align: center;
  }

  .header-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    justify-content: center;
    align-items: center;
  }

  .header-buttons .btn {
    font-size: 11px;
    padding: 2px 5px;
  }

  /* 世界Boss按钮特殊处理 */
  #world-boss-entry {
    font-size: 10px;
    padding: 2px 4px;
  }

  #world-boss-entry .boss-icon {
    font-size: 12px;
  }

  #world-boss-entry .boss-timer {
    font-size: 9px;
  }

  /* 游戏主体布局 */
  .game-body {
    flex-direction: column;
  }

  /* 侧边栏 - 限制高度可滚动 */
  .sidebar {
    width: 100%;
    max-height: 260px;
    border-right: none;
    border-bottom: 1px solid #333;
    padding: 6px 8px;
    overflow-y: auto;
  }

  .player-info .name {
    font-size: 13px;
  }

  .player-info .class-level {
    font-size: 11px;
  }

  .player-gold {
    font-size: 11px;
    padding: 2px 5px;
  }

  .player-gold .gold-value {
    font-size: 12px;
  }

  /* 状态条 - 紧凑 */
  .stat-bars {
    margin: 6px 0;
  }

  .stat-bar {
    margin-bottom: 4px;
  }

  .stat-bar .label {
    font-size: 11px;
  }

  .text-bar {
    font-size: 13px;
    letter-spacing: 1px;
  }

  /* 属性网格 - 紧凑 */
  .stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
  }

  .stat-item {
    font-size: 11px;
    padding: 1px 0;
  }

  .section-divider {
    margin: 8px 0 4px;
    font-size: 11px;
  }

  /* 主内容区 */
  .main-content {
    flex: 1;
    overflow-y: auto;
  }

  .content-area {
    padding: 8px;
  }

  .content-area h2 {
    font-size: 13px;
    margin-bottom: 8px;
  }

  /* 日志区 */
  .log-area {
    height: 140px;
    font-size: 11px;
  }

  .log-header {
    padding: 3px 6px;
  }

  .log-header span {
    font-size: 10px;
  }

  /* 战斗界面 */
  .battle-arena {
    flex-direction: column;
    gap: 8px;
    padding: 10px;
  }

  .battle-unit {
    width: 100%;
  }

  .battle-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 8px;
  }

  .battle-actions .btn {
    font-size: 11px;
    padding: 5px 6px;
  }

  .battle-log-area {
    height: 140px;
    font-size: 11px;
  }

  /* 装备槽位 */
  .equipment-slots {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }

  .equip-slot {
    font-size: 11px;
  }

  /* 弹窗面板 */
  .panel-popup {
    width: 95%;
    max-width: 95%;
    left: 2.5%;
    top: 5%;
    max-height: 85vh;
    padding: 10px;
  }

  .panel-popup h3 {
    font-size: 13px;
    margin-bottom: 8px;
  }

  /* 背包筛选 */
  .bag-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
  }

  .bag-filter label {
    font-size: 11px;
  }

  /* 商店 */
  .shop-item {
    font-size: 11px;
    padding: 4px 0;
  }

  .shop-item .item-name {
    width: 70px;
  }

  .shop-item .item-desc {
    font-size: 10px;
  }

  /* 任务面板 */
  .quest-popup {
    width: 95%;
    max-width: 95%;
    left: 2.5%;
  }

  .quest-item {
    padding: 6px;
    font-size: 11px;
  }

  .quest-tab {
    font-size: 11px;
    padding: 3px 6px;
  }

  /* 设置面板 */
  .settings-popup {
    width: 95%;
    max-width: 95%;
    left: 2.5%;
  }

  .settings-item {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }

  .settings-label {
    font-size: 12px;
  }

  /* 技能查看 */
  .skill-view-popup {
    width: 95%;
    max-width: 95%;
    left: 2.5%;
  }

  .skill-view-item {
    font-size: 11px;
    padding: 5px;
  }

  .skill-tab {
    font-size: 11px;
  }

  /* 称号查看 */
  .title-view-popup {
    width: 95%;
    max-width: 95%;
    left: 2.5%;
  }

  /* 掉落汇总 */
  .drop-summary-popup {
    width: 95%;
    max-width: 95%;
    left: 2.5%;
  }

  /* 世界Boss面板 */
  #panel-world-boss {
    padding: 8px;
  }

  /* MUD地图 */
  .mud-map-grid {
    gap: 2px;
  }

  .world-region-box {
    font-size: 10px;
    padding: 2px 4px;
    margin-right: 2px;
  }

  /* 按钮通用 */
  .btn {
    font-size: 11px;
    padding: 2px 6px;
  }

  .btn-small {
    font-size: 9px;
    padding: 1px 4px;
  }

  /* 物品详情 */
  .item-detail {
    font-size: 10px;
  }

  /* 战斗VS */
  .battle-vs {
    font-size: 16px;
    padding: 5px 0;
  }

  /* 确认弹窗 */
  .game-confirm-box {
    width: 90%;
    padding: 12px;
  }

  .game-confirm-msg {
    font-size: 12px;
  }

  .game-confirm-btns {
    gap: 10px;
  }

  .btn-confirm-yes,
  .btn-confirm-no {
    padding: 5px 16px !important;
    font-size: 12px !important;
  }

  /* 调试控制台 */
  .debug-console {
    padding: 4px 8px;
  }

  .console-input-group input {
    font-size: 11px;
  }

  .console-hint {
    font-size: 8px;
  }

  /* MUD区域视图 */
  .mud-location-body {
    flex-direction: column;
  }

  .mud-ascii-art {
    font-size: 11px;
    padding: 4px 6px;
  }

  /* 背包物品 */
  .bag-item {
    font-size: 11px;
    padding: 4px 0;
  }

  /* 掉落说明 */
  .drops-tier {
    font-size: 11px;
    padding: 6px;
  }

  .drop-item {
    font-size: 10px;
  }
}

/* 小屏手机 (宽度 < 480px) */
@media (max-width: 480px) {
  body {
    font-size: 13px;
  }

  .login-box {
    padding: 15px 10px;
  }

  .game-title {
    font-size: 18px;
    letter-spacing: 3px;
  }

  .header-buttons .btn {
    font-size: 11px;
    padding: 2px 6px;
  }

  .stat-item {
    font-size: 11px;
  }

  .stats-grid {
    gap: 2px;
  }

  .battle-actions .btn {
    font-size: 12px;
    padding: 5px 6px;
  }

  .content-area h2 {
    font-size: 13px;
  }

  .mud-area-box {
    font-size: 12px;
  }
}

/* ========== MUD地图导航 ========== */
.mud-world-map,
.mud-area-view {
  padding: 10px;
}

.mud-section-title {
  color: #ffcc00;
  text-align: center;
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre;
}

.mud-area-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.mud-area-box {
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre;
  transition: color 0.2s;
}
.mud-area-box:hover {
  color: #ffffff !important;
}

.mud-area-desc {
  font-size: 12px;
  color: #888;
  text-align: center;
  margin-top: -4px;
  margin-bottom: 8px;
}

.mud-back {
  color: #00ffff;
  cursor: pointer;
  margin-bottom: 10px;
  font-size: 13px;
}
.mud-back:hover {
  color: #ffffff;
  text-decoration: underline;
}

.mud-location-title {
  color: #ffcc00;
  font-size: 14px;
  margin: 10px 0 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid #333;
}

.mud-location-desc {
  color: #cccccc;
  font-family: 'NSimSun', 'SimSun', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.8;
  margin: 12px 0;
  padding: 10px;
  border-left: 2px solid #555;
  background: #0a0800;
}

.mud-location-body {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin: 12px 0;
}

.mud-location-body .mud-location-desc {
  flex: 1;
  margin: 0;
}

.mud-ascii-art {
  flex-shrink: 0;
  color: #4fc3f7;
  font-family: 'NSimSun', 'SimSun', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.4;
  margin: 0;
  padding: 8px 12px;
  background: #0a0a14;
  border: 1px solid #1a3a5c;
  border-radius: 4px;
  white-space: pre;
}

.mud-exits-title,
.mud-actions-title {
  color: #8b7355;
  font-size: 12px;
  margin: 10px 0 6px;
}

.mud-exits,
.mud-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mud-exit,
.mud-action {
  color: #00ffff;
  cursor: pointer;
  font-size: 13px;
  padding: 3px 0;
}
.mud-exit:hover,
.mud-action:hover {
  color: #ffffff;
  text-decoration: underline;
}

.mud-exit-locked {
  color: #555;
  cursor: default;
}
.mud-exit-locked:hover {
  color: #555;
  text-decoration: none;
}

/* ========== 内嵌世界地图区域网格 ========== */
.world-map-grid {
  margin-top: 12px;
}

.mud-connector {
  color: #555;
  font-size: 12px;
  margin: 0 2px;
}

/* 地点网格布局 */
.mud-map-grid {
  display: grid;
  gap: 2px;
  margin: 12px 0;
  justify-content: start;
  align-items: center;
}
.mud-world-grid {
  display: grid;
  gap: 2px;
  margin: 12px 0;
  justify-content: center;
  align-items: center;
}
.mud-grid-empty {
  width: 0;
  height: 0;
}
.mud-line-h {
  color: #555;
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
}
.mud-line-v {
  color: #555;
  font-size: 14px;
  text-align: center;
  line-height: 1;
}

.world-region-box {
  display: inline-block;
  cursor: pointer;
  padding: 2px 8px;
  margin-right: 6px;
  border: 1px solid #555;
  color: #ccc;
  font-size: 12px;
  background: #1a1a1a;
  text-align: center;
}
.world-region-box:hover {
  color: #fff;
  border-color: #aaa;
  background: #2a2a2a;
}
.world-region-box.active {
  color: #ffcc00;
  border-color: #ffcc00;
}
.world-region-box.locked {
  color: #555;
  cursor: default;
  border-color: #333;
  background: #111;
}
.world-region-box.locked:hover {
  color: #555;
  border-color: #333;
  background: #111;
}

/* ========== 天气动画 ========== */
.mud-weather-container {
  position: relative;
  overflow: hidden;
}

.mud-weather-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

/* 风+落叶 - 每片叶子独立动画 */
.weather-wind-overlay .leaf {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 0 50% 50% 50%;
  opacity: 0;
  animation: leaf-fall linear infinite;
  will-change: transform;
}

@keyframes leaf-fall {
  0% {
    transform: translate(0, -20px) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.5;
  }
  100% {
    transform: translate(80px, 350px) rotate(360deg);
    opacity: 0;
  }
}
