@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ── Design tokens ──────────────────────────────────────────────────────── */
:root {
  --bg-base:        #101731;
  --bg-panel:       #0a0e1f;
  --bg-input:       rgba(255, 255, 255, 0.04);
  --bg-input-hover: rgba(0, 212, 255, 0.06);
  --accent-cyan:    #00d4ff;
  --accent-purple:  #7b2ff7;
  --accent-blue:    #4f8ef7;
  --text-primary:   #e8eaf6;
  --text-secondary: #7a8099;
  --text-muted:     #3d4460;
  --border-idle:    rgba(0, 212, 255, 0.12);
  --border-focus:   rgba(0, 0, 0, 0.7);
  --glow-cyan:      rgba(0, 0, 0, 0.25);
  --glow-purple:    rgba(123, 47, 247, 0.25);
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
input,
select,
button {
  font-family: "Nunito", "Space Grotesk", -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

/* ── Page wrapper ───────────────────────────────────────────────────────── */
.container {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  background-color: var(--bg-base);
  /* Tech dot-grid */
  background-image:
    radial-gradient(rgba(0, 212, 255, 0.10) 1px, transparent 1px);
  background-size: 36px 36px;
}

/* ── Ambient glow orbs ──────────────────────────────────────────────────── */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.10) 0%, transparent 70%);
  top: -120px;
  left: -120px;
  animation: orbDrift 14s ease-in-out infinite alternate;
}

.orb-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(123, 47, 247, 0.10) 0%, transparent 70%);
  bottom: -160px;
  right: 20%;
  animation: orbDrift 18s ease-in-out infinite alternate-reverse;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(79, 142, 247, 0.08) 0%, transparent 70%);
  top: 40%;
  right: 10%;
  animation: orbDrift 10s ease-in-out infinite alternate;
}

@keyframes orbDrift {
  0%   { transform: translate(0, 0)    scale(1);    }
  100% { transform: translate(40px, 30px) scale(1.08); }
}

/* ── Forms layer ────────────────────────────────────────────────────────── */
.forms-container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.signin-signup {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  left: 75%;
  width: 50%;
  transition: 1s 0.7s ease-in-out;
  display: grid;
  grid-template-columns: 1fr;
  z-index: 5;
}

form {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 5rem;
  transition: all 0.2s 0.7s;
  overflow: hidden;
  grid-column: 1 / 2;
  grid-row: 1 / 2;
}

form.sign-up-form {
  opacity: 0;
  z-index: 1;
}

form.sign-in-form {
  z-index: 2;
}

/* ── Title & badge ──────────────────────────────────────────────────────── */
.title {
  font-family: "Space Grotesk", "Nunito", sans-serif;
  font-size: 2.1rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.title-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  border: 1px solid rgba(0, 212, 255, 0.28);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 22px;
  background: rgba(0, 212, 255, 0.05);
  backdrop-filter: blur(6px);
}

.title-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: blinkDot 2s ease-in-out infinite;
}

@keyframes blinkDot {
  0%, 100% { opacity: 1;   box-shadow: 0 0 8px  var(--accent-cyan); }
  50%       { opacity: 0.4; box-shadow: 0 0 3px  var(--accent-cyan); }
}

/* ── Input fields ───────────────────────────────────────────────────────── */
.input-field {
  max-width: 380px;
  width: 100%;
  background: var(--bg-input);
  margin: 7px 0;
  height: 54px;
  border-radius: 14px;
  display: grid;
  grid-template-columns: 15% 85%;
  padding: 0 0.6rem;
  position: relative;
  border: 1px solid var(--border-idle);
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
  backdrop-filter: blur(12px);
}

.input-field:focus-within {
  background: var(--bg-input-hover);
  border-color: var(--border-focus);
  box-shadow:
    0 0 0 3px rgba(0, 212, 255, 0.10),
    0 0 24px rgba(0, 212, 255, 0.08);
}

.input-field.has-toggle {
  grid-template-columns: 15% 70% 15%;
}

.input-field.select-field {
  grid-template-columns: 15% 85%;
}

.input-field i {
  text-align: center;
  line-height: 52px;
  color: var(--text-muted);
  transition: color 0.3s, text-shadow 0.3s;
  font-size: 1rem;
}

.input-field:focus-within i {
  color: var(--accent-cyan);
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.input-field input,
.input-field select {
  background: none;
  outline: none;
  border: none;
  line-height: 1;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-primary);
  width: 100%;
  font-family: inherit;
}

.input-field select {
  cursor: pointer;
  padding-right: 8px;
  color: var(--text-secondary);
}

.input-field select option {
  background: #0d1530;
  color: var(--text-primary);
}

.input-field input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Browser Autofill Fix ───────────────────────────────────────────────── */
/* Remove white background from browser autofill/autocomplete */
.input-field input:-webkit-autofill,
.input-field input:-webkit-autofill:hover,
.input-field input:-webkit-autofill:focus,
.input-field input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.04) inset !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  transition: background-color 9999s ease-in-out 0s, -webkit-box-shadow 9999s ease-in-out 0s;
  caret-color: var(--text-primary);
}

/* Firefox autofill fix */
.input-field input:-moz-autofill,
.input-field input:-moz-autofill-preview {
  background: var(--bg-input) !important;
  color: var(--text-primary) !important;
}

/* ── Password toggle ────────────────────────────────────────────────────── */
.toggle-password {
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  padding: 0;
  width: 100%;
  height: 100%;
  border-radius: 0 14px 14px 0;
}

.toggle-password:hover {
  color: var(--accent-cyan);
}

/* ── Password strength ──────────────────────────────────────────────────── */
.password-strength {
  max-width: 380px;
  width: 100%;
  margin: 0 0 4px;
  padding: 0 6px;
  display: none;
}

.strength-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}

.strength-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 3px;
  transition: width 0.4s ease, background 0.4s ease;
}

.password-strength small {
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* ── Form note (info hint) ──────────────────────────────────────────────── */
.form-note {
  max-width: 380px;
  width: 100%;
  margin: 2px 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #ffffff;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
}

.form-note i {
  color: #ffffff;
  margin-top: 2px;
  flex-shrink: 0;
}

.form-note strong {
  color: #048fb9;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  width: 165px;
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
  border: none;
  outline: none;
  height: 48px;
  border-radius: 12px;
  color: #fff;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.80rem;
  letter-spacing: 1.2px;
  margin: 14px 0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn:hover::before {
  opacity: 1;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 30px rgba(0, 212, 255, 0.35),
    0 4px 16px rgba(123, 47, 247, 0.25);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn.solid {
  background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
}

.btn.solid:hover {
  box-shadow:
    0 8px 30px rgba(0, 180, 216, 0.45),
    0 4px 16px rgba(0, 119, 182, 0.3);
}

/* ── Copyright ──────────────────────────────────────────────────────────── */
.social-text {
  padding: 0.6rem 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Panels ─────────────────────────────────────────────────────────────── */
.panels-container {
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

/* Sliding dark divider circle */
.container:before {
  content: "";
  position: absolute;
  height: 2000px;
  width: 2000px;
  top: -10%;
  right: 48%;
  transform: translateY(-50%);
  background: linear-gradient(140deg, #28387f 0%, #00216b 40%, #0a0029 100%);
  transition: 0.8s ease-in-out;
  border-radius: 50%;
  z-index: 6;
  box-shadow:
    6px 0 60px rgba(0, 212, 255, 0.08),
    inset -4px 0 60px rgba(123, 47, 247, 0.06);
}

/* Vertical neon line on the circle edge — purely decorative */
.container:after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 212, 255, 0.03) 30%,
    rgba(0, 212, 255, 0.06) 50%,
    rgba(0, 212, 255, 0.03) 70%,
    transparent 100%
  );
  z-index: 7;
  transition: left 0.8s ease-in-out;
  pointer-events: none;
}

.container.sign-up-mode:after {
  left: 50%;
}

.image {
  width: 100%;
  transition: transform 1.1s ease-in-out;
  transition-delay: 0.4s;
  filter:
    drop-shadow(0 0 20px rgba(0, 212, 255, 0.25))
    drop-shadow(0 4px 16px rgba(0, 0, 0, 0.5))
    brightness(1.05);
}

.panel {
  display: flex;
  align-items: stretch;
  text-align: center;
  z-index: 6;
  flex-wrap: nowrap;
  align-content: stretch;
  flex-direction: column-reverse;
  justify-content: flex-end;
}

.left-panel {
  pointer-events: all;
  padding: 3rem 17% 2rem 12%;
}

.right-panel {
  pointer-events: none;
  padding: 3rem 12% 2rem 17%;
}

.panel .content {
  color: var(--text-primary);
  transition: transform 0.9s ease-in-out;
  transition-delay: 0.6s;
}

.panel h3 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  line-height: 1.3;
  font-size: 1.45rem;
  color: #ffffff00;
  text-shadow: 0 0 40px rgba(0, 212, 255, 0.3);
}

.panel p {
  font-size: 0.88rem;
  padding: 0.65rem 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.btn.transparent {
  margin: 0;
  background: none;
  border: 1px solid rgba(0, 212, 255, 0.40);
  width: 135px;
  height: 40px;
  font-weight: 700;
  font-size: 0.76rem;
  color: var(--accent-cyan);
  border-radius: 10px;
  letter-spacing: 1px;
  backdrop-filter: blur(6px);
}

.btn.transparent::before {
  display: none;
}

.btn.transparent:hover {
  background: rgba(0, 212, 255, 0.10);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.20);
  transform: translateY(-1px);
}

/* ── Panel system info bar ──────────────────────────────────────────────── */
.system-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(0, 212, 255, 0.5);
  margin-bottom: 1.2rem;
  padding: 5px 14px;
  border: 1px solid rgba(0, 212, 255, 0.12);
  border-radius: 20px;
  background: rgba(0, 212, 255, 0.04);
  width: fit-content;
  align-self: center;
}

.system-info .si-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
}

/* ── Sign-up mode animations ────────────────────────────────────────────── */
.right-panel .image,
.right-panel .content {
  transform: translateX(800px);
}

.container.sign-up-mode:before {
  transform: translate(100%, -50%);
  right: 52%;
}

.container.sign-up-mode .left-panel .image,
.container.sign-up-mode .left-panel .content {
  transform: translateX(-800px);
}

.container.sign-up-mode .signin-signup {
  left: 25%;
}

.container.sign-up-mode form.sign-up-form {
  opacity: 1;
  z-index: 2;
}

.container.sign-up-mode form.sign-in-form {
  opacity: 0;
  z-index: 1;
}

.container.sign-up-mode .right-panel .image,
.container.sign-up-mode .right-panel .content {
  transform: translateX(0%);
}

.container.sign-up-mode .left-panel {
  pointer-events: none;
}

.container.sign-up-mode .right-panel {
  pointer-events: all;
}

/* ── Tablet (≤870px) ────────────────────────────────────────────────────── */
@media (max-width: 870px) {
  .container {
    min-height: 800px;
    height: 100vh;
  }

  .signin-signup {
    width: 100%;
    top: 95%;
    transform: translate(-50%, -100%);
    transition: 0.8s 0.8s ease-in-out;
  }

  .signin-signup,
  .container.sign-up-mode .signin-signup {
    left: 50%;
  }

  .panels-container {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 2fr 1fr;
  }

  .panel {
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    padding: 2.5rem 8%;
    grid-column: 1 / 2;
  }

  .right-panel {
    grid-row: 3 / 4;
  }

  .left-panel {
    grid-row: 1 / 2;
  }

  .image {
    width: 200px;
    transition: transform 0.9s ease-in-out;
    transition-delay: 0.1s;
  }

  .panel .content {
    padding-right: 15%;
    transition: transform 0.9s ease-in-out;
    transition-delay: 0.1s;
  }

  .panel h3 {
    font-size: 1.15rem;
  }

  .panel p {
    font-size: 0.72rem;
    padding: 0.5rem 0;
  }

  .btn.transparent {
    width: 110px;
    height: 36px;
    font-size: 0.7rem;
  }

  .container:before {
    width: 1500px;
    height: 1500px;
    transform: translateX(-50%);
    left: 30%;
    bottom: 68%;
    right: initial;
    top: initial;
    transition: 0.5s ease-in-out;
  }

  .container:after {
    display: none;
  }

  .container.sign-up-mode:before {
    transform: translate(-50%, 100%);
    bottom: 32%;
    right: initial;
  }

  .container.sign-up-mode .left-panel .image,
  .container.sign-up-mode .left-panel .content {
    transform: translateY(-300px);
  }

  .container.sign-up-mode .right-panel .image,
  .container.sign-up-mode .right-panel .content {
    transform: translateY(0px);
  }

  .right-panel .image,
  .right-panel .content {
    transform: translateY(300px);
  }

  .container.sign-up-mode .signin-signup {
    top: 5%;
    transform: translate(-50%, 0);
  }

  form {
    padding: 0 2.5rem;
  }

  .system-info {
    display: none;
  }
}

/* ── Mobile (≤570px) ────────────────────────────────────────────────────── */
@media (max-width: 570px) {
  form {
    padding: 0 1.5rem;
  }

  .image {
    display: none;
  }

  .panel .content {
    padding: 0.5rem 1rem;
  }

  .container {
    padding: 1.5rem;
  }

  .container:before {
    bottom: 72%;
    left: 50%;
  }

  .container.sign-up-mode:before {
    bottom: 28%;
    left: 50%;
  }

  .title {
    font-size: 1.8rem;
  }

  .input-field {
    height: 50px;
    margin: 6px 0;
  }

  .btn {
    width: 148px;
    height: 45px;
  }

  .orb-1,
  .orb-2,
  .orb-3 {
    display: none;
  }
}
