* {
    -webkit-tap-highlight-color: transparent;
}

/* --- CONFIGURACIÓN GENERAL --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #f9f6f7;
    color: #333333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Contenedor adaptado a la pantalla del celular */
.app-container {
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* --- HEADER DE MENDOCITA --- */
.app-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-title {
    font-size: 2.8rem;
    font-weight: 700;
    /* Degradado Malbec moderno */
    background: linear-gradient(135deg, #5c0632 0%, #a82c5c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.tagline {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

/* --- TARJETA DE LOGIN --- */
.card {
    width: 100%;
    padding: 25px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid #f0e6eb;
}

.card h2 {
    font-size: 1.5rem;
    color: #5c0632;
    margin-bottom: 20px;
    text-align: center;
}

.input-group {
    margin-bottom: 15px;
}

.input-group input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.input-group input:focus {
    border-color: #a82c5c;
    background-color: #ffffff;
    box-shadow: 0 0 8px rgba(168, 44, 92, 0.15);
}

/* --- BOTONES --- */
.btn-primary {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #5c0632 0%, #a82c5c 100%);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(92, 6, 50, 0.3);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-primary:active {
    transform: scale(0.98);
    opacity: 0.95;
}

/* Enlace para cambiar de pantalla */
.switch-form {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: #777;
}

.switch-form span {
    color: #a82c5c;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}
.hidden {
    display: none !important;
}
/* ========================================== */
/* PANTALLA PRINCIPAL (HOME)                  */
/* ========================================== */

/* Clase para ocultar elementos */
.hidden {
    display: none !important;
}

.home-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #f1f1f1;
    padding-bottom: 10px;
}

.home-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: white;
}

.btn-secondary {
    background: #f1f1f1;
    color: #555;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: bold;
}

.btn-secondary:hover {
    background: #e5e5e5;
}

/* Tarjeta de perfil sugerido */
.profile-card {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    width: 100%; /* Asegura que ocupe todo su contenedor */
    max-width: 350px; /* O el ancho que tenía antes */
    margin: 0 auto; /* Lo centra automáticamente */
}

.profile-photo-placeholder {
    width: 100%;
    height: 350px;
    background: #e2d9db;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 1rem;
    overflow: hidden;
}

/* La foto ocupa todo el placeholder de forma normal sin absolute */
#profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
}


.profile-info {
    padding: 15px;
    text-align: left;
}

.profile-info h2 {
    margin: 0 0 5px 0;
    font-size: 1.4rem;
    color: #4a1525;
}

.profile-info p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.4;
}


/* Botones de acción */
/* Contenedor de los botones centrado debajo de la tarjeta */
.action-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    margin-top: -10px;    /* Los sube un cachito para que no choquen con la barra */
    margin-bottom: 12px;  /* Los separa cómodamente de la navegación */
}



/* Estilo base para ambos botones */
.btn-action {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: none;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

/* Efecto al presionar (rebote estilo app pro) */
.btn-action:active {
    transform: scale(0.90);
}

/* Botón de Dislike (Cruz) */
.btn-no {
    background: #ffffff;
    color: #ff4757;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-no:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Botón de Like (Corazón) combinado con el color de la app */
.btn-yes {
    background: #8B264E;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(139, 38, 78, 0.4);
}

.btn-yes:hover {
    box-shadow: 0 6px 20px rgba(139, 38, 78, 0.6);
}

.hidden {
    display: none !important;
}
#home-container {
    width: 100% !important;
    position: absolute !important;
    top: 0;
    left: 0;
    z-index: 1000;
}
/* Contenedor de fondo (oscurece la pantalla) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  
  /* El efecto borroso mágico 👇 */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* El cartel en sí */
.modal-content {
  background-color: #ffffff;
  padding: 25px;
  border-radius: 20px;
  width: 85%;
  max-width: 350px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

/* Cuando se muestra el modal */
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-overlay.active .modal-content {
  transform: scale(1);
}

/* Encabezado y texto */
.modal-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 10px;
}
.modal-header h2 {
  color:#5c0632; /* El tono borravino de tu logo */
  margin: 0 0 10px 0;
  font-size: 1.6rem;
}
.modal-body p {
  color: #333333;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

/* El botón personalizado */
.modal-btn {
  background: linear-gradient(135deg, #5c0632 0%, #a82c5c 100%);
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 1rem;
  border-radius: 25px;
  font-weight: bold;
  width: 100%;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.modal-btn:active {
  background-color: #31080e;
}
#pantalla-match {
  /* Hace que el fondo de esta pantalla en específico se ponga borroso */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
/* Estilos para los globos del Chat */
.mensaje-globo {
  max-width: 75%;
  padding: 10px 15px;
  border-radius: 18px;
  font-family: sans-serif;
  font-size: 15px;
  line-height: 1.4;
  word-wrap: break-word;
}

/* Mis mensajes (Enviados por mí) */
.mensaje-mio {
  align-self: flex-end;
  background: linear-gradient(135deg, #5c0632 0%, #a82c5c 100%);
  color: white;
  border-bottom-right-radius: 4px; /* Efecto globo de chat moderno */
}

/* Mensajes del otro (Recibidos) */
.mensaje-otro {
  align-self: flex-start;
  background-color: #e9e9eb;
  color: #333;
  border-bottom-left-radius: 4px;
}
/* --- BARRA DE NAVEGACIÓN INFERIOR --- */
/* Contenedor principal de la barra inferior */
.navbar-inferior {
    display: none; /* Oculta por defecto en la pantalla de login */
    justify-content: space-around;
    align-items: center;
    background-color: #ffffff;
    border-top: 1px solid #f0f0f0;
    padding: 8px 0;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

/* Estilo base para cada botón de la barra */
.nav-item {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 6px 12px;
    transition: transform 0.15s ease, color 0.2s ease;
    color: #999999; /* Color inactivo */
}

/* Icono de la barra */
.nav-icon {
    font-size: 22px;
    margin-bottom: 2px;
    transition: transform 0.2s ease;
}

/* Texto de la barra */
.nav-text {
    font-size: 11px;
    font-weight: 500;
}

/* Efecto al presionar cualquier pestaña (rebote suave) */
.nav-item:active {
    transform: scale(0.90);
}

/* Pestaña ACTIVA (la que el usuario tiene seleccionada) */
.nav-item.active {
    color: #8B264E; /* Color borravino principal de tu app */
}

.nav-item.active .nav-icon {
    transform: scale(1.1); /* Agranda un poquito el icono activo */
}

.nav-item.active .nav-text {
    font-weight: 700;
}



/* =================================================== */
/*  DISEÑO PREMIUM BANDEJA DE ENTRADA (ESTILO MALBEC)   */
/* =================================================== */

/* Contenedor principal de la bandeja */
#pantalla-bandeja {
  background-color: #fcfafb; /* Un blanco con un sutil tinte cálido */
}

/* Cabecera de la bandeja */
.chat-header {
  padding: 20px 20px 30px 20px; /* Ajusta el último valor (30px) para cambiar el alto inferior */
  background: linear-gradient(135deg, #5c0632 0%, #a82c5c 100%);
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  color: white;
}

.chat-header h2 {
  margin: 0;
  font-size: 24px;
}


/* Botón volver (si lo usás en el header) */
.btn-volver {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-volver:active {
  background: rgba(255, 255, 255, 0.3);
}

/* Contenedor de la lista de chats */
.lista-conversaciones-container {
    padding: 10px;
    flex: 1;
    overflow-y: auto;
    width: 100%;
    /* 💡 Cambiamos esto para que baje por completo hasta la barra inferior */
    max-height: calc(100vh - 140px); /* Ajusta este valor si necesitas que baje unos píxeles más o menos */
    padding-bottom: 80px; /* 💡 Esto añade un respiro al final para que el último chat no quede pegado al borde */
    -webkit-overflow-scrolling: touch;
}


/* Tarjeta individual - Estilo Fino y Elegante */
.chat-item {
  display: flex;
  align-items: center;
  background: #ffffff;
  padding: 12px 16px; /* Un poco más de espacio interno para que respire */
  margin: 10px 16px;  /* Margen lateral constante */
  border-radius: 16px; /* Bordes más redondeados dan look más moderno */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); /* Sombra más envolvente */
  border: 1px solid rgba(0, 0, 0, 0.03); 
  /* IMPORTANTE: Esto hará que no se vea desproporcionado */
  width: calc(100% - 32px); 
}


/* Ajuste del texto para que no quede raro */
.chat-item-foto {
    width: 60px !important;    /* Forzamos un tamaño fijo pequeño */
    height: 60px !important;   /* Forzamos altura igual para que sea un cuadrado */
    border-radius: 50%;        /* Esto la vuelve a hacer redonda */
    object-fit: cover;         /* Esto evita que la cara de Sofia se vea estirada */
    margin-right: 15px;
    flex-shrink: 0;            /* Evita que la foto se encoja aunque el texto sea largo */
}


.chat-item-nombre {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.chat-item-preview {
  font-size: 13px;
  color: #888;
  margin-top: 2px;
}


/* Mensaje de "No tenés matches aún" con más onda */
.cargando-chats {
  text-align: center;
  padding: 40px 20px;
  color: #6e6e73;
  font-size: 15px;
  line-height: 1.5;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  border: 1px dashed rgba(107, 29, 56, 0.2);
  margin-top: 20px;
}

/* Aseguramos que la bandeja deje libre el espacio inferior */
#pantalla-bandeja {
  background-color: #fcfafb;
  display: none;
  flex-direction: column;
  width: 100vw;
  height: calc(100vh - 65px) !important; /* 👈 Forzamos a dejar los 65px libres */
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90; /* 👈 Le bajamos el z-index para que no tape a la barra */
  box-sizing: border-box;
}

/* Forzamos a la barra de navegación a flotar por encima de CUALQUIER pantalla */
.navbar-inferior {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  z-index: 9999 !important; /* 👈 Un número altísimo para que gane siempre */
}
/* =================================================== */
/*   DISEÑO PANTALLA PRINCIPAL COMPLETO (GAMA MALBEC)  */
/* =================================================== */

/* 1. PARTE SUPERIOR (Header estirado a los extremos y texto en blanco) */
.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: linear-gradient(135deg, #5c0632 0%, #a82c5c 100%);
  
  /* Márgenes negativos para romper el padding del contenedor y llegar al borde */
  margin-top: -16px;   
  margin-left: -16px;  
  margin-right: -16px; 
  width: auto;         
  
  border-top-left-radius: 12px;  
  border-top-right-radius: 12px;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  box-shadow: 0 4px 12px rgba(74, 16, 36, 0.15);
  margin-bottom: 20px;
}

/* Forzamos a que el saludo y cualquier span interno sea blanco brillante */
.home-header h3 span {
  color: #ffffff !important; 
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

/* Estilizado del botón Cerrar Sesión */
#btn-logout {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}
#btn-logout:active {
  background: rgba(255, 255, 255, 0.35);
}


/* 3. BARRA DE NAVEGACIÓN INFERIOR (La que te gustó) */
.navbar-inferior {
  background: #ffffff !important;
  border-top: 1px solid rgba(107, 29, 56, 0.15) !important;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05) !important;
}

.nav-item.active {
  color: #6b1d38 !important; 
}
.nav-item.active svg, .nav-item.active i {
  fill: #6b1d38 !important;
}
/* =================================================== */
/*   DISEÑO INTERFAZ DE CHAT (ESTILO MALBEC MODERN)    */
/* =================================================== */

/* Este es el contenedor que ocupa toda la pantalla */
#pantalla-chat {
    background-color: #7c1d35;
    display: none;
    flex-direction: column; /* Lo mantenemos para que el chat esté abajo */
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
}

/* Esta es la nueva barra superior (la cabecera) */
.chat-header {
    background: linear-gradient(135deg, #5c0632 0%, #a82c5c 100%); /* El color bordó */
    height: 60px;              /* Altura fija y pequeña */
    display: flex;             /* Para alinear los elementos en fila */
    align-items: center;       /* Centrado vertical */
    padding: 0 10px;           /* Aire a los lados */
    gap: 15px;                 /* Espacio entre la flecha, foto y nombre */
    flex-shrink: 0;            /* Evita que se aplaste */
}

/* Aseguramos que la zona de mensajes ocupe el resto */
#chat-mensajes {
    flex: 1;
    overflow-y: auto;
    background-color: white; /* O el color que quieras para el fondo del chat */
}



/* Foto del usuario en la cabecera */
.chat-header-foto {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.6);
  margin-left: 0px;
}

/* Zona de mensajes */
.mensajes-container {
    margin-top: 17px; /* Esto bajará los mensajes 20px del header */
    padding-bottom: 20px; /* Para que el último mensaje no quede pegado al campo de texto */
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 70px; /* Espacio para que el input no tape los mensajes */
}

/* Estilo base de los globos de mensaje */
.mensaje {
  max-width: 75%;
  padding: 8px 14px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.4;
  margin-bottom: 8px;
  word-wrap: break-word;
}

/* Mensaje recibido (Gris claro premium) */
.mensaje.recibido {
  background-color: #f1f1f4;
  color: #2b2b2b;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

/* Mensaje enviado (Tono Malbec suave/destacado) */
.mensaje.enviado {
  background: linear-gradient(135deg, #5c0632 0%, #a82c5c 100%);
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 6px rgba(107, 29, 56, 0.2);
}

/* Caja de entrada de texto inferior */
.chat-input-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    padding: 10px 12px; /* Reducimos un poquito el padding de los costados */
    display: flex;
    align-items: center;
    gap: 8px; /* Reducimos el espacio entre input y botón */
    border-top: 1px solid rgba(107, 29, 56, 0.1);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.03);
    box-sizing: border-box; /* Clave para que los paddings no rompan el ancho */
    z-index: 110;
}


.chat-input-container input {
    flex: 1;
    background: #ffffff; /* Fondo blanco o el color que prefieras */
    border: 1.5px solid #6b1d38; /* ¡Acá está el contorno bordó! */
    padding: 12px 16px;
    border-radius: 24px; /* Bordes bien redondeados estilo píldora */
    font-size: 15px;
    color: #2b2b2b;
    outline: none;
}

/* Botón enviar (Icono de avioncito) */
.chat-input-container button {
    background: #6b1d38; /* El color bordó de tu app */
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%; /* Lo hace un círculo perfecto */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff; /* Icono blanco */
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(107, 29, 56, 0.3);
}

/* Botón enviar (Icono de avioncito) */
#btn-enviar-msj {
  background: #6b1d38;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s;
}


/* Esto obliga a cualquier contenedor de login a centrarse */
.app-container form, .login-box {
    margin-top: auto !important;
    margin-bottom: auto !important;
}

/* Asegura que el contenedor de la lista empiece justo debajo */
.lista-conversaciones-container {
    width: 100%;
    padding: 10px;
}

#lista-conversaciones {
  width: 100%;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column; /* Asegura que las tarjetas se apilen bien */
}
/* Esto fuerza a que TODAS las pantallas se centren verticalmente */
/* Limpiamos la pantalla para que el header tenga su lugar */
/* Este estilo será ÚNICAMENTE para la bandeja de entrada */


/* El cartel vino */
#pantalla-bandeja .header-saludo {
background: linear-gradient(135deg, #5c0632 0%, #a82c5c 100%)!important;
    width: 100% !important;
    height: 70px !important; /* Bajamos de 100px a 70px */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0 0 20px 20px !important;
    margin-bottom: 9px !important; /* Un poco menos de margen abajo */
}

#pantalla-bandeja .header-saludo h2 {
    color: #ffffff !important;
    font-size: 18px !important; /* Un poco más chico para que no se vea gigante */
    margin: 0 !important;
}


/* 2. Tarjeta con sombra, bordes y separada de las orillas */
.chat-card {
    background: white;
    padding: 8px;
    margin: 0 5px 10px 5px; /* Margen a los lados para que "flote" */
    border-radius: 20px; /* Esquinas bien redondeadas */
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* Esa sombra que le da profundidad */
    border: 1px solid #f0f0f0;
}

/* 3. Foto de perfil (el círculo) */
.chat-item-foto {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    border: 2px solid #7c1d35; /* Un borde fino del color del header para resaltar */
}

/* 3. Ajuste de tipografía */
.chat-item-nombre {
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}

.chat-item-preview {
    font-size: 0.85em;
    color: #888; /* Color gris para que sea sutil */
}

/* Aseguramos que la pantalla de chat no herede estilos de la bandeja */
#pantalla-chat {
    display: none; /* Por defecto oculta */
    flex-direction: column;
    height: 100vh;
    width: 100%;
}

/* Un header propio para el chat, distinto al de "Mis Conversaciones" */
.header-chat {
    background-color: #7c1d35 !important;
    padding: 15px !important;
    display: flex !important;
    align-items: center !important;
    color: white !important;
    width: 100% !important;
}

/* Aseguramos que todas las pantallas estén ocultas por defecto 
   y ocupen el lugar correcto cuando se muestren */
.pantalla {
    position: absolute; /* Para que se posicionen sobre la misma capa */
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px); /* 100% de la altura menos el alto de la barra inferior */
    background-color: #ffffff; /* O el color de fondo de tu app */
    display: none; /* Se ocultan por defecto */
    flex-direction: column;
    overflow: hidden; /* Evita que el contenido desborde */
    z-index: 10; /* Asegura que estén arriba de todo */
}

/* Ajuste específico para el chat para que no se deforme */
#pantalla-chat-final {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}
#btn-cerrar-chat {
    background: transparent; /* Para que el fondo sea transparente y no tape el degradado */
    border: none;            /* Quitamos el borde cuadrado */
    border-radius: 50%;      /* Lo vuelve circular */
    width: 40px;             /* Tamaño fijo para que sea un círculo perfecto */
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: white;
}
@keyframes aparecer-match {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.animacion-match {
    animation: aparecer-match 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
/* Pantalla de Perfil */
.header-perfil {
    background: linear-gradient(135deg, #5c0632 0%, #a82c5c 100%);
    color: white;
    padding: 15px;
    text-align: center;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

.contenido-perfil {
    padding: 16px;
    overflow-y: auto;
    max-height: calc(100vh - 150px);
    padding-bottom: 90px;
    -webkit-overflow-scrolling: touch;
}

.titulo-seccion {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

/* Grid de fotos estilo Tinder / Instagram */
.grid-fotos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.slot-foto {
    position: relative;
    aspect-ratio: 3/4;
    background-color: #f3f4f6;
    border-radius: 12px;
    overflow: hidden;
    border: 2px dashed #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slot-foto.principal {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: 1/1;
}



.slot-foto img {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 5;
    border-radius: 12px;
}
/* Forzar que se muestre cuando tenga contenido cargado */
.slot-foto img[src]:not([src=""]) {
    display: block !important;
}

.btn-subir-foto {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: #881337;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Formulario */
.formulario-perfil {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.input-grupo {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-grupo label {
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
}

.input-grupo input, 
.input-grupo textarea {
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    background-color: #f9fafb;
    outline: none;
}

.input-grupo input:focus, 
.input-grupo textarea:focus {
    border-color: #881337;
    background-color: #fff;
}

.input-grupo textarea {
    resize: none;
    height: 80px;
}

.btn-guardar-perfil {
    background: linear-gradient(135deg, #5c0632 0%, #a82c5c 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 16px;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(136, 19, 55, 0.3);
}
/* Forzar al selector de localidad a tener el mismo estilo exacto que los inputs */
.input-grupo select {
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    background-color: #f9fafb;
    outline: none;
    width: 100%;
    color: #333;
    appearance: none; /* Saca la flecha fea por defecto en algunos móviles */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.input-grupo select:focus {
    border-color: #881337;
    background-color: #fff;
}

/* Forzar a que la imagen cargada cubra todo el slot y se muestre bien */
/* Contenedor principal de la pantalla VIP estilo Badoo */
.pantalla-vip-contenedor {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px); /* <- Cambia esto (antes decía - 60vh por error de tipeo) */
    background-color: #2b0c1c;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}


/* Barra superior fija */
.vip-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: linear-gradient(90deg, #3d1027, #5a1526);
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.vip-titulo-principal {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

.vip-btn-volver {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
}

.btn-crear-o-balance {
    background: #d4af37; /* Dorado VIP */
    color: #1a050f;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
}

/* Zona de desplazamiento (Scroll) */
.vip-grid-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

/* Cuadrícula de 2 columnas para las tarjetas */
.vip-grid-tarjetas {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding-bottom: 20px;
}

/* Diseño de cada tarjeta VIP individual */
.vip-tarjeta-card {
    background: linear-gradient(145deg, #4a152d, #2d0b1a);
    border-radius: 14px;
    padding: 12px;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

/* Badge superior derecho de "VIP X Fotos" */
.vip-badge-fotos {
    align-self: flex-end;
    background-color: #f3ce46;
    color: #2b0c1c;
    font-size: 9px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

/* Información del usuario en la tarjeta */
.vip-info-usuario {
    display: flex;
    flex-direction: column;
}

.vip-nombre-edad {
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    margin: 0 0 4px 0;
}

.vip-ubicacion {
    font-size: 11px;
    color: #e0d0d5;
    margin: 0;
}
#contenedor-tarjetas-vip {
    padding-bottom: 120px !important; /* Espacio extra para que la barra no tape el último álbum */
}
