/* ============================================================
   Pulsora — auth.css
   Kapı/overlay (auth-gate.js) + landing güçlendirmeleri için
   bağımsız stiller. Glassmorphism, koyu tema, marka mavisi/moru.
   index.html / style.css / app.js'e DOKUNMAZ — çakışma yok.
   Tüm seçiciler .pg- (Pulsora Gate) öneki ile namespace'li.
   ============================================================ */

:root {
  --pg-bg-base: #07060f;
  --pg-brand-pink: #e1306c;
  --pg-brand-purple: #c13584;
  --pg-brand-blue: #4facfe;
  --pg-brand-cyan: #00f2fe;
  --pg-grad-brand: linear-gradient(135deg, #6a5cff 0%, #c13584 50%, #e1306c 100%);
  --pg-grad-accent: linear-gradient(135deg, #4facfe 0%, #6a5cff 100%);
  --pg-text: #ffffff;
  --pg-text-soft: rgba(255, 255, 255, 0.66);
  --pg-text-mute: rgba(255, 255, 255, 0.40);
  --pg-border: rgba(255, 255, 255, 0.10);
  --pg-border-strong: rgba(255, 255, 255, 0.18);
  --pg-surface: rgba(255, 255, 255, 0.045);
  --pg-danger: #ff4a5a;
  --pg-success: #00f2fe;
  --pg-font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --pg-font-display: 'Outfit', 'Plus Jakarta Sans', sans-serif;
}

/* ---------- OVERLAY KÖKÜ ---------- */
.pg-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  font-family: var(--pg-font);
  color: var(--pg-text);
  background:
    radial-gradient(circle at 18% 12%, rgba(106, 92, 255, 0.22) 0%, transparent 46%),
    radial-gradient(circle at 84% 22%, rgba(64, 172, 254, 0.16) 0%, transparent 42%),
    radial-gradient(circle at 50% 96%, rgba(225, 48, 108, 0.18) 0%, transparent 52%),
    rgba(7, 6, 15, 0.86);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  opacity: 0;
  animation: pg-fade-in 0.35s ease forwards;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
}
.pg-overlay * { box-sizing: border-box; }

/* body kilidi (overlay açıkken) */
body.pg-locked { overflow: hidden !important; }

@keyframes pg-fade-in { to { opacity: 1; } }
@keyframes pg-fade-out { to { opacity: 0; } }
.pg-overlay.pg-closing { animation: pg-fade-out 0.28s ease forwards; }

/* ---------- KART ---------- */
.pg-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: auto;
  padding: 2.4rem 2.2rem 2.2rem;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  border: 1px solid var(--pg-border-strong);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  transform: translateY(14px) scale(0.98);
  opacity: 0;
  animation: pg-card-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.06s forwards;
}
@keyframes pg-card-in {
  to { transform: translateY(0) scale(1); opacity: 1; }
}
/* üst ışık çizgisi */
.pg-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 26px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(106, 92, 255, 0.6), rgba(225, 48, 108, 0.35), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

/* ---------- MARKA BAŞLIK ---------- */
.pg-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 1.4rem;
}
.pg-logo {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--pg-grad-brand);
  box-shadow: 0 6px 22px rgba(193, 53, 132, 0.5);
}
.pg-logo svg { width: 22px; height: 22px; fill: #fff; }
.pg-brand-name {
  font-family: var(--pg-font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
}

.pg-title {
  font-family: var(--pg-font-display);
  font-weight: 700;
  font-size: 1.5rem;
  text-align: center;
  letter-spacing: -0.6px;
  margin: 0 0 0.35rem;
}
.pg-subtitle {
  text-align: center;
  font-size: 0.92rem;
  color: var(--pg-text-soft);
  margin: 0 0 1.6rem;
}

/* ---------- SEKMELER ---------- */
.pg-tabs {
  position: relative;
  display: flex;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--pg-border);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 1.5rem;
}
.pg-tab {
  flex: 1;
  position: relative;
  z-index: 2;
  appearance: none;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--pg-font);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--pg-text-mute);
  padding: 0.62rem 0;
  border-radius: 10px;
  transition: color 0.25s ease;
}
.pg-tab.pg-active { color: #fff; }
.pg-tab:focus-visible { outline: 2px solid var(--pg-brand-blue); outline-offset: 2px; }
/* kayan vurgu */
.pg-tab-indicator {
  position: absolute;
  top: 4px; left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: 10px;
  background: var(--pg-grad-accent);
  box-shadow: 0 6px 18px rgba(106, 92, 255, 0.45);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1;
}
.pg-tabs[data-mode="signup"] .pg-tab-indicator { transform: translateX(100%); }

/* ---------- FORM ---------- */
.pg-form { display: flex; flex-direction: column; gap: 1rem; }
.pg-field { display: flex; flex-direction: column; gap: 0.4rem; }
.pg-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--pg-text-soft);
  letter-spacing: 0.2px;
}
.pg-input-wrap { position: relative; display: flex; align-items: center; }
.pg-input-wrap > svg.pg-input-icon {
  position: absolute; left: 0.95rem;
  width: 17px; height: 17px;
  stroke: var(--pg-text-mute); fill: none; stroke-width: 2;
  pointer-events: none;
  transition: stroke 0.2s ease;
}
.pg-input {
  width: 100%;
  font-family: var(--pg-font);
  font-size: 0.96rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.30);
  border: 1px solid var(--pg-border);
  border-radius: 13px;
  padding: 0.85rem 2.7rem 0.85rem 2.7rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.pg-input::placeholder { color: var(--pg-text-mute); }
.pg-input:hover { border-color: var(--pg-border-strong); }
.pg-input:focus {
  outline: none;
  border-color: rgba(106, 92, 255, 0.85);
  background: rgba(0, 0, 0, 0.42);
  box-shadow: 0 0 0 4px rgba(106, 92, 255, 0.18);
}
.pg-input:focus + .pg-toggle,
.pg-input-wrap:focus-within > svg.pg-input-icon { stroke: var(--pg-brand-blue); }

/* şifre göster/gizle */
.pg-toggle {
  position: absolute; right: 0.7rem;
  appearance: none; background: transparent; border: none; cursor: pointer;
  width: 30px; height: 30px;
  display: grid; place-items: center; border-radius: 8px;
  color: var(--pg-text-mute);
  transition: color 0.2s ease, background 0.2s ease;
}
.pg-toggle:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.pg-toggle:focus-visible { outline: 2px solid var(--pg-brand-blue); outline-offset: 1px; }
.pg-toggle svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ---------- HATA & BİLGİ MESAJI ---------- */
.pg-message {
  display: none;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.85rem;
  line-height: 1.45;
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  margin-top: -0.2rem;
}
.pg-message.pg-show { display: flex; animation: pg-shake 0.4s ease; }
.pg-message svg { flex-shrink: 0; width: 16px; height: 16px; margin-top: 1px; stroke: currentColor; fill: none; stroke-width: 2; }
.pg-message.pg-error {
  color: #ffb1b9;
  background: rgba(255, 74, 90, 0.12);
  border: 1px solid rgba(255, 74, 90, 0.35);
}
.pg-message.pg-info {
  color: #aef1ff;
  background: rgba(0, 242, 254, 0.10);
  border: 1px solid rgba(0, 242, 254, 0.30);
  animation: none;
}
@keyframes pg-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

/* ---------- SUBMIT ---------- */
.pg-submit {
  position: relative;
  appearance: none; border: none; cursor: pointer;
  font-family: var(--pg-font-display);
  font-weight: 700; font-size: 1rem; letter-spacing: 0.2px;
  color: #fff;
  background: var(--pg-grad-brand);
  background-size: 180% 180%;
  border-radius: 14px;
  padding: 0.95rem 1rem;
  margin-top: 0.35rem;
  box-shadow: 0 10px 28px rgba(193, 53, 132, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, background-position 0.6s ease;
}
.pg-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  background-position: 100% 0;
  box-shadow: 0 14px 36px rgba(193, 53, 132, 0.6);
}
.pg-submit:active:not(:disabled) { transform: translateY(0); }
.pg-submit:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.pg-submit:disabled { cursor: not-allowed; filter: saturate(0.6) brightness(0.85); opacity: 0.85; }

/* yükleniyor spinner */
.pg-submit .pg-btn-label { transition: opacity 0.15s ease; }
.pg-submit.pg-loading .pg-btn-label { opacity: 0; }
.pg-spinner {
  position: absolute; inset: 0; margin: auto;
  width: 20px; height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  display: none;
  animation: pg-spin 0.7s linear infinite;
}
.pg-submit.pg-loading .pg-spinner { display: block; }
@keyframes pg-spin { to { transform: rotate(360deg); } }

/* ---------- ALT GEÇİŞ ---------- */
.pg-switch {
  text-align: center;
  font-size: 0.88rem;
  color: var(--pg-text-soft);
  margin-top: 1.3rem;
}
.pg-switch button {
  appearance: none; background: none; border: none; cursor: pointer;
  font-family: var(--pg-font);
  font-weight: 700; font-size: 0.88rem;
  color: var(--pg-brand-blue);
  padding: 0 0.15rem;
  transition: color 0.2s ease;
}
.pg-switch button:hover { color: #fff; text-decoration: underline; }
.pg-switch button:focus-visible { outline: 2px solid var(--pg-brand-blue); outline-offset: 2px; border-radius: 4px; }

/* ---------- GÜVEN ROZETİ / FOOTER ---------- */
.pg-card-foot {
  display: flex; align-items: center; justify-content: center; gap: 0.45rem;
  margin-top: 1.4rem;
  font-size: 0.76rem;
  color: var(--pg-text-mute);
}
.pg-card-foot svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }

/* boot/yükleniyor ekranı (me() kontrolü sırasında) */
.pg-boot {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  color: var(--pg-text-soft); font-size: 0.92rem;
}
.pg-boot .pg-spinner {
  position: static; display: block; width: 34px; height: 34px;
  border-width: 3px; border-color: rgba(255, 255, 255, 0.2); border-top-color: var(--pg-brand-blue);
}

/* ---------- MOBİL ---------- */
@media (max-width: 480px) {
  .pg-overlay { padding: 0.9rem; align-items: flex-start; padding-top: 2.5rem; }
  .pg-card { padding: 1.9rem 1.4rem 1.6rem; border-radius: 22px; }
  .pg-title { font-size: 1.3rem; }
}

/* hareketi azaltma tercihi */
@media (prefers-reduced-motion: reduce) {
  .pg-overlay, .pg-card, .pg-message.pg-show, .pg-tab-indicator,
  .pg-submit, .pg-spinner { animation: none !important; transition: none !important; }
  .pg-card { transform: none; opacity: 1; }
}

/* ============================================================
   LANDING GÜÇLENDİRMELERİ (landing.html ile birlikte yüklenir)
   .pgl- öneki — landing'in mevcut stilleriyle çakışmaz.
   ============================================================ */

/* hero üstünde ince animasyonlu gradient çizgi */
.pgl-topglow {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60;
  background: linear-gradient(90deg, transparent, #6a5cff, #e1306c, #4facfe, transparent);
  background-size: 200% 100%;
  animation: pgl-slide 6s linear infinite;
  pointer-events: none;
}
@keyframes pgl-slide { to { background-position: 200% 0; } }

/* CTA butonlarına yumuşak parlama (mevcut .btn-primary'yi bozmadan ekler) */
.pgl-shine { position: relative; overflow: hidden; }
.pgl-shine::after {
  content: ''; position: absolute; top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}
.pgl-shine:hover::after { left: 140%; }

/* kart girişlerinde yumuşak yükselme (IntersectionObserver ile tetiklenir) */
.pgl-reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.pgl-reveal.pgl-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .pgl-topglow, .pgl-shine::after { animation: none; }
  .pgl-reveal { opacity: 1; transform: none; transition: none; }
}
