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

body {
  font-family: 'Roboto Serif', serif;
  background-color: #e8e8e8;
  min-height: 100vh;
  position: relative;
  display: flex;
  justify-content: center;
}

/* =====================
   PRELOADER
===================== */
#preloader {
  position: fixed;
  inset: 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s ease;
}

#preloader.hide {
  opacity: 0;
  pointer-events: none;
}

.preloader-spinner {
  width: 52px;
  height: 52px;
  border: 5px solid #e0e0e0;
  border-top-color: #003773;
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =====================
   PAGE WRAPPER â€” centers content like a mobile app on desktop
===================== */
.page-wrapper {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background-color: #ffffff;
  position: relative;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.18);
}

/* Language Button */
.language-btn-wrapper {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
}

.language-btn {
  background: #fff;
  border: none;
  border-radius: 24px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  color: #222;
}

.lang-icon {
  font-size: 18px;
  color: #003773;
}

/* Hero Section */
.hero-section {
  position: relative;
  width: 100%;
  height: 360px;
  overflow: visible;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(to bottom, transparent, #ffffff);
  pointer-events: none;
  z-index: 1;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Circular Logo */
.logo-circle {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  width: 115px;
  height: 115px;
  border-radius: 50%;
  background: #003773;
  border: 4px solid #fff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  z-index: 5;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Form Card */
.form-card {
  background: #fff;
  border-radius: 20px;
  margin: 48px 22px 36px 22px;
  padding: 32px 28px 52px 28px;
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 2;
}

/* Tabs */
.tabs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.tab {
  font-size: 20px;
  font-weight: 700;
  color: #999;
  cursor: pointer;
  position: relative;
  padding-bottom: 10px;
  flex: 1;
  text-align: center;
  transition: color 0.2s;
}

.tab.active {
  color: #222;
}

.tab.active::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 3px;
  background: #003773;
  border-radius: 2px;
}

/* Input Groups */
.input-group {
  display: flex;
  align-items: center;
  padding: 24px 0 16px 0;
  position: relative;
  width: 100%;
}

.phone-group {
  padding: 20px 0 16px 0;
}

.phone-code {
  font-size: 17px;
  font-weight: 700;
  color: #222;
  margin-right: 14px;
  white-space: nowrap;
}

.divider {
  width: 1.5px;
  height: 22px;
  background: #ccc;
  margin-right: 16px;
  flex-shrink: 0;
}

.input-field {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  color: #aaa;
  background: transparent;
  font-family: inherit;
  min-width: 0;
}

.input-field::placeholder {
  color: #aaa;
  font-size: 16px;
}

.input-field:focus {
  color: #333;
}

.referral-input {
  color: #333;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 1px;
}

.eye-icon {
  cursor: pointer;
  display: flex;
  align-items: center;
  padding-left: 12px;
  opacity: 0.6;
  flex-shrink: 0;
}

.eye-icon:hover {
  opacity: 1;
}

/* Input underline */
.input-line {
  height: 1px;
  background: #e0e0e0;
  width: 100%;
}

/* Login / Register Button */
.register-btn {
  width: 100%;
  padding: 18px;
  background: linear-gradient(180deg, #003773, #c9af00);
  border: none;
  border-radius: 50px;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 32px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 16px rgba(0, 130, 0, 0.35);
  transition: opacity 0.2s, transform 0.1s;
}

.register-btn:hover {
  opacity: 0.93;
}

.register-btn:active {
  transform: scale(0.98);
}

/* Already have account / No account */
.already-account {
  text-align: center;
  margin-top: 20px;
  color: #444;
  font-size: 15px;
  cursor: default;
}

.already-account a {
  color: #222;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.already-account a:hover {
  text-decoration: none;
}

/* Responsive â€” mobile */
@media (max-width: 480px) {
  body {
    background-color: #ffffff;
  }

  .page-wrapper {
    box-shadow: none;
  }

  .hero-section {
    height: 290px;
  }

  .logo-circle {
    width: 100px;
    height: 100px;
    bottom: -2px;
  }

  .form-card {
    margin: 28px 18px 28px 18px;
    padding: 28px 22px 48px 22px;
  }

  .tab {
    font-size: 18px;
  }

  .input-group {
    padding: 22px 0 14px 0;
  }

  .phone-group {
    padding: 18px 0 14px 0;
  }

  .register-btn {
    font-size: 18px;
    padding: 16px;
  }
}

@media (max-width: 360px) {
  .form-card {
    margin: 34px 14px 24px 14px;
    padding: 24px 18px 44px 18px;
  }

  .input-field {
    font-size: 15px;
  }

  .input-field::placeholder {
    font-size: 15px;
  }
}