*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #000000;
  --bg-glow: #0a1f3d;
  --surface: #2a2b2e;
  --surface-soft: #222326;
  --text: #ffffff;
  --text-muted: #a0a3a8;
  --text-soft: #8b8e94;
  --link: #6ea8ff;
  --btn-disabled-bg: #2f3033;
  --btn-disabled-text: #6b6e74;
  --line: rgba(255, 255, 255, 0.12);
  --radius-input: 16px;
  --radius-pill: 999px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html, body {
  height: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(120% 70% at 12% -10%, var(--bg-glow) 0%, transparent 55%),
    radial-gradient(90% 50% at 80% 0%, #061226 0%, transparent 45%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hidden {
  display: none !important;
}

.rev-layout {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 24px;
  padding-top: max(20px, env(safe-area-inset-top));
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}

.rev-header {
  text-align: center;
  padding: 28px 0 0;
  flex-shrink: 0;
}

.rev-logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}

.rev-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 36px 0 24px;
}

.rev-columns {
  width: 100%;
}

.rev-form-col {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.rev-desktop-only,
.rev-qr-col {
  display: none !important;
}

.rev-step h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  text-align: center;
  margin: 0 0 14px;
}

.rev-step .rev-subtitle {
  font-size: 15px;
  line-height: 1.45;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 28px;
  padding: 0 4px;
}

.rev-phone-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.rev-country {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: none;
  border-radius: var(--radius-input);
  padding: 0 14px;
  height: 56px;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  flex: 0 0 auto;
  min-width: 96px;
  cursor: default;
}

.rev-flag {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.rev-input {
  width: 100%;
  height: 56px;
  background: var(--surface);
  border: none;
  border-radius: var(--radius-input);
  padding: 0 16px;
  font-size: 16px;
  color: var(--text);
  outline: none;
  font-family: inherit;
}

.rev-input::placeholder {
  color: #8e9196;
}

.rev-input:focus {
  box-shadow: 0 0 0 2px rgba(110, 168, 255, 0.35);
}

.rev-link {
  display: inline-block;
  color: var(--link);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  margin: 2px 0 22px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

.rev-link:hover {
  text-decoration: underline;
}

.rev-btn {
  width: 100%;
  height: 56px;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s, opacity 0.15s;
}

.rev-btn--primary {
  background: #ffffff;
  color: #000000;
}

.rev-btn--primary:disabled {
  background: var(--btn-disabled-bg);
  color: var(--btn-disabled-text);
  cursor: not-allowed;
}

.rev-btn--secondary {
  background: var(--surface);
  color: var(--text);
  margin-top: 12px;
}

.rev-btn--secondary:hover {
  background: #34363a;
}

.rev-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 28px 0 22px;
  color: var(--text-soft);
  font-size: 13px;
  white-space: nowrap;
}

.rev-divider::before,
.rev-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.rev-social {
  display: flex;
  justify-content: center;
  gap: 36px;
  margin: 0 0 36px;
}

.rev-social-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  min-width: 72px;
  padding: 0;
}

.rev-social-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.rev-social-item:hover .rev-social-icon {
  background: #34363a;
}

.rev-social-item svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.rev-icon-google {
  width: 24px;
  height: 24px;
}

.rev-icon-apple {
  width: 22px;
  height: 22px;
  fill: #ffffff;
}

.rev-create-block {
  margin-top: 4px;
  text-align: center;
}

.rev-create-label {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.rev-footer {
  margin-top: auto;
  padding: 28px 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: var(--text);
}

.rev-lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: default;
  font-weight: 500;
}

.rev-lang-chevron {
  opacity: 0.7;
  font-size: 10px;
  line-height: 1;
  margin-top: 1px;
}

.rev-footer-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.rev-footer-link:hover {
  text-decoration: underline;
}

/* Step 2 desktop */
.rev-back {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  margin: -8px 0 20px -8px;
  display: flex;
  align-items: center;
  border-radius: 8px;
}

.rev-back:hover {
  background: rgba(255, 255, 255, 0.06);
}

.rev-back svg {
  width: 24px;
  height: 24px;
}

.rev-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  margin-bottom: 20px;
}

.rev-step2-desktop h1 {
  text-align: left;
}

@media (min-width: 769px) {
  .rev-layout {
    max-width: 520px;
    padding-left: 32px;
    padding-right: 32px;
  }

  .rev-header {
    padding-top: 40px;
  }

  .rev-main {
    align-items: center;
    padding-top: 48px;
  }

  .rev-pin-screen {
    display: none !important;
  }
}

/* Mobile PIN screen */
@media (max-width: 768px) {
  .rev-pin-screen {
    position: fixed;
    inset: 0;
    background:
      radial-gradient(120% 70% at 12% -10%, var(--bg-glow) 0%, transparent 55%),
      var(--bg);
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 12px 20px 28px;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: max(28px, env(safe-area-inset-bottom));
  }

  .rev-pin-top {
    min-height: 44px;
    display: flex;
    align-items: center;
    margin-bottom: 8px;
  }

  .rev-back--round {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
  }

  .rev-back--round svg {
    width: 22px;
    height: 22px;
  }

  .rev-pin-title {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.03em;
    margin: 0 0 36px;
    padding: 0 8px;
  }

  .rev-dots {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 40px;
    min-height: 12px;
    padding: 0 16px;
  }

  .rev-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
  }

  .rev-dot.filled {
    background: #ffffff;
  }

  .rev-keypad {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 320px;
    margin: 0 auto;
    width: 100%;
    align-content: center;
  }

  .rev-key {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text);
    font-size: 28px;
    font-weight: 400;
    width: 72px;
    height: 72px;
    margin: 0 auto;
    cursor: pointer;
    border-radius: 50%;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s;
  }

  .rev-key:active {
    background: rgba(255, 255, 255, 0.18);
  }

  .rev-key--action {
    background: rgba(255, 255, 255, 0.1);
  }

  .rev-key--action svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
  }

  .rev-key--submit {
    background: #2f6fed;
    color: #fff;
  }

  .rev-key--submit:active {
    background: #2563eb;
  }

  .rev-key--submit:disabled {
    background: rgba(47, 111, 237, 0.35);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
  }

  .rev-key--submit svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
  }

  .rev-pin-footer {
    text-align: center;
    padding-top: 20px;
  }

  .rev-pin-footer .rev-link {
    color: #ffffff;
    font-size: 15px;
    margin-bottom: 0;
  }
}
