/* Auth pages: login, signup – black theme to match sidebar/top nav */
.login-page,
.signup-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #0f172a;
  font-family: var(--font-sans);
}

/* Login page: video background (loop, mute) */
.login-page {
  position: relative;
}

.login-bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

.login-bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.75);
  z-index: 1;
  pointer-events: none;
}

.login-page .auth-nav,
.login-page .auth-main {
  position: relative;
  z-index: 2;
}

/* Signup page: video background (loop, mute) */
.signup-page {
  position: relative;
}

.signup-bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

.signup-bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.75);
  z-index: 1;
  pointer-events: none;
}

.signup-page .auth-nav,
.signup-page .auth-main {
  position: relative;
  z-index: 2;
}

/* Login and Signup: falling-from-top animation */
@keyframes auth-fall {
  0% {
    opacity: 0;
    transform: translateY(-50px);
  }
  70% {
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-page .auth-nav,
.signup-page .auth-nav {
  animation: auth-fall 0.55s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
  opacity: 0;
}

.login-page .auth-main .auth-card,
.signup-page .auth-main .auth-card {
  animation: auth-fall 0.6s cubic-bezier(0.34, 1.2, 0.64, 1) 0.12s forwards;
  opacity: 0;
}

/* Floating animation for logo (runs after fall) */
@keyframes auth-logo-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.login-page .auth-card .auth-card-logo,
.signup-page .auth-card .auth-card-logo {
  animation: auth-fall 0.5s cubic-bezier(0.34, 1.2, 0.64, 1) 0.25s forwards,
             auth-logo-float 2.5s ease-in-out 0.8s infinite;
  opacity: 0;
}

.login-page .auth-card h1,
.signup-page .auth-card h1 {
  animation: auth-fall 0.5s cubic-bezier(0.34, 1.2, 0.64, 1) 0.32s forwards;
  opacity: 0;
}

.login-page .auth-card-subtitle,
.signup-page .auth-card-subtitle {
  animation: auth-fall 0.5s cubic-bezier(0.34, 1.2, 0.64, 1) 0.38s forwards;
  opacity: 0;
}

.login-page .auth-card .form-group,
.signup-page .auth-card .form-group {
  animation: auth-fall 0.5s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
  opacity: 0;
}

.login-page .auth-card .form-group:nth-child(1) { animation-delay: 0.45s; }
.login-page .auth-card .form-group:nth-child(2) { animation-delay: 0.52s; }
.login-page .auth-card .form-group:nth-child(3) { animation-delay: 0.59s; }

.signup-page .auth-card .form-group:nth-child(1) { animation-delay: 0.45s; }
.signup-page .auth-card .form-group:nth-child(2) { animation-delay: 0.52s; }
.signup-page .auth-card .form-group:nth-child(3) { animation-delay: 0.59s; }
.signup-page .auth-card .form-group:nth-child(4) { animation-delay: 0.66s; }

.login-page .auth-card .btn-primary {
  animation: auth-fall 0.5s cubic-bezier(0.34, 1.2, 0.64, 1) 0.66s forwards;
  opacity: 0;
}

.signup-page .auth-card .btn-primary {
  animation: auth-fall 0.5s cubic-bezier(0.34, 1.2, 0.64, 1) 0.73s forwards;
  opacity: 0;
}

.login-page .auth-card .auth-footer {
  animation: auth-fall 0.5s cubic-bezier(0.34, 1.2, 0.64, 1) 0.72s forwards;
  opacity: 0;
}

.signup-page .auth-card .auth-footer {
  animation: auth-fall 0.5s cubic-bezier(0.34, 1.2, 0.64, 1) 0.8s forwards;
  opacity: 0;
}

.login-page .auth-nav,
.signup-page .auth-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: #0f172a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.login-page .auth-nav-brand,
.signup-page .auth-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.375rem;
  color: #f1f5f9;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.login-page .auth-nav-brand:hover,
.signup-page .auth-nav-brand:hover {
  color: #fff;
  text-decoration: none;
}

.login-page .auth-nav-logo,
.signup-page .auth-nav-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.login-page .auth-nav-links,
.signup-page .auth-nav-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.login-page .auth-nav-links a,
.signup-page .auth-nav-links a {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.9375rem;
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.login-page .auth-nav-links a:hover,
.signup-page .auth-nav-links a:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
}

.login-page .auth-nav-links .btn-signup,
.signup-page .auth-nav-links .btn-signup {
  padding: 0.5rem 1.25rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-md);
}

.login-page .auth-nav-links .btn-signup:hover,
.signup-page .auth-nav-links .btn-signup:hover {
  background: var(--color-primary-dark);
  color: #fff;
}

.login-page .auth-main,
.signup-page .auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.login-page .auth-card,
.signup-page .auth-card {
  width: 100%;
  max-width: 420px;
  background: #1e293b;
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  padding: 2.5rem;
}

.login-page .auth-card-logo,
.signup-page .auth-card-logo {
  width: 112px;
  height: 112px;
  object-fit: contain;
  margin: 0 auto 1.75rem;
  display: block;
}

.login-page .auth-card h1,
.signup-page .auth-card h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #f1f5f9;
  text-align: center;
  margin: 0 0 0.25rem;
  letter-spacing: -0.025em;
}

.login-page .auth-card-subtitle,
.signup-page .auth-card-subtitle {
  font-size: 0.9375rem;
  color: #94a3b8;
  text-align: center;
  margin: 0 0 1.75rem;
}

.login-page .auth-card .form-group,
.signup-page .auth-card .form-group {
  margin-bottom: 1.25rem;
}

.login-page .auth-card .form-label,
.signup-page .auth-card .form-label {
  display: block;
  margin-bottom: 0.375rem;
  font-weight: 500;
  font-size: 0.875rem;
  color: #e2e8f0;
}

.login-page .auth-card .form-control,
.signup-page .auth-card .form-control {
  width: 100%;
  min-height: 48px;
  padding: 0 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  background: #334155;
  color: #f1f5f9;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-page .auth-card .form-control::placeholder,
.signup-page .auth-card .form-control::placeholder {
  color: #64748b;
}

.login-page .auth-card .form-control:hover,
.signup-page .auth-card .form-control:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.login-page .auth-card .form-control:focus,
.signup-page .auth-card .form-control:focus {
  outline: none;
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.login-page .auth-card .form-error,
.signup-page .auth-card .form-error {
  color: #fca5a5;
  font-size: 0.8125rem;
  margin-top: 0.375rem;
  display: block;
}

.login-page .auth-card .btn-primary,
.signup-page .auth-card .btn-primary {
  width: 100%;
  min-height: 48px;
  margin-top: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  border: none;
  background: var(--color-primary-gradient);
  color: #fff;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.4);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.login-page .auth-card .btn-primary:hover,
.signup-page .auth-card .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.5);
}

.login-page .auth-divider,
.signup-page .auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.login-page .auth-divider::before,
.login-page .auth-divider::after,
.signup-page .auth-divider::before,
.signup-page .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.login-page .auth-divider span,
.signup-page .auth-divider span {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #94a3b8;
}

.login-page .auth-card .btn-google,
.signup-page .auth-card .btn-google {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #e2e8f0;
  background: #334155;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.login-page .auth-card .btn-google:hover,
.signup-page .auth-card .btn-google:hover {
  background: #475569;
  border-color: rgba(255, 255, 255, 0.2);
}

.login-page .auth-footer,
.signup-page .auth-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.9375rem;
  color: #94a3b8;
}

.login-page .auth-footer a,
.signup-page .auth-footer a {
  font-weight: 600;
  color: #38bdf8;
  text-decoration: none;
}

.login-page .auth-footer a:hover,
.signup-page .auth-footer a:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

@media (max-width: 480px) {
  .login-page .auth-card,
  .signup-page .auth-card {
    padding: 1.75rem;
  }
  .login-page .auth-card h1,
  .signup-page .auth-card h1 {
    font-size: 1.5rem;
  }
}
