/* ===== JAI SHREE RAM — LOGIN PAGE CSS ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Poppins:wght@600;700;800&display=swap');

:root {
  --saffron: #FF6B00;
  --saffron-light: #FF8C3A;
  --saffron-glow: rgba(255,107,0,0.15);
  --navy: #0A1628;
  --navy-soft: #1A2744;
  --gold: #F5C542;
  --white: #FFFFFF;
  --off-white: #F8F9FB;
  --gray-100: #F0F2F5;
  --gray-200: #E4E6EA;
  --gray-400: #B0B3B8;
  --gray-600: #65676B;
  --gray-900: #1C1E21;
  --error: #FF3B30;
  --success: #30D158;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.14);
  --shadow-glow: 0 0 0 3px var(--saffron-glow);
  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--navy);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
}

/* Animated Background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 10%, rgba(255,107,0,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 90%, rgba(245,197,66,0.10) 0%, transparent 55%),
    linear-gradient(135deg, #0A1628 0%, #0D1F3C 50%, #0A1628 100%);
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  width: 600px; height: 600px;
  top: -200px; right: -200px;
  background: radial-gradient(circle, rgba(255,107,0,0.08) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
  animation: float 8s ease-in-out infinite;
}

@keyframes float {
  0%,100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

/* ===== PAGE LAYOUT ===== */
.page-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-container {
  width: 100%;
  max-width: 420px;
}

/* ===== LOGO AREA ===== */
.logo-area {
  text-align: center;
  margin-bottom: 28px;
}

.app-logo {
  font-family: 'Poppins', sans-serif;
  font-size: 40px;
  font-weight: 800;
  background: linear-gradient(135deg, #FF6B00 0%, #FF8C3A 40%, #F5C542 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 4px;
}

.app-tagline {
  color: var(--gray-400);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.5px;
}

/* ===== AUTH BOX ===== */
.auth-box {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-xl);
  padding: 28px 28px 24px;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.08);
}

/* ===== TAB SWITCHER ===== */
.tab-container {
  display: flex;
  background: rgba(0,0,0,0.25);
  border-radius: var(--radius-md);
  padding: 3px;
  margin-bottom: 24px;
  gap: 2px;
}

.tab-btn {
  flex: 1;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 11px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-400);
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
}

.tab-btn.active {
  background: var(--saffron);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(255,107,0,0.4);
}

.tab-btn:hover:not(.active) {
  color: var(--white);
  background: rgba(255,255,255,0.06);
}

/* ===== TAB CONTENT ===== */
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeSlide 0.25s ease; }

@keyframes fadeSlide {
  from { opacity:0; transform: translateY(8px); }
  to { opacity:1; transform: translateY(0); }
}

/* ===== INPUTS ===== */
.input-group {
  position: relative;
  margin-bottom: 10px;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 15px;
  pointer-events: none;
  z-index: 1;
}

.auth-input {
  width: 100%;
  padding: 13px 14px 13px 42px;
  border: 1.5px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  background: rgba(0,0,0,0.25);
  color: var(--white);
  transition: var(--transition);
  outline: none;
  -webkit-appearance: none;
}

.auth-input::placeholder { color: var(--gray-400); }

.auth-input:focus {
  border-color: var(--saffron);
  background: rgba(255,107,0,0.06);
  box-shadow: var(--shadow-glow);
}

select.auth-input {
  color: var(--gray-400);
  cursor: pointer;
}

select.auth-input option {
  background: var(--navy-soft);
  color: var(--white);
}

/* ===== BUTTONS ===== */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--saffron) 0%, var(--saffron-light) 100%);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 6px;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 16px rgba(255,107,0,0.30);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.12), transparent);
  transform: translateX(-100%);
  transition: 0.5s ease;
}

.btn-primary:hover::after { transform: translateX(100%); }

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255,107,0,0.40);
}

.btn-primary:active { transform: translateY(0); }

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-google {
  width: 100%;
  padding: 13px;
  background: rgba(255,255,255,0.06);
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-google:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.20);
  transform: translateY(-1px);
}

/* ===== DIVIDER ===== */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  color: var(--gray-400);
  font-size: 12px;
  font-weight: 500;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.08);
}

/* ===== PHONE SECTION ===== */
.phone-section {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 16px;
  margin-top: 16px;
}

.phone-section-label {
  text-align: center;
  color: var(--gray-400);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.phone-input-group {
  display: flex;
  gap: 8px;
}

.phone-input-group .auth-input { flex: 1; }

.phone-input-group .btn-otp {
  padding: 13px 16px;
  background: var(--navy-soft);
  color: var(--saffron);
  border: 1.5px solid rgba(255,107,0,0.30);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  flex-shrink: 0;
}

.phone-input-group .btn-otp:hover {
  background: rgba(255,107,0,0.10);
  border-color: var(--saffron);
}

/* ===== MESSAGES ===== */
.hidden { display: none !important; }

.msg-error, .msg-success {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  margin: 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.error, .msg-error {
  background: rgba(255,59,48,0.12);
  border: 1px solid rgba(255,59,48,0.25);
  color: #FF6B60;
}

.success, .msg-success {
  background: rgba(48,209,88,0.10);
  border: 1px solid rgba(48,209,88,0.20);
  color: #30D158;
}

/* ===== SWITCH TEXT ===== */
.switch-text {
  text-align: center;
  margin-top: 18px;
  color: var(--gray-400);
  font-size: 13px;
}

.switch-text a {
  color: var(--saffron-light);
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.switch-text a:hover { color: var(--gold); }

/* ===== MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
  padding: 16px;
}

.modal.show { display: flex; animation: fadeIn 0.25s ease; }

.modal-content {
  background: var(--navy-soft);
  border: 1px solid rgba(255,255,255,0.10);
  padding: 32px 28px;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 420px;
  position: relative;
  animation: slideUp 0.3s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}

.modal-content h2 {
  color: var(--white);
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
}

.modal-subtitle {
  text-align: center;
  color: var(--gray-400);
  font-size: 13px;
  margin-bottom: 20px;
}

.modal-close {
  position: absolute;
  top: 16px; right: 20px;
  font-size: 24px;
  cursor: pointer;
  color: var(--gray-400);
  transition: var(--transition);
  line-height: 1;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}

.modal-close:hover {
  color: var(--white);
  background: rgba(255,255,255,0.08);
  transform: rotate(90deg);
}

@keyframes fadeIn { from{opacity:0} to{opacity:1} }
@keyframes slideUp { from{transform:translateY(40px);opacity:0} to{transform:translateY(0);opacity:1} }

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .auth-box { padding: 22px 18px 20px; }
  .modal-content { padding: 24px 18px; }
  .phone-input-group { flex-direction: column; }
  .phone-input-group .btn-otp { width: 100%; text-align: center; }
  .app-logo { font-size: 34px; }
}

/* ═══════════════════════════════════════════════════════════
   FULLSCREEN SEARCH OVERLAY — "black glass" Instagram-style
   Tapping the small nav search bar (Feed or Explore) opens this
   instead of a tiny dropdown, so every result lives in one
   consistent fullscreen place.
   ═══════════════════════════════════════════════════════════ */
.search-overlay {
  display: none;
  position: fixed;
  inset: 0; top: 0; right: 0; bottom: 0; left: 0; /* longhand fallback: old WebKit/Opera Mini lack `inset` shorthand */
  z-index: 5000;
  flex-direction: column;
  background: rgba(8, 10, 16, 0.92);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  animation: searchOverlayIn 0.18s ease-out;
}
.search-overlay.show { display: flex; }

@keyframes searchOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.search-overlay-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 10px;
  flex-shrink: 0;
}

.search-overlay-back {
  background: none;
  border: none;
  color: var(--white);
  font-size: 18px;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.search-overlay-back:active { background: rgba(255,255,255,0.1); }

.search-overlay-input-wrap {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 22px;
  padding: 9px 14px;
}
.search-overlay-input-wrap i.fa-search {
  color: var(--gray-400);
  font-size: 14px;
  flex-shrink: 0;
}
.search-overlay-input-wrap input {
  flex: 1 1 auto;
  background: none;
  border: none;
  outline: none;
  color: var(--white);
  font-size: 15px;
  min-width: 0;
}
.search-overlay-input-wrap input::placeholder { color: var(--gray-400); }
.search-overlay-clear {
  background: none;
  border: none;
  color: var(--gray-400);
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
}

.search-overlay-results {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 6px 24px;
}

.search-overlay-results .search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.search-overlay-results .search-result-item:active,
.search-overlay-results .search-result-item:hover {
  background: rgba(255,255,255,0.06);
}
.search-overlay-results .search-result-item img {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.search-overlay-results .search-result-item span {
  color: var(--white);
  font-size: 14.5px;
  font-weight: 600;
}
.search-overlay-results .search-result-hint {
  text-align: center;
  color: var(--gray-400);
  font-size: 13.5px;
  padding: 50px 20px;
}
