/* ========================================
   SamurAI Studios - Authentication Pages
   Cinematic Dark Theme
   ======================================== */

/* Auth Page Layout */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

/* Background Decoration */
.auth-bg-decoration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.bg-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.03;
}

.bg-circle-1 {
  width: 800px;
  height: 800px;
  top: -400px;
  right: -200px;
  background: radial-gradient(circle, var(--accent-gold) 0%, transparent 70%);
}

.bg-circle-2 {
  width: 600px;
  height: 600px;
  bottom: -300px;
  left: -200px;
  background: radial-gradient(circle, var(--accent-amber) 0%, transparent 70%);
}

.bg-line {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-gold-dim), transparent);
  opacity: 0.1;
}

.bg-line-1 {
  width: 60%;
  top: 30%;
  left: 20%;
  transform: rotate(-15deg);
}

.bg-line-2 {
  width: 40%;
  bottom: 25%;
  right: 10%;
  transform: rotate(10deg);
}

/* Auth Container */
.auth-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: var(--space-lg);
}

/* Auth Card */
.auth-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  animation: cardIn 0.5s ease;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Logo */
.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

/* Auth Title */
.auth-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: var(--space-sm);
}

.auth-subtitle {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: var(--space-xl);
}

/* Error Message */
.auth-error {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  color: var(--error-red);
  font-size: 0.875rem;
  text-align: center;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* Form Styles */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group label .optional {
  font-weight: 400;
  color: var(--text-muted);
}

.form-group input {
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  color: var(--text-primary);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--accent-gold-glow);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Auth Buttons */
.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-normal), background var(--transition-normal);
  text-decoration: none;
}

.auth-btn:hover {
  transform: translateY(-2px);
}

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

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

.auth-btn-primary {
  color: var(--bg-primary);
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-amber) 100%);
}

.auth-btn-primary:hover {
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.3);
}

/* OAuth Buttons */
.oauth-buttons {
  display: flex;
  gap: var(--space-md);
}

.auth-btn-oauth {
  flex: 1;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-accent);
  color: var(--text-primary);
}

.auth-btn-oauth:hover {
  background: var(--bg-elevated);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.oauth-icon {
  width: 20px;
  height: 20px;
}

.auth-btn-google .oauth-icon {
  color: #fff;
}

.auth-btn-github .oauth-icon {
  color: #fff;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-xl) 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.auth-divider span {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Footer Link */
.auth-footer {
  margin-top: var(--space-xl);
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
}

.auth-footer a {
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-normal);
}

.auth-footer a:hover {
  color: var(--accent-amber);
  text-decoration: underline;
}

/* Small Spinner */
.spinner-small {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 0, 0, 0.3);
  border-top-color: var(--bg-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Responsive */
@media (max-width: 480px) {
  .auth-card {
    padding: var(--space-xl);
  }

  .auth-title {
    font-size: 1.5rem;
  }

  .oauth-buttons {
    flex-direction: column;
  }
}

