:root {
  --ink: #0c1210;
  --ink-soft: #1a2420;
  --fog: #d7e0d8;
  --mist: #a8b5ab;
  --paper: #eef3ef;
  --accent: #c4f04d;
  --accent-deep: #8fb82a;
  --glow: rgba(196, 240, 77, 0.28);
  --danger: #ff6b5a;
  --ok: #5dffb0;
  --warn: #ffd166;
  --font: "Outfit", "Segoe UI", sans-serif;
  --display: "Syne", "Outfit", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body.landing-body {
  font-family: var(--font);
  color: var(--paper);
  background: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 90% 60% at 15% 10%, rgba(196, 240, 77, 0.16), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 80%, rgba(60, 120, 110, 0.35), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(255, 255, 255, 0.04), transparent 70%),
    linear-gradient(165deg, #070b09 0%, #101816 45%, #0a100e 100%);
  animation: drift 18s ease-in-out infinite alternate;
}

.mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(215, 224, 216, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(215, 224, 216, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}

@keyframes drift {
  from {
    transform: scale(1) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.05) translate3d(-1.5%, 1%, 0);
  }
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 4vw, 40px);
}

.topbar-brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--fog);
  opacity: 0.7;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(215, 224, 216, 0.12);
  font-size: 0.8rem;
  color: var(--mist);
  backdrop-filter: blur(10px);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 0 rgba(255, 209, 102, 0.5);
  animation: pulse 1.6s ease-out infinite;
}

.status-pill[data-state="ok"] .status-dot {
  background: var(--ok);
  box-shadow: 0 0 12px rgba(93, 255, 176, 0.55);
  animation: none;
}

.status-pill[data-state="ok"] .status-text {
  color: var(--ok);
}

.status-pill[data-state="down"] .status-dot {
  background: var(--danger);
  box-shadow: 0 0 12px rgba(255, 107, 90, 0.45);
  animation: none;
}

.status-pill[data-state="down"] .status-text {
  color: var(--danger);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 209, 102, 0.55);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 209, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 209, 102, 0);
  }
}

.hero-stage {
  position: relative;
  z-index: 2;
  min-height: calc(100vh - 88px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8vh clamp(20px, 5vw, 56px) 12vh;
  max-width: 920px;
}

.brand {
  margin: 0 0 18px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(4.2rem, 14vw, 7.5rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--accent);
  text-shadow: 0 0 60px var(--glow);
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.05s forwards;
}

.hero-stage h1 {
  margin: 0 0 14px;
  max-width: 14ch;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.55rem, 3.4vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--paper);
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.18s forwards;
}

.lead {
  margin: 0 0 28px;
  max-width: 38ch;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.55;
  color: var(--mist);
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

.lead strong {
  color: var(--fog);
  font-weight: 600;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.42s forwards;
}

.download-hint {
  margin: 14px 0 0;
  max-width: 42ch;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--mist);
  opacity: 0;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

.btn[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
  transform: none;
  cursor: not-allowed;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--accent);
  color: var(--ink);
  box-shadow: 0 10px 40px var(--glow);
}

.btn-primary:hover {
  background: #d6ff6a;
  box-shadow: 0 14px 48px rgba(196, 240, 77, 0.4);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--fog);
  border-color: rgba(215, 224, 216, 0.16);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(215, 224, 216, 0.28);
}

@media (max-width: 640px) {
  .hero-stage {
    padding-top: 6vh;
    justify-content: flex-start;
  }

  .cta-group {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}

/* Shared modern form pages (register / recover) */
body.site-body {
  font-family: var(--font);
  color: var(--paper);
  background: var(--ink);
  min-height: 100vh;
}

body.site-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(196, 240, 77, 0.12), transparent 50%),
    linear-gradient(180deg, #070b09, #101816 60%, #0a100e);
  pointer-events: none;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 440px;
  margin: 0 auto;
  padding: 40px 18px 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100vh;
}

.page .brand {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.4rem, 8vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent);
  line-height: 1;
  text-shadow: none;
  opacity: 1;
  transform: none;
  animation: none;
}

.page .hero {
  text-align: left;
}

.page .hero h1 {
  margin: 10px 0 6px;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--paper);
}

.page .lead {
  margin: 0;
  color: var(--mist);
  animation: none;
  opacity: 1;
  transform: none;
}

.panel {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(215, 224, 216, 0.12);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.raised {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.titlebar {
  background: rgba(196, 240, 77, 0.1);
  color: var(--accent);
  padding: 12px 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(215, 224, 216, 0.1);
}

.form,
.success-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: transparent;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--mist);
}

.classic-input {
  border: 1px solid rgba(215, 224, 216, 0.16);
  background: rgba(0, 0, 0, 0.28);
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
  color: var(--paper);
  width: 100%;
}

.classic-input:focus {
  outline: none;
  border-color: rgba(196, 240, 77, 0.55);
  box-shadow: 0 0 0 3px rgba(196, 240, 77, 0.15);
}

.hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--mist);
  line-height: 1.4;
}

.error {
  margin: 0;
  padding: 10px 12px;
  background: rgba(255, 107, 90, 0.12);
  border: 1px solid rgba(255, 107, 90, 0.35);
  border-radius: 10px;
  color: #ffb4ab;
  font-size: 0.85rem;
}

.actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 4px;
}

.classic-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(215, 224, 216, 0.16);
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  color: var(--fog);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.classic-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.classic-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.classic-btn.primary {
  background: var(--accent);
  color: var(--ink);
  border-color: transparent;
}

.classic-btn.primary:hover {
  background: #d6ff6a;
}

.ok-label {
  margin: 0;
  font-size: 0.75rem;
  color: var(--mist);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.uin {
  margin: 0;
  font-family: var(--display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--ok);
  letter-spacing: 0.02em;
  line-height: 1.1;
  user-select: all;
}

.nick-line {
  margin: 0;
}

.foot {
  margin-top: auto;
  text-align: center;
  font-size: 0.85rem;
}

.foot a {
  color: var(--accent);
}

.cta-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

a.classic-btn.cta,
button.cta {
  padding: 12px 16px;
}

.tips .steps {
  margin: 0;
  padding: 16px 16px 16px 34px;
  line-height: 1.55;
  color: var(--fog);
}

.tips code {
  font-size: 0.8rem;
  color: var(--accent);
}
