* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f2f4f7;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  background: linear-gradient(135deg, #1a2a3a, #2d4a5e);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.brand { font-size: 18px; font-weight: 600; }
#nav { display: flex; gap: 6px; flex-wrap: wrap; }
.navbtn {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}
.navbtn.active { background: #4a7c59; }
.container { flex: 1; max-width: 960px; width: 100%; margin: 0 auto; padding: 24px 16px; }
.view h2 { margin-bottom: 14px; color: #1a2a3a; }
.hidden { display: none !important; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 14px; }
.card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  margin-bottom: 14px;
}
.cards .card { margin-bottom: 0; }
.card.stat { text-align: center; }
.stat-num { font-size: 24px; font-weight: 700; color: #2d4a5e; }
.stat-label { font-size: 12px; color: #888; margin-top: 4px; }
.card h3 { margin-bottom: 10px; font-size: 15px; }
.player-list { display: flex; flex-wrap: wrap; gap: 8px; min-height: 24px; }
.player-chip {
  background: #e8f3ec;
  color: #2e6b46;
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 13px;
}
.hint { color: #999; font-size: 12px; margin-top: 8px; }
.btn {
  background: #4a7c59;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px 18px;
  font-size: 14px;
  cursor: pointer;
}
.btn:hover { background: #3d6a4b; }
.btn.small { padding: 8px 14px; font-size: 13px; }
.btn.ghost { background: #eef0f2; color: #555; }
.btn.ghost:hover { background: #e0e3e6; }
.btn.warn { background: #d98e32; }
.btn.warn:hover { background: #c07c25; }
.btn.danger { background: #c0453e; }
.btn.danger:hover { background: #a93832; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; }
.cmdrow { display: flex; gap: 8px; flex-wrap: wrap; }
.cmdrow input { flex: 1; min-width: 140px; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; }
.cmd-output {
  background: #14202b;
  color: #bfe8c8;
  border-radius: 8px;
  padding: 12px;
  margin-top: 10px;
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 260px;
  overflow: auto;
}
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 8px 6px; border-bottom: 1px solid #eee; text-align: left; }
.post-item {
  background: #fff;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.post-title { font-size: 16px; font-weight: 600; color: #2d4a5e; cursor: pointer; }
.post-title:hover { text-decoration: underline; }
.post-meta { color: #999; font-size: 12px; margin-top: 6px; }
.post-content { white-space: pre-wrap; line-height: 1.7; margin: 12px 0; }
.comment { border-top: 1px solid #f0f0f0; padding: 10px 0; }
.comment-meta { color: #999; font-size: 12px; margin-bottom: 4px; }
.comment-form { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.row-between { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.row-between h2 { margin-bottom: 0; }
.auth-wrap { max-width: 460px; margin: 0 auto; background: #fff; border-radius: 14px; padding: 24px; box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { flex: 1; padding: 10px; border: none; border-radius: 8px; background: #f0f2f5; color: #555; cursor: pointer; font-size: 14px; }
.tab.active { background: #4a7c59; color: #fff; }
label { display: block; margin-bottom: 13px; font-size: 13px; color: #555; }
input, textarea {
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}
input:focus, textarea:focus { outline: none; border-color: #4a7c59; }
.panel .btn { width: 100%; margin-top: 4px; }
.panel .btn + .btn { margin-top: 10px; }
#user-box { margin-top: 16px; padding: 14px; background: #f6f8f7; border-radius: 8px; font-size: 14px; }
#user-box p { margin-bottom: 6px; }
#changepass-box { margin-top: 16px; padding: 14px; background: #fbf7f0; border-radius: 8px; }
.cp-title { font-size: 15px; margin-bottom: 10px; }
.msg { margin-top: 14px; text-align: center; font-size: 14px; min-height: 20px; }
.msg.ok { color: #2e8b57; }
.msg.err { color: #d9534f; }
.footer { text-align: center; color: #999; font-size: 12px; padding: 16px; }
