:root {
  --primary-color: #ff007f;
  --secondary-color: #ff8fa3;
  --accent-color: #a044ff;
  --text-color: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --input-bg: rgba(0, 0, 0, 0.2);
  --error-color: #ff7675;
  --success-color: #55efc4;
}

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

body {
  font-family: 'Poppins', sans-serif;
  background: #240b36;
  background: linear-gradient(45deg, #c31432, #240b36, #4a00e0);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--text-color);
  overflow: hidden;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Floating shapes for atmosphere */
body::before, body::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  opacity: 0.6;
  animation: float 10s infinite alternate;
}

body::before {
  background: var(--primary-color);
  top: -50px;
  left: -50px;
}

body::after {
  background: var(--accent-color);
  bottom: -50px;
  right: -50px;
  animation-delay: -5s;
}

@keyframes float {
  0% { transform: translate(0, 0); }
  100% { transform: translate(30px, 30px); }
}

.login-container {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 50px 40px;
  width: 100%;
  max-width: 440px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 1;
  transform: translateY(0);
  animation: cardEntrance 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.logo {
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.app-logo {
  height: 70px;
  width: auto;
  filter: drop-shadow(0 0 15px rgba(108, 92, 231, 0.5));
  transition: transform 0.3s ease;
}

.app-logo:hover {
  transform: scale(1.05) rotate(2deg);
}

h2 {
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 25px;
  position: relative;
  text-align: left;
}

.form-group label {
  position: absolute;
  left: 20px;
  top: 16px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  pointer-events: none;
  transition: all 0.3s ease;
  background: transparent;
  padding: 0 5px;
}

.form-group input {
  width: 100%;
  padding: 16px 20px;
  background: var(--input-bg);
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--text-color);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  outline: none;
}

.form-group input:focus,
.form-group input:not(:placeholder-shown) {
  background: rgba(0, 0, 0, 0.4);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}

.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label {
  top: -10px;
  left: 15px;
  font-size: 0.75rem;
  color: var(--primary-color);
  background: #201c3d; /* Fallback matching bg color mostly */
  background: linear-gradient(to bottom, transparent 50%, #201c3d 50%); /* Hacky fix for label bg if needed, or just keep transparent */
  background: #24243e; /* Solid bg to hide line */
  border-radius: 4px;
}

/* Hide default placeholder to use floating label correctly */
.form-group input::placeholder {
  color: transparent;
}

.login-button {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
  position: relative;
  overflow: hidden;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(108, 92, 231, 0.4);
}

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

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

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

/* Status States */
.login-button.success {
  background: var(--success-color);
  box-shadow: 0 10px 20px rgba(85, 239, 196, 0.3);
}

.login-button.error {
  background: var(--error-color);
  box-shadow: 0 10px 20px rgba(255, 118, 117, 0.3);
}

.message {
  margin-top: 20px;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  display: none;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.message.error {
  background: rgba(255, 118, 117, 0.1);
  color: var(--error-color);
  border: 1px solid rgba(255, 118, 117, 0.2);
}

.message.success {
  background: rgba(85, 239, 196, 0.1);
  color: var(--success-color);
  border: 1px solid rgba(85, 239, 196, 0.2);
}

.footer-info {
  position: absolute;
  bottom: 25px;
  width: auto;
  min-width: 300px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  justify-content: center;
  gap: 20px;
  z-index: 10;
  padding: 10px 25px;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.footer-info:hover {
  background: rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.1);
}

.footer-info span {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.footer-info span:not(:last-child)::after {
  content: '•';
  position: absolute;
  right: -12px;
  color: var(--glass-border);
}

/* SSO Button specific styles */
#ssoContainer {
  margin-bottom: 25px;
}

#ssoContainer .login-button {
  background: linear-gradient(135deg, #0984e3, #74b9ff);
  box-shadow: 0 10px 20px rgba(9, 132, 227, 0.3);
}

/* Responsive */
@media (max-width: 480px) {
  .login-container {
    padding: 30px 20px;
  }
  
  .app-logo {
    height: 50px;
  }
  
  .footer-info {
    flex-direction: column;
    gap: 5px;
  }
  
  .footer-info span:not(:last-child)::after {
    display: none;
  }
}
