/* Auth Scene & 3D Environment */
#auth-view {
  padding: 0;
  display: none;
  background: #0f172a;
  /* Fallback */
  background: radial-gradient(circle at center, #1e1b4b 0%, #050b14 100%);
}

#auth-view.active {
  display: block;
}

.auth-scene {
  perspective: 1500px;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.scene-world {
  width: 100vw;
  height: 100vh;
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  /* Pre-welcome state: lying down */
  transform: rotateX(55deg) rotateZ(-35deg) scale(0.9);
  /* Animation to stand up */
  animation: sceneStandUp 3.5s 1.5s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes sceneStandUp {
  0% {
    transform: rotateX(55deg) rotateZ(-35deg) scale(0.9);
  }

  100% {
    transform: rotateX(0deg) rotateZ(0deg) scale(1);
  }
}

.ground-surface {
  position: absolute;
  width: 300vw;
  height: 300vh;
  background: repeating-linear-gradient(rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 60px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 60px);
  transform: translateZ(-100px);
  pointer-events: none;
  opacity: 0.6;
}

/* Floating Elements Container */
.auth-3d-wrapper {
  position: relative;
  z-index: 10;
  transform-style: preserve-3d;
  transform: translateZ(50px);
  animation: floatBox 6s ease-in-out infinite;
}

@keyframes floatBox {

  0%,
  100% {
    transform: translateZ(50px) translateY(0);
  }

  50% {
    transform: translateZ(50px) translateY(-15px);
  }
}

/* Premium Glassmorphic Login Box */
.premium-glass {
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 24px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  padding: 48px;
  width: 440px;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.premium-glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 24px;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
  z-index: -1;
}

.premium-glass h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  text-align: center;
  background: linear-gradient(to right, #ffffff, #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.premium-glass>p {
  text-align: center;
  color: #94a3b8;
  margin-bottom: 36px;
  font-size: 15px;
}

.input-group {
  margin-bottom: 20px;
  position: relative;
}

.premium-glass input {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 20px;
  border-radius: 12px;
  color: white;
  font-size: 15px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.premium-glass input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.premium-glass input:focus {
  background: rgba(0, 0, 0, 0.4);
  border-color: #8b5cf6;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.auth-options {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
  font-size: 14px;
}

.forgot-pwd {
  color: #a78bfa;
  text-decoration: none;
  transition: color 0.3s;
  font-weight: 500;
}

.forgot-pwd:hover {
  color: #ddd6fe;
}

.premium-btn {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.4);
  margin-bottom: 24px;
  width: 100%;
  border: none;
  color: white;
  cursor: pointer;
  transition: all 0.3s;
}

.premium-btn:hover {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  box-shadow: 0 15px 35px rgba(124, 58, 237, 0.6);
  transform: translateY(-2px);
}

.premium-glass .toggle-auth {
  text-align: center;
  margin-top: 0;
  color: #94a3b8;
  cursor: pointer;
  font-size: 14px;
  transition: color 0.3s;
}

.premium-glass .toggle-auth:hover {
  color: white;
}

/* SVG Connection Lines */
.connection-lines {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1000px;
  height: 1000px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: -1;
  opacity: 0.7;
}

.connection-lines path {
  fill: none;
  stroke: rgba(139, 92, 246, 0.4);
  stroke-width: 2;
  stroke-dasharray: 6 6;
  animation: dashMove 20s linear infinite;
}

@keyframes dashMove {
  to {
    stroke-dashoffset: -1000;
  }
}

/* Floating Document Nodes */
.doc-node {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 80px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.5px;
  box-shadow:
    -4px 4px 0px rgba(0, 0, 0, 0.3),
    -10px 10px 25px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  transform-style: preserve-3d;
}

.doc-node::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  border-width: 0 18px 18px 0;
  border-style: solid;
  border-color: transparent transparent rgba(0, 0, 0, 0.2) rgba(255, 255, 255, 0.3);
  border-radius: 0 8px 0 0;
}

.doc-pdf {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: white;
  animation: float1 4s ease-in-out infinite alternate;
}

.doc-word {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  animation: float2 5s ease-in-out infinite alternate;
}

.doc-excel {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  color: white;
  animation: float3 6s ease-in-out infinite alternate;
}

.doc-json {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: white;
  animation: float1 5.5s ease-in-out infinite alternate-reverse;
}

@keyframes float1 {
  0% {
    transform: translateZ(20px) translateY(0);
  }

  100% {
    transform: translateZ(40px) translateY(-15px);
  }
}

@keyframes float2 {
  0% {
    transform: translateZ(10px) translateY(-5px);
  }

  100% {
    transform: translateZ(35px) translateY(10px);
  }
}

@keyframes float3 {
  0% {
    transform: translateZ(30px) translateY(5px);
  }

  100% {
    transform: translateZ(15px) translateY(-12px);
  }
}