:root {
  --bg: linear-gradient(180deg, #1a1c38 0%, #0d0f21 100%);
  --paper: rgba(255, 255, 255, 0.09);
  --canvas: rgba(255, 255, 255, 0.06);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.62);
  --faint: rgba(255, 255, 255, 0.38);
  --line: rgba(255, 255, 255, 0.14);
  --lagoon: #3dd6bf;
  --lagoon-shadow: rgba(61, 214, 191, 0.22);
  --ember: #ff7869;
  --iris: #a894fa;
  --honey: #fcc759;
  --danger: #ff6b7a;
  --ink: #0d0f21;
  --radius: 24px;
  --font: "SF Pro Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --rounded: "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow: hidden;
}

body {
  min-height: 100dvh;
  padding: 28px 18px 36px;
}

.page-shell {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}

.hero-card,
.auth-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 32px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.hero-card {
  padding: 28px 24px;
  margin-bottom: 18px;
}

.brand-mark {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 24px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #ff7869 0%, #a894fa 52%, #3dd6bf 100%);
  box-shadow: 0 12px 28px rgba(168, 148, 250, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-glow {
  position: absolute;
  inset: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
}

.brand-glyph {
  position: relative;
  font-size: 34px;
  line-height: 1;
}

.eyebrow,
.card-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--lagoon);
}

.hero-title {
  margin: 0 0 10px;
  font-family: var(--rounded);
  font-size: 34px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero-copy {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.auth-card {
  padding: 24px;
}

h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  font-family: var(--rounded);
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.step[hidden],
#open-app[hidden] {
  display: none !important;
}

.row {
  display: flex;
  gap: 10px;
}

.select,
.input {
  width: 100%;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  font-size: 16px;
  padding: 15px 14px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.select {
  flex: 0 0 118px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--lagoon) 50%),
    linear-gradient(135deg, var(--lagoon) 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 3px), calc(100% - 11px) calc(50% - 3px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
}

.select option {
  color: #111;
}

.input:focus,
.select:focus {
  border-color: var(--lagoon);
  box-shadow: 0 0 0 4px rgba(61, 214, 191, 0.18);
  background: rgba(255, 255, 255, 0.1);
}

.btn {
  width: 100%;
  margin-top: 14px;
  border: 0;
  border-radius: var(--radius);
  background: var(--lagoon);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  padding: 15px 16px;
  cursor: pointer;
  box-shadow: 0 10px 22px var(--lagoon-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(61, 214, 191, 0.28);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.error {
  min-height: 20px;
  margin-top: 12px;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.4;
}

.links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 10px;
}

.links button {
  background: none;
  border: 0;
  color: var(--iris);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 0;
}

.links button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#recaptcha-container {
  min-height: 1px;
}

.open-card {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--canvas);
}

.open-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 520px) {
  body {
    padding: 18px 14px 28px;
  }

  .hero-card,
  .auth-card {
    border-radius: 28px;
  }

  .hero-title {
    font-size: 30px;
  }

  .row {
    flex-direction: column;
  }

  .select {
    flex-basis: auto;
  }
}
