/* ----- Giriş kapısı (Kayıt Ol / Giriş Yap | Kayıt olmadan devam et) ----- */
.auth-gate {
  text-align: center;
  padding: 2rem 1.5rem;
  position: relative;
  z-index: 1;
}

.auth-gate-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--qw-text-secondary, #475569);
  margin-bottom: 1.25rem;
}

.auth-gate-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 320px;
  margin: 0 auto;
}

.auth-gate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 1rem 1.5rem;
  border-radius: 14px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  border: none;
  text-decoration: none;
  color: #fff;
}

.auth-gate-btn:active {
  transform: scale(0.98);
}

.auth-gate-btn--primary {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 50%, #5b21b6 100%);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}

.auth-gate-btn--primary:hover {
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.45);
}

.auth-gate-btn--secondary {
  background: rgba(255, 255, 255, 0.95);
  color: var(--qw-text-primary, #1e293b);
  border: 2px solid rgba(124, 58, 237, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.auth-gate-btn--secondary:hover {
  border-color: rgba(124, 58, 237, 0.6);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.12);
}

/* Giriş yapılmışsa: tek buton Hesabıma git */
.auth-gate--loggedin .auth-gate-buttons {
  max-width: 280px;
}

.auth-gate--loggedin .auth-gate-btn {
  text-decoration: none;
  box-sizing: border-box;
}

/* ----- Auth modal (Kayıt Ol / Giriş Yap) ----- */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.auth-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.auth-modal-box {
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

/* Kapalıyken Turnstile iframe vb. görünmez katman tıklamaları yutmasın */
.auth-modal-overlay:not(.is-open) .auth-modal-box {
  display: none !important;
}

.auth-modal-overlay.is-open .auth-modal-box {
  display: block;
  transform: scale(1);
}

.auth-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-size: 1.25rem;
  transition: background 0.2s, color 0.2s;
  z-index: 2;
}

.auth-modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #1e293b;
}

.auth-modal-header {
  padding: 2rem 2rem 0;
  text-align: center;
}

.auth-modal-tabs {
  display: flex;
  background: rgba(124, 58, 237, 0.08);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 1.5rem;
}

.auth-modal-tab {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-modal-tab.is-active {
  background: #fff;
  color: #7c3aed;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.auth-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.auth-modal-body {
  padding: 1.5rem 2rem 2rem;
}

.auth-form-panel {
  display: none;
}

.auth-form-panel.is-active {
  display: block;
}

.auth-form-group {
  margin-bottom: 1.25rem;
}

.auth-form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.4rem;
}

.auth-form-group input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form-group input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.auth-form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 0.5rem;
}

.auth-form-forgot {
  display: inline-block;
  font-size: 0.85rem;
  color: #7c3aed;
  margin-top: 0;
  text-decoration: none;
  font-weight: 500;
}
.auth-form-actions .auth-form-forgot { margin-top: 0; }
.auth-form-forgot:hover { text-decoration: underline; }

.auth-form-register-btn {
  font-size: 0.85rem;
  color: #7c3aed;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  text-decoration: none;
}
.auth-form-register-btn:hover { text-decoration: underline; }

.auth-form-error {
  font-size: 0.85rem;
  color: #dc2626;
  margin-top: 0.5rem;
  display: none;
}

.auth-form-error.is-visible {
  display: block;
}

.auth-form-turnstile {
  margin: 1rem 0 0.5rem;
}

.auth-modal-box .btn-auth-submit {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  margin-top: 0.5rem;
}

.auth-modal-box .btn-auth-submit:hover {
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}

.auth-modal-box .btn-auth-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.auth-modal-box .btn-auth-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  color: #1f2937;
  background: #fff;
  border: 2px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.auth-modal-box .btn-auth-google:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.auth-modal-box .btn-auth-google .fa-google {
  color: #4285f4;
}

.auth-modal-privacy-note {
  font-size: 0.85rem;
  color: var(--qw-text-secondary, #64748b);
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-modal-privacy-note i {
  color: #10b981;
  flex-shrink: 0;
}

/* Header auth link */
.header-auth {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-auth a,
.header-auth button {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--text-dark, #1e293b);
  transition: background 0.2s, color 0.2s;
}

.header-auth a:hover,
.header-auth button:hover {
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
}

.header-auth .btn-login {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #fff;
}

.header-auth .btn-login:hover {
  background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%);
  color: #fff;
}

.nav-mobile-auth-btn,
.nav-mobile-links .nav-mobile-auth-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-dark, #1e293b);
}

.nav-mobile-auth-btn:hover {
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
}

@media (max-width: 640px) {
  .auth-gate { padding: 1.5rem 1rem; }
  .auth-modal-header,
  .auth-modal-body { padding-left: 1.5rem; padding-right: 1.5rem; }
}
