* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

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

body {
  min-height: 100vh;
  background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),
    url("../img/BG.jpg") no-repeat center center;
  background-size: cover;
  color: #ffffff;
}

.container {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  min-height: 100vh;
}

/* LEFT SIDE */
.left {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  padding: 0 60px;
}

.welcome-text h1 {
  font-size: clamp(3rem, 5vw, 5.5rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 16px;
}

.welcome-text p {
  font-size: clamp(1.15rem, 2vw, 1.75rem);
  max-width: 420px;
  margin: 0 auto;
}

/* RIGHT SIDE */
.right {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 48px 36px;
}

/* LOGIN BOX */
.login-box {
  width: 100%;
  max-width: 400px;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 32px 38px;
  border-radius: 24px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
  background: rgba(12, 12, 39, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.logo {
  width: 130px;
  margin-bottom: 24px;
}

.login-box h2 {
  font-size: 2rem;
  margin-bottom: 28px;
  text-align: center;
}

/* FORM */
form {
  width: 100%;
}

/* INPUT */
.input-box {
  position: relative;
  margin-bottom: 24px;
  width: 100%;
}

.input-box input {
  width: 100%;
  padding: 16px 0 12px;
  font-size: 17px;
  border: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.45);
  background: transparent;
  color: white;
  outline: none;
}

.input-box input:focus {
  border-bottom-color: #6b9cff;
}

.input-box label {
  position: absolute;
  top: 14px;
  left: 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
  pointer-events: none;
  transition: 0.25s ease;
}

.input-box input:focus + label,
.input-box input:not(:placeholder-shown) + label {
  top: -8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
}

.toggle-password {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.toggle-password:hover {
  color: rgba(255, 255, 255, 1);
}

.toggle-password svg {
  display: block;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* Animation เมื่อกด toggle */
@-webkit-keyframes eye-pop {
  0%   { -webkit-transform: scale(1) rotate(0deg);     opacity: 1; }
  30%  { -webkit-transform: scale(0.5) rotate(-12deg); opacity: 0.35; }
  65%  { -webkit-transform: scale(1.25) rotate(6deg);  opacity: 1; }
  100% { -webkit-transform: scale(1) rotate(0deg);     opacity: 1; }
}

@keyframes eye-pop {
  0%   { transform: scale(1) rotate(0deg);     opacity: 1; }
  30%  { transform: scale(0.5) rotate(-12deg); opacity: 0.35; }
  65%  { transform: scale(1.25) rotate(6deg);  opacity: 1; }
  100% { transform: scale(1) rotate(0deg);     opacity: 1; }
}

.toggle-password.animating svg {
  -webkit-animation: eye-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation: eye-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* ซ่อน native browser password reveal button บน Edge/Chrome/Android */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-contacts-auto-fill-button {
  display: none !important;
}

button {
  width: 100%;
  padding: 14px 0;
  font-size: 17px;
  border: none;
  background: linear-gradient(135deg, #1a52ff, #0a28d1);
  color: white;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.25s ease, filter 0.25s ease;
}

button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.login-note {
  margin-top: 18px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.login-divider {
  width: 100%;
  margin: 18px 0 14px;
  text-align: center;
  position: relative;
}

.login-divider span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(8, 15, 36, 0.85);
  padding: 0 12px;
  position: relative;
  z-index: 2;
}

.login-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  transform: translateY(-50%);
}

.google-login-btn {
  width: 100%;
  display: block;
  text-align: center;
  text-decoration: none;
  padding: 14px 0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #111;
  background: #fff;
  border: 1px solid #d9d9d9;
  transition: background 0.2s ease, transform 0.2s ease;
}

.google-login-btn:hover {
  background: #f5f5f5;
  transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 960px) {
  .container {
    grid-template-columns: 1fr;
  }

  /* Tab switching is handled by fast-search/search.js + fast-search.css */
  /* Do NOT hide .left or .right here — JS controls visibility on mobile */

  .right {
    padding: 30px 22px;
    min-height: calc(100vh - 52px);
    justify-content: center;
    align-items: center;
  }
}

@media (max-width: 600px) {
  body {
    background-position: top center;
  }

  .right {
    padding: 24px 18px 32px;
  }

  .login-box {
    padding: 24px 20px 26px;
    border-radius: 20px;
  }

  .logo {
    width: 100px;
    margin-bottom: 18px;
  }

  .login-box h2 {
    font-size: 1.8rem;
    margin-bottom: 22px;
  }

  .input-box {
    margin-bottom: 20px;
  }

  .input-box input {
    padding: 14px 0 10px;
    font-size: 16px;
  }

  button,
  .google-login-btn {
    font-size: 15px;
    padding: 13px 0;
  }

  .login-note {
    font-size: 12px;
  }
}