:root {
  --primary-color: #0a1f5c;
  --primary-dark: #061440;
  --accent-color: #00c9b7;
  --accent-hover: #00a89a;
  --text-color: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.85);
  --error-color: #ff6b6b;
  --success-color: #4ecdc4;
  --border-radius: 16px;
  --shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  background: var(--primary-dark);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Video background */
#backgroundVideo {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: 0;
}

/* Dark overlay on video for better readability */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(6, 20, 64, 0.85) 0%, rgba(10, 31, 92, 0.75) 50%, rgba(26, 58, 140, 0.8) 100%);
  pointer-events: none;
  z-index: 1;
}

/* ── intl-tel-input overrides ── */
.iti {
  width: 100%;
  display: block;
}

/* The phone input itself */
.iti input#contactnumber {
  width: 100%;
  height: auto;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.97);
  margin: 0;
  padding: 14px 16px 14px 16px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 10px;
  color: #333;
  transition: var(--transition);
  box-sizing: border-box;
}

.iti input#contactnumber:hover {
  border-color: rgba(0, 201, 183, 0.5);
}

.iti input#contactnumber:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(0, 201, 183, 0.18);
}

/* Country selector button */
.iti .iti__country-container {
  color: #333;
}

.iti .iti__country-container .iti__selected-country-primary {
  padding: 0 8px 0 12px;
}

.iti .iti__selected-country {
  background: transparent;
  border-radius: 10px 0 0 10px;
  height: 100%;
  display: flex;
  align-items: center;
}

/* Dial code text */
.iti .iti__selected-dial-code {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: #555;
  padding-left: 4px;
}

/* Dropdown arrow */
.iti .iti__arrow {
  border-left-color: #888;
  border-right-color: #888;
}

/* Dropdown search input */
.iti .iti__search-input {
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  outline: none;
  color: #333;
}

.iti .iti__search-input:focus {
  border-color: var(--accent-color);
}

/* Dropdown list */
.iti__dropdown-content {
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.iti__country-list {
  max-height: 220px;
}

.iti__country {
  padding: 8px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
}

.iti__country:hover,
.iti__country--highlight {
  background: rgba(0, 201, 183, 0.12);
}

.iti__dial-code {
  color: #666;
}

input {
  color: #333;
}

#othercountrydropdown {
  display: none;
}

/* ── Layout ── */
.container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: min(96%, 900px);
  margin: 0 auto;
  padding: 24px 0 40px;
}

#logo {
  width: 50%;
  margin: 0 auto 28px;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.25));
  transition: var(--transition);
}

#logo:hover {
  transform: scale(1.05);
}

h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.25;
  margin-bottom: 28px;
  text-align: center;
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.92) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 24px;
  color: var(--text-muted);
}

.signup_container {
  background: rgba(10, 31, 92, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: clamp(10px, 1vw, 48px);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

/* ── Form fields ── */
fieldset {
  border: none;
  margin: 0 0 18px;
  padding: 0;
  width: 100%;
}

fieldset label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-muted);
}

fieldset em {
  display: block;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 6px;
  font-style: normal;
}

#signup input[type="text"],
#signup input[type="email"],
#signup input[type="tel"],
#signup input[type="date"],
#signup select {
  width: 100%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.97);
  margin: 0;
  padding: 14px 16px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 10px;
  transition: var(--transition);
}

#signup input[type="text"]:hover,
#signup input[type="email"]:hover,
#signup input[type="tel"]:hover,
#signup input[type="date"]:hover,
#signup select:hover {
  border-color: rgba(0, 201, 183, 0.5);
}

#signup input[type="text"]:focus,
#signup input[type="email"]:focus,
#signup input[type="tel"]:focus,
#signup input[type="date"]:focus,
#signup select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(0, 201, 183, 0.18);
}

#signup input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent-color);
  cursor: pointer;
  border-radius: 4px;
}

#signup input[type="checkbox"] + label {
  display: inline;
  cursor: pointer;
  margin-left: 10px;
  font-size: 0.9rem;
}

/* ── Submit button ── */
#submit-button {
  cursor: pointer;
  width: 100%;
  border: none;
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
  color: #fff;
  margin-top: 12px;
  padding: 18px 28px;
  border-radius: 10px;
  transition: var(--transition);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 8px 24px rgba(0, 201, 183, 0.35);
}

#submit-button:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, #008f82 100%);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 201, 183, 0.45);
}

#submit-button:disabled {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.6);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#submit-button:active:not(:disabled) {
  transform: translateY(-1px);
}

/* ── Messages ── */
#error {
  display: none;
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid var(--error-color);
  color: var(--error-color);
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 20px;
  font-weight: 500;
}

#sorry {
  display: none;
  font-size: 1.25rem;
  line-height: 1.7;
  font-weight: 400;
  text-align: center;
  padding: 32px;
  background: rgba(78, 205, 196, 0.15);
  border-radius: 12px;
  border: 1px solid var(--success-color);
}

/* ── Typography & header ── */
p {
  font-size: 1rem;
  line-height: 1.75;
  font-weight: 400;
  margin-bottom: 20px;
  color: var(--text-muted);
}

.header_container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 28px;
}

#header_blurb {
  text-align: left;
}

#header_blurb .content-wrapper {
  overflow: hidden;
}

#header_blurb .mobile-preview {
  display: block;
  width: 35%;
  max-width: 140px;
  float: right;
  margin: 0 0 16px 24px;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

a {
  color: var(--accent-color);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: #fff;
  text-decoration: underline;
}

::placeholder {
  color: #999;
}

/* Checkbox field styling */
.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.cta-text {
  font-weight: 600;
  color: #fff;
  font-size: 1.05rem;
}

/* Divider */
.form-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  margin: 28px 0;
}

/* ── DOB dropdown row ── */
.dob-row {
  display: flex;
  gap: 10px;
}

.dob-row .dob-field {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dob-row .dob-field label {
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.65);
}

.dob-row .dob-field select {
  width: 100%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.97);
  padding: 14px 12px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 10px;
  color: #333;
  transition: var(--transition);
  cursor: pointer;
  appearance: auto;
}

.dob-row .dob-field select:hover {
  border-color: rgba(0, 201, 183, 0.5);
}

.dob-row .dob-field select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(0, 201, 183, 0.18);
}

/* ── Validation error styles ── */
.field-error input[type="text"],
.field-error input[type="email"],
.field-error input[type="tel"],
.field-error select {
  border-color: var(--error-color) !important;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15) !important;
}

.field-error .iti input#contactnumber {
  border-color: var(--error-color) !important;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15) !important;
}

.field-error .dob-row select {
  border-color: var(--error-color) !important;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15) !important;
}

.field-error input[type="checkbox"] {
  outline: 2px solid var(--error-color);
  outline-offset: 2px;
}

.error-message {
  display: block;
  color: var(--error-color);
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 6px;
  line-height: 1.4;
  animation: errorFadeIn 0.25s ease-out;
}

@keyframes errorFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── City Autocomplete ── */
.city-autocomplete-wrap {
  position: relative;
}

.city-suggestions {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  max-height: 260px;
  overflow-y: auto;
  margin-top: -2px;
}

.city-suggestion-item {
  display: flex;
  flex-direction: column;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.city-suggestion-item:last-child {
  border-bottom: none;
}

.city-suggestion-item:hover,
.city-suggestion-item.active {
  background: rgba(0, 201, 183, 0.12);
}

.city-suggestion-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #333;
}

.city-suggestion-detail {
  font-size: 0.8rem;
  color: #777;
  margin-top: 2px;
}

.city-geo-info {
  display: none;
  font-size: 0.8rem;
  color: var(--accent-color);
  margin-top: 6px;
  font-weight: 500;
}

.city-geo-info a {
  color: var(--accent-color);
  text-decoration: underline;
  font-weight: 600;
  margin-left: 4px;
}

.city-geo-info a:hover {
  color: #fff;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .container {
    padding: 32px 0 48px;
  }

  .signup_container {
    border-radius: 20px;
  }

  #header_blurb .mobile-preview {
    float: none;
    display: block;
    margin: 0 auto 24px;
    width: 45%;
    max-width: 160px;
  }
}
