/* ─────────────────────────────────────────────────────────────
   ANI-UI Auth — split layout sayfa stili
   ─────────────────────────────────────────────────────────────
   Sol panel: marka + slogan + 3 bullet (desktop only)
   Sağ panel: tab switcher + Google + form + password strength
   ───────────────────────────────────────────────────────────── */

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font-sans);
  background: #08080f;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; }
img, svg { display: block; max-width: 100%; }

/* ─── Layout: 2 column grid ─────────────────────────────────── */
.auth-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ─── Sol panel ─────────────────────────────────────────────── */
.auth-left {
  position: relative;
  padding: 56px 64px;
  background: linear-gradient(135deg, #0d0005 0%, #150008 40%, #0a0003 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

/* Three.js beams canvas (mutlak pozisyon, sol panelin arkasında) */
.auth-left__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}
.auth-left__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 30% 60%, rgba(232, 0, 61, 0.22) 0%, transparent 60%),
    linear-gradient(135deg, rgba(5, 0, 10, 0.7) 0%, rgba(5, 0, 10, 0.85) 100%);
  pointer-events: none;
}
/* Content z-index'i yükselt — canvas üstünde görünsün */
.auth-left > .auth-brand,
.auth-left > .auth-hero,
.auth-left > .auth-quote { position: relative; z-index: 2; }
.auth-left > .auth-hero:last-child { margin-block: auto; }
/* Sağ kenar dikey gradient → sağ panele yumuşak geçiş (canvas üstünde) */
.auth-left::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 100px;
  background: linear-gradient(90deg, transparent, #08080f);
  pointer-events: none;
  z-index: 2;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
}
/* (auth-brand-mark artık kullanılmıyor — logo img'si var) */
.auth-brand img { display: block; height: 34px; width: auto; }
.auth-mobile-logo img { display: block; height: 28px; width: auto; }

.auth-hero {
  position: relative;
  z-index: 1;
  max-width: 460px;
}
.auth-hero__title {
  font-size: clamp(36px, 4.5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0 0 32px;
}
.auth-hero__title em {
  font-style: normal;
  background: linear-gradient(135deg, #ff4466 0%, #e8003d 50%, #8b0000 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.auth-hero__bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-hero__bullets li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 15px;
  line-height: 1.4;
}
.auth-hero__check {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(232, 0, 61, 0.12);
  border: 1px solid rgba(232, 0, 61, 0.3);
  display: grid; place-items: center;
  flex-shrink: 0;
  color: var(--accent);
}
.auth-hero__check svg { width: 12px; height: 12px; }

.auth-quote {
  position: relative;
  z-index: 1;
  border-left: 2px solid rgba(232, 0, 61, 0.5);
  padding: 12px 0 12px 18px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  line-height: 1.6;
  font-style: italic;
  max-width: 420px;
}
.auth-quote cite {
  display: block;
  margin-top: 8px;
  font-style: normal;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  letter-spacing: 0.02em;
}

/* ─── Sağ panel ─────────────────────────────────────────────── */
.auth-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: #08080f;
}
.auth-form-wrap {
  width: 100%;
  max-width: 400px;
}

/* Mobil-only logo (üstte) */
.auth-mobile-logo {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  margin: 0 0 32px;
}

/* ─── Tab switcher ──────────────────────────────────────────── */
.auth-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 4px;
  margin: 0 0 32px;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: 0;
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.auth-tab.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

/* ─── Form ──────────────────────────────────────────────────── */
.auth-form {
  display: none;
  flex-direction: column;
  gap: 16px;
}
.auth-form.is-active {
  display: flex;
  animation: auth-form-in 0.3s var(--ease-out);
}
@keyframes auth-form-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-form__title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.018em;
  margin: 0 0 4px;
}
.auth-form__sub {
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
  margin: 0 0 18px;
}

/* Google button — prominent, formun üstünde */
.auth-google {
  width: 100%;
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.2s var(--ease-out), border-color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}
.auth-google:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}
.auth-google svg { width: 18px; height: 18px; }

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.25);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 4px 0;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

/* Field */
.auth-field { display: flex; flex-direction: column; gap: 7px; }
.auth-field__label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
}
.auth-field__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.auth-field__hint {
  font-size: 13px;
  color: rgba(232, 0, 61, 0.75);
  font-weight: 500;
  transition: color 0.15s var(--ease-out);
}
.auth-field__hint:hover { color: var(--accent); }

.auth-input-wrap { position: relative; }
.auth-input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text-primary);
  font: 500 15px/1.4 var(--font-sans);
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.auth-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 0, 61, 0.12);
}
.auth-input::placeholder { color: rgba(255, 255, 255, 0.25); }
.auth-input--pw { padding-right: 48px; }
.auth-pw-toggle {
  position: absolute;
  top: 50%; right: 10px;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.35);
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 6px;
  transition: color 0.15s var(--ease-out), background 0.15s var(--ease-out);
}
.auth-pw-toggle:hover { color: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.06); }
.auth-pw-toggle svg { width: 18px; height: 18px; }

/* Password strength meter */
.auth-pw-strength {
  display: flex;
  gap: 5px;
  margin: -4px 0 0;
}
.auth-pw-strength__block {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  transition: background 0.3s var(--ease-out);
}
.auth-pw-strength[data-strength="1"] .auth-pw-strength__block:nth-child(1) { background: #ef4444; }
.auth-pw-strength[data-strength="2"] .auth-pw-strength__block:nth-child(-n+2) { background: #f97316; }
.auth-pw-strength[data-strength="3"] .auth-pw-strength__block:nth-child(-n+3) { background: #facc15; }
.auth-pw-strength[data-strength="4"] .auth-pw-strength__block { background: #22c55e; }
.auth-pw-strength__label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 4px;
}

/* Submit */
.auth-submit {
  margin-top: 6px;
  padding: 14px;
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.2s var(--ease-out), transform 0.2s var(--ease-out), box-shadow 0.25s var(--ease-out);
  box-shadow: 0 8px 24px rgba(232, 0, 61, 0.25);
}
.auth-submit:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(232, 0, 61, 0.4);
}
.auth-submit[disabled] { opacity: 0.7; cursor: wait; transform: none; }
.auth-spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: auth-spin 0.6s linear infinite;
}
.auth-submit.is-loading .auth-spinner { display: inline-block; }
.auth-submit.is-loading .auth-submit-text { opacity: 0.85; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

/* Error */
.auth-error {
  display: none;
  padding: 12px 14px;
  background: rgba(232, 0, 61, 0.1);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  color: #ffb3c1;
  font-size: 13px;
  line-height: 1.5;
}
.auth-error.is-shown {
  display: block;
  animation: auth-shake 0.4s var(--ease-out);
}
@keyframes auth-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* Bottom switch link */
.auth-switch {
  text-align: center;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
}
.auth-switch button {
  background: transparent;
  border: 0;
  color: var(--accent);
  font-weight: 600;
  padding: 0;
  font-size: 14px;
}
.auth-switch button:hover { text-decoration: underline; text-underline-offset: 2px; }

.auth-legal {
  margin: 22px 0 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.22);
  font-size: 12px;
  line-height: 1.5;
}
.auth-legal a { color: rgba(255, 255, 255, 0.4); text-decoration: underline; text-underline-offset: 2px; }

/* ─── Mobil ─────────────────────────────────────────────────── */
@media (max-width: 880px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .auth-right { padding: 32px 24px; min-height: 100vh; }
  .auth-mobile-logo { display: inline-flex; }
}

/* ─── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   ANI-AUTH OTP — 6 haneli e-posta doğrulama ekranı
   ═══════════════════════════════════════════════════════════════ */
.auth-form--otp[hidden] { display: none; }
.auth-form--otp:not([hidden]) { display: flex; flex-direction: column; }

.otp-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 24px 0 18px;
}
@media (max-width: 480px) {
  .otp-inputs { gap: 6px; }
}

.otp-input {
  width: 52px;
  height: 64px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  font-size: 28px;
  font-weight: 700;
  color: #f4f4f5;
  text-align: center;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  caret-color: #e8003d;
}
@media (max-width: 480px) {
  .otp-input { width: 42px; height: 54px; font-size: 22px; }
}
.otp-input:focus {
  outline: none;
  border-color: #e8003d;
  background: rgba(232, 0, 61, 0.06);
  box-shadow: 0 0 0 3px rgba(232, 0, 61, 0.15);
}
.otp-input.is-error {
  border-color: #e8003d;
  background: rgba(232, 0, 61, 0.10);
  animation: otp-shake 0.4s ease;
}
@keyframes otp-shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(5px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(3px); }
}

#otp-error {
  margin: 4px 0 12px;
  font-size: 13px;
  color: #ff4466;
  text-align: center;
}

.otp-resend {
  margin: 14px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.5);
}
#otp-resend-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s ease;
}
#otp-resend-btn:not(:disabled) {
  color: #e8003d;
  cursor: pointer;
}
#otp-resend-btn:not(:disabled):hover {
  color: #ff2055;
}
#otp-resend-btn:disabled {
  cursor: not-allowed;
}

/* "Beni hatırla" — giriş formu, şifre alanı ile submit arasında.
   Renk/geçiş dili auth-field__label + auth-field__hint ile aynı tutuldu. */
.auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: -4px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  user-select: none;
  transition: color 0.15s var(--ease-out);
}

.auth-remember:hover {
  color: rgba(255, 255, 255, 0.8);
}

.auth-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.auth-remember input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
