:root {
  --bg: #000;
  --fg: #fff;
  --muted: rgba(255, 255, 255, 0.68);
  --soft: rgba(255, 255, 255, 0.12);
  --line: rgba(255, 255, 255, 0.24);
  --panel: rgba(255, 255, 255, 0.055);
  --panel-strong: rgba(255, 255, 255, 0.08);
  --max: 1160px;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--fg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #000;
}

a { color: inherit; text-decoration: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--soft);
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(22px);
}

.nav,
.auth-hero,
.form-layout,
.profile-editor,
.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 22px;
  padding-right: 22px;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.nav-links,
.nav-actions,
.language-switcher,
.hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.nav a:hover,
.nav a[aria-current="page"],
.footer-links a:hover {
  color: var(--fg);
}

.language-switcher {
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
}

.language-switcher a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 30px;
  border: 1px solid var(--soft);
  border-radius: 999px;
}

.auth-hero,
.form-layout,
.profile-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 470px);
  gap: 72px;
  align-items: center;
  min-height: calc(100vh - 156px);
  padding-top: 88px;
  padding-bottom: 88px;
}

.profile-editor {
  min-height: auto;
  padding-top: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--fg);
  border-radius: 8px;
}

.brand-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--fg);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
p { margin-top: 0; }

h1 {
  max-width: 680px;
  margin-bottom: 24px;
  font-size: clamp(52px, 7vw, 96px);
  line-height: 0.92;
  font-weight: 850;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
}

.lead {
  max-width: 610px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.5;
}

.hero-actions {
  flex-wrap: wrap;
  margin-top: 34px;
}

.auth-card,
.form-card {
  display: grid;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.auth-panel {
  min-height: 170px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.auth-panel span {
  display: block;
  margin-bottom: 28px;
  color: var(--fg);
  font-size: 28px;
  font-weight: 850;
}

.auth-panel p,
.message,
.form-card label {
  color: var(--muted);
  line-height: 1.6;
}

.auth-status,
.message {
  min-height: 58px;
  padding: 14px 18px;
  border: 1px solid var(--fg);
  border-radius: 8px;
  color: var(--fg);
  font-size: 14px;
  font-weight: 850;
}

.auth-status {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-align: center;
}

.message p:last-child {
  margin-bottom: 0;
}

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

.message.success {
  border-color: var(--fg);
}

.form-card form {
  display: grid;
  gap: 12px;
}

.account-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.account-list div {
  display: grid;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--soft);
}

.account-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.account-list dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-list dd {
  margin: 0;
  color: var(--fg);
  font-size: 18px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.form-card label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--fg);
  font: inherit;
}

.textarea {
  min-height: 132px;
  resize: vertical;
}

.field:focus {
  outline: 1px solid var(--fg);
  outline-offset: 2px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  color: var(--fg);
  letter-spacing: 0;
  text-transform: none;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  accent-color: #fff;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--fg);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.button:hover {
  background: var(--fg);
  color: var(--bg);
}

.button.primary {
  background: var(--fg);
  color: var(--bg);
}

.button.primary:hover {
  background: var(--bg);
  color: var(--fg);
}

.form-button {
  margin-top: 10px;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 38px;
  padding-bottom: 38px;
  border-top: 1px solid var(--soft);
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

@media (max-width: 860px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .nav-links,
  .nav-actions,
  .language-switcher {
    flex-wrap: wrap;
  }

  .auth-hero,
  .form-layout,
  .profile-editor {
    grid-template-columns: 1fr;
    gap: 34px;
    min-height: auto;
  }
}

@media (max-width: 520px) {
  .nav,
  .auth-hero,
  .form-layout,
  .profile-editor,
  .footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  h1 {
    font-size: 50px;
  }

  .auth-card,
  .form-card {
    padding: 20px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
