/* Auth — 3D scene & glass card */

body.page-auth main {
  padding: 0;
}

body.page-auth .site-footer {
  margin-top: 0;
}

.auth-scene {
  position: relative;
  min-height: calc(100vh - 180px);
  padding: 2.5rem 0 3.5rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(237, 31, 39, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 80%, rgba(15, 23, 42, 0.9), transparent 50%),
    linear-gradient(145deg, #0f1419 0%, #1a1f26 42%, #12151a 100%);
}

.auth-scene__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  pointer-events: none;
  animation: auth-orb-float 14s ease-in-out infinite;
}

.auth-scene__orb--1 {
  width: 320px;
  height: 320px;
  background: #ed1f27;
  top: -80px;
  left: -60px;
}

.auth-scene__orb--2 {
  width: 280px;
  height: 280px;
  background: #3b82f6;
  bottom: 10%;
  right: 5%;
  animation-delay: -4s;
}

.auth-scene__orb--3 {
  width: 200px;
  height: 200px;
  background: #f97316;
  top: 40%;
  left: 45%;
  opacity: 0.25;
  animation-delay: -7s;
}

@keyframes auth-orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -24px) scale(1.08); }
}

.auth-scene__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 1100px;
}

/* 3D showcase */
.auth-showcase {
  color: #fff;
  padding: 1rem 1rem 1rem 0;
}

.auth-showcase__stage {
  perspective: 900px;
  margin-bottom: 2rem;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-helmet-3d {
  position: relative;
  width: 180px;
  height: 180px;
  transform-style: preserve-3d;
  animation: auth-helmet-spin 18s linear infinite;
}

@keyframes auth-helmet-spin {
  0% { transform: rotateY(-12deg) rotateX(8deg); }
  50% { transform: rotateY(12deg) rotateX(8deg); }
  100% { transform: rotateY(-12deg) rotateX(8deg); }
}

.auth-helmet-3d__ring {
  position: absolute;
  inset: -20px;
  border: 2px solid rgba(237, 31, 39, 0.35);
  border-radius: 50%;
  transform: rotateX(72deg) translateZ(-30px);
  box-shadow: 0 0 40px rgba(237, 31, 39, 0.25);
}

.auth-helmet-3d__ring--2 {
  inset: -36px;
  border-color: rgba(255, 255, 255, 0.12);
  transform: rotateX(72deg) translateZ(-50px);
  animation: auth-ring-pulse 3s ease-in-out infinite;
}

@keyframes auth-ring-pulse {
  0%, 100% { opacity: 0.5; transform: rotateX(72deg) translateZ(-50px) scale(1); }
  50% { opacity: 1; transform: rotateX(72deg) translateZ(-50px) scale(1.05); }
}

.auth-helmet-3d__icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5.5rem;
  color: #fff;
  background: linear-gradient(145deg, rgba(237, 31, 39, 0.9), rgba(180, 20, 28, 0.95));
  border-radius: 28px;
  transform: translateZ(40px);
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    -8px -8px 24px rgba(255, 255, 255, 0.08) inset;
}

.auth-helmet-3d__badge {
  position: absolute;
  right: -12px;
  bottom: 8px;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #fff;
  color: #ed1f27;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  transform: translateZ(60px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  animation: auth-badge-bob 2.5s ease-in-out infinite;
}

@keyframes auth-badge-bob {
  0%, 100% { transform: translateZ(60px) translateY(0); }
  50% { transform: translateZ(60px) translateY(-8px); }
}

.auth-showcase__tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ed1f27;
  margin-bottom: 0.5rem;
}

.auth-showcase__title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  margin: 0 0 0.75rem;
  line-height: 1.15;
}

.auth-showcase__text {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 380px;
  margin-bottom: 1.5rem;
}

.auth-showcase__features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.auth-showcase__features li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}

.auth-showcase__features i {
  color: #ed1f27;
  width: 1.25rem;
  text-align: center;
}

/* 3D card */
.auth-card-wrap {
  perspective: 1200px;
  display: flex;
  justify-content: center;
}

.auth-card-3d {
  position: relative;
  width: 100%;
  max-width: 440px;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
  will-change: transform;
}

.auth-card-3d__edge {
  position: absolute;
  inset: 12px -8px -12px 8px;
  background: linear-gradient(135deg, rgba(237, 31, 39, 0.35), rgba(0, 0, 0, 0.5));
  border-radius: 20px;
  transform: translateZ(-24px);
  filter: blur(2px);
}

.auth-card-3d__body {
  position: relative;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 20px;
  padding: 2rem 2rem 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    0 32px 64px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset,
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
  transform: translateZ(32px);
  backdrop-filter: blur(12px);
}

.auth-card-3d--register {
  max-width: 480px;
}

.auth-card-3d__head {
  margin-bottom: 1.5rem;
}

.auth-card-3d__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #ed1f27;
  background: rgba(237, 31, 39, 0.1);
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 0.75rem;
}

.auth-card-3d__title {
  font-size: 1.65rem;
  font-weight: 800;
  margin: 0 0 0.35rem;
  color: #111;
}

.auth-card-3d__sub {
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.5;
}

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  color: #b91c1c;
  font-size: 0.88rem;
}

.auth-alert i {
  margin-top: 0.1rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.auth-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.auth-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.4rem;
}

.auth-field__control {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-field__icon {
  position: absolute;
  left: 1rem;
  color: #94a3b8;
  font-size: 0.9rem;
  pointer-events: none;
  transition: color 0.2s;
}

.auth-field__control input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.8rem 2.75rem 0.8rem 2.65rem;
  font-size: 0.95rem;
  font-family: inherit;
  background: #f8fafc;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s, transform 0.2s;
}

.auth-field__control input:focus {
  outline: none;
  border-color: #ed1f27;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(237, 31, 39, 0.12);
  transform: translateY(-1px);
}

.auth-field__control:focus-within .auth-field__icon {
  color: #ed1f27;
}

.auth-field__toggle {
  position: absolute;
  right: 0.5rem;
  border: none;
  background: transparent;
  color: #94a3b8;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.auth-field__toggle:hover {
  color: #ed1f27;
  background: rgba(237, 31, 39, 0.08);
}

.auth-strength {
  display: flex;
  gap: 4px;
  margin-top: 0.45rem;
}

.auth-strength span {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: #e2e8f0;
  transition: background 0.25s;
}

.auth-strength[data-level="1"] span:nth-child(1) { background: #ef4444; }
.auth-strength[data-level="2"] span:nth-child(-n+2) { background: #f59e0b; }
.auth-strength[data-level="3"] span:nth-child(-n+3) { background: #22c55e; }
.auth-strength[data-level="4"] span { background: #16a34a; }

.auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.95rem 1.25rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #ed1f27 0%, #c41820 100%);
  box-shadow:
    0 12px 28px rgba(237, 31, 39, 0.35),
    0 4px 0 #9f1218;
  transform: translateY(0);
  transition: transform 0.15s, box-shadow 0.15s;
}

.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow:
    0 16px 32px rgba(237, 31, 39, 0.4),
    0 4px 0 #9f1218;
}

.auth-submit:active {
  transform: translateY(2px);
  box-shadow:
    0 6px 16px rgba(237, 31, 39, 0.3),
    0 1px 0 #9f1218;
}

.auth-submit i {
  transition: transform 0.2s;
}

.auth-submit:hover i {
  transform: translateX(4px);
}

.auth-card-3d__switch {
  text-align: center;
  margin: 1.35rem 0 0;
  font-size: 0.88rem;
  color: #64748b;
}

.auth-card-3d__switch a {
  color: #ed1f27;
  font-weight: 700;
  text-decoration: none;
}

.auth-card-3d__switch a:hover {
  text-decoration: underline;
}

@media (max-width: 991px) {
  .auth-scene__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 480px;
    margin: 0 auto;
  }

  .auth-showcase {
    text-align: center;
    padding: 0;
  }

  .auth-showcase__text {
    margin-left: auto;
    margin-right: auto;
  }

  .auth-showcase__features {
    align-items: center;
  }

  .auth-showcase__stage {
    height: 160px;
    margin-bottom: 1.25rem;
  }

  .auth-helmet-3d {
    width: 140px;
    height: 140px;
  }

  .auth-helmet-3d__icon {
    font-size: 4rem;
    border-radius: 22px;
  }
}

@media (max-width: 480px) {
  .auth-scene {
    padding: 1.5rem 0 2.5rem;
  }

  .auth-card-3d__body {
    padding: 1.5rem 1.25rem 1.25rem;
  }

  .auth-form__row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-scene__orb,
  .auth-helmet-3d,
  .auth-helmet-3d__ring--2,
  .auth-helmet-3d__badge {
    animation: none;
  }

  .auth-card-3d {
    transition: none;
  }
}
