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

:root {
  --gold-primary: #D4AF37;
  --gold-light: #F2D675;
  --gold-dark: #AA8C2C;
  --deep-purple: #000000; /* Changed from #2A1A47 to black */
  --light-cream: #FDF8E1;
  --charcoal: #333333;
}

.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  width: 100%; /* Ensure container takes full width */
  background-color: var(--deep-purple);
  background-image: url('../assets/cosmic-bg.jpg');
  background-size: cover;
  background-position: center;
  padding: 20px;
  font-family: 'Montserrat', sans-serif;
  position: relative;
  overflow: hidden;
}

.login-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(212, 175, 55, 0.15) 0%, rgba(0, 0, 0, 0.8) 70%); /* Changed purple gradient stop to black */
  z-index: 1;
}

/* Gold stars constellation pattern */
.login-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(242, 214, 117, 0.4) 1px, transparent 1px),
    radial-gradient(circle at 30% 50%, rgba(242, 214, 117, 0.3) 1px, transparent 1px),
    radial-gradient(circle at 50% 30%, rgba(242, 214, 117, 0.4) 1px, transparent 1px),
    radial-gradient(circle at 70% 70%, rgba(242, 214, 117, 0.3) 1px, transparent 1px),
    radial-gradient(circle at 90% 40%, rgba(242, 214, 117, 0.4) 1px, transparent 1px),
    radial-gradient(circle at 15% 80%, rgba(242, 214, 117, 0.3) 1px, transparent 1px),
    radial-gradient(circle at 40% 10%, rgba(242, 214, 117, 0.4) 1px, transparent 1px),
    radial-gradient(circle at 80% 15%, rgba(242, 214, 117, 0.3) 1px, transparent 1px);
  background-size: 150px 150px;
  opacity: 0.7;
  z-index: 1;
  animation: twinkle 4s infinite alternate;
}

@keyframes twinkle {
  0% {
    opacity: 0.5;
  }
  100% {
    opacity: 0.8;
  }
}

.login-card {
  position: relative;
  z-index: 2;
  background-color: rgba(253, 248, 225, 0.9);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 500px;
  box-shadow: 
    0 8px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(212, 175, 55, 0.2),
    0 0 20px rgba(212, 175, 55, 0.3);
  transition: all 0.3s ease;
  border: 1px solid var(--gold-primary);
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    transparent, 
    rgba(212, 175, 55, 0.05), 
    transparent, 
    transparent
  );
  animation: rotate 15s linear infinite;
  z-index: -1;
}

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

.logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  position: relative;
  padding: 15px;
  border-radius: 50%;
  background: radial-gradient(
    circle at center, 
    rgba(242, 214, 117, 0.2) 0%, 
    rgba(242, 214, 117, 0.1) 40%, 
    transparent 70%
  );
}

.logo-container::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 50%;
  animation: rotate 30s linear infinite;
  opacity: 0.6;
}

.logo {
  width: 180px;
  height: auto;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.5));
  animation: pulse-subtle 3s infinite alternate ease-in-out;
  position: relative;
  z-index: 1;
}

@keyframes pulse-subtle {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.3));
  }
  100% {
    transform: scale(1.02);
    filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.7));
  }
}

.logo-container::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
  animation: halo-pulse 4s infinite alternate ease-in-out;
}

@keyframes halo-pulse {
  0% {
    opacity: 0.5;
    width: 150px;
    height: 150px;
  }
  100% {
    opacity: 0.8;
    width: 180px;
    height: 180px;
  }
}

.login-title {
  color: var(--deep-purple);
  font-size: 32px;
  margin: 0 0 16px 0;
  text-align: center;
  font-weight: bold;
  font-family: 'Cinzel', serif;
  letter-spacing: 1px;
  text-shadow: 0 1px 2px rgba(212, 175, 55, 0.3);
}

.cosmic-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px 0;
}

.line-element {
  height: 1px;
  width: 80px;
  background: linear-gradient(to right, transparent, var(--gold-primary), transparent);
  margin: 0 10px;
}

.star-element {
  width: 12px;
  height: 12px;
  position: relative;
  display: inline-block;
}

.star-element::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--gold-primary);
  clip-path: polygon(
    50% 0%, 
    61% 35%, 
    98% 35%, 
    68% 57%, 
    79% 91%, 
    50% 70%, 
    21% 91%, 
    32% 57%, 
    2% 35%, 
    39% 35%
  );
  animation: twinkle-star 3s infinite alternate;
}

@keyframes twinkle-star {
  0% {
    opacity: 0.7;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1.1);
  }
}

.login-subtitle {
  color: var(--charcoal);
  text-align: center;
  margin-bottom: 32px;
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.3px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
  position: relative;
}

.form-group label {
  font-size: 14px;
  color: #666;
  font-weight: 500;
  margin-left: 4px;
}

.form-group input {
  padding: 16px;
  border: 1px solid rgba(212, 175, 55, 0.3); /* Changed purple border to gold */
  border-radius: 10px;
  font-size: 16px;
  transition: all 0.3s ease;
  background-color: rgba(255, 255, 255, 0.8);
}

.form-group input {
  padding: 16px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 10px;
  font-size: 16px;
  transition: all 0.3s ease;
  background-color: rgba(255, 255, 255, 0.8);
}

.form-group input:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.login-button {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 50%, var(--gold-dark) 100%);
  color: var(--deep-purple);
  border: none;
  border-radius: 50px;
  padding: 16px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 30px;
  transition: all 0.3s ease;
  box-shadow: 
    0 4px 15px rgba(170, 140, 44, 0.4),
    0 0 0 1px rgba(212, 175, 55, 0.3) inset;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.8px;
  font-family: 'Cinzel', serif;
}

.login-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: all 0.5s ease;
}

.login-button::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 20px rgba(212, 175, 55, 0.5),
    0 0 0 1px rgba(212, 175, 55, 0.3) inset;
}

.login-button:hover::before {
  left: 100%;
}

.login-button:hover::after {
  opacity: 1;
}

.login-button:active {
  transform: translateY(0);
}

.login-button:disabled {
  background: linear-gradient(135deg, #E0D5B1 0%, #BBAA6C 100%);
  cursor: not-allowed;
  box-shadow: none;
  color: rgba(42, 26, 71, 0.5);
}

/* Spiritual particles on button hover */
.login-button .button-particle {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0;
  transition: all 0.5s ease;
}

.login-button:hover .button-particle:nth-child(1) {
  width: 8px;
  height: 8px;
  top: 20%;
  left: 10%;
  animation: float-up 1.5s infinite ease-out;
  opacity: 0.6;
}

.login-button:hover .button-particle:nth-child(2) {
  width: 6px;
  height: 6px;
  top: 40%;
  left: 80%;
  animation: float-up 2s infinite ease-out;
  animation-delay: 0.3s;
  opacity: 0.4;
}

.login-button:hover .button-particle:nth-child(3) {
  width: 10px;
  height: 10px;
  top: 30%;
  left: 50%;
  animation: float-up 1.8s infinite ease-out;
  animation-delay: 0.6s;
  opacity: 0.5;
}

@keyframes float-up {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-20px);
    opacity: 0;
  }
}

.error-message {
  background-color: rgba(253, 248, 225, 0.85);
  color: var(--deep-purple);
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  text-align: center;
  font-size: 14px;
  border: 1px solid var(--gold-primary);
  backdrop-filter: blur(5px);
  position: relative;
  overflow: hidden;
  animation: breathe 6s infinite ease-in-out;
}

@keyframes breathe {
  0%, 100% {
    box-shadow: 0 0 8px 1px rgba(212, 175, 55, 0.3);
  }
  50% {
    box-shadow: 0 0 12px 3px rgba(212, 175, 55, 0.4);
  }
}

.error-message::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
  animation: pulse-breathe 6s infinite ease-in-out;
  opacity: 0.6;
  pointer-events: none;
}

@keyframes pulse-breathe {
  0%, 100% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.6;
  }
}

.register-link {
  text-align: center;
  margin-top: 30px;
  color: #666;
  font-size: 16px;
  position: relative;
}

.register-link::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 25%;
  right: 25%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(212, 175, 55, 0.3), transparent); /* Changed purple gradient to gold */
}

.register-link::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 25%;
  right: 25%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(212, 175, 55, 0.5), transparent);
}

.register-link-text {
  color: var(--gold-dark);
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.register-link-text:hover {
  color: var(--gold-primary);
}

.register-link-text::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--gold-primary);
  transition: width 0.3s ease;
}

.register-link-text:hover::after {
  width: 100%;
}

/* Responsive adjustments */
@media (max-width: 520px) {
  .login-card {
    padding: 30px 20px;
  }
  
  .logo {
    width: 140px;
  }
  
  .login-title {
    font-size: 28px;
  }
  
  .login-subtitle {
    font-size: 16px;
  }
}
