@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* Reset and Global Tokens */
:root {
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* HSL Color Palette */
  --bg-primary: hsl(230, 25%, 8%);
  --bg-secondary: hsl(230, 25%, 12%);
  --bg-card: hsla(230, 25%, 14%, 0.6);
  --border-color: hsla(230, 100%, 80%, 0.08);
  --border-focus: hsla(215, 100%, 60%, 0.4);
  
  --text-primary: hsl(0, 0%, 96%);
  --text-secondary: hsl(230, 15%, 70%);
  --text-muted: hsl(230, 12%, 50%);
  
  /* Brand/Accent Glows */
  --accent-color: hsl(217, 100%, 61%);
  --accent-gradient: linear-gradient(135deg, hsl(210, 100%, 55%) 0%, hsl(270, 90%, 60%) 100%);
  --accent-glow: hsla(217, 100%, 61%, 0.3);
  
  /* Alert/Status Indicators */
  --success: hsl(142, 70%, 45%);
  --error: hsl(350, 80%, 55%);
  --warning: hsl(38, 90%, 50%);
  --info: hsl(200, 80%, 50%);
  
  /* Global border-radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Background animated blur spheres */
body::before, body::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.35;
  pointer-events: none;
}

body::before {
  top: 15%;
  left: 10%;
  background: var(--accent-gradient);
  animation: float-slow 18s infinite alternate;
}

body::after {
  bottom: 15%;
  right: 10%;
  background: hsl(270, 90%, 60%);
  animation: float-slow 18s infinite alternate-reverse;
}

@keyframes float-slow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(35px, 35px) scale(1.15); }
}

#app {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* Standard reusable card styling */
.auth-container {
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.auth-header {
  text-align: center;
  margin-bottom: 25px;
}

.auth-header h1 {
  font-size: 2.1rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Shared Form Elements */
.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background-color: hsla(230, 25%, 6%, 0.45);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-smooth);
}

.form-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background-color: hsla(230, 25%, 4%, 0.65);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

/* Shared Buttons system */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 12px 24px;
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

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

.btn-secondary {
  background-color: hsla(230, 25%, 20%, 0.45);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background-color: hsla(230, 25%, 25%, 0.65);
}

.btn-danger {
  background-color: var(--error);
  color: white;
}

.btn-danger:hover {
  background-color: hsl(350, 80%, 45%);
}

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

.auth-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  font-size: 0.85rem;
}

.auth-link {
  color: var(--accent-color);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.auth-link:hover {
  text-decoration: underline;
}

/* Page Loading Overlay */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(14, 16, 27, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.spinner {
  width: 38px;
  height: 38px;
  border: 3px solid hsla(230, 100%, 80%, 0.06);
  border-radius: 50%;
  border-top-color: var(--accent-color);
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}

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

.loading-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Responsive Media Queries */
@media (max-width: 480px) {
  #app {
    padding: 10px;
  }

  .auth-container {
    padding: 24px 20px;
    border-radius: var(--radius-md);
  }

  .auth-header {
    margin-bottom: 18px;
  }

  .auth-header h1 {
    font-size: 1.75rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

