/* ----- LOGIN CONTAINER (Visible First) ----- */
.login-container {
  width: 100%;
  max-width: 400px;
  margin: auto;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 1.5rem;
  box-shadow: 0 15px 30px -8px rgba(0, 0, 0, 0.25);
  overflow: clip; /* was "hidden" — clipped the signup form on small screens */
  position: relative;
  z-index: 2;
}

.login-container.hidden {
  display: none;
}

.brand-header {
  background: linear-gradient(135deg, #0F3D34 0%, #1B5E4F 100%);
  padding: 0.9rem 1.2rem 0.8rem 1.2rem;
  text-align: center;
  position: relative;
}

.brand-header::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 100%;
  height: 24px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 1.2rem 1.2rem 0 0;
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
}

.brand-icon {
  font-size: 1.8rem;
  background: transparent;
  width: 48px;
  height: 48px;
  margin: 0 auto 0.4rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  backdrop-filter: blur(2px);
  color: #FFE0A3;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.brand-icon img { width: 100%; height: 100%; display: block; object-fit: contain; border-radius: 1rem; }

.app-name {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: white;
  line-height: 1.1;
}

.app-tagline {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-size: 0.6rem;
  margin-top: 0.15rem;
}

.creator-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(27, 94, 79, 0.5);
  padding: 0.2rem 0.7rem;
  border-radius: 1.5rem;
  margin-top: 0.4rem;
  font-size: 0.55rem;
  color: #FFE0A3;
}

.form-panel {
  padding: 0.9rem 1.2rem 1.2rem 1.2rem;
  background: #ffffff;
}

.form-panel.hidden {
  display: none;
}

.welcome-message {
  margin-bottom: 0.7rem;
}

.welcome-message h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1F2E2A;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.welcome-message p {
  color: #5F6C69;
  font-size: 0.6rem;
  margin-top: 0.1rem;
}

.content-types {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.content-badge {
  background: #E8F3F0;
  padding: 0.2rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.55rem;
  font-weight: 600;
  color: #1B5E4F;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.input-group {
  margin-bottom: 0.7rem;
  position: relative;
}

.input-group label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: #1F3D36;
}

.input-field {
  width: 100%;
  padding: 0.5rem 0.6rem 0.5rem 2rem;
  font-size: 0.75rem;
  font-family: 'Inter', sans-serif;
  border: 1.5px solid #E2E8F0;
  border-radius: 0.8rem;
  background-color: #FEFEFE;
  transition: all 0.2s ease;
  outline: none;
  font-weight: 500;
  color: #1E2C28;
}

.input-field:focus {
  border-color: #1B5E4F;
  box-shadow: 0 0 0 2px rgba(27, 94, 79, 0.15);
}

.input-icon {
  position: absolute;
  left: 0.6rem;
  top: calc(0.65rem + 0.2rem + 0.42rem);
  transform: translateY(0%);
  color: #1B5E4F;
  font-size: 0.8rem;
  pointer-events: none;
}

.toggle-pwd {
  position: absolute;
  right: 0.6rem;
  top: calc(0.65rem + 0.2rem + 0.42rem);
  cursor: pointer;
  color: #8EA39D;
  font-size: 0.75rem;
  background: transparent;
  border: none;
  outline: none;
}

.phone-group .iti {
  width: 100%;
  display: block;
}
.phone-group .iti__flag-container {
  left: 0;
  z-index: 4;
}
.phone-group .input-field {
  padding-left: 3.2rem;
}
/* Compact country selector */
.phone-group .iti__selected-flag {
  padding: 0 4px 0 6px;
  min-width: 0;
}
.phone-group .iti__flag {
  transform: scale(0.72);
  transform-origin: left center;
}
.phone-group .iti__selected-dial-code {
  font-size: 0.6rem;
  margin-left: 2px;
}
.phone-group .iti__arrow {
  border-top-width: 4px;
  border-left-width: 3px;
  border-right-width: 3px;
  margin-left: 2px;
}

.options-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0.1rem 0 0.8rem 0;
  font-size: 0.6rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #2C4B42;
  font-weight: 500;
  cursor: pointer;
}

.forgot-link {
  color: #1B5E4F;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.6rem;
  cursor: pointer;
}

.login-btn, .signup-btn {
  width: 100%;
  background: linear-gradient(100deg, #0F3D34, #1B5E4F);
  border: none;
  padding: 0.55rem 0.8rem;
  border-radius: 1.5rem;
  font-weight: 600;
  font-size: 0.8rem;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 3px 8px rgba(27, 94, 79, 0.25);
}

.signup-redirect, .login-redirect {
  text-align: center;
  margin-top: 0.4rem;
  font-size: 0.6rem;
  color: #4F6E65;
}
.signup-redirect a, .login-redirect a {
  color: #1B5E4F;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.toast-message {
  position: fixed;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: rgba(15, 45, 40, 0.95);
  color: #F9F3E2;
  padding: 0.4rem 0.9rem;
  border-radius: 30px;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(8px);
  z-index: 99999;
  opacity: 0;
  transition: 0.2s;
  pointer-events: none;
}
.toast-message.show { opacity: 1; transform: translateX(-50%) scale(1); }

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: white;
  border-radius: 1.5rem;
  padding: 1.2rem;
  width: 90%;
  max-width: 340px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.show .modal {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.modal-header h3 {
  color: #1F2E2A;
  font-size: 1rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: #8EA39D;
  cursor: pointer;
  font-size: 1rem;
}

.modal-btn {
  width: 100%;
  background: linear-gradient(100deg, #0F3D34, #1B5E4F);
  border: none;
  padding: 0.55rem;
  border-radius: 1.5rem;
  font-weight: 600;
  font-size: 0.75rem;
  color: white;
  cursor: pointer;
}

.phone-hint {
  font-size: 0.5rem;
  color: #8EA39D;
  margin-top: 0.1rem;
}

.error-message {
  color: #dc3545;
  font-size: 0.55rem;
  margin-top: 0.1rem;
  display: none;
}

.error-message.show {
  display: block;
}


/* ── Sign in with Google ── */
.auth-divider { display:flex; align-items:center; gap:0.5rem; margin:0.6rem 0 0.5rem; color:#7C948C; font-size:0.6rem; }
.auth-divider::before, .auth-divider::after { content:""; flex:1; height:1px; background:rgba(27,94,79,0.18); }
.google-signin-wrap { display:flex; justify-content:center; min-height:40px; transition:opacity .2s; }
.google-note { text-align:center; margin:0.3rem 0 0; font-size:0.55rem; color:#7C948C; }

/* ── Signup wizard (one question per screen) ── */
#signupPanel.wizard .welcome-message,
#signupPanel.wizard .content-types { display: none; }
#signupPanel.wizard .input-group { display: none; margin-top: 0.4rem; }
#signupPanel.wizard .input-group.wz-active { display: block; }
#signupPanel.wizard .input-group > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wz-head { display: none; }
#signupPanel.wizard .wz-head { display: block; }
.wz-back { background: none; border: 0; color: #0F3D34; font-size: 1.05rem; padding: 0.2rem 0.3rem 0.2rem 0; cursor: pointer; }
.wz-dots { display: flex; gap: 5px; margin: 0.45rem 0 0.7rem; }
.wz-dots span { height: 4px; flex: 1; border-radius: 4px; background: rgba(27, 94, 79, 0.18); transition: background .2s; }
.wz-dots span.on { background: #1B5E4F; }
.wz-title { margin: 0 0 0.2rem; font-size: 1.15rem; font-weight: 700; color: #0F3D34; }
.wz-sub { margin: 0 0 0.6rem; font-size: 0.7rem; color: #4F6E65; line-height: 1.35; }
.wz-next { margin-top: 0.7rem; }

/* ── Signup wizard: cover the whole page ── */
#signupPanel.wizard:not(.hidden) {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  box-sizing: border-box;
  overflow-y: auto;
  border-radius: 0;
  background: #ffffff;
  padding: max(1rem, env(safe-area-inset-top)) 1.4rem max(1rem, env(safe-area-inset-bottom));
}
#signupPanel.wizard > * { width: 100%; max-width: 440px; margin-left: auto; margin-right: auto; box-sizing: border-box; }
#signupPanel.wizard .wz-title { font-size: 1.6rem; }
#signupPanel.wizard .wz-sub { font-size: 0.85rem; margin-bottom: 1rem; }
#signupPanel.wizard .wz-back { font-size: 1.3rem; padding: 0.4rem 0.4rem 0.4rem 0; }
#signupPanel.wizard .wz-next,
#signupPanel.wizard .signup-btn { padding: 0.8rem 1rem; font-size: 1rem; }
#signupPanel.wizard .login-redirect { margin-top: auto; padding: 1.2rem 0 0.4rem; font-size: 0.85rem; text-align: center; }
