/* ============================================
   SPACE THEME AUTHENTICATION PAGES
   Register & Login with Space Background
   ============================================ */

:root {
  --space-primary: #ce1126;
  --space-dark: #0a0e27;
  --space-darker: #050813;
  --space-star: #ffffff;
  --space-glow: rgba(206, 17, 38, 0.6);
}

/* ============================================
   SPACE BACKGROUND
   ============================================ */

.space-auth-container {
  min-height: 100vh;
  background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* Animated Stars */
.stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* Shooting Stars */
.shooting-star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: linear-gradient(90deg, #fff, transparent);
  animation: shoot 3s linear infinite;
}

@keyframes shoot {
  from {
    transform: translate(0, 0);
    opacity: 1;
  }
  to {
    transform: translate(-300px, 300px);
    opacity: 0;
  }
}

/* Floating Particles */
.space-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(206, 17, 38, 0.6);
  border-radius: 50%;
  animation: float-particle 6s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(206, 17, 38, 0.8);
}

@keyframes float-particle {
  0%, 100% {
    transform: translateY(0) translateX(0);
  }
  25% {
    transform: translateY(-30px) translateX(20px);
  }
  50% {
    transform: translateY(-60px) translateX(-20px);
  }
  75% {
    transform: translateY(-30px) translateX(20px);
  }
}

/* Planet Background */
.space-planet {
  position: absolute;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle at 30% 30%, rgba(206, 17, 38, 0.3), rgba(0, 0, 0, 0.5));
  border-radius: 50%;
  opacity: 0.3;
  filter: blur(2px);
  animation: rotate-planet 60s linear infinite;
}

@keyframes rotate-planet {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   AUTHENTICATION FORM
   ============================================ */

.space-auth-card {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(206, 17, 38, 0.3);
  border-radius: 25px;
  padding: 3rem;
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 10;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
              0 0 40px rgba(206, 17, 38, 0.2);
  animation: card-float 3s ease-in-out infinite;
}

@keyframes card-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.space-auth-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #ce1126, transparent, #ce1126);
  border-radius: 25px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s;
}

.space-auth-card:hover::before {
  opacity: 0.5;
  animation: rotate-border 3s linear infinite;
}

/* Logo/Brand */
.space-brand {
  text-align: center;
  margin-bottom: 2.5rem;
}

.space-brand-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, #ce1126, #000000);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: white;
  box-shadow: 0 10px 30px rgba(206, 17, 38, 0.4);
  animation: icon-glow 2s ease-in-out infinite;
}

@keyframes icon-glow {
  0%, 100% {
    box-shadow: 0 10px 30px rgba(206, 17, 38, 0.4),
                0 0 20px rgba(206, 17, 38, 0.3);
  }
  50% {
    box-shadow: 0 15px 40px rgba(206, 17, 38, 0.6),
                0 0 40px rgba(206, 17, 38, 0.5);
  }
}

.space-brand-title {
  font-size: 2rem;
  font-weight: 900;
  color: white;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 20px rgba(206, 17, 38, 0.5);
  animation: text-glow 2s ease-in-out infinite;
}

@keyframes text-glow {
  0%, 100% {
    text-shadow: 0 0 20px rgba(206, 17, 38, 0.5);
  }
  50% {
    text-shadow: 0 0 30px rgba(206, 17, 38, 0.8),
                 0 0 40px rgba(206, 17, 38, 0.6);
  }
}

.space-brand-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  animation: fade-in-up 1s ease-out 0.3s backwards;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Form Elements */
.space-form-group {
  margin-bottom: 1.5rem;
  animation: fade-in-up 1s ease-out backwards;
}

.space-form-group:nth-child(1) { animation-delay: 0.4s; }
.space-form-group:nth-child(2) { animation-delay: 0.5s; }
.space-form-group:nth-child(3) { animation-delay: 0.6s; }
.space-form-group:nth-child(4) { animation-delay: 0.7s; }

.space-label {
  display: block;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.space-label i {
  color: #ce1126;
  margin-left: 0.5rem;
}

.space-input {
  width: 100%;
  padding: 1rem 1.25rem;
  background: rgba(30, 41, 59, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  transition: all 0.3s;
  outline: none;
}

.space-input:focus {
  border-color: #ce1126;
  background: rgba(30, 41, 59, 0.8);
  box-shadow: 0 0 20px rgba(206, 17, 38, 0.3),
              inset 0 0 10px rgba(206, 17, 38, 0.1);
}

.space-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.space-select {
  width: 100%;
  padding: 1rem 1.25rem;
  background: rgba(30, 41, 59, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  transition: all 0.3s;
  outline: none;
  cursor: pointer;
}

.space-select:focus {
  border-color: #ce1126;
  background: rgba(30, 41, 59, 0.8);
  box-shadow: 0 0 20px rgba(206, 17, 38, 0.3);
}

.space-select option {
  background: #1e293b;
  color: white;
  padding: 10px;
}

/* Submit Button */
.space-btn {
  width: 100%;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #ce1126 0%, #000000 100%);
  border: 2px solid rgba(206, 17, 38, 0.5);
  border-radius: 12px;
  color: white;
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(206, 17, 38, 0.3);
  animation: fade-in-up 1s ease-out 0.8s backwards;
}

.space-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.space-btn:hover::before {
  width: 400px;
  height: 400px;
}

.space-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(206, 17, 38, 0.5),
              0 0 30px rgba(206, 17, 38, 0.4);
  border-color: rgba(206, 17, 38, 0.8);
}

.space-btn span {
  position: relative;
  z-index: 1;
}

/* Links */
.space-link {
  text-align: center;
  margin-top: 1.5rem;
  animation: fade-in-up 1s ease-out 0.9s backwards;
}

.space-link a {
  color: #ce1126;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  text-shadow: 0 0 10px rgba(206, 17, 38, 0.3);
}

.space-link a:hover {
  color: #ff3366;
  text-shadow: 0 0 20px rgba(206, 17, 38, 0.6);
}

/* Divider */
.space-divider {
  text-align: center;
  margin: 1.5rem 0;
  position: relative;
  animation: fade-in-up 1s ease-out 1s backwards;
}

.space-divider::before,
.space-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(206, 17, 38, 0.3), transparent);
}

.space-divider::before {
  right: 0;
}

.space-divider::after {
  left: 0;
}

.space-divider span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  padding: 0 1rem;
  background: rgba(15, 23, 42, 0.8);
}

/* Remember Me & Forgot Password */
.space-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  animation: fade-in-up 1s ease-out 0.8s backwards;
}

.space-checkbox {
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9375rem;
  cursor: pointer;
}

.space-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-left: 0.5rem;
  cursor: pointer;
  accent-color: #ce1126;
}

.space-forgot {
  color: #ce1126;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: all 0.3s;
}

.space-forgot:hover {
  color: #ff3366;
  text-shadow: 0 0 10px rgba(206, 17, 38, 0.5);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 576px) {
  .space-auth-card {
    padding: 2rem 1.5rem;
  }
  
  .space-brand-title {
    font-size: 1.5rem;
  }
  
  .space-brand-icon {
    width: 60px;
    height: 60px;
    font-size: 2rem;
  }
  
  .space-row {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}

/* ============================================
   ALERT MESSAGES
   ============================================ */

.space-alert {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slide-down 0.5s ease-out;
}

@keyframes slide-down {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.space-alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.space-alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 2px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.space-alert i {
  font-size: 1.25rem;
}

/* ============================================
   LOADING SPINNER
   ============================================ */

.space-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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