*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
  background: transparent;
}

:root {
  --bg: #020403;
  --green: #2a7a52;
  --green-bright: #45c288;
  --green-glow: rgba(63, 180, 120, 0.16);
  --card-bg: #050a08;
  --border: rgba(45, 130, 90, 0.5);
  --text-muted: #86b89a;
  --auth-switch-duration: 520ms;
  --auth-switch-ease: cubic-bezier(0.2, 0.85, 0.22, 1);
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--green);
  font-family: "Space Grotesk", system-ui, sans-serif;
  overflow-x: hidden;
}

/* Custom crosshair: ../js/cursor-overlay.js draws on #deepskeetCursorLayer */
.deepskeet-cursor-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999999;
  display: block;
}

body.deepskeet-custom-cursor,
body.deepskeet-custom-cursor button,
body.deepskeet-custom-cursor a,
body.deepskeet-custom-cursor input,
body.deepskeet-custom-cursor textarea,
body.deepskeet-custom-cursor label,
body.deepskeet-custom-cursor [role="button"] {
  cursor: none !important;
}

.auth-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

/* Vignette sits under the canvas so particles stay visible */
.auth-shell__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    ellipse 78% 58% at 50% 32%,
    var(--green-glow) 0%,
    transparent 62%
  );
  opacity: 0.34;
}

.auth-shell__particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 2;
  pointer-events: none;
  opacity: 1;
}

.auth-stage {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem 2rem;
  animation: auth-slide-in 0.94s cubic-bezier(0.32, 0.8, 0.22, 1) both;
  will-change: transform, opacity;
  pointer-events: auto;
}

@keyframes auth-slide-in {
  from {
    transform: translate3d(0, 100vh, 0);
    opacity: 0.97;
  }
  to {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

.auth-brand {
  text-align: center;
  margin-bottom: 1.35rem;
  max-width: 28rem;
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.auth-brand__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: var(--green-bright);
  text-shadow: 0 0 24px rgba(63, 160, 111, 0.35);
}

.auth-brand__sub {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.auth-card {
  width: 100%;
  max-width: 22rem;
  background:
    linear-gradient(145deg, rgba(12, 28, 20, 0.55) 0%, transparent 42%),
    linear-gradient(180deg, rgba(6, 14, 10, 0.99) 0%, rgba(2, 8, 5, 0.99) 100%);
  border: 1px solid var(--border);
  box-shadow:
    0 0 0 1px #000,
    0 20px 56px rgba(0, 0, 0, 0.5),
    0 0 48px rgba(45, 140, 95, 0.12),
    inset 0 1px 0 rgba(120, 200, 160, 0.06);
  transform: translateZ(0);
  opacity: 1;
  isolation: isolate;
  transition:
    border-color 0.45s var(--auth-switch-ease),
    box-shadow 0.5s var(--auth-switch-ease),
    transform 0.4s var(--auth-switch-ease);
}

.auth-card:hover {
  border-color: rgba(72, 190, 130, 0.55);
  box-shadow:
    0 0 0 1px #000,
    0 28px 72px rgba(0, 0, 0, 0.58),
    0 0 72px rgba(55, 170, 115, 0.28),
    inset 0 1px 0 rgba(140, 220, 175, 0.09);
}

.auth-card[data-auth-view="signup"] {
  border-color: rgba(63, 160, 111, 0.48);
}

.auth-shell.auth-shell--enter .auth-brand {
  animation: auth-brand-enter 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-shell.auth-shell--enter .auth-card {
  animation: auth-card-enter 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes auth-brand-enter {
  from {
    transform: translate3d(0, 14px, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes auth-card-enter {
  from {
    transform: translate3d(0, 18px, 0) scale(0.99);
  }
  to {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.auth-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}

.auth-tabs__indicator {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 50%;
  height: 2px;
  background: var(--green-bright);
  transform: translateX(calc(var(--auth-tab, 0) * 100%));
  transition: transform var(--auth-switch-duration) var(--auth-switch-ease);
  pointer-events: none;
  z-index: 2;
  box-shadow: 0 0 14px rgba(63, 160, 111, 0.45);
}

.auth-tab {
  margin: 0;
  padding: 0.9rem 0.5rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: none;
  position: relative;
  z-index: 1;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.auth-tab:hover {
  color: #f0fff6;
  background: rgba(50, 150, 100, 0.12);
}

.auth-tab:active {
  opacity: 0.92;
}

.auth-tab--active {
  color: #f2fff8;
  background: linear-gradient(180deg, rgba(32, 95, 65, 0.35) 0%, rgba(20, 70, 48, 0.2) 100%);
  box-shadow: inset 0 -2px 0 rgba(72, 210, 150, 0.55);
}

.auth-panels {
  position: relative;
  overflow: hidden;
  padding: 0;
  min-height: 240px;
}

.auth-panels__track {
  display: flex;
  width: 200%;
  transition: transform var(--auth-switch-duration) var(--auth-switch-ease);
  will-change: transform;
}

.auth-panels__track[data-auth-view="login"] {
  transform: translateX(0);
}

.auth-panels__track[data-auth-view="signup"] {
  transform: translateX(-50%);
}

.auth-panel {
  flex: 0 0 50%;
  width: 50%;
  box-sizing: border-box;
  padding: 1.35rem 1.25rem 1.5rem;
  position: relative;
  opacity: 1;
  transform: none;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.auth-panel--fields-in.auth-panel--active .auth-field {
  animation: auth-field-rise 0.48s var(--auth-switch-ease) both;
}

.auth-panel--fields-in.auth-panel--active .auth-field:nth-child(2) {
  animation-delay: 0.02s;
}

.auth-panel--fields-in.auth-panel--active .auth-field:nth-child(3) {
  animation-delay: 0.09s;
}

.auth-panel--fields-in.auth-panel--active .auth-field:nth-child(4) {
  animation-delay: 0.16s;
}

.auth-panel--fields-in.auth-panel--active .auth-remember {
  animation: auth-field-rise 0.48s var(--auth-switch-ease) both;
  animation-delay: 0.16s;
}

@keyframes auth-field-rise {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.auth-field__label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.auth-field:hover .auth-field__label {
  color: rgba(122, 158, 138, 0.95);
}

.auth-input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 0.88rem;
  color: #c5e2d4;
  caret-color: #7fd9a8;
  background: #020705;
  border: 1px solid var(--border);
  border-radius: 0;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.auth-input:hover {
  border-color: rgba(63, 160, 111, 0.42);
  background: #030a07;
}

.auth-input::placeholder {
  color: rgba(122, 158, 138, 0.45);
}

.auth-input:focus {
  border-color: rgba(63, 160, 111, 0.65);
  box-shadow: 0 0 0 1px rgba(63, 160, 111, 0.2);
}

.auth-remember {
  margin: 0.1rem 0 0;
  user-select: none;
}

.auth-remember__wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}

.auth-remember__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-remember__pixel {
  position: relative;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border: 2px solid rgba(90, 200, 150, 0.75);
  border-radius: 4px;
  background: #020705;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.65),
    2px 2px 0 rgba(0, 0, 0, 0.45);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.2s cubic-bezier(0.34, 1.45, 0.64, 1);
}

.auth-remember__wrap:hover .auth-remember__pixel {
  border-color: rgba(140, 235, 190, 0.9);
}

.auth-remember__wrap:focus-within .auth-remember__pixel {
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.65),
    2px 2px 0 rgba(0, 0, 0, 0.45),
    0 0 0 2px rgba(63, 160, 111, 0.55);
}

.auth-remember__fill {
  position: absolute;
  inset: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, #1f7a4e 0%, #0c3d26 55%, #082818 100%);
  transform: scale(0);
  transform-origin: 50% 50%;
  transition: transform 0.32s cubic-bezier(0.34, 1.45, 0.64, 1);
}

.auth-remember__input:checked ~ .auth-remember__pixel .auth-remember__fill {
  transform: scale(1);
}

/* Smooth vector-style check (border trick), not block pixels */
.auth-remember__mark {
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #dfffea;
  border-width: 0 2px 2px 0;
  border-radius: 0 1px 1px 0;
  transform: rotate(45deg) scale(0.65);
  transform-origin: 50% 50%;
  opacity: 0;
  pointer-events: none;
  box-sizing: border-box;
  transition:
    opacity 0.22s ease,
    transform 0.32s cubic-bezier(0.34, 1.45, 0.64, 1);
}

.auth-remember__input:checked ~ .auth-remember__pixel .auth-remember__mark {
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

.auth-remember__input:checked ~ .auth-remember__pixel {
  border-color: rgba(160, 255, 210, 0.95);
  animation: auth-remember-box-glow 0.45s ease;
}

.auth-remember__text {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.auth-remember__wrap:hover .auth-remember__text {
  color: rgba(190, 220, 205, 0.98);
}

@keyframes auth-remember-box-glow {
  0%,
  100% {
    filter: brightness(1);
  }
  40% {
    filter: brightness(1.25) drop-shadow(0 0 6px rgba(72, 200, 140, 0.55));
  }
}

.auth-submit {
  margin-top: 0.35rem;
  padding: 0.72rem 1rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: none;
  color: #e8f8ef;
  background: #0c1a14;
  border: 2px solid rgba(88, 200, 145, 0.7);
  border-radius: 0;
  cursor: pointer;
  width: 100%;
  image-rendering: pixelated;
  box-shadow:
    4px 4px 0 #030806,
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

.auth-submit:hover {
  color: #ffffff;
  background: #112a1f;
  border-color: rgba(130, 235, 185, 0.9);
  box-shadow:
    3px 3px 0 #030806,
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  filter: brightness(1.08);
}

.auth-submit:active {
  background: #08120e;
  transform: translate(2px, 2px);
  box-shadow:
    1px 1px 0 #030806,
    inset 0 2px 6px rgba(0, 0, 0, 0.35);
  filter: brightness(0.98);
}

.auth-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
  .deepskeet-cursor-layer {
    display: none !important;
  }

  .auth-card {
    animation: none;
  }

  .auth-panels__track {
    transition: none;
  }

  .auth-card:hover {
    box-shadow:
      0 0 0 1px #000,
      0 18px 48px rgba(0, 0, 0, 0.45),
      0 0 40px rgba(63, 160, 111, 0.08);
  }

  .auth-panel {
    transition: opacity 0.2s ease;
  }

  .auth-tabs__indicator {
    transition: transform 0.2s ease;
  }

  .auth-input:hover,
  .auth-input:focus {
    transform: none;
  }

  .auth-panel--fields-in.auth-panel--active .auth-field {
    animation: none;
  }

  .auth-panel--fields-in.auth-panel--active .auth-remember {
    animation: none;
  }

  .auth-remember__fill {
    transition: none;
  }

  .auth-remember__input:checked ~ .auth-remember__pixel {
    animation: none;
  }

  .auth-remember__mark {
    transition: opacity 0.15s ease, transform 0.15s ease;
  }

  .auth-submit:hover {
    filter: none;
  }

  .auth-submit:active {
    transform: none;
  }

  .auth-tab:hover {
    transform: none;
  }
}
