:root {
  color-scheme: dark;
  --bg: #03121f;
  --panel: rgba(7, 31, 54, 0.9);
  --panel-strong: #082842;
  --line: rgba(0, 174, 255, 0.34);
  --text: #e8f6ff;
  --muted: rgba(255, 255, 255, 0.74);
  --blue: #005799;
  --cyan: #00aeff;
  --deep: #04192b;
  --danger: #ff5d88;
  --ok: #46f6b1;
  --wallpaper-image: none;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(rgba(0, 11, 24, 0.68), rgba(0, 11, 24, 0.72)),
    var(--wallpaper-image),
    linear-gradient(rgba(0, 174, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 174, 255, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 20% 10%, rgba(0, 174, 255, 0.22), transparent 30rem),
    radial-gradient(circle at 80% 70%, rgba(0, 87, 153, 0.38), transparent 34rem),
    linear-gradient(135deg, rgba(0, 87, 153, 0.44), transparent 45%),
    var(--bg);
  background-position: center, center, 0 0, 0 0, center, center, center;
  background-repeat: no-repeat, no-repeat, repeat, repeat, no-repeat, no-repeat, no-repeat;
  background-size: cover, cover, 42px 42px, 42px 42px, auto, auto, auto;
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0 18%, rgba(0, 174, 255, 0.08) 18% 19%, transparent 19% 48%, rgba(255, 255, 255, 0.05) 48% 49%, transparent 49%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 6px);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  position: relative;
  min-height: 100vh;
  padding: 28px;
  z-index: 1;
}


.eyebrow {
  margin: 24px 0 8px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.02;
}

h1 {
  max-width: 760px;
  font-size: clamp(2.5rem, 8vw, 4.4rem);
}

h1 span {
  color: var(--blue);
}

h1 strong {
  display: block;
  color: var(--cyan);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.lead {
  margin: 12px 0 28px;
  color: var(--muted);
  font-size: 1.19rem;
  line-height: 1.7;
}

.menu-item,
.logout,
.primary-action,
.secondary-action {
  min-height: 34px;
  border: 1px solid var(--line);
  color: var(--blue);
  border-radius: 8px;
}

.content .primary-action,
.content .secondary-action,
.modal-panel .primary-action,
.modal-panel .secondary-action,
.auth-card .primary-action,
.auth-card .secondary-action {
  min-height: 31px;
}

.content .form,
.modal-panel form,
.auth-card .form,
.alert-form {
  gap: 21px;
}

.menu-item,
.logout,
.settings-btn.sidebar-settings,
.primary-action,
.secondary-action {
  background: rgba(255, 255, 255, 0.90);
}

.menu-item,
.logout,
.settings-btn.sidebar-settings,
.auth-card .primary-action,
.auth-card .secondary-action {
  border-color: rgba(0, 87, 153, 0.35);
  box-shadow:
    0 5px 0 rgba(0, 42, 74, 0.95),
    0 10px 18px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transform: translateY(-3px);
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.menu-item.active,
.primary-action {
  border-color: rgba(0, 174, 255, 0.82);
  background: rgba(0, 87, 153, 0.90);
  color: #ffffff;
}

.menu-item:hover,
.logout:hover,
.settings-btn.sidebar-settings:hover,
.auth-card .primary-action:hover,
.auth-card .secondary-action:hover {
  transform: translateY(-5px);
  box-shadow:
    0 7px 0 rgba(0, 42, 74, 0.95),
    0 14px 24px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.menu-item:active,
.logout:active,
.settings-btn.sidebar-settings:active,
.auth-card .primary-action:active,
.auth-card .secondary-action:active {
  transform: translateY(1px);
  box-shadow:
    0 1px 0 rgba(0, 42, 74, 0.95),
    0 6px 12px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.secondary-action {
  color: var(--blue);
}


.form {
  display: none;
  gap: 10px;
}

.form.active {
  display: grid;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  background: rgba(3, 18, 31, 0.92);
  color: var(--text);
  outline: none;
  padding: 0 14px;
  border-radius: 6px;
}

#loginForm input,
#registerForm input,
#resetForm input {
  min-height: 45px;
}

input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 174, 255, 0.12);
}

textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  border: 1px solid var(--line);
  background: rgba(3, 18, 31, 0.92);
  color: var(--text);
  outline: none;
  padding: 14px;
}

textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 174, 255, 0.12);
}

.primary-action {
  margin-top: 6px;
  font-weight: 800;
}

#loginForm .primary-action,
#registerForm .primary-action,
#resetForm .primary-action {
  min-height: 43px;
}

#loginTab,
#resetLoginTab {
  color: var(--blue);
}

.message {
  min-height: 22px;
  margin: 16px 0 0;
  color: var(--muted);
}

.message.error {
  color: var(--danger);
}

.message.ok {
  color: var(--ok);
}

.hidden {
  display: none !important;
}

/* ── textarea & alert form ──────────────────────────────────────────── */
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(3, 18, 31, 0.92);
  color: var(--text);
  outline: none;
  padding: 10px 14px;
  border-radius: 6px;
  font: inherit;
  resize: vertical;
  min-height: 100px;
}

textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 174, 255, 0.12);
}

.alert-form {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.50);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  padding: 22px;
}

.page-logo {
  display: block;
  width: min(180px, 42vw);
  height: auto;
  margin-bottom: 14px;
}

.game-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  padding: clamp(18px, 4vw, 28px);
}

.game-header .lead {
  margin-bottom: 0;
}

.game-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.ghost-link {
  min-height: 48px;
  display: inline-grid;
  place-items: center;
  padding: 0 18px;
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}
