/* Auth Modal Styles (shared across pages) */

.auth-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.auth-modal.active {
  display: flex;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
}

.auth-modal-content {
  position: relative;
  z-index: 10000;
  width: 100%;
  max-width: 420px;
  background: rgba(31, 41, 55, 0.95);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 100px rgba(147, 51, 234, 0.3);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(147, 51, 234, 0.2);
  animation: modalSlideIn 0.3s ease-out;
}

.auth-modal-small {
  max-width: 380px;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.auth-modal-header h2,
.auth-modal-header h3 {
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  margin: 0 0 0.25rem 0;
}

.auth-modal-header p {
  font-size: 0.875rem;
  color: #9ca3af;
  margin: 0;
}

.auth-close-btn {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.auth-close-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.auth-tabs {
  display: flex;
  gap: 0.25rem;
  background: rgba(55, 65, 81, 0.5);
  padding: 0.25rem;
  border-radius: 0.5rem;
  margin-bottom: 1.25rem;
}

.auth-tab {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #9ca3af;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab:hover {
  color: white;
}

.auth-tab.active {
  background: #9333ea;
  color: white;
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.4);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-message {
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.auth-error {
  background: rgba(220, 38, 38, 0.2);
  border: 1px solid #dc2626;
  color: #fca5a5;
}

.auth-success {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid #22c55e;
  color: #86efac;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #d1d5db;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-field input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid #4b5563;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: white;
  background: #374151;
  transition: all 0.2s;
}

.auth-field input:focus {
  outline: none;
  border-color: #9333ea;
  box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.2);
}

.auth-field input::placeholder {
  color: #6b7280;
}

.auth-forgot-btn {
  align-self: flex-start;
  background: none;
  border: none;
  color: #a78bfa;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
  margin-top: -0.25rem;
  transition: color 0.2s;
}

.auth-forgot-btn:hover {
  color: #c4b5fd;
}

.auth-submit-btn {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  background: #9333ea;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
  margin-top: 0.5rem;
}

.auth-submit-btn:hover {
  background: #7e22ce;
  box-shadow: 0 6px 16px rgba(147, 51, 234, 0.4);
  transform: translateY(-1px);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

.auth-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.auth-submit-btn.loading {
  position: relative;
  color: transparent;
}

.auth-submit-btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid white;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-signup-info {
  text-align: center;
  padding-top: 0.5rem;
}

.auth-signup-info p {
  font-size: 0.75rem;
  color: white;
  font-style: italic;
  margin: 0;
}

.auth-vip-info {
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.auth-vip-info p {
  font-size: 0.75rem;
  color: #fde68a;
  margin: 0;
  line-height: 1.5;
}

.auth-vip-info a {
  color: #c084fc;
  text-decoration: underline;
  transition: color 0.2s;
}

.auth-vip-info a:hover {
  color: #d8b4fe;
}

.auth-reset-description {
  font-size: 0.875rem;
  color: #d1d5db;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.auth-reset-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.auth-cancel-btn {
  flex: 1;
  padding: 0.625rem 0.75rem;
  border: 1px solid #4b5563;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #d1d5db;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-cancel-btn:hover {
  color: white;
  border-color: #6b7280;
}

.auth-cancel-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .auth-modal-content {
    padding: 1.25rem;
  }

  .auth-modal-header h2,
  .auth-modal-header h3 {
    font-size: 1.5rem;
  }

  .auth-reset-actions {
    flex-direction: column;
  }

  .auth-cancel-btn,
  .auth-submit-btn {
    width: 100%;
  }
}
