/* Modern Login Styles - login-styles.css */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter",
    sans-serif;
  background: var(--bg-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Animated background */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 20% 80%,
      var(--accent-primary-transparent) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(238, 0, 11, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(68, 68, 68, 0.1) 0%,
      transparent 50%
    );
  animation: backgroundShift 20s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes backgroundShift {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.1) rotate(2deg);
  }
}

/* Floating particles */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
      2px 2px at 20px 30px,
      rgba(238, 0, 11, 0.3),
      transparent
    ),
    radial-gradient(2px 2px at 40px 70px, rgba(238, 0, 11, 0.2), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.1), transparent),
    radial-gradient(
      1px 1px at 130px 80px,
      rgba(255, 255, 255, 0.05),
      transparent
    );
  background-repeat: repeat;
  background-size: 200px 100px;
  animation: particleFloat 15s linear infinite;
  pointer-events: none;
  z-index: -1;
  opacity: 0.6;
}

@keyframes particleFloat {
  0% {
    transform: translateY(0px);
  }
  100% {
    transform: translateY(-200px);
  }
}

.login-wrapper {
  position: relative;
  z-index: 1;
}

.login-card {
  background: var(--card-bg-trans);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 3rem 2.5rem;
  border-radius: 24px;
  border: 1px solid var(--card-border-light-trans);
  box-shadow: 0 25px 50px -12px var(--shadow-strong-color),
    0 0 60px rgba(238, 0, 11, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  width: 100%;
  max-width: 420px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-speed) ease;
}

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

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

.login-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 35px 70px -12px var(--shadow-strong-color),
    0 0 80px rgba(238, 0, 11, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.login-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
  position: relative;
}

.login-header .logo {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 4px 8px rgba(238, 0, 11, 0.3));
  animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
}

.login-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-heading);
  margin: 0;
  background: linear-gradient(
    135deg,
    var(--text-heading),
    var(--accent-primary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 10px rgba(238, 0, 11, 0.2);
}

.subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 0 0 2.5rem 0;
  font-weight: 400;
  line-height: 1.5;
  opacity: 0.9;
}

#google-signin-btn {
  cursor: pointer;
  background: white;
  color: #3c4043;
  border: 2px solid var(--border-primary);
  padding: 16px 28px;
  border-radius: 16px;
  font-size: 1.1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 25px -8px var(--shadow-strong-color),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

#google-signin-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

#google-signin-btn:hover::before {
  left: 100%;
}

#google-signin-btn:hover {
  background: #f8f9fa;
  border-color: var(--border-secondary);
  box-shadow: 0 12px 35px -8px var(--shadow-strong-color),
    0 0 30px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

#google-signin-btn:active {
  transform: translateY(-1px);
  background: #f1f3f4;
  box-shadow: 0 6px 20px -8px var(--shadow-strong-color),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

#google-signin-btn svg {
  position: relative;
  z-index: 1;
  transition: transform var(--transition-speed) ease;
}

#google-signin-btn:hover svg {
  transform: scale(1.1) rotate(5deg);
}

#google-signin-btn span {
  position: relative;
  z-index: 1;
}

#error-message {
  color: var(--accent-primary);
  margin-top: 2rem;
  font-weight: 600;
  min-height: 24px;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(238, 0, 11, 0.1);
  border: 1px solid rgba(238, 0, 11, 0.2);
  font-size: 0.95rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--transition-speed) ease;
}

#error-message:not(:empty) {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive design */
@media (max-width: 480px) {
  .login-card {
    margin: 1rem;
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }

  .login-header h1 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  #google-signin-btn {
    padding: 14px 24px;
    font-size: 1rem;
  }
}

/* Enhanced focus states for accessibility */
#google-signin-btn:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Loading state */
#google-signin-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

#google-signin-btn.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid #3c4043;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  right: 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
