html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  font-family: Arial, sans-serif;
  background-image:
    linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
    url('../images/campus.jpeg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  height: 100vh;
  margin: 0;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-bottom: 120px;
}

.page-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px;
  width: 90%;
  max-width: 1200px;
}

/* Contenedor izquierdo con el contenido actual */
.left-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 350px;
}

.logo {
  width: 300px;
  height: auto;
  margin: 0 auto 20px auto;
  display: block;
}

.login-container {
  background-color: #012f44;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
  box-sizing: border-box;
  width: 100%;
}

input {
  width: 100%;
  padding: 12px 20px;
  margin-bottom: 20px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  box-sizing: border-box;
}

button {
  width: 100%;
  padding: 12px 20px;
  background-color: #cc0000;
  color: white;
  font-size: 1.2rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.25s ease;
}

button:hover {
  background-color: #ff3300;
}

.switch-form {
  margin-top: 15px;
  font-size: 1rem;
}

.switch-form a {
  color: #ffbb33;
  text-decoration: underline;
  cursor: pointer;
}

#message {
  margin-top: 15px;
  font-size: 1rem;
  height: 1.2em;
  color: #ff6666;
}

/* Contenedor derecho para el logo Bondly */
.right-content {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bondly-logo {
  width: 100%;
  max-width: 450px;
  height: auto;
  filter: drop-shadow(0 8px 32px rgba(0, 0, 0, 0.8));
}


/* ESTILOS DEL FOOTER DE CREADORES */
.creators-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, rgba(0, 61, 130, 0.95) 0%, rgba(30, 86, 160, 0.95) 70%, rgba(200, 16, 46, 0.95) 100%);
  backdrop-filter: blur(10px);
  padding: 12px 20px;
  z-index: 1000;
}

.creators-footer::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 61, 130, 0.3) 50%, rgba(0, 61, 130, 0.7) 100%);
  pointer-events: none;
}

.creators-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.creators-title {
  color: white;
  font-size: 12px;
  font-weight: 600;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.creators-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.creator-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  text-decoration: none;
  color: white;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.creator-link:hover {
  background: rgba(200, 16, 46, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(200, 16, 46, 0.4);
}

.ig-icon {
  width: 16px;
  height: 16px;
  fill: white;
}

.footer-info {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 10px;
  flex-wrap: wrap;
}

.footer-info span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.footer-divider {
  color: rgba(255, 255, 255, 0.4);
}

/* =========================================
   OPTIMIZACIÓN MÓVIL - PERFECTO
   ========================================= */

@media (max-width: 768px) {

  /* 1. FONDO COMPLETO */
  body {
    background-image:
      linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)),
      url('../images/campus.jpeg');
    height: 100vh;
    min-height: 100vh;
    padding: 0;
    align-items: center;
    justify-content: center;
  }

  /* 2. CONTENEDOR PRINCIPAL - CENTRADO PERFECTO */
  .page-container {
    flex-direction: column;
    gap: 30px;
    width: 100%;
    max-width: 100%;
    padding: 20px;
    height: auto;
  }

  /* 3. LOGO BONDLY - ARRIBA, CENTRADO */
  .right-content {
    width: 100%;
    padding: 0;
    display: flex;
    justify-content: center;
    order: -1;
  }
  
  .bondly-logo {
    width: 180px;
    max-width: 180px;
    filter: drop-shadow(0 4px 16px rgba(255, 255, 255, 0.3));
  }

  /* 4. OCULTAR LOGO UCV */
  .logo {
    display: none;
  }

  /* 5. CONTENEDOR LOGIN - COMPACTO Y CENTRADO */
  .left-content {
    width: 100%;
    max-width: 400px;
    padding: 0;
    margin: 0 auto;
  }

  .login-container {
    background: rgba(1, 47, 68, 0.95);
    backdrop-filter: blur(15px);
    padding: 35px 30px;
    border-radius: 20px;
    box-shadow: 
      0 10px 40px rgba(0, 0, 0, 0.8),
      0 0 0 1px rgba(255, 255, 255, 0.15);
  }

  .login-container h1 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #ffffff;
  }

  /* 6. INPUTS - MODERNOS */
  input {
    padding: 15px 18px;
    margin-bottom: 16px;
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    color: #333;
  }

  input::placeholder {
    color: #999;
  }

  input:focus {
    outline: none;
    border-color: #ffbb33;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(255, 187, 51, 0.2);
  }

  /* 7. BOTÓN - DESTACADO */
  button {
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #cc0000 0%, #ff0000 100%);
    box-shadow: 0 6px 20px rgba(204, 0, 0, 0.5);
    transition: all 0.3s ease;
    margin-top: 8px;
  }

  button:active {
    transform: scale(0.98);
  }

  /* 8. LINK REGISTRO */
  .switch-form {
    margin-top: 20px;
    text-align: center;
    font-size: 0.95rem;
  }

  .switch-form a {
    color: #ffcc44;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid #ffcc44;
  }

  #message {
    text-align: center;
    margin-top: 15px;
  }

  /* 9. FOOTER - OCULTO EN MÓVIL */
  .creators-footer {
    display: none;
  }

  /* ALTERNATIVA: Si quieres footer minimalista en móvil, descomenta esto */
  /*
  .creators-footer {
    position: relative;
    background: transparent;
    backdrop-filter: none;
    padding: 20px 15px 15px;
    margin-top: 30px;
  }

  .creators-footer::before {
    display: none;
  }

  .creators-container {
    gap: 8px;
  }

  .creators-title {
    font-size: 10px;
  }

  .creators-grid {
    gap: 6px;
  }

  .creator-link {
    padding: 6px 10px;
    font-size: 10px;
    background: rgba(0, 0, 0, 0.4);
  }

  .ig-icon {
    width: 12px;
    height: 12px;
  }

  .footer-info {
    font-size: 8px;
  }
  */
}

/* Pantallas muy pequeñas */
@media (max-width: 360px) {
  .bondly-logo {
    width: 150px;
    max-width: 150px;
  }

  .left-content {
    max-width: 100%;
  }

  .login-container {
    padding: 30px 20px;
  }

  .login-container h1 {
    font-size: 1.6rem;
  }

  input {
    padding: 14px 16px;
    font-size: 0.95rem;
  }

  button {
    padding: 14px 18px;
    font-size: 1.1rem;
  }
}
/* =========================================
   ESTILOS BOTÓN Y MODAL DE POLÍTICAS
   ========================================= */

/* Botón flotante "i" */
.btn-policies {
  position: fixed;
  top: 25px;
  right: 25px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(1, 47, 68, 0.8); /* Azul oscuro semi-transparente */
  color: #fff;
  font-family: 'Times New Roman', serif; /* Fuente elegante para la "i" */
  font-style: italic;
  font-weight: bold;
  font-size: 24px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  z-index: 2000; /* Por encima de todo */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  padding: 0; /* Reset del padding global de botones */
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.btn-policies:hover {
  background: #cc0000; /* Rojo Bondly al hover */
  transform: scale(1.1) rotate(10deg);
  border-color: #fff;
}

/* Fondo oscuro del modal */
.modal-policies {
  display: none; /* Oculto por defecto */
  position: fixed;
  z-index: 3000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85); /* Fondo muy oscuro */
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

/* Caja de contenido del modal */
.modal-policies-content {
  background: linear-gradient(135deg, #012f44 0%, #001f33 100%);
  padding: 30px;
  border-radius: 20px;
  width: 90%;
  max-width: 600px;
  max-height: 85vh; /* Altura máxima del 85% de la pantalla */
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  color: white;
}

/* Título */
.modal-policies-content h2 {
  margin-top: 0;
  margin-bottom: 20px;
  text-align: center;
  color: #ffbb33;
  font-size: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 15px;
}

/* Área de texto con SCROLL */
.policies-text {
  overflow-y: auto; /* Scroll vertical activado */
  padding-right: 10px; /* Espacio para el scrollbar */
  margin-bottom: 20px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #e0e0e0;
  text-align: left; /* Lectura más fácil */
}

/* Estilo del scrollbar interno */
.policies-text::-webkit-scrollbar {
  width: 8px;
}
.policies-text::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}
.policies-text::-webkit-scrollbar-thumb {
  background: #cc0000;
  border-radius: 4px;
}

.policies-text h3 {
  color: #fff;
  margin-top: 15px;
  margin-bottom: 5px;
  font-size: 1.1rem;
}

/* Botón cerrar (X) */
.close-policies {
  position: absolute;
  top: 15px;
  right: 20px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
  line-height: 1;
}

.close-policies:hover {
  color: #cc0000;
}

/* Botón "Entendido" */
#btn-accept-policies {
  margin-top: auto;
  background: #28a745; /* Verde aceptación */
  width: 100%;
  padding: 12px;
  font-size: 1rem;
}

#btn-accept-policies:hover {
  background: #218838;
}

/* Animación de entrada */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* RESPONSIVE MÓVIL (VERTICAL) */
@media (max-width: 768px) {
  .btn-policies {
    top: 15px;
    right: 15px; /* Un poco más pegado al borde en móvil */
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .modal-policies-content {
    padding: 20px;
    width: 95%; /* Ocupa más ancho en móvil */
    max-height: 80vh; /* Un poco menos de altura para evitar toques fantasma */
  }

  .modal-policies-content h2 {
    font-size: 1.2rem;
  }

  .policies-text {
    font-size: 0.9rem; /* Texto un pelín más chico */
  }
}

/* =========================================
   MODAL DE CARGANDO
   ========================================= */

.loading-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.loading-modal.show {
  opacity: 1;
}

.loading-content {
  background: white;
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 90%;
  width: 400px;
  animation: slideIn 0.4s ease;
}

@keyframes slideIn {
  from {
    transform: translateY(-30px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.loading-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
}

.spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.success-checkmark {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: checkmark 0.6s ease forwards;
}

@keyframes checkmark {
  to {
    stroke-dashoffset: 0;
  }
}

.success-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: circle 0.6s ease forwards;
}

@keyframes circle {
  to {
    stroke-dashoffset: 0;
  }
}

.error-x {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: checkmark 0.4s ease forwards;
}

.loading-text {
  font-size: 18px;
  color: #333;
  font-weight: 500;
  margin-top: 10px;
}

.loading-subtext {
  font-size: 14px;
  color: #666;
  margin-top: 8px;
}

/* Responsive para el modal de cargando */
@media (max-width: 480px) {
  .loading-content {
    padding: 30px 20px;
    width: 320px;
    border-radius: 16px;
  }
  
  .loading-icon {
    width: 60px;
    height: 60px;
  }
  
  .loading-text {
    font-size: 16px;
  }
  
  .loading-subtext {
    font-size: 13px;
  }
}