:root {
  font-family: "Microsoft YaHei", system-ui, sans-serif;
  color: #25394e;
  background: #f3f6fa;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: #428bd0;
  text-decoration: none;
}
h1 {
  font-size: 26px;
  margin: 0;
}
h2 {
  font-size: 19px;
  margin: 0 0 22px;
}
p {
  line-height: 1.7;
}
small,
.muted {
  color: #8292a5;
}
.layout {
  display: grid;
  grid-template-columns: 225px 1fr;
  min-height: 100vh;
}
.sidebar {
  min-width: 0;
  padding: 32px 18px;
  background: #172b42;
  color: #c3d4e5;
}
.brand {
  font-size: 24px;
  font-weight: 700;
  color: white;
  padding: 0 16px;
  margin-bottom: 10px;
}
.sidebar > p {
  padding: 0 16px;
  color: #7f9bb5;
  font-size: 13px;
  margin-bottom: 38px;
}
.sidebar nav {
  display: grid;
  gap: 10px;
}
.sidebar button {
  background: transparent;
  text-align: left;
  border: 0;
  border-radius: 7px;
  color: #adc4da;
  padding: 14px 20px;
}
.sidebar button.active {
  background: #2e7dc1;
  color: white;
}
.main {
  padding: 30px 38px;
  min-width: 0;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 30px;
}
.header-user {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 14px;
}
.button {
  background: #348fd3;
  color: white;
  border: 0;
  border-radius: 6px;
  padding: 11px 20px;
}
.secondary {
  background: white;
  color: #4588bd;
  border: 1px solid #cbdfee;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 26px;
}
.stat,
.panel {
  background: white;
  border: 1px solid #e1e9f1;
  border-radius: 10px;
  padding: 25px;
}
.stat span {
  font-size: 14px;
  color: #8797a8;
}
.stat strong {
  display: block;
  font-size: 30px;
  color: #388dc7;
  margin-top: 10px;
}
.field {
  display: grid;
  gap: 9px;
  font-size: 14px;
  margin-bottom: 22px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px;
  border: 1px solid #d7e2ed;
  border-radius: 6px;
  color: #38506b;
  background: white;
}
.field textarea {
  min-height: 130px;
  resize: vertical;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.error {
  min-height: 20px;
  color: #c55059;
  font-size: 14px;
}
.scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  white-space: nowrap;
}
th,
td {
  text-align: left;
  border-bottom: 1px solid #e5edf3;
  padding: 15px;
}
th {
  background: #f5f8fc;
  color: #7890a6;
  font-weight: 400;
}
td.detail {
  white-space: normal;
  word-break: break-word;
  min-width: 200px;
  max-width: 450px;
}
.game-form {
  border: 1px solid #e0e9f0;
  border-radius: 8px;
  padding: 24px;
  margin-top: 18px;
}
.game-form h3 {
  margin: 0 0 18px;
}
.game-fields {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 14px;
}
.game-fields label {
  display: flex;
  align-items: center;
  gap: 9px;
}
.game-fields input[type="number"] {
  width: 95px;
  padding: 9px;
  border: 1px solid #d2dfeb;
  border-radius: 5px;
}
.game-fields select {
  padding: 9px;
  border: 1px solid #d2dfeb;
  border-radius: 5px;
}
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(130deg, #172b42, #2b5475);
  padding: 25px;
}
.login-card {
  background: white;
  width: min(430px, 100%);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 18px 80px #10273b55;
}
.login-card h1 {
  margin-bottom: 10px;
}
.login-card > p {
  color: #8a9aac;
  font-size: 14px;
  margin-bottom: 28px;
}
.login-card .button {
  width: 100%;
}
.empty {
  padding: 35px;
  text-align: center;
  color: #8ba0b4;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 22px;
  border-radius: 7px;
  background: #263e56;
  color: white;
  display: none;
  max-width: 90%;
  z-index: 10;
}
#toast.show {
  display: block;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #69b5eb;
  outline-offset: 3px;
}
@media (max-width: 800px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    padding: 18px;
  }
  .brand {
    font-size: 21px;
    padding: 0;
  }
  .sidebar > p {
    margin: 6px 0 16px;
    padding: 0;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
    gap: 6px;
  }
  .sidebar button {
    padding: 10px 13px;
    white-space: nowrap;
    font-size: 14px;
  }
  .main {
    padding: 22px 15px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 15px;
  }
  .stat strong {
    font-size: 24px;
  }
  .stat span {
    font-size: 12px;
  }
  .grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .panel {
    padding: 20px;
  }
  .game-form {
    padding: 18px;
  }
  .header-user {
    gap: 8px;
    font-size: 12px;
  }
  header h1 {
    font-size: 23px;
  }
  .header-user .button {
    padding: 8px 12px;
  }
  .login-card {
    padding: 28px;
  }
}
.game-tabs{display:flex;gap:8px;border-bottom:1px solid #d8e2ef;margin-bottom:24px;overflow-x:auto;padding:0 0 1px}
.game-tabs button{white-space:nowrap;padding:12px 22px;border:0;border-bottom:3px solid transparent;background:transparent;color:#64748b;font-size:15px;cursor:pointer}
.game-tabs button[aria-selected=true]{border-bottom-color:#287bd4;color:#1764b4;background:#edf5ff;font-weight:700}
.game-tabs button:focus-visible{outline:2px solid #287bd4;outline-offset:-2px}
.password-result{width:min(92vw,480px);border:1px solid #425573;border-radius:12px;padding:24px;background:#fff;color:#182235}.password-result::backdrop{background:rgba(0,0,0,.55)}.password-result input{font:22px monospace;letter-spacing:2px}
.account-dialog{width:min(94vw,500px);max-height:88vh;overflow:auto;border:1px solid #d4deea;border-radius:12px;padding:24px;background:#fff;color:#182235}.account-dialog::backdrop{background:rgba(0,0,0,.55)}.records-dialog{width:min(96vw,1100px)}.dialog-close{float:right}.dialog-content h2{padding-right:75px}.account-dialog .field{margin:16px 0}.account-dialog pre{white-space:pre-wrap;overflow-wrap:anywhere}
