* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #0f1420;
  color: #dde3f0;
  min-height: 100vh;
}

.wrap { max-width: 960px; margin: 0 auto; padding: 24px 16px 48px; }

header { text-align: center; margin-bottom: 24px; }
header h1 { font-size: 28px; }
.sub { color: #8a93a8; font-size: 14px; margin-top: 6px; }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 720px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: #1a2132;
  border: 1px solid #2a3450;
  border-radius: 12px;
  padding: 16px;
}
.card h2 { font-size: 16px; margin-bottom: 12px; color: #9db4ff; }

/* 战场 */
.arena {
  display: flex;
  align-items: center;
  gap: 12px;
}
.fighter { flex: 1; }
.vs { font-weight: bold; color: #5a6880; }
.name { font-size: 14px; margin-bottom: 6px; }

.bar {
  position: relative;
  height: 18px;
  background: #0d1120;
  border-radius: 9px;
  overflow: hidden;
  margin-bottom: 6px;
}
.bar .fill {
  height: 100%;
  width: 100%;
  transition: width .2s;
}
.bar.hp .fill { background: linear-gradient(90deg, #37c26a, #5be08a); }
.bar.hp.enemy .fill { background: linear-gradient(90deg, #d64545, #ff7a6b); }
.bar.xp .fill { background: linear-gradient(90deg, #4a7de0, #7aa5ff); }
.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,.6);
}

.controls { display: flex; gap: 8px; margin-top: 14px; }
button {
  flex: 1;
  padding: 8px 0;
  border: 1px solid #3a4a70;
  background: #232c44;
  color: #dde3f0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
button:hover { background: #2c3854; }

/* 表格 */
.stats { width: 100%; border-collapse: collapse; font-size: 14px; }
.stats td { padding: 7px 4px; border-bottom: 1px solid #232c44; }
.stats td:last-child { text-align: right; color: #ffd479; font-variant-numeric: tabular-nums; }
.hint { font-size: 12px; color: #6b7590; margin-top: 10px; }

/* 日志 */
.log-card { grid-column: 1 / -1; }
.log {
  height: 220px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.7;
  background: #0d1120;
  border-radius: 8px;
  padding: 10px 12px;
}
.log .kill { color: #5be08a; }
.log .hurt { color: #ff9d7a; }
.log .level { color: #7aa5ff; }
.log .buy { color: #ffd479; }
.log .death { color: #ff6b6b; }
