/* ------------------------------------------------------------------
   Walkaroos dashboard — clean & sleek
   Refined dark surfaces, one emerald accent, quiet depth, good type.
   No blocky bevels, no gradients, no hard shadows.
------------------------------------------------------------------- */

:root {
  --bg: #0b0d10;
  --surface: #12151a;
  --surface-2: #171b21;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --ink: #e8eaed;
  --ink-muted: #9aa1a8;
  --ink-faint: #6b7280;
  --accent: #10b981;
  --accent-strong: #0d9e6f;
  --accent-soft: rgba(16, 185, 129, 0.14);
  --green: #22c55e;
  --red: #ef4444;
  --radius: 10px;
  --radius-sm: 8px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Browser surfaces — themed, not left at defaults */
::selection { background: var(--accent); color: #fff; }

* { scrollbar-width: thin; scrollbar-color: var(--border-strong) var(--bg); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border: 2px solid var(--bg); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a { color: inherit; }

/* ---------- login ---------- */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 460px;
}
.login-stage.no-skins { max-width: 380px; }

.skin-figure {
  position: absolute;
  bottom: -10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 2;
  pointer-events: none;
}

.skin-left { left: -126px; }
.skin-right { right: -126px; }

.skin-figure canvas {
  width: 260px;
  height: 280px;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.4));
}

.skin-tag {
  font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  white-space: nowrap;
}

.login-panel {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.login-panel.shake {
  animation: shake 0.4s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(9px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(4px); }
}

.login-brand { margin-bottom: 32px; }

.login-title {
  font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}

.login-subtitle {
  color: var(--ink-muted);
  font-size: 14px;
  margin-top: 6px;
}

.alert {
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 20px;
  font-size: 13px;
}

.login-form { display: flex; flex-direction: column; }

.field-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.login-form input {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  margin-bottom: 16px;
  caret-color: var(--accent);
  -webkit-appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.login-form input::placeholder { color: var(--ink-faint); }
.login-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  transition: background 0.15s ease;
}
.btn-primary:hover { background: var(--accent-strong); }
.btn-primary:active { transform: translateY(1px); }

.login-hint {
  margin-top: 20px;
  color: var(--ink-faint);
  font-size: 13px;
  text-align: center;
}

/* ---------- navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 13, 16, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top, 0px);
}

.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav-right { display: flex; align-items: center; gap: 16px; }

.nav-updated { color: var(--ink-faint); font-size: 12px; }

.nav-logout {
  font-size: 13px;
  color: var(--ink-muted);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-logout:hover { background: var(--surface-2); color: var(--ink); }

/* ---------- layout ---------- */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.card-title {
  font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 14px;
}

.empty { color: var(--ink-faint); font-size: 13px; padding: 8px 0; }

/* ---------- hero ---------- */
.hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 24px;
  text-align: center;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-faint);
  display: inline-block;
}
.status-dot.online { background: var(--green); box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15); }
.status-dot.offline { background: var(--red); box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15); }

.status-label { color: var(--ink-muted); }

.hero-count { margin-top: 12px; }
.hero-num { font-size: 52px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.hero-max { font-size: 22px; font-weight: 500; color: var(--ink-muted); margin-left: 4px; }

.hero-caption { margin-top: 10px; color: var(--ink-muted); font-size: 14px; }
.hero-caption #hero-version { color: var(--accent); font-weight: 600; }
.hero-motd { margin-top: 2px; color: var(--ink-faint); font-size: 14px; }
.hero-address {
  margin-top: 14px;
  color: var(--ink-faint);
  font-size: 12px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

/* ---------- player table ---------- */
.player-table { display: flex; flex-direction: column; }

.prow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}
.prow + .prow { border-top: 1px solid var(--border); }
.prow:hover { background: var(--surface-2); }

.prow-face {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  flex-shrink: 0;
}

.prow-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.prow-name {
  font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.prow-status {
  font-size: 12.5px;
  color: var(--ink-faint);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.prow-status.online { color: var(--ink-muted); }

.prow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  flex-shrink: 0;
}

/* ---------- activity ---------- */
.activity-list { display: flex; flex-direction: column; }

.activity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  padding: 8px 4px;
}
.activity-item + .activity-item { border-top: 1px solid var(--border); }

.activity-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}
.activity-tag.join { background: var(--accent-soft); color: var(--green); }
.activity-tag.leave { background: rgba(239, 68, 68, 0.12); color: #fca5a5; }

.activity-time { margin-left: auto; color: var(--ink-faint); font-size: 12px; }

/* ---------- details ---------- */
.details { display: flex; flex-direction: column; }

.details > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 14px;
}
.details > div + div { border-top: 1px solid var(--border); }

.details dt { color: var(--ink-muted); }
.details dd { font-weight: 500; text-align: right; }

/* ---------- mobile ---------- */
@media (max-width: 900px) {
  .skin-figure { display: none; }
  .login-stage { gap: 0; max-width: 380px; }
}

@media (max-width: 768px) {
  .grid { grid-template-columns: 1fr; }
  .nav-updated { display: none; }
  .container { padding: 20px 16px 48px; }
  .hero { padding: 24px 16px; }
  .hero-num { font-size: 42px; }
}
