:root {
  --fg: #ffffff;
  --bg: #000000;
  --border: rgba(255, 255, 255, 0.5);
  --border-focus: #ffffff;
  --placeholder: rgba(255, 255, 255, 0.6);
}

/* Allows the conic-gradient angle to animate smoothly (used by the submit button's shine effect). */
@property --shine-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes shine-rotate {
  to { --shine-angle: 360deg; }
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  overflow: hidden;
}

.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1;
  pointer-events: none;
}

.content {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 32px) 24px calc(env(safe-area-inset-bottom, 0px) + 32px);
}

.logo-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.logo {
  max-width: 190px;
  max-height: 78px;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  /* Force the SVG (originally black) to render white over the video. */
  filter: brightness(0) invert(1);
}

.form {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 8px;
}

.field {
  width: 100%;
  padding: 16px 22px;
  font-size: 16px;
  font-family: inherit;
  color: var(--fg);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.14),
    rgba(255, 255, 255, 0.04)
  );
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 9999px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    0 4px 18px rgba(0, 0, 0, 0.18);
}

.field::placeholder {
  color: var(--placeholder);
  font-weight: 300;
}

.field:focus {
  border-color: rgba(255, 255, 255, 0.45);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.20),
    rgba(255, 255, 255, 0.07)
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06),
    0 6px 22px rgba(0, 0, 0, 0.22);
}

.field:-webkit-autofill,
.field:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--fg);
  -webkit-box-shadow: 0 0 0 1000px transparent inset;
  transition: background-color 9999s ease-in-out 0s;
}

/* --- Phone group: liquid glass pill containing [country selector] + [number input] --- */
.phone-group {
  position: relative;
  /* Sits above the email field and submit button so the country dropdown
     isn't covered (those siblings create their own stacking contexts via backdrop-filter). */
  z-index: 50;
  display: flex;
  align-items: stretch;
  width: 100%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.14),
    rgba(255, 255, 255, 0.04)
  );
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 9999px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    0 4px 18px rgba(0, 0, 0, 0.18);
}

.phone-group:focus-within {
  border-color: rgba(255, 255, 255, 0.45);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.20),
    rgba(255, 255, 255, 0.07)
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06),
    0 6px 22px rgba(0, 0, 0, 0.22);
}

.country-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px 0 18px;
  margin: 4px 0;
  background: transparent;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--fg);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.country-btn .flag {
  font-size: 20px;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.country-btn .dial {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.country-btn .chevron {
  font-size: 10px;
  opacity: 0.7;
  margin-left: 2px;
  transition: transform 0.2s ease;
}

.country-btn[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.phone-input {
  flex: 1;
  min-width: 0;
  padding: 16px 22px 16px 16px;
  font-size: 16px;
  font-family: inherit;
  color: var(--fg);
  background: transparent;
  border: 0;
  outline: none;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
}

.phone-input::placeholder {
  color: var(--placeholder);
  font-weight: 300;
}

.phone-input:-webkit-autofill,
.phone-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--fg);
  -webkit-box-shadow: 0 0 0 1000px transparent inset;
  transition: background-color 9999s ease-in-out 0s;
}

/* --- Country dropdown panel --- */
.country-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(300px, calc(100vw - 48px));
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  background: linear-gradient(
    135deg,
    rgba(28, 28, 30, 0.78),
    rgba(10, 10, 12, 0.62)
  );
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  z-index: 20;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.country-panel::-webkit-scrollbar {
  width: 6px;
}

.country-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.country-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--fg);
  font-size: 14px;
  line-height: 1;
  transition: background 0.12s ease;
}

.country-option:hover {
  background: rgba(255, 255, 255, 0.10);
}

.country-option[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.14);
}

.country-option .flag {
  font-size: 18px;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.country-option .name {
  flex: 1;
}

.country-option .dial {
  color: rgba(255, 255, 255, 0.55);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

.country-option .check {
  width: 14px;
  text-align: center;
  opacity: 0;
}

.country-option[aria-selected="true"] .check {
  opacity: 1;
}

.submit-btn {
  position: relative;
  width: 100%;
  padding: 18px 22px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.24),
    rgba(255, 255, 255, 0.08) 45%,
    rgba(255, 255, 255, 0.04)
  );
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 9999px;
  cursor: pointer;
  margin-top: 6px;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06),
    0 6px 28px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease, background 0.2s ease;
}

/* Rotating light around the button border. */
.submit-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(
    from var(--shine-angle),
    transparent 0deg,
    transparent 285deg,
    rgba(255, 255, 255, 0.95) 325deg,
    rgba(255, 255, 255, 0.2) 350deg,
    transparent 360deg
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: shine-rotate 4s linear infinite;
  pointer-events: none;
}

.submit-btn:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.32),
    rgba(255, 255, 255, 0.12) 45%,
    rgba(255, 255, 255, 0.06)
  );
}

.submit-btn:active {
  transform: scale(0.985);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.status {
  min-height: 1.2em;
  margin: 6px 0 0;
  font-size: 13px;
  text-align: center;
  color: var(--placeholder);
  letter-spacing: 0.04em;
}

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

.status.error {
  color: #ff8a8a;
}

@media (min-width: 768px) {
  .logo {
    max-width: 240px;
    max-height: 100px;
  }
  .content {
    padding: 48px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-video { display: none; }
  body { background: #111; }
}
