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

/* ========== Reset & Globals ========== */
* {
  box-sizing: border-box;
}

body {
  margin: 20;
  font-family: 'Montserrat', sans-serif;
  background: #f6f5f7;
  color: #333;
  transition: background 0.3s, color 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 30px;
  min-height: 100vh;
  overflow-y: auto;
}

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

/* ========== Typography ========== */
h1 {
  font-weight: bold;
  margin: 20px 0 10px;
}

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

/* ========== Buttons ========== */
button {
  border-radius: 20px;
  border: 1px solid #ff4b2b;
  background-color: #ff4b2b;
  color: #fff;
  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: #fff;
}

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

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

/* ========== Containers ========== */
.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: 100vh;
  display: flex;
}

/* ========== Form Panels ========== */
.form-container {
  position: relative;
  width: 50%;
  max-height: 100vh;
  overflow-y: auto;
  padding: 40px 20px 60px;
  background-color: #fff;
  z-index: 2;
  -webkit-overflow-scrolling: touch;
}

form {
  background-color: #fff;
  text-align: center;
  padding: 40px 10px 80px;
}

/* Modo oscuro */
body.dark-mode form {
  background-color: #2a2a2a;
}

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

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

/* ========== Overlay ========== */
.overlay-container {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  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-size: cover;
  background-repeat: no-repeat;
  position: relative;
  width: 100%;
  height: 100%;
  color: #fff;
  transform: translateX(0);
  transition: transform 0.6s ease-in-out;
}

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

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

.overlay-panel {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 40px;
  text-align: center;
  top: 0;
  height: 100%;
}

.overlay-right {
    /* margin: 20px; */
    transform: translateX(0);
}

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

/* ========== Logo ========== */
.logo {
  max-width: 100%px;
  height: 15%;
  margin: 0 auto 20px;
  display: block;
}

/* ========== Footer ========== */
.auth-footer {
  text-align: center;
  font-size: 13px;
  padding: 15px;
}

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

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

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

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

/* ========== Options Row ========== */
.options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1em 0;
  font-size: 0.9em;
}

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

.options a {
  text-decoration: none;
  color: inherit;
}

/* ========== Top Controls ========== */
.top-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 12px;
  z-index: 10;
}

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

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

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

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

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

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

/* ========== Language Button ========== */
.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);
}

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

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

  .form-container {
    overflow-y: auto;
    height: auto;
  }

  .overlay {
    display: none;
  }

  .logo {
    max-width: 150px;
    margin: 20px auto 10px;
    display: block;
  }

  .top-controls {
    position: static;
    justify-content: center;
    margin-bottom: 15px;
  }
}

/* Mostrar solo en móviles */
.mobile-only {
  display: none;
}

.desktop-only {
  display: block;
}

@media (max-width: 768px) {
  .mobile-only {
    display: block !important;
  }

  .desktop-only {
    display: none !important;
  }
}
