:root {
  --bg: #201d1d;
  --panel: #302c2c;
  --text: #fdfcfc;
  --muted: #9a9898;
  --line: #646262;
  --red: #ff3b30;
  --green: #30d158;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 "Berkeley Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

button,
input,
a {
  font: inherit;
}

.siteTop,
footer {
  width: min(980px, calc(100vw - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.siteTop {
  padding: 28px 0 18px;
  border-bottom: 1px solid rgba(100, 98, 98, 0.55);
}

.brand {
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.brand img {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 4px;
}

nav {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
}

button,
.button {
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  background: var(--bg);
  padding: 8px 18px;
  min-height: 40px;
  text-decoration: none;
  cursor: pointer;
}

button:disabled,
input:disabled {
  cursor: default;
  opacity: 0.65;
}

button:hover,
.button:hover,
nav button.active {
  border-color: var(--text);
}

.ghost {
  color: var(--muted);
}

main {
  width: min(980px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.authWrap {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: start;
}

.intro img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 24px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.35;
}

h2 {
  font-size: 16px;
  margin-bottom: 18px;
}

p,
label,
dt,
dd,
.hint,
footer,
.intro p {
  color: var(--muted);
}

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.authGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 420px;
}

.authSwitch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.releaseNotice {
  position: sticky;
  top: 12px;
  z-index: 2;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: 4px;
  color: var(--text);
  padding: 12px 14px;
}

.authSwitch button.active {
  border-color: var(--text);
}

.box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 24px;
}

label {
  display: block;
  margin-bottom: 14px;
}

input {
  display: block;
  width: 100%;
  margin-top: 6px;
  background: #3a3636 !important;
  color: var(--text) !important;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
}

select {
  display: block;
  width: 100%;
  background: #3a3636;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 16px;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  box-shadow: 0 0 0 1000px #3a3636 inset;
  caret-color: var(--text);
}

input::placeholder {
  color: var(--muted);
}

form button {
  width: 100%;
  margin-top: 8px;
}

.turnstileSlot {
  min-height: 65px;
  margin: 4px 0 12px;
}

.btnSpin,
.webSpin {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(253, 252, 252, 0.25);
  border-top-color: var(--text);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

.btnSpin {
  margin-right: 8px;
  vertical-align: -3px;
}

.pageLoad {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  padding: 12px 14px;
}

.toastHost {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 40;
  width: min(360px, calc(100vw - 32px));
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--muted);
  border-radius: 4px;
  color: var(--text);
  padding: 12px 14px;
  pointer-events: auto;
}

.toast.error {
  border-left-color: var(--red);
}

.toast.ok {
  border-left-color: var(--green);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hidden,
.panel {
  display: none;
}

.panel.active,
.dash:not(.hidden) {
  display: block;
}

.accountHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.profileLine {
  display: flex;
  align-items: center;
  gap: 18px;
}

.profileLine img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 4px;
}

.kv {
  margin: 0;
}

.kv div {
  display: grid;
  grid-template-columns: 140px 1fr;
  border-top: 1px solid rgba(100, 98, 98, 0.55);
  padding: 12px 0;
}

.plan {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.plan .button {
  margin-top: auto;
  text-align: center;
}

.adminGrid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 24px;
}

.adminSide {
  display: grid;
  gap: 24px;
}

.adminActions {
  display: grid;
  gap: 8px;
}

.boxHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.boxHead h2 {
  margin-bottom: 0;
}

.boxHead button {
  min-height: 34px;
  padding: 6px 14px;
}

.adminLogs,
.activePlayers,
.adminUsers {
  display: grid;
  gap: 10px;
  max-height: 440px;
  overflow: auto;
  color: var(--muted);
}

.adminLog {
  border-top: 1px solid rgba(100, 98, 98, 0.55);
  padding-top: 10px;
}

.activePlayer {
  border-top: 1px solid rgba(100, 98, 98, 0.55);
  padding-top: 10px;
}

.userTools,
.logTools {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.userTools {
  grid-template-columns: 1fr 180px;
}

.logTools {
  grid-template-columns: 1fr 150px 140px;
}

.userTools input,
.logTools input {
  margin-top: 0;
}

.adminUser {
  text-align: left;
  border-top: 1px solid rgba(100, 98, 98, 0.55);
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
  background: transparent;
  padding: 10px 0 0;
  min-height: 0;
}

.pager {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
}

.pager span {
  text-align: center;
  font-size: 13px;
}

.pager button {
  min-height: 34px;
  padding: 6px 14px;
}

.adminLog strong,
.adminLog span,
.activePlayer strong,
.activePlayer span,
.adminUser strong,
.adminUser span {
  display: block;
}

.adminLog strong,
.activePlayer strong,
.adminUser strong,
.activeCount {
  color: var(--text);
  font-size: 13px;
}

.hint {
  margin-top: 20px;
}

footer {
  border-top: 1px solid rgba(100, 98, 98, 0.55);
  padding: 18px 0 28px;
  justify-content: flex-end;
}

footer div {
  display: flex;
  gap: 18px;
}

footer a {
  color: var(--muted);
}

.legal {
  max-width: 760px;
}

.legal h1 {
  margin-bottom: 8px;
}

.legal h2 {
  margin-top: 30px;
}

.legal p,
.legal li {
  color: var(--muted);
}

.legal ul {
  margin: 0;
  padding-left: 20px;
}

.legal a {
  color: var(--text);
}

@media (max-width: 760px) {
  .siteTop,
  footer,
  main {
    width: calc(100vw - 24px);
  }

  .siteTop,
  footer,
  .accountHead {
    align-items: flex-start;
    flex-direction: column;
  }

  .authWrap,
  .authGrid,
  .adminGrid,
  .userTools,
  .logTools,
  .plans {
    grid-template-columns: 1fr;
  }
}
