@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Fredoka:wght@300..700&display=swap");

:root {
  --primary: #1e3a5f;
  --secondary: #f8b500;
  --accent: #4361ee;
  --text-dark: #1b263b;
  --text-light: #415a77;
  --text-muted: #778da9;
  --bg-body: #ffffff;
  --bg-light: #f8f9fa;
  --white: #ffffff;
  --danger: #ef4444;
  --radius-lg: 16px;
  --radius-pill: 50px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.08); /* Slightly stronger for auth card feel */
  --transition: 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  color: var(--text-dark);
  background-color: var(--white);
  height: 100vh;
  display: flex;
  overflow: hidden; /* Prevent scroll on full split screen */
}

/* --- Layout Split --- */
.form-section {
  width: 50%;
  padding: 2rem; /* Increased slightly for breathing room */
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow-y: auto;
  height: 100vh;
}

.image-section {
  width: 50%;
  background: url("../images/child.jpeg") no-repeat center center/cover;
  position: relative;
}

/* Gradient overlay for text readability if needed on image side */
.image-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(30, 58, 95, 0.2),
    rgba(30, 58, 95, 0)
  );
}

/* --- Form Container --- */
.form-container {
  max-width: 440px; /* Slightly wider */
  width: 100%;
  margin: 0 auto;
}

.logo-container {
  margin-bottom: 1.5rem; /* Better spacing */
  text-align: center;
}

.logo {
  font-family: "Fredoka", sans-serif;
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.logo span {
  color: var(--secondary);
}

.form-container h1 {
  font-family: "Fredoka", sans-serif;
  font-size: 1.85rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
  text-align: center;
}

.subtitle {
  color: var(--text-light);
  margin-bottom: 1.75rem; /* Increased spacing */
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: center;
}

/* --- Inputs --- */
.input-group {
  margin-bottom: 1rem; /* More comfortable spacing */
}

.input-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--text-dark);
  font-size: 0.9rem;
}

.input-group input {
  width: 100%;
  padding: 0.75rem 1.1rem; /* Comfortable padding */
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
  background: var(--bg-light);
  outline: none;
}

.input-group input:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.input-group input::placeholder {
  color: #cbd5e1;
}

.password-wrapper {
  position: relative;
}

.password-toggle-icon {
  position: absolute;
  right: 1.1rem; /* Matches input padding */
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.password-toggle-icon:hover {
  color: var(--primary);
}

/* --- Actions (Checkbox / Forgot Password) --- */
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--text-light);
  user-select: none;
}

.checkbox-container input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.forgot-password {
  color: var(--secondary);
  font-weight: 500;
  text-decoration: none;
}

.forgot-password:hover {
  text-decoration: underline;
}

/* --- Buttons --- */
button {
  width: 100%;
  padding: 0.85rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(30, 58, 95, 0.2);
}

.btn-primary:hover {
  background: #152943;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(30, 58, 95, 0.3);
}

.btn-google {
  background: var(--white);
  color: var(--text-dark);
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.btn-google:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.footer-text {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-light);
}

.footer-text a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.footer-text a:hover {
  text-decoration: underline;
  color: var(--secondary);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  body {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  .image-section {
    display: none; /* Hide image on mobile for cleaner look or make it a header */
  }

  .form-section {
    width: 100%;
    height: 100vh;
    padding: 2rem 1.5rem;
  }

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

/* HTML: <div class="loader"></div> */
.loader {
  width: 100px;
  height: 40px;
  --g: radial-gradient(
      farthest-side,
      #0000 calc(95% - 3px),
      #fff calc(100% - 3px) 98%,
      #0000 101%
    )
    no-repeat;
  background: var(--g), var(--g), var(--g);
  background-size: 30px 30px;
  animation: l9 1s infinite alternate;
}
@keyframes l9 {
  0% {
    background-position:
      0 50%,
      50% 50%,
      100% 50%;
  }
  20% {
    background-position:
      0 0,
      50% 50%,
      100% 50%;
  }
  40% {
    background-position:
      0 100%,
      50% 0,
      100% 50%;
  }
  60% {
    background-position:
      0 50%,
      50% 100%,
      100% 0;
  }
  80% {
    background-position:
      0 50%,
      50% 50%,
      100% 100%;
  }
  100% {
    background-position:
      0 50%,
      50% 50%,
      100% 50%;
  }
}
