.ffa-auth-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.ffa-auth-modal.is-open {
  display: flex;
  animation: ffaAuthFadeIn 180ms ease;
}
@keyframes ffaAuthFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.ffa-auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 28, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
}

.ffa-auth-dialog {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  background: rgba(17, 24, 39, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 32px 28px 28px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(59, 130, 246, 0.08);
  color: #f8fafc;
  animation: ffaAuthSlideUp 220ms ease;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
@keyframes ffaAuthSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.ffa-auth-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  transition: background 100ms, color 100ms;
}
.ffa-auth-close:hover { background: rgba(255, 255, 255, 0.05); color: #f8fafc; }

.ffa-auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}
.ffa-auth-brand img { display: block; border-radius: 8px; }
.ffa-auth-brand-text {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: #f8fafc;
}
.ffa-auth-brand-text span { color: #60a5fa; }

.ffa-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 22px;
}
.ffa-auth-tab {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 7px;
  cursor: pointer;
  transition: background 100ms, color 100ms;
  min-height: 40px;
}
.ffa-auth-tab.active {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
}
.ffa-auth-tab:not(.active):hover { color: #f8fafc; }

.ffa-auth-title {
  display: none;
}

.ffa-auth-google {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}
/* Aurora temasına uyumlu koyu cam buton (renkli G logosu koyuda öne çıkar) */
.ffa-google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, .05);
  color: #eef2f9;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 11px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background .15s ease, box-shadow .15s ease, border-color .15s ease, transform .12s ease;
}
.ffa-google-btn:hover {
  background: rgba(255, 255, 255, .09);
  border-color: rgba(139, 92, 246, .5);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .14), 0 8px 22px -10px rgba(139, 92, 246, .5);
  transform: translateY(-1px);
}
.ffa-google-btn:active { background: rgba(255, 255, 255, .12); transform: none; }
.ffa-google-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  flex: none;
}
.ffa-google-logo svg { width: 15px; height: 15px; }
.ffa-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 18px;
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.ffa-auth-divider::before,
.ffa-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.ffa-auth-form { display: flex; flex-direction: column; gap: 14px; }
.ffa-auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #94a3b8;
  min-width: 0; /* grid item içeriğe göre taşmasın */
}
.ffa-auth-form label span { font-weight: 500; }
.ffa-auth-form input[type="text"],
.ffa-auth-form input[type="email"],
.ffa-auth-form input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 12px 14px;
  color: #f8fafc;
  font-size: 16px;
  min-height: 46px;
  transition: border-color 120ms, box-shadow 120ms;
  font-family: inherit;
}
.ffa-auth-form input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.ffa-auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ffa-auth-row > label { min-width: 0; }
@media (max-width: 380px) { .ffa-auth-row { grid-template-columns: 1fr; } }

.ffa-auth-check {
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  color: #f8fafc !important;
  font-size: 13px !important;
}
.ffa-auth-check input { accent-color: #3b82f6; width: 18px; height: 18px; }

.ffa-auth-submit {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  border: none;
  padding: 13px 16px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  min-height: 48px;
  margin-top: 4px;
  transition: transform 80ms, box-shadow 120ms;
}
.ffa-auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}
.ffa-auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.ffa-auth-foot {
  margin: 12px 0 0;
  font-size: 13px;
  color: #94a3b8;
  text-align: center;
  line-height: 1.5;
}
.ffa-auth-foot a { color: #60a5fa; text-decoration: none; }
.ffa-auth-foot a:hover { text-decoration: underline; }

.ffa-auth-help {
  margin: 0 0 6px;
  font-size: 14px;
  color: #94a3b8;
  text-align: center;
}

.ffa-auth-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 14px;
}
.ffa-auth-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 14px;
}

body.ffa-auth-open { overflow: hidden; }

@media (max-width: 480px) {
  .ffa-auth-dialog {
    padding: 24px 20px 20px;
    border-radius: 14px;
  }
  .ffa-auth-brand-text { font-size: 18px; }
  .ffa-auth-brand img { width: 36px; height: 36px; }
}
