:root {
  --bg: #060d18;
  --bg-card: #0c1829;
  --border: #1a3a5c;
  --text: #e8f4ff;
  --muted: #7a9bb8;
  --accent: #2d8cff;
  --accent-glow: rgba(45, 140, 255, 0.35);
  --online: #3dd68c;
  --offline: #ff6b6b;
  --discord: #5865f2;
  --font: "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(45, 140, 255, 0.15), transparent),
    linear-gradient(rgba(26, 58, 92, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 58, 92, 0.08) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.site-header,
main,
footer {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 1.25rem 0;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.logo-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.35);
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #1a5fb4);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.logo-text em {
  font-style: normal;
  color: var(--accent);
}

nav {
  display: flex;
  gap: 1.25rem;
  flex: 1;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

nav a:hover {
  color: var(--text);
}

nav a.active {
  color: var(--text);
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
}

.btn-discord {
  background: var(--discord);
  color: #fff;
}

.btn-sm {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  padding: 0.4rem 0.85rem;
}

.hero {
  padding: 3rem 0 2.5rem;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.lead {
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.card-wide {
  grid-column: 1 / -1;
}

.card h2 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.pill {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 107, 107, 0.15);
  color: var(--offline);
}

.pill.online {
  background: rgba(61, 214, 140, 0.15);
  color: var(--online);
}

.players-big {
  font-size: 1.75rem;
  font-weight: 700;
}

.meta {
  display: grid;
  gap: 0.5rem;
}

.meta div {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.meta dt {
  color: var(--muted);
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

.player-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
}

.player-list li {
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  font-size: 0.9rem;
}

.player-list li.empty {
  grid-column: 1 / -1;
  color: var(--muted);
  background: none;
}

.connect-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.connect-box h2 {
  margin-bottom: 1rem;
}

.connect-box ol {
  margin: 0 0 1rem 1.25rem;
  color: var(--muted);
}

.connect-string {
  display: block;
  padding: 0.75rem 1rem;
  background: #000;
  border-radius: 8px;
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

.roadmap h2 {
  margin-bottom: 1rem;
}

.roadmap-list {
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.roadmap-list li {
  padding: 0.65rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
}

.roadmap-list li.done {
  border-color: var(--accent);
  color: var(--text);
}

.roadmap-list span {
  display: inline-block;
  min-width: 5.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-right: 0.5rem;
}

footer {
  padding: 2rem 1.25rem 3rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

.auth-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.auth-user-chip:hover {
  border-color: var(--accent);
  color: var(--text);
}

.auth-user-chip img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: 8px;
  font-size: 0.9rem;
  max-width: 320px;
}

.toast.error {
  border-color: var(--offline);
}

.account-section {
  margin-bottom: 2rem;
}

.account-section > h2 {
  margin-bottom: 1rem;
}

.account-card {
  max-width: 520px;
}

.account-profile {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.account-avatar {
  border-radius: 50%;
  border: 2px solid var(--border);
}

.account-name {
  font-size: 1.15rem;
  font-weight: 600;
}

.account-meta {
  margin-bottom: 1rem;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-top: 0.35rem;
}

.badge-admin {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

.btn-steam {
  background: linear-gradient(180deg, #1b2838 0%, #171a21 100%);
  color: #fff;
  border: 1px solid #66c0f4;
  width: 100%;
  margin-bottom: 0.5rem;
}

.btn-steam:hover {
  border-color: #fff;
  transform: translateY(-1px);
}

.steam-link-actions {
  margin-bottom: 1rem;
}

.steam-suggest {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: rgba(45, 140, 255, 0.1);
  border: 1px solid var(--accent);
  border-radius: 8px;
}

.steam-suggest .btn {
  margin-top: 0.5rem;
}

.steam-manual {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.section-intro {
  margin-bottom: 1rem;
  max-width: 560px;
}

.vault-section,
.grow-section,
.admin-section {
  margin-bottom: 2rem;
}

.vault-section > h2,
.grow-section > h2,
.admin-section > h2 {
  margin-bottom: 0.5rem;
}

.vault-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.vault-list,
.order-list {
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.vault-item,
.admin-order {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  flex-wrap: wrap;
}

.vault-item-actions {
  display: flex;
  gap: 0.5rem;
}

.grow-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.character-panel {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: #000;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.75rem;
  max-height: 200px;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--muted);
}

.grow-tier-btns {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.grow-tier h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.subhead {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 1rem 0 0.5rem;
}

#btn-daily {
  margin-top: 0.75rem;
}

.steam-manual summary {
  cursor: pointer;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.steam-form label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.steam-form-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.steam-form input {
  flex: 1;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #000;
  color: var(--text);
  font-size: 0.95rem;
}

.setup-hint {
  margin-top: 0.75rem;
  color: var(--offline);
}

.setup-hint code {
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .site-header nav {
    display: none;
  }

  .steam-form-row {
    flex-direction: column;
  }
}

.account-membership {
  margin-top: 1.25rem;
  padding: 1rem 1.15rem;
}

.account-membership h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.account-membership-tier {
  margin: 0 0 0.65rem;
  font-weight: 600;
}

.account-membership-perks {
  margin: 0 0 0.75rem;
  padding-left: 1.1rem;
}

.points-give-form label {
  display: block;
  font-size: 0.78rem;
  margin-bottom: 0.35rem;
}

.inv-card-extra-actions {
  margin-top: 0.65rem;
}
