/* Auth Backdrop */
.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: fadeIn 0.2s forwards;
  padding: 16px;
}
.auth-modal-backdrop.closing {
  animation: fadeOut 0.2s forwards;
}

/* Auth Modal Card */
.auth-modal {
  width: 100%;
  max-width: 420px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: translateY(20px);
  opacity: 0;
  animation: slideUpFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.auth-modal-backdrop.closing .auth-modal {
  animation: slideDownFadeOut 0.2s forwards;
}

/* Modal Close Button */
.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}
.auth-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Header */
.auth-modal-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.auth-logo {
  display: block;
  width: 96px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 8px;
}
.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.auth-subtitle {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

/* Tabs */
.auth-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}
.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  padding: 8px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.auth-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Forms */
.auth-form {
  display: none;
  flex-direction: column;
  gap: 16px;
}
.auth-form.active {
  display: flex;
  animation: fadeIn 0.3s;
}

/* Fields */
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  font-weight: 600;
}
.auth-input {
  background: #1f2937;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 16px;
  color: #f9fafb;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: all 0.2s;
  outline: none;
}
.auth-input:focus {
  border-color: #2563eb;
  background: #1f2937;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.auth-input::placeholder {
  color: #64748b;
}

/* Error */
.auth-error {
  display: none;
  background: rgba(239, 68, 68, 0.1);
  border-left: 3px solid #ef4444;
  padding: 10px 14px;
  border-radius: 8px;
  color: #f87171;
  font-size: 0.85rem;
  line-height: 1.4;
}
.auth-error.visible {
  display: block;
  animation: slideDownFadeIn 0.2s;
}

/* Submit Button */
.auth-submit-btn {
  width: 100%;
  background: #2563eb;
  color: white;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.auth-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #1d4ed8;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.24);
}
.auth-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.auth-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: none;
}
.auth-submit-btn.loading .auth-spinner {
  display: block;
}
.auth-submit-btn.loading span {
  opacity: 0.8;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.85rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

/* Google Button */
.auth-google-btn {
  width: 100%;
  background: #f8fafc;
  color: #0f172a;
  border: none;
  padding: 12px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.auth-google-btn:hover {
  background: #e2e8f0;
}
.auth-google-btn svg {
  width: 20px;
  height: 20px;
}

/* User Badge */
.auth-user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 10px 4px 4px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
}
.auth-user-badge:hover {
  background: rgba(255, 255, 255, 0.1);
}
.auth-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
}
.auth-user-name {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  max-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Profile Modal Specifics */
.profile-modal {
  width: 100%;
  max-width: 360px;
}
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-top: 10px;
}
.profile-avatar-large {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.24);
}
.profile-email-display {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  margin-top: 4px;
}
.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 12px;
  border-radius: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.4);
}
.btn-danger {
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.5);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes slideUpFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideDownFadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(20px); }
}
@keyframes slideDownFadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
