body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Sarabun', sans-serif;
  background: #f0fdfa;
  /* Light teal background */
}

.container {
  display: flex;
  height: 100vh;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.left-side {
  flex: 1.2;
  /* More medical/clean aesthetic image */
  background: url('https://images.unsplash.com/photo-1710074213374-e68503a1b795?fm=jpg&q=60&w=3000&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Nnx8aG9zcGl0YWwlMjBiZWRzfGVufDB8fDB8fHww') no-repeat center center;
  background-size: cover;
  position: relative;
  filter: blur(2px);
  display: none;
}

/* Overlay for left side to ensure text readability if we add any, or just for mood */
.left-side::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.4), rgba(17, 94, 89, 0.6));
}

.right-side {
  flex: 1;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  position: relative;
}

.login-container {
  width: 100%;
  max-width: 420px;
  padding: 2rem;
  /* Removed background/blur for cleaner look on white right-side */
}

h1 {
  font-size: 2rem;
  color: #0f766e;
  margin-bottom: 0.5rem;
  font-weight: 800;
}

h2 {
  font-size: 1rem;
  color: #555;
  margin-bottom: 2rem;
  font-weight: 400;
}

h3 {
  font-size: 1.5rem;
  color: #115e59;
  margin-bottom: 1.5rem;
  text-align: left;
  /* Align left for modern feel */
}

.forms-wrapper {
  position: relative;
  width: 100%;
  /* Removed fixed height constraint so it flows naturally */
}

/* Sliding Logic */
.forms-wrapper.sliding {
  height: 520px;
  /* Increased height to ensure Register form fits */
  overflow: hidden;
  position: relative;
}

.forms-wrapper.sliding .form {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
  /* Smoother bezier */
  opacity: 0;
  pointer-events: none;
}

/* Default positions for inactive forms */
.forms-wrapper.sliding .login-form {
  transform: translateX(-50px);
  /* Slight shift left */
}

.forms-wrapper.sliding .register-form {
  transform: translateX(50px);
  /* Slight shift right */
}

/* Active State */
.forms-wrapper.sliding .form.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
  z-index: 5;
}

/* User Friendly Inputs */
input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  margin: 10px 0;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background-color: #f8fafc;
  font-size: 1rem;
  transition: all 0.2s;
  box-sizing: border-box;
  /* IMPORTANT fix for padding overflow */
}

input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: #0d9488;
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

/* Checkbox styling */
.checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
  justify-content: flex-start;
}

.checkbox label {
  font-size: 0.9rem;
  color: #64748b;
  cursor: pointer;
}

/* Button Styling */
button {
  width: 100%;
  margin-top: 1.5rem;
  padding: 16px;
  background-color: #0f766e;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  transition: background-color 0.2s, transform 0.1s;
}

button:hover {
  background-color: #115e59;
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.extras {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  text-align: center;
}

.extras a {
  color: #0d9488;
  text-decoration: none;
  font-weight: 600;
}

.extras a:hover {
  text-decoration: underline;
}

.quote {
  margin-top: 3rem;
  text-align: center;
  font-style: italic;
  color: #94a3b8;
  font-size: 0.9rem;
}

@media (min-width: 900px) {
  .left-side {
    display: block;
  }
}