/* ══════════════════════════════════════════════
   LOGIN MODAL — Sahnawaz Portfolio
   Matches existing dark/cyan cyberpunk theme
   ══════════════════════════════════════════════ */

/* ── Sign In button in header ───────────────── */
#visitorLoginBtn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  border: 1.5px solid rgba(0,255,255,0.35);
  border-radius: 40px;
  background: rgba(0,255,255,0.06);
  color: #00ffff;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  font-family: inherit;
  margin-top: 6px;
}
#visitorLoginBtn:hover {
  background: rgba(0,255,255,0.14);
  border-color: #00ffff;
  box-shadow: 0 0 16px rgba(0,255,255,0.3);
  transform: translateY(-1px);
}
#visitorLoginBtn .vl-avatar {
  width: 20px; height: 20px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(0,255,255,0.6);
  display: none;
}
#visitorLoginBtn.logged-in .vl-avatar { display: block; }
#visitorLoginBtn .vl-icon { font-size: 0.85rem; }
#visitorLoginBtn.logged-in .vl-icon { display: none; }

/* ── Modal Overlay ──────────────────────────── */
#loginModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(2, 8, 18, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
}
#loginModal.open { display: flex; }

/* ── Modal Card ─────────────────────────────── */
#loginCard {
  position: relative;
  width: min(380px, 92vw);
  padding: 40px 32px 30px;
  background: linear-gradient(145deg, rgba(4,16,32,0.98) 0%, rgba(2,8,22,0.99) 100%);
  border: 1px solid rgba(0,255,255,0.2);
  border-radius: 22px;
  box-shadow:
    0 0 0 1px rgba(0,255,255,0.06),
    0 25px 70px rgba(0,0,0,0.75),
    0 0 60px rgba(0,255,255,0.04),
    inset 0 1px 0 rgba(0,255,255,0.1);
  animation: loginCardIn 0.38s cubic-bezier(0.34,1.56,0.64,1) both;
  text-align: center;
}
@keyframes loginCardIn {
  from { opacity:0; transform: scale(0.85) translateY(24px); }
  to   { opacity:1; transform: scale(1)    translateY(0);    }
}

/* Top glow line */
#loginCard::before {
  content: '';
  position: absolute;
  top: 0; left: 15%; right: 15%; height: 1.5px;
  background: linear-gradient(90deg, transparent, #00ffff, rgba(160,255,240,0.8), transparent);
  border-radius: 2px;
}

/* ── Card Content ───────────────────────────── */
#loginCard .lm-emoji {
  font-size: 2.4rem;
  margin-bottom: 12px;
  display: block;
  filter: drop-shadow(0 0 12px rgba(0,255,255,0.5));
}
#loginCard .lm-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #e0f4ff;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}
#loginCard .lm-subtitle {
  font-size: 0.78rem;
  color: rgba(160,220,255,0.5);
  margin-bottom: 28px;
  line-height: 1.6;
}

/* ── Google Sign-In button area ─────────────── */
#googleBtnWrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

/* ── Divider ────────────────────────────────── */
.lm-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: rgba(255,255,255,0.15);
  font-size: 0.68rem;
  letter-spacing: 1.5px;
}
.lm-divider::before,
.lm-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0,255,255,0.1);
}

/* ── Skip button ────────────────────────────── */
.lm-skip {
  font-size: 0.72rem;
  color: rgba(160,220,255,0.38);
  cursor: pointer;
  transition: color 0.2s;
  background: none;
  border: none;
  font-family: inherit;
  padding: 4px 8px;
  letter-spacing: 0.3px;
}
.lm-skip:hover { color: rgba(0,255,255,0.7); }

/* ── Privacy note ───────────────────────────── */
.lm-privacy {
  margin-top: 16px;
  font-size: 0.64rem;
  color: rgba(160,220,255,0.25);
  line-height: 1.6;
}
.lm-privacy a {
  color: rgba(0,255,255,0.4);
  text-decoration: none;
}
.lm-privacy a:hover { color: #00ffff; }

/* ── Close button ───────────────────────────── */
#loginModalClose {
  position: absolute;
  top: 13px; right: 15px;
  background: none; border: none;
  color: rgba(255,255,255,0.18);
  font-size: 1rem; cursor: pointer;
  padding: 5px 7px; border-radius: 50%;
  transition: color 0.15s, background 0.15s;
  font-family: inherit; line-height: 1;
}
#loginModalClose:hover {
  color: rgba(255,255,255,0.65);
  background: rgba(255,255,255,0.07);
}

/* ── Welcome Banner (post-login toast) ─────── */
#loginWelcomeBanner {
  display: none;
  position: fixed;
  bottom: 96px; right: 20px;
  z-index: 99998;
  background: linear-gradient(135deg, rgba(0,28,56,0.97), rgba(0,12,30,0.99));
  border: 1px solid rgba(0,255,255,0.3);
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: 0 8px 36px rgba(0,0,0,0.55), 0 0 24px rgba(0,255,255,0.08);
  animation: wbIn 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
  max-width: 255px;
}
@keyframes wbIn {
  from { opacity:0; transform: translateY(18px) scale(0.9); }
  to   { opacity:1; transform: translateY(0)    scale(1);   }
}
#loginWelcomeBanner .wb-row {
  display: flex; align-items: center; gap: 11px;
}
#loginWelcomeBanner .wb-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(0,255,255,0.45);
  object-fit: cover;
  flex-shrink: 0;
}
#loginWelcomeBanner .wb-name {
  display: block;
  font-size: 0.8rem;
  color: #e0f4ff;
  font-weight: 700;
}
#loginWelcomeBanner .wb-sub {
  display: block;
  font-size: 0.68rem;
  color: rgba(160,220,255,0.5);
  margin-top: 2px;
}

/* ── Logged-in profile dropdown ─────────────── */
#profileDropdown {
  display: none;
  position: fixed;
  top: 60px; right: 16px;
  z-index: 999999;
  background: linear-gradient(145deg, rgba(4,16,32,0.98), rgba(2,8,22,0.99));
  border: 1px solid rgba(0,255,255,0.2);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 20px rgba(0,255,255,0.06);
  min-width: 200px;
  animation: loginCardIn 0.25s ease both;
}
#profileDropdown.open { display: block; }
#profileDropdown .pd-header {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0,255,255,0.1);
  margin-bottom: 12px;
}
#profileDropdown .pd-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(0,255,255,0.4);
  object-fit: cover;
}
#profileDropdown .pd-name {
  font-size: 0.8rem; font-weight: 700; color: #e0f4ff;
}
#profileDropdown .pd-email {
  font-size: 0.65rem; color: rgba(160,220,255,0.45);
}
#profileDropdown .pd-signout {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255,60,60,0.08);
  border: 1px solid rgba(255,60,60,0.2);
  border-radius: 8px;
  color: rgba(255,120,120,0.8);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}
#profileDropdown .pd-signout:hover {
  background: rgba(255,60,60,0.15);
  color: #ff8888;
}
