/* Right-side 3D TV hero on the login page.
   Absolutely positioned so the existing login form (col-md-5) is untouched. */
.login-hero {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 41.666667%; /* matches .left-side col-md-5 width */
  overflow: hidden;
  background: transparent; /* show the page backdrop (blue + circle.png) through the canvas */
  z-index: 1;
}

#login-hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#login-hero-canvas canvas {
  display: block;
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* Hide the scene + project buttons until the model and screen are ready. */
.login-hero.is-loading #login-hero-canvas canvas,
.login-hero.is-loading .hero-projects {
  opacity: 0;
  pointer-events: none;
}

.login-hero:not(.is-loading) #login-hero-canvas canvas {
  opacity: 1;
}

/* Centered loading spinner, shown while the scene is being prepared. */
.login-hero-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.login-hero:not(.is-loading) .login-hero-loader {
  opacity: 0;
  pointer-events: none;
}

.login-hero-spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  animation: login-hero-spin 0.8s linear infinite;
}

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

/* Project switch buttons, overlaid at the bottom of the hero. */
.hero-projects {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2.5rem;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0 1rem;
  list-style: none;
}

.hero-project {
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.5rem 1rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 2rem;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.hero-project:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.hero-project.active {
  color: #2e63fd;
  background: #fff;
  border-color: #fff;
}

/* On smaller screens the form goes full width; hide the 3D hero there. */
@media (max-width: 991.98px) {
  .login-hero {
    display: none;
  }
}
