@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
  --theme-bg: linear-gradient(to bottom right, #0f0c29, #302b63, #24243e);
  --purple: #6d28d9;
  --purple-light: #a78bfa;
  --text-light: #f1f5f9;
  --input-bg: white;
  --input-text: #1f2937;
  --border-light: rgba(255, 255, 255, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--theme-bg);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

/* Container */
.register-container {
  width: 100%;
  max-width: 600px;
}

.register-card {
  background-color: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  width: 100%;
}

.logo-box {
  text-align: center;
  margin-bottom: 1.5rem;
}
.logo-box img {
  height: 60px;
  max-width: 100%;
  object-fit: contain;
}

.register-card h2 {
  font-size: 1.75rem;
  color: var(--purple-light);
  text-align: center;
  margin-bottom: 0.5rem;
}

.subtitle {
  text-align: center;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  color: #d1d5db;
}

.form-group {
  margin-bottom: 1.2rem;
}
.form-group label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
  color: #e5e7eb;
}
.form-group input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border-light);
  background: var(--input-bg);
  color: var(--input-text);
  border-radius: 8px;
  outline: none;
  transition: border 0.3s;
}
.form-group input:focus {
  border-color: var(--purple);
}

.register-btn {
  width: 100%;
  background-color: var(--purple);
  color: white;
  padding: 0.75rem;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s;
}
.register-btn:hover {
  background-color: #5b21b6;
}

/* Login Box */
.login-box {
  text-align: center;
  margin-top: 2rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 1rem;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
}
.login-box p {
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.95rem;
  color: #f1f5f9;
}
.login-box .login-btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background-color: var(--purple-light);
  color: #1e1e2f;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s;
}
.login-box .login-btn:hover {
  background-color: #c4b5fd;
}

.role-options {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}
.role-options label {
  font-size: 0.95rem;
  color: #d1d5db;
}

.next-btn, .register-btn {
  width: 100%;
  background-color: var(--purple);
  color: white;
  padding: 0.75rem;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-top: 1.2rem;
}
.next-btn:hover, .register-btn:hover {
  background-color: #5b21b6;
}

.username-msg {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  font-weight: 500;
}

.register-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  width: 100%;
}

.step-progress {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.step-progress .step {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  width: 35px;
  height: 35px;
  text-align: center;
  line-height: 35px;
  font-weight: 700;
  color: #a78bfa;
  transition: background 0.3s;
}

.step-progress .step.active {
  background-color: var(--purple);
  color: white;
}

.step-progress .step.optional {
  font-size: 0.75rem;
  line-height: 2.3rem;
  background: rgba(255, 255, 255, 0.05);
}

.username-suggestions ul {
  list-style: none;
  padding-left: 0;
  display: flex;
  gap: 0.5rem;
}
.username-suggestions li {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}
.username-suggestions li:hover {
  background: rgba(255, 255, 255, 0.2);
}


/* === Contact number row (country code + mobile) === */
.contact-row {
  display: grid;
  grid-template-columns: 110px 1fr; /* compact code, wide input on desktop/tablet */
  gap: 0.6rem;
  align-items: center;
}

/* Country code select should not grow */
.country-code {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border-light);
  background: #fff;
  color: #111827;
  border-radius: 8px;
  outline: none;
  line-height: 1.2;
  /* prevent oversized width on small screens */
  min-width: 90px;
  max-width: 140px;
  /* make sure native dropdown arrow doesn’t explode width on some Androids */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: none; /* keep clean; you can add a custom chevron later */
}

/* 10-digit input should flex wider */
.contact-input {
  width: 100%;
  min-width: 0;         /* allow shrinking within grid */
  padding: 0.7rem;
  border: 1px solid var(--border-light);
  background: #fff;
  color: #111827;
  border-radius: 8px;
  outline: none;
}

/* Focus state consistent with your theme */
.country-code:focus,
.contact-input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.2);
}

/* Small helper text */
.contact-hint {
  display: block;
  margin-top: .35rem;
  opacity: .85;
  font-size: 0.85rem;
}

/* ===== Mobile tweaks ===== */
@media (max-width: 480px) {
  .contact-row {
    grid-template-columns: 90px 1fr;  /* tighter code column on phones */
    gap: 0.5rem;
  }
  .country-code,
  .contact-input {
    padding: 0.6rem;   /* reduce padding a bit to save space */
    font-size: 0.95rem;
  }
}

/* Ultra-small devices */
@media (max-width: 360px) {
  .contact-row {
    grid-template-columns: 84px 1fr;
  }
  .country-code {
    min-width: 80px;
  }
}


/* back button styling */
.back-btn {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}
.back-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-2px);
}
.back-btn:active {
  transform: translateX(0);
}


