:root {
  --bg: #070d0d;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.25);
  --glass-highlight: rgba(255, 255, 255, 0.35);
  --teal: #1ad6d6;
  --teal-soft: rgba(26, 214, 214, 0.55);
  --text-light: #f5f7f7;
  --text-muted: #aebcbc;
  --input-placeholder: #55605f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text-light);
}

.auth-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  background: var(--bg);
}

.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(8px);
  z-index: 0;
  will-change: transform;
  pointer-events: none;
}

.glow-1 {
  width: 520px;
  height: 460px;
  top: 4%;
  left: 6%;
  background: radial-gradient(circle, rgba(26, 214, 214, 0.4), transparent 70%);
  animation: glow-drift-1 39s ease-in-out infinite;
  animation-delay: -8.6s;
}

.glow-2 {
  width: 580px;
  height: 500px;
  top: 6%;
  right: 4%;
  background: radial-gradient(circle, rgba(60, 130, 230, 0.32), transparent 70%);
  animation: glow-drift-2 48s ease-in-out infinite;
  animation-delay: -10.6s;
}

.glow-3 {
  width: 640px;
  height: 560px;
  bottom: -8%;
  left: 28%;
  background: radial-gradient(circle, rgba(26, 214, 214, 0.28), transparent 70%);
  animation: glow-drift-3 57s ease-in-out infinite;
  animation-delay: -12.5s;
}

.glow-4 {
  width: 380px;
  height: 340px;
  top: 2%;
  left: 42%;
  background: radial-gradient(circle, rgba(26, 214, 214, 0.3), transparent 70%);
  animation: glow-drift-4 33s ease-in-out infinite;
  animation-delay: -7.3s;
}

.glow-5 {
  width: 440px;
  height: 400px;
  bottom: -4%;
  left: 4%;
  background: radial-gradient(circle, rgba(60, 130, 230, 0.26), transparent 70%);
  animation: glow-drift-5 51s ease-in-out infinite;
  animation-delay: -11.2s;
}

/* Each glow sweeps fully off-screen along its own diagonal; every loop's
   0% and 100% sit outside the viewport, so the wrap is invisible and the
   glow reads as exiting one edge and re-entering from the opposite side.
   The negative animation-delay above starts each glow partway through its
   cycle (already mid-sweep) so it arrives into view right on page load
   instead of sitting off-screen for the first few seconds. */
@keyframes glow-drift-1 {
  0% {
    transform: translate(-60vw, -15vh) scale(0.85);
  }
  30% {
    transform: translate(10vw, 25vh) scale(1.2);
  }
  60% {
    transform: translate(70vw, -10vh) scale(1);
  }
  100% {
    transform: translate(150vw, 20vh) scale(0.8);
  }
}

@keyframes glow-drift-2 {
  0% {
    transform: translate(55vw, 45vh) scale(0.9);
  }
  30% {
    transform: translate(-10vw, -30vh) scale(1.15);
  }
  60% {
    transform: translate(-75vw, 15vh) scale(1);
  }
  100% {
    transform: translate(-160vw, -25vh) scale(0.85);
  }
}

@keyframes glow-drift-3 {
  0% {
    transform: translate(10vw, 60vh) scale(0.85);
  }
  30% {
    transform: translate(-25vw, 10vh) scale(1.1);
  }
  60% {
    transform: translate(15vw, -60vh) scale(1);
  }
  100% {
    transform: translate(-20vw, -140vh) scale(0.8);
  }
}

@keyframes glow-drift-4 {
  0% {
    transform: translate(20vw, -70vh) scale(0.8);
  }
  30% {
    transform: translate(-15vw, -10vh) scale(1.1);
  }
  60% {
    transform: translate(30vw, 40vh) scale(0.95);
  }
  100% {
    transform: translate(-10vw, 130vh) scale(0.75);
  }
}

@keyframes glow-drift-5 {
  0% {
    transform: translate(-70vw, 50vh) scale(0.8);
  }
  30% {
    transform: translate(-10vw, -5vh) scale(1.1);
  }
  60% {
    transform: translate(50vw, -55vh) scale(1);
  }
  100% {
    transform: translate(140vw, -120vh) scale(0.8);
  }
}

@media (prefers-reduced-motion: reduce) {
  .glow-1,
  .glow-2,
  .glow-3,
  .glow-4,
  .glow-5 {
    animation: none;
  }
}

.brand {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 18px;
}

.brand-logo {
  width: 200px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 18px rgba(26, 214, 214, 0.35));
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 340px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 22px 22px;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}

.field label {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--text-light);
}

.input-group {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  padding: 0 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.input-group:focus-within {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 3px var(--teal-soft);
}

.input-group.has-error {
  box-shadow: 0 0 0 3px rgba(255, 90, 90, 0.45);
}

.field-error {
  min-height: 14px;
  margin: 3px 2px 0;
  font-size: 12px;
  font-weight: 600;
  color: #ff8a8a;
}

.input-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.input-group input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 10px 10px;
  font-size: 15px;
  color: #1c1c1c;
}

.input-group input::placeholder {
  color: var(--input-placeholder);
}

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
  cursor: pointer;
}

.forgot-link {
  font-size: 13px;
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
}

.forgot-link:hover {
  text-decoration: underline;
}

.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 14px;
}

.terms-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--teal);
  cursor: pointer;
  flex-shrink: 0;
}

.terms-row label {
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.terms-row a {
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
}

.terms-row a:hover {
  text-decoration: underline;
}

.btn-primary {
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(26, 214, 214, 0.85), rgba(20, 160, 180, 0.85));
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 6px 20px rgba(26, 214, 214, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: filter 0.15s ease, transform 0.05s ease;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-primary:active {
  transform: translateY(1px);
}

.auth-switch {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}

.auth-switch a {
  color: var(--text-light);
  font-weight: 600;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}
