/* ==========================================================================
   SPORTXAPI AUTH DESIGN SYSTEM
   Ultra-Clean, Precision-Spaced & Centered Authentication Canvas
   ========================================================================== */

:root {
  --bg-color: #FEFDFB;
  --foreground: #060606;
  --foreground-muted: #6B5A50;
  --card-bg: transparent;
  
  /* Primary Button (Google) */
  --btn-primary-bg: #060606;
  --btn-primary-text: #FCFCFC;
  --btn-primary-hover: #222222;

  /* Secondary Button (GitHub & Microsoft) */
  --btn-secondary-bg: #F9F6F3;
  --btn-secondary-text: #060606;
  --btn-secondary-hover: #EFE9E3;
  --btn-secondary-border: rgba(0, 0, 0, 0.04);

  /* Focus & Accents */
  --ring-focus: rgba(6, 6, 6, 0.14);
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Page Shell — Precision Optical Centering */
.auth-wrapper {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 40px 24px 28px;
}

.auth-top-spacer {
  height: 1px;
  width: 100%;
  visibility: hidden;
  pointer-events: none;
}

/* Centered Form Card */
.auth-container {
  width: 100%;
  max-width: 380px;
  margin: auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.auth-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Brand Logo */
.logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.sxa-logo {
  height: 32px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sxa-logo:hover {
  transform: scale(1.03);
}

/* Typography Header */
.auth-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  text-align: center;
}

.auth-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.4px;
  line-height: 1.25;
  color: var(--foreground);
  margin: 0;
}

.auth-subtitle {
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--foreground-muted);
  max-width: 360px;
  margin: 0 auto;
  text-align: center;
}

/* Button Container */
.auth-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

/* Universal Button Style */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  width: 100%;
  padding: 0 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.1px;
  line-height: 1;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  outline: none;
  transition: background-color 0.18s ease, transform 0.1s ease, box-shadow 0.18s ease;
}

.btn:active {
  transform: scale(0.99);
}

.btn:focus-visible {
  box-shadow: 0 0 0 3px var(--ring-focus);
}

/* Primary Google Pill */
.btn-google {
  background-color: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  gap: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.btn-google:hover {
  background-color: var(--btn-primary-hover);
}

/* 2-Column Grid (GitHub & Microsoft) */
.btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.btn-secondary {
  background-color: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  border: 1px solid var(--btn-secondary-border);
  gap: 8px;
}

.btn-secondary:hover {
  background-color: var(--btn-secondary-hover);
}

.icon {
  flex-shrink: 0;
  display: block;
}

/* Legal Notice Footer */
.auth-footer {
  width: 100%;
  max-width: 480px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--foreground-muted);
  text-align: center;
  padding-top: 24px;
  padding-bottom: 8px;
}

.auth-footer a {
  color: var(--foreground-muted);
  text-decoration: underline;
  text-underline-offset: 2.5px;
  transition: color 0.16s ease;
}

.auth-footer a:hover {
  color: var(--foreground);
}

/* Entrance Animation */
.fade-in {
  animation: authFadeIn 0.22s ease-out forwards;
}

@keyframes authFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .auth-wrapper {
    padding: 32px 16px 20px;
  }
  .auth-title {
    font-size: 24px;
  }
  .auth-subtitle {
    font-size: 14px;
    max-width: 300px;
  }
  .btn {
    height: 46px;
  }
  .auth-footer {
    font-size: 11.5px;
  }
}


/* Interactive Loading & Auth States */
.btn.is-loading {
  pointer-events: none;
  opacity: 0.88;
  cursor: wait;
}

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

.spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}
