/* ================================================================
   NeuroPilot — Login Page Styles
   ================================================================ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button, input { font-family: inherit; }

/* ── Layout: two-column split ── */
.login-page {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* ── Left Panel: Characters ── */
.login-left {
  flex: 1;
  background: #1e1e2e;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

.characters-scene {
  position: relative;
  width: 420px;
  height: 480px;
}

/* ── Character base ── */
.character {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: bottom center;
}

/* Individual characters */
.char-purple {
  width: 170px;
  height: 320px;
  background: #472def;
  border-radius: 12px;
  bottom: 60px;
  left: 50px;
  z-index: 1;
  transform: rotate(3deg);
}

.char-black {
  width: 90px;
  height: 260px;
  background: #1a1a1a;
  border-radius: 12px;
  bottom: 0px;
  left: 210px;
  z-index: 2;
  transform: rotate(4deg);
}

.char-orange {
  width: 230px;
  height: 160px;
  background: #f67a53;
  border-radius: 180px 180px 0 0;
  bottom: 0;
  left: 10px;
  z-index: 3;
}

.char-yellow {
  width: 140px;
  height: 190px;
  background: #d7b539;
  border-radius: 100px 100px 0 0;
  bottom: 0;
  left: 240px;
  z-index: 3;
}

/* ── Eyes ── */
.eyes {
  display: flex;
  transition: transform 0.15s ease-out;
}

.char-purple .eyes { margin-top: 60px; gap: 24px; }
.char-black .eyes { margin-top: 40px; gap: 16px; }
.char-orange .eyes { margin-top: 80px; gap: 35px; }
.char-yellow .eyes { margin-top: 60px; gap: 26px; }

/* Eye bases */
.eye {
  position: relative;
  border-radius: 50%;
  transition: all 0.3s ease;
}

/* White background for purple and black */
.char-purple .eye { background: #fff; width: 22px; height: 22px; }
.char-black .eye { background: #fff; width: 18px; height: 18px; }

/* Transparent background for orange and yellow */
.char-orange .eye, .char-yellow .eye { background: transparent; width: 16px; height: 16px; }

/* Pupils */
.pupil {
  background: #000;
  border-radius: 50%;
  position: absolute;
  transition: all 0.1s ease-out;
}

.char-purple .pupil { width: 8px; height: 8px; top: 4px; left: 9px; }
.char-black .pupil { width: 7px; height: 7px; top: 4px; left: 7px; }
.char-orange .pupil { width: 12px; height: 12px; top: 2px; left: 2px; }
.char-yellow .pupil { width: 12px; height: 12px; top: 2px; left: 2px; }

/* ── Mouth ── */
.mouth {
  width: 60px;
  height: 4px;
  background: #1a1a1a;
  border-radius: 2px;
  margin-top: 25px;
  transition: all 0.3s ease;
}

/* ── Peeking state: characters lean toward input ── */
.characters-scene.peeking .char-purple {
  transform: translateX(30px) translateY(-30px) rotate(10deg);
  height: 350px;
}
.characters-scene.peeking .char-black {
  transform: rotate(4deg);
}
.characters-scene.peeking .char-orange {
  transform: none;
}
.characters-scene.peeking .char-yellow {
  transform: none;
}

/* ── Peeking eyes: purple and black look right, others center ── */
.characters-scene.peeking .char-purple .pupil { top: 6px !important; left: 14px !important; }
.characters-scene.peeking .char-black .pupil { top: 6px !important; left: 10px !important; }

/* ── Shy state: characters look away (password visible) ── */
/* Characters maintain their original body positions, only pupils look away */

/* When shy, lock pupils to look far away (opposite to input) */
.characters-scene.shy .char-purple .pupil { top: 2px !important; left: 2px !important; }
.characters-scene.shy .char-black .pupil { top: 2px !important; left: 2px !important; }
.characters-scene.shy .char-orange .pupil { top: 0px !important; left: -1px !important; }
.characters-scene.shy .char-yellow .pupil { top: 0px !important; left: -1px !important; }

/* ── Covering eyes state (password focused, not visible) ── */
.characters-scene.covering .char-purple .eyes,
.characters-scene.covering .char-black .eyes,
.characters-scene.covering .char-orange .eyes,
.characters-scene.covering .char-yellow .eyes {
  transform: scaleY(0.15);
}

.characters-scene.covering .char-purple {
  transform: translateY(-5px) rotate(3deg);
}

/* ── Right Panel: Form ── */
.login-right {
  flex: 1;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.login-form-container {
  width: 100%;
  max-width: 400px;
}

.login-form-container h1 {
  font-size: 28px;
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.login-form-container .subtitle {
  font-size: 15px;
  color: #6b7280;
  margin-bottom: 32px;
}

/* ── Form Fields ── */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  color: #1a1a2e;
  background: #fff;
  border: 1.5px solid #e0e0e0;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input::placeholder { color: #b0b0b0; }

.form-group input:focus {
  border-color: #7c4dff;
  box-shadow: 0 0 0 3px rgba(124,77,255,0.1);
}

/* Password wrapper */
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 48px;
}

.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.toggle-password:hover { color: #6b7280; }

/* ── Buttons ── */
.btn-login {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: #1a1a2e;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-bottom: 12px;
}

.btn-login:hover { background: #2d2d44; }
.btn-login:active { transform: scale(0.98); }

/* ── Footer text ── */
.login-footer-text {
  text-align: center;
  font-size: 14px;
  color: #6b7280;
}

.login-footer-text a {
  color: #7c4dff;
  font-weight: 600;
}

.login-footer-text a:hover { text-decoration: underline; }

/* ── Back link ── */
.back-link {
  position: absolute;
  top: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  z-index: 10;
  transition: color 0.2s;
}

.back-link:hover { color: rgba(255,255,255,0.9); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .login-page { flex-direction: column; }
  .login-left {
    min-height: 280px;
    flex: none;
  }
  .characters-scene {
    width: 300px;
    height: 300px;
    transform: scale(0.7);
  }
  .login-right { padding: 32px 24px; }
}
