/* 荒古战纪 - 暗色文字游戏风（移动端优先） */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  background: #0d0d18;
  color: #d8d8e8;
  font-size: 15px;
  line-height: 1.6;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 16px 80px;
  min-height: 100vh;
}

.hidden { display: none !important; }

.tip {
  text-align: center;
  color: #8a8a9e;
  padding: 120px 0;
}

.card {
  background: #1c1c30;
  border: 1px solid #2e2e4a;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.title {
  font-size: 19px;
  color: #e8c46a;
  font-weight: bold;
  margin-bottom: 14px;
  text-align: center;
}

.notice {
  background: #2a2313;
  border: 1px solid #5a4a1a;
  color: #e8c46a;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 16px;
}

input {
  width: 100%;
  background: #12121f;
  border: 1px solid #3a3a55;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 14px;
  color: #d8d8e8;
  font-size: 15px;
  outline: none;
}

input:focus { border-color: #e8c46a; }

.btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 15px;
  cursor: pointer;
  margin-bottom: 12px;
  color: #fff;
}

.btn-primary { background: #b8860b; }
.btn-primary:active { background: #96700a; }
.btn-plain {
  background: transparent;
  color: #8a8a9e;
  border: 1px solid #3a3a55;
}
.btn[disabled] { background: #444; color: #888; cursor: not-allowed; }

.link-row {
  text-align: center;
  font-size: 13px;
  color: #8a8a9e;
  margin-top: 8px;
}
.link-row a { color: #e8c46a; cursor: pointer; }

/* 职业选择 */
.class-list { display: flex; gap: 8px; margin-bottom: 18px; }
.class-item {
  flex: 1;
  background: #12121f;
  border: 2px solid #3a3a55;
  border-radius: 8px;
  padding: 12px 6px;
  text-align: center;
  cursor: pointer;
}
.class-item.active { border-color: #e8c46a; background: #2a2313; }
.class-name { color: #e8c46a; font-weight: bold; font-size: 14px; }
.class-desc { font-size: 12px; color: #8a8a9e; margin: 6px 0; }
.class-attr { font-size: 12px; }

/* 角色面板 */
.row { margin-bottom: 8px; }
.row.head { display: flex; align-items: baseline; gap: 10px; }
.name { font-size: 19px; color: #e8c46a; font-weight: bold; }
.class-tag { font-size: 13px; color: #8ab8e8; }
.level { font-size: 15px; margin-left: auto; }
.small { font-size: 13px; color: #a8a8be; }
.idle {
  font-size: 13px;
  color: #7ec87e;
  background: #14231a;
  border-radius: 6px;
  padding: 8px 10px;
  margin-top: 12px;
}

/* 底部导航 */
#nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  background: #1c1c30;
  border-top: 1px solid #2e2e4a;
  padding-bottom: env(safe-area-inset-bottom);
}
#nav a {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  color: #8a8a9e;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}
#nav a.active { color: #e8c46a; font-weight: bold; }

/* Toast */
#toast {
  position: fixed;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 30, 50, 0.95);
  border: 1px solid #5a4a1a;
  color: #e8c46a;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 999;
  max-width: 80%;
  text-align: center;
}

/* ---------- v2：刷图 / 战斗 / 背包 / 聊天 / 排行 ---------- */
.bar {
  height: 10px;
  background: #12121f;
  border: 1px solid #3a3a55;
  border-radius: 5px;
  overflow: hidden;
  margin: 6px 0 10px;
}
.bar-fill { height: 100%; background: linear-gradient(90deg, #b8860b, #e8c46a); transition: width .3s; }
.hp-text { color: #7ec87e; }

.btn-link {
  background: none; border: none; color: #e8c46a;
  cursor: pointer; font-size: 14px; padding: 0;
}

.map-item {
  display: flex; justify-content: space-between; align-items: center;
  background: #1c1c30; border: 1px solid #2e2e4a; border-radius: 10px;
  padding: 14px 16px; margin-bottom: 10px; cursor: pointer;
}
.map-item.locked { opacity: .45; }
.map-name { color: #e8c46a; font-weight: bold; font-size: 16px; }
.arrow { color: #8a8a9e; font-size: 20px; }

.monster-item {
  display: flex; justify-content: space-between; align-items: center;
  background: #1c1c30; border: 1px solid #2e2e4a; border-radius: 10px;
  padding: 12px 14px; margin-bottom: 10px;
}
.fight-btn { width: 84px; margin: 0; }

.battle-log {
  background: #0f0f1a; border: 1px solid #2e2e4a; border-radius: 8px;
  padding: 10px 12px; height: 200px; overflow-y: auto;
  font-size: 13px; line-height: 1.8; color: #b8b8cc;
}

.item-row {
  display: flex; justify-content: space-between; align-items: center;
  background: #1c1c30; border: 1px solid #2e2e4a; border-radius: 8px;
  padding: 10px 12px; margin-bottom: 8px;
}
.btn-mini {
  background: #2a3a55; color: #d8d8e8; border: none; border-radius: 6px;
  padding: 6px 12px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.btn-mini.danger { background: #552a2a; color: #e8a0a0; }

.chat-box {
  height: 55vh; overflow-y: auto; font-size: 14px;
}
.chat-msg { margin-bottom: 6px; word-break: break-all; }
.chat-msg .blocked { color: #666; text-decoration: line-through; }

.rank-row {
  display: flex; gap: 10px; padding: 8px 4px;
  border-bottom: 1px solid #2e2e4a; font-size: 14px;
}
.rank-row.me { background: #2a2313; border-radius: 6px; }
