/* === Page Background === */
body {
  background: radial-gradient(circle at 20% 20%, #3a0ca3, #240046, #10002b);
  font-family: "Poppins", sans-serif;
  overflow: hidden;
  color: white;
}

/* === Home button (top-left) === */
.home_btn {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 999;
  display: inline-block;
  padding: 10px 14px;
  background: linear-gradient(90deg, #5b48ed, #6930c3);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(11,7,40,0.6);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.home_btn:hover,
.home_btn:focus {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(91,72,237,0.35);
  outline: none;
}

/* Small-screen tweak: shrink and move slightly inward */
@media (max-width: 480px) {
  .home_btn { top: 12px; left: 12px; padding: 8px 10px; font-size: 14px; }
}

/* === Center Container === */
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  perspective: 1000px;
}

/* === Form Flip Animation === */
.form {
  position: relative;
  transform-style: preserve-3d;
  transition: all 1s ease;
  /* give the form an intrinsic size so flex centering works */
  width: 380px; /* a bit wider than the card to allow spacing */
  height: auto;
  min-height: 320px;
}

.container #signup_toggle {
  display: none;
}

.container #signup_toggle:checked + .form {
  transform: rotateY(-180deg);
}

/* === Shared Card Style (Login / Signup) === */
.form .form_front,
.form .form_back {
  position: absolute;
  /* center the absolute card inside the .form container */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 350px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  padding: 50px 40px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 0 20px rgba(0, 0, 0, 0.8),
    inset 0 0 10px rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  backface-visibility: hidden;
  transition: 0.8s ease;
}

.form .form_back {
  /* keep the centered translate and then rotate */
  transform: translate(-50%, -50%) rotateY(-180deg);
  z-index: 1;
}

.form .form_front {
  z-index: 2;
}

/* === Title / Branding === */
.form_details {
  display: flex;
  align-items: center;     /* vertically centers text with the logo */
  justify-content: center; /* keeps everything centered horizontally */
  gap: 12px;               /* space between logo and text */
  font-size: 25px;
  font-weight: 600;
  color: #fff;
  text-align: center;
  margin-top: 0px;        /* lowers the whole logo-title section */
  margin-bottom: -5px;
}

/* === Floating Inputs === */
.input_container {
  position: relative;
  width: 100%;
}

.input {
  width: 100%;
  height: 45px;
  padding: 0 10px;
  border: none;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 15px;
  outline: none;
  box-shadow:
    inset 2px 2px 5px rgba(0, 0, 0, 0.8),
    inset -1px -1px 5px rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.input:focus {
  box-shadow:
    0 0 8px #5b48ed,
    inset 0 0 10px rgba(0, 0, 0, 0.8);
  transform: scale(1.02);
}

.label {
  position: absolute;
  top: 12px;
  left: 12px;
  color: #ccc;
  font-size: 14px;
  transition: 0.3s ease;
  pointer-events: none;
}

.input:focus ~ .label,
.input:valid ~ .label {
  transform: translateY(-24px);
  font-size: 12px;
  color: #8ab4ff;
}

.input:focus ~ .label,
.input:not(:placeholder-shown) ~ .label {
  transform: translateY(-24px);
  font-size: 12px;
  color: #8ab4ff;
}

/* === Buttons === */
.btn {
  width: 100%;
  padding: 10px;
  font-size: 15px;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(90deg, #5b48ed, #6930c3);
  border: none;
  border-radius: 8px;
  box-shadow:
    0 0 10px rgba(91, 72, 237, 0.7),
    0 0 20px rgba(91, 72, 237, 0.4);
  cursor: pointer;
  transition: 0.3s;
}

.btn:hover {
  transform: scale(1.05);
  box-shadow:
    0 0 15px rgba(91, 72, 237, 1),
    0 0 30px rgba(91, 72, 237, 0.6);
}

/* === Google Button === */
.signin {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: #1f1f1f;
  color: #ddd;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s ease;
  height:50px;
}

.signin:hover {
  background: #2b2b2b;
  transform: scale(1.03);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
}

.signin img,
.signin .google-icon {
  height: 28px; 
  width: auto;
  display: inline-block;
  vertical-align: middle;
}

.signin {
  align-items: center;
}

/* === Flip Toggle Text === */
.form .switch {
  font-size: 14px;
  color: #eee;
}

.form .switch .signup_tog {
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  color: #8ab4ff;
  transition: 0.3s;
}

.form .switch .signup_tog:hover {
  color: #b3d1ff;
}

/* === Logo === */
.form_details img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

/* === Remember Me + Forgot Password Row === */
.options_row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -10px;
  margin-bottom: 10px;
  font-size: 14px;
}

/* Label text styling */
.remember_me {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ccc;
  cursor: pointer;
}

/* Container for the custom checkbox */
.checkbox_container {
  display: block;
  position: relative;
  width: 1.3em;
  height: 1.3em;
  cursor: pointer;
}

/* Hide the default checkbox */
.checkbox_container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* Create a custom circular checkbox */
.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 1.3em;
  width: 1.3em;
  background: black;
  border-radius: 50px;
  transition: all 0.7s ease;
  --spread: 20px;
}

.checkbox_container input:checked ~ .checkmark {
  background: black;
  box-shadow:
    0 0 20px #5b48ed,
    0 0 40px #6930c3,
    0 0 60px #8b5cf6,
    inset 0 0 10px #5b48ed;
}


/* Checkmark tick */
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox_container input:checked ~ .checkmark:after {
  display: block;
}

/* Style of the checkmark tick */
.checkmark:after {
  left: 0.45em;
  top: 0.25em;
  width: 0.25em;
  height: 0.5em;
  border: solid #f0f0f0;
  border-width: 0 0.15em 0.15em 0;
  transform: rotate(45deg);
}

/* Forgot Password link */
.forgot_password {
  color: #8ab4ff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.forgot_password:hover {
  color: #b3d1ff;
  text-decoration: underline;
}

