@import url('https://fonts.googleapis.com/css?family=Montserrat:400,800');

* {
  box-sizing: border-box;
}

body {
  padding-top: 30px;
  background: #f6f5f7;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  font-family: 'Montserrat', sans-serif;
  height: 100vh;
  margin: 0;
  transition: background 0.3s, color 0.3s;
}

body.dark-mode {
  background: #1e1e1e;
  color: #f6f5f7;
}

h1 {
  font-weight: bold;
  margin: 0;
}

p {
  font-size: 14px;
  font-weight: 100;
  line-height: 20px;
  letter-spacing: 0.5px;
  margin: 20px 0 30px;
}

button {
  border-radius: 20px;
  border: 1px solid #ff4b2b;
  background-color: #ff4b2b;
  color: #ffffff;
  font-size: 12px;
  font-weight: bold;
  padding: 12px 45px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: transform 80ms ease-in;
  cursor: pointer;
}

button:active {
  transform: scale(0.95);
}

button:focus {
  outline: none;
}

button.ghost {
  background-color: transparent;
  border-color: #ffffff;
}

/* Login button override (if needed) */
.btn {
  /* inherits from button */
}

form {
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 50px;
  height: 100%;
  text-align: center;
  /* corrected border-radius */
  border-radius: 0px 0px 0px 0px !important;
}

input,
select {
  background-color: #eee;
  border: none;
  padding: 12px 15px;
  margin: 8px 0;
  width: 100%;
  border-radius: 4px;
}

body.dark-mode form {
  background-color: #2a2a2a;
}

body.dark-mode input,
body.dark-mode select {
  background-color: #444;
  color: #fff;
}

.container {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25),
              0 10px 10px rgba(0, 0, 0, 0.22);
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 900px;
  min-height: 580px;
}

.form-container {
  position: absolute;
  top: 0;
  height: 100%;
  transition: all 0.6s ease-in-out;
}

.sign-in-container {
  left: 0;
  width: 50%;
  z-index: 2;
}

.sign-up-container {
  left: 0;
  width: 50%;
  z-index: 2;
}

.container.right-panel-active .sign-in-container {
  transform: translateX(100%);
}

.container.right-panel-active .sign-up-container {
  transform: translateX(100%);
  opacity: 1;
  z-index: 5;
  animation: show 0.6s;
}

@keyframes show {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.overlay-container {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  overflow: hidden;
  transition: transform 0.6s ease-in-out;
  z-index: 100;
}

.container.right-panel-active .overlay-container {
  transform: translateX(-100%);
}

.overlay {
  background: linear-gradient(to right, #ff4b2b, #ff416c);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 0 0;
  color: #ffffff;
  position: relative;
  left: -100%;
  height: 100%;
  width: 200%;
  transform: translateX(0);
  transition: transform 0.6s ease-in-out;
}

.container.right-panel-active .overlay {
  transform: translateX(50%);
}

.overlay-panel {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 40px;
  text-align: center;
  top: 0;
  height: 100%;
  width: 50%;
  transform: translateX(0);
  transition: transform 0.6s ease-in-out;
}

.overlay-left {
  transform: translateX(-20%);
}

.container.right-panel-active .overlay-left {
  transform: translateX(0);
}

.overlay-right {
  right: 0;
  transform: translateX(0);
}

.container.right-panel-active .overlay-right {
  transform: translateX(20%);
}

.logo {
  width: 160px;
  margin-bottom: 10px;
}

.auth-footer {
  text-align: center;
  margin-top: 25px;
  font-size: 13px;
  color: inherit;
  padding-bottom: 10px;
}

.auth-footer a {
  color: #2196f3;
  text-decoration: none;
}

.footer-controls {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 18px;
}

.footer-controls button {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: inherit;
  transition: transform 0.2s ease;
}

.footer-controls button:hover {
  transform: scale(1.2);
}

/* Dark mode overlay */
body.dark-mode .overlay {
  background: linear-gradient(to right, #0d47a1, #2196f3);
}

/* Password toggle */
.password-container {
  position: relative;
  width: 100%;
}

.toggle-password {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: inherit;
  font-size: 1rem;
  cursor: pointer;
}

body.dark-mode .toggle-password {
  color: #ddd;
}

/* Options: "Recuérdame" y "Olvidaste tu contraseña" */
.options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1em 0;
  font-size: 0.9em;
}

.options label {
  padding-right: px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.options a {
  margin: 25px;
  text-decoration: none;
  color: inherit;
  gap: 10px;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    width: 100%;
    min-height: auto;
    flex-direction: column;
    box-shadow: none;
    border-radius: 0;
  }

  .form-container,
  .overlay-container {
    width: 100%;
    position: relative;
    padding: 30px;
  }

  .overlay {
    display: none;
  }

  form {
    padding: 30px 20px;
  }
}

/* === Switchers (modo oscuro y lenguaje) === */
.top-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 12px;
  z-index: 10;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: background-color 0.4s;
  border-radius: 34px;
}

.slider:before {
  content: "☀️";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: transform 0.4s ease;
  border-radius: 50%;
  text-align: center;
  line-height: 22px;
  font-size: 14px;
}

.switch input:checked + .slider {
  background-color: #555;
}

.switch input:checked + .slider:before {
  content: "🌙";
  transform: translateX(22px);
}

.lang-toggle {
  font-size: 18px;
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
  border-radius: 20px;
  padding: 4px 10px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.lang-toggle:hover {
  background: rgba(255,255,255,0.1);
}
