:root {
  --bg: #050812;
  --panel: rgba(255, 255, 255, 0.065);
  --panel-strong: rgba(255, 255, 255, 0.095);
  --border: rgba(255, 255, 255, 0.13);
  --text: #edf6ff;
  --muted: #9fb0c7;
  --acid: #8cff66;
  --cyan: #55d8ff;
  --amber: #ffd166;
  --danger: #ff6b6b;
  --shadow: 0 26px 90px rgba(0, 0, 0, 0.45);
  --radius: 24px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(140, 255, 102, 0.20), transparent 28rem),
    radial-gradient(circle at 82% 22%, rgba(85, 216, 255, 0.18), transparent 30rem),
    radial-gradient(circle at 50% 90%, rgba(255, 209, 102, 0.10), transparent 28rem),
    linear-gradient(135deg, #040711 0%, #07101f 52%, #03050d 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.35) 1px, transparent 1px),
    radial-gradient(circle, rgba(255,255,255,0.20) 1px, transparent 1px);
  background-size: 72px 72px, 118px 118px;
  background-position: 0 0, 32px 48px;
  opacity: 0.22;
}

button, input { font: inherit; }
button { cursor: pointer; }

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 26px;
  align-items: center;
}

.hero-panel, .auth-panel, .game-card, .dashboard-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel {
  min-height: 680px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 13px; }

.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--acid), var(--cyan));
  color: #06101f;
  font-weight: 1000;
  letter-spacing: -0.08em;
  box-shadow: 0 18px 40px rgba(140, 255, 102, 0.22);
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 21px; }
.brand small { color: var(--muted); margin-top: 2px; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--acid);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

h1, h2, p { overflow-wrap: anywhere; }

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

h2 {
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.04em;
}

p { color: var(--muted); line-height: 1.65; }
.hero-content p:not(.eyebrow) { max-width: 650px; margin-top: 24px; font-size: 18px; }

.species-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

.species-grid article {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.species-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
}

.species-grid strong { display: block; }
.auth-panel { padding: 26px; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 6px;
  margin-bottom: 26px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}

.auth-tabs button {
  border: 0;
  border-radius: 999px;
  padding: 12px 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.auth-tabs button.active {
  color: #06101f;
  background: linear-gradient(135deg, var(--acid), var(--cyan));
}

.auth-view { display: none; }
.auth-view.active { display: block; }

.form { display: grid; gap: 16px; margin-top: 22px; }

label { display: grid; gap: 8px; color: var(--text); font-weight: 800; }

input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.075);
  outline: none;
}

input:focus {
  border-color: rgba(140, 255, 102, 0.65);
  box-shadow: 0 0 0 4px rgba(140, 255, 102, 0.12);
}

.btn {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 950;
}

.btn.primary { color: #06101f; background: linear-gradient(135deg, var(--acid), var(--cyan)); }
.btn.secondary { color: var(--text); border: 1px solid var(--border); background: var(--panel-strong); }
.btn.danger { color: #190707; background: var(--danger); }

.message {
  margin-top: 18px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 800;
}

.message.error { border-color: rgba(255, 107, 107, 0.45); background: rgba(255, 107, 107, 0.11); }
.message.success { border-color: rgba(140, 255, 102, 0.45); background: rgba(140, 255, 102, 0.10); }

.dashboard-panel { grid-column: 1 / -1; padding: 30px; }

.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}

.dashboard-header h2 { margin-bottom: 10px; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.dash-card, .dash-section {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.045);
}

.dash-card { padding: 20px; }

.dash-label {
  display: block;
  margin-bottom: 10px;
  color: var(--acid);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.dash-card strong { display: block; font-size: 22px; overflow-wrap: anywhere; }
.dash-card p { margin-bottom: 0; }

.dashboard-content {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  gap: 18px;
}

.dash-section { padding: 22px; }
.dash-section h3 { margin: 0 0 16px; font-size: 22px; }

.profile-list { display: grid; gap: 12px; }
.profile-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.profile-list div:last-child { border-bottom: 0; }
.profile-list span, .muted { color: var(--muted); }
.profile-list strong { text-align: right; }

.species-list { display: grid; gap: 12px; }
.species-item {
  display: grid;
  grid-template-columns: 1fr 18px;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
}
.species-item strong { display: block; margin-bottom: 4px; }
.species-item p { margin: 0; }
.species-item > span {
  width: 18px;
  height: 46px;
  border-radius: 999px;
  box-shadow: 0 0 26px currentColor;
}

@media (max-width: 940px) {
  .app-shell { grid-template-columns: 1fr; align-items: start; }
  .hero-panel { min-height: auto; gap: 48px; }
  .dashboard-grid, .dashboard-content { grid-template-columns: 1fr; }
  .dashboard-header { flex-direction: column; }
}

@media (max-width: 580px) {
  .app-shell { width: min(100% - 22px, 1180px); padding: 18px 0; }
  .hero-panel, .auth-panel, .dashboard-panel { border-radius: 18px; padding: 20px; }
  h1 { font-size: 42px; }
  .species-grid { grid-template-columns: 1fr; }
}

/* ===================== Zone admin ===================== */
.dashboard-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; font-weight: 900; }

.admin-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.admin-wide { margin-top: 18px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.section-head h3 { margin: 0; }

.search-input {
  width: min(280px, 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.075);
  outline: none;
}

.checkbox-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.checkbox-row input { width: 18px; height: 18px; }

.table-wrap { overflow-x: auto; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.admin-table th, .admin-table td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}
.admin-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.admin-table tbody tr:hover { background: rgba(255, 255, 255, 0.035); }
.admin-table td.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid var(--border);
}
.pill.admin { color: var(--amber); border-color: rgba(255, 209, 102, 0.45); background: rgba(255, 209, 102, 0.10); }
.pill.player { color: var(--cyan); border-color: rgba(85, 216, 255, 0.4); background: rgba(85, 216, 255, 0.08); }
.pill.ok { color: var(--acid); border-color: rgba(140, 255, 102, 0.4); background: rgba(140, 255, 102, 0.08); }
.pill.banned { color: var(--danger); border-color: rgba(255, 107, 107, 0.45); background: rgba(255, 107, 107, 0.10); }

@media (max-width: 940px) {
  .admin-content { grid-template-columns: 1fr; }
}
