.spinner2 {
  display: inline-block;
  border: 8px solid #f3f3f3;
  border-top: 8px solid #3498db;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: girar 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes girar {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.full-post-modal {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    position: fixed;
    z-index: 999999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    overflow-y: auto;
}

.full-post-modal.active {
    visibility: visible;
    opacity: 1;
}

.full-post-content {
    background: #fff;
    max-width: 700px;
    margin: 60px auto;
    padding: 20px;
    border-radius: 10px;
    position: relative;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.full-post-modal.active .full-post-content {
    transform: translateY(0);
    opacity: 1;
}

@media screen and (max-width: 767px) {
  .gap {
    margin: 0 !important;
    padding: 0 !important;
  }
}


.comentarios-modal {
    display: none;
    position: fixed;
    z-index: 99999999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow-y: auto; /* 👈 necesario */
    background-color: rgba(0, 0, 0, 0.85);
    padding: 20px;
    box-sizing: border-box;
	
}

.comentarios-contenido {
    background: white;
    max-width: 700px;
    width: 100%;
    margin: auto;
    padding: 20px;
    border-radius: 10px;
    position: relative;
    box-sizing: border-box;

    animation: aparecerModal 0.3s ease-out;

    /* 👇 clave: crece según contenido */
    height: auto;
    max-height: none;
    overflow: visible;
	display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 100px;
}

.cerrar-modal {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 50px;
    background: none;
    border: none;
    cursor: pointer;
    color: #ffffff;
    z-index: 10000;
}

@media (max-width: 768px) {
    .comentarios-contenido {
        width: 100%;
        margin: 0;
        height: 100%;
        overflow-y: auto;
    }

    .cerrar-modal {
		color: #000000;
        font-size: 36px;
        top: 5px;
        right: 15px;
    }
}

@media (max-width: 768px) {
    .comentarios-contenido {
        width: 100%;
        height: 100%;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box;
    }

    #comentarios-contenido-interno,
    .contenido-dinamico {
        margin: 0 !important;
		padding: 15px 20px;
    box-sizing: border-box;
    }

    /* Si post.php trae un contenedor con clase "central-meta" o similar: */
    #comentarios-contenido-interno > .central-meta {
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }
}
@keyframes aparecerModal {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: auto;
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
    max-height: 50vh;
    object-fit: contain;
	top: 7px;
}

.video-container img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 50vh;
    object-fit: contain;
	background-color: black;
	top: 7px;
}

.video-container-his {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: auto;
}

.video-container-his video {
    width: 100%;
    height: auto;
    display: block;
    max-height: 100vh;
    object-fit: contain;
	top: 7px;
}

.video-container-his img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 100vh;
    object-fit: contain;
	background-color: black;
	top: 7px;
}

.simulated-fullscreen-container {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
}

.simulated-fullscreen-container video {
    width: auto !important;
    height: auto !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
}

.simulated-fullscreen-button {
    position: absolute;
    bottom: 40px;
    right: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    z-index: 99996;
    font-size: 16px;
    border-radius: 5px;
}

@supports (-webkit-touch-callout: none) {
  .simulated-fullscreen-button {
    bottom: 40px; /* Ajusta según lo alto que necesites moverlo */
  }
}

/* Contenedor principal de historias */
.historia-contenedor-principal {
    display: flex;
    width: 920px;
    overflow-x: auto;
    padding: 10px;
    gap: 12px;


}

/* Scrollbar personalizado para escritorio */
.historia-contenedor-principal::-webkit-scrollbar {
    height: 8px;
}

.historia-contenedor-principal::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.historia-contenedor-principal::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #ff5e5e, #ffb347);
    border-radius: 10px;
}

/* Ocultar scrollbar en móviles */
@media (max-width: 768px) {
    .historia-contenedor-principal::-webkit-scrollbar {
        display: none;
    }

    .historia-contenedor-principal {
        -ms-overflow-style: none; /* IE y Edge */
        scrollbar-width: none;    /* Firefox */
    }
}

/* Historia individual */
.historia-circulo {
    flex: 0 0 auto;
    width: 80px;
    text-align: center;
    scroll-snap-align: start;
}

/* Avatar con borde colorido */
.historia-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #ff5e5e;
    margin: 0 auto 5px auto;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background-color: white;
}

.historia-avatar.historia {
    border: 3px solid #3498db; /* azul */
}

/* Historias en vivo: aro rojo */
.historia-avatar.live {
    border: 3px solid #e74c3c; /* rojo intenso */
}

/* Imagen del avatar */
.historia-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Nombre debajo del avatar */
.historia-nombre {
    font-size: 12px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Modal para mostrar historias */
.modal-historia {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0; top: 0;
    width: 100vw;
    height: 100vh;
    background: #000 !important;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.modal-historia .contenido-modal {
	position: relative;
    background: transparent !important;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    padding: 0;
    margin: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.cerrar-modal-his {
    position: absolute;
    top: 50px;
    right: 30px;
    font-size: 3em;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 99999;
    text-shadow: 0 1px 10px #000;
    opacity: 0.85;
}

.historia-contenido-centro {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
    position: relative;
}


.usuario-modal {
    position: absolute;
    top: 100px;         /* distancia desde arriba */
    left: 50%;          /* lo coloca en el medio */
    transform: translateX(-50%); /* lo centra de verdad */
    font-weight: bold;
    font-size: 18px;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8);
    z-index: 100000;
}

.archivo-modal img, .archivo-modal video {
    border-radius: 10px;
    max-width: 100%;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.comentario-historia {
    position: absolute;
    bottom: 65px; /* ⬅️ Deja espacio para los controles Plyr */
    left: 8%;
	right: 8%;
    width: 84%;
    max-height: 100px; /* ⬅️ Limita el alto máximo */
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 14px;
    overflow-y: auto;
    box-sizing: border-box;
    text-align: center;
	border-radius: 6px;

}
.historia-scroll-externo {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px;
}

.historia-scroll-interno {
    display: flex;
    gap: 12px;
    margin: 0 auto;
}

/* Solo en pantallas grandes → centramos las historias */
@media (min-width: 769px) {
    .historia-scroll-externo {
        display: flex;
        justify-content: center;
    }
}
.navegar-historia {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    background: transparent; /* ✅ fondo totalmente transparente */
    border: none;
    cursor: pointer;
    z-index: 10;
    padding: 0;
    margin: 0;
    font-size: 0; /* ✅ sin texto visible */
    outline: none;
}


.navegar-historia.izquierda {
    left: 0;
}
.navegar-historia.derecha {
    right: 0;
}

/* Botones redondos visibles SOLO en escritorio */
@media (hover: hover) and (pointer: fine) {
    .navegar-historia::after {
        content: '';
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        background-color: rgba(0, 0, 0, 0.6);
        color: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        z-index: 11;
    }

    .navegar-historia.izquierda::after {
        content: '‹';
        left: 15px;
    }

    .navegar-historia.derecha::after {
        content: '›';
        right: 15px;
    }
}


.indicadores-historias {
    position: absolute;
    top: 140px;   /* ⬅️ lo bajamos debajo del nombre */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 100000;
}

.indicador {
    width: 30px;
    height: 4px;
    background: rgba(255, 255, 255, 0.4); /* más visible sobre negro */
    border-radius: 4px;
}

.indicador.activo {
    background: #fff; /* bien marcado */
}
.boton-borrar-historia {
    position: absolute;
    top: 10px;
    font-size: 20px;
    text-decoration: none;
    z-index: 10;
    background: rgba(0,0,0,0.5);
    padding: 6px 10px;
    color: white;
    border-radius: 6px;
}

.boton-borrar-historia.izquierda {
    left: 10px;
}
.menu-historia {
    position: absolute;
    top: 60px;
    left: 25px;
    z-index: 999999999999;
}

#modal-fondo-negro {
    display: none;
    position: fixed;
    z-index: 999998; /* Un paso debajo de tus modales de historia */
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    opacity: 1;
}

.menu-btn {
    background: none;
    border: none;
    font-size: 30px;
    color: white; /* ⬅️ ahora es negro */
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.menu-opciones {
    display: none;
    position: absolute;
    top: 28px;
    left: 0;
    background: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    border-radius: 6px;
    overflow: hidden;
    z-index: 999;
}

.menu-opciones a {
    display: block;
    padding: 8px 14px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.menu-opciones a:hover {
    background: #f2f2f2;
}
.video-modal {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: #000;
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-modal-content {
  position: relative;
  background: transparent; /* Sin fondo para que sea como fullscreen */
  border-radius: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  top: 10px;
}
.video-modal-close {
  position: absolute;
  right: 0px; top: 40px;
  font-size: 3em;
  color: white;
  cursor: pointer;
  z-index: 999999999 !important; /* Súper alto */
  text-shadow: 0 2px 10px #000;
  border-radius: 100px;
  padding: 0 16px 2px 16px;
  user-select: none;
}
#video-modal-inner {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
#video-modal-inner video {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  border-radius: 0;
  background: black;
  object-fit: contain;
}
.tiktok-modal-content {
  background: transparent;
  border-radius: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}
.tiktok-slides-wrapper {
  flex: 1 1 auto;
  width: 100vw; height: 100vh;
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
}
.tiktok-slide {
  width: 100vw; height: 100vh;
  display: flex;
  align-items: center; justify-content: center;
  position: absolute;
  left: 0;
  top: 0;
  transition: transform 0.15s cubic-bezier(.17,.67,.83,.67);
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

@keyframes aparecerVideoTiktok {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.tiktok-slide.active {
  opacity: 1;
  z-index: 2;
  pointer-events: auto;
  transform: translateY(0%);
  animation: aparecerVideoTiktok 0.25s ease-out;
}
.tiktok-slide.prev {
  opacity: 0.4;
  z-index: 1;
  transform: translateY(-100%);
}
.tiktok-slide.next {
  opacity: 0.4;
  z-index: 1;
  transform: translateY(100%);
}
.tiktok-slide video {
  max-width: 100vw;
  max-height: 100vh;
  width: auto;
  height: auto;
  object-fit: contain; /* asegura que no se deforme */
  background: black;
}
/* Ajuste dinámico de orientación TikTok */
.tiktok-slide.vertical video {
  width: auto !important;
  height: 100vh !important;
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain !important;
}
.tiktok-slide.horizontal video {
  width: 100vw !important;
  height: auto !important;
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain !important;
}
.video-caption {
  position: absolute;
  bottom: 50px;
  left: 20px;
  color: white;
  font-size: 1.1em;
  max-width: 80%;
  background: rgba(0, 0, 0, 0.5);
  padding: 10px 14px;
  border-radius: 8px;
  line-height: 1.4;
  text-shadow: 1px 1px 2px #000;
  z-index: 10;
  font-family: sans-serif;
}
@media (max-width: 600px) {
  .video-caption {
    left: 0;
    right: 0;
    max-width: 100vw;
    width: 100vw;
    border-radius: 0;
    padding-left: 8vw;
    padding-right: 8vw;
    text-align: left;
    box-sizing: border-box;
  }
}

.tiktok-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    height: 100%;
    flex-direction: column;
    font-family: sans-serif;
    color: white;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px); /* empieza más abajo */
  }
  to {
    opacity: 1;
    transform: translateY(0); /* llega a su posición normal */
  }
}

video {
  opacity: 0; /* oculto hasta animar */
  animation: slideUp 0.6s ease-out forwards;
}

.experiencia-texto {
    margin-top: auto;
    pointer-events: auto;
    padding-bottom: 70px;
	pointer-events: none;
}

.experiencia-texto .texto {
    font-size: 16px;
    margin-bottom: 6px;
    word-break: break-word;
	margin-right: 50px;
}

.nombre-usuario {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nombre-usuario .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.nombre-usuario .nombre {
    font-weight: bold;
    font-size: 15px;
}

.acciones-tiktok {
    position: absolute;
    right: 3px;
    bottom: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    pointer-events: auto;
}

.acciones-tiktok .icono {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

/* Iconos tipo imagen (ej: saludo.png) */
.acciones-tiktok .icono img {
    width: 34px;
    height: 34px;
    -webkit-filter: drop-shadow(5px 5px 5px #222);
  filter: drop-shadow(5px 5px 5px #222);
}

/* Contadores debajo de cada icono */
.acciones-tiktok .contador {
    font-size: 14px;
    margin-top: 4px;
    color: #fff; /* Asegura blanco */
    text-shadow: 0 0 4px rgba(0,0,0,0.8); /* 👈 sombra para contraste */
}

.experiencia-texto .texto {
    font-size: 16px;
    margin-bottom: 6px;
    word-break: break-word;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 1); /* sombra más fuerte */
}

.nombre-usuario .nombre {
    font-weight: bold;
    font-size: 15px;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 1); /* sombra más fuerte */
}
.icono.enviado img {
    filter: brightness(1.2) saturate(1.6);
    transform: scale(1.1);
}
.sticker-box {
    width: 70px;
    height: 70px;
    display: inline-block;
    overflow: hidden;
  }

  .sticker-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  .sticker-box2 {
    width: 50%;
    height: 50%;
    display: inline-block;

  }


 @keyframes palpitar {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.sticker-box2 img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: palpitar 1s infinite ease-in-out;
}

  
  .sticker-select {
    display: inline-block;
    cursor: pointer;
    margin: 5px;
  }

  .sticker-select input[type="radio"] {
    display: none;
  }

  .sticker-box {
    width: 70px;
    height: 70px;
    overflow: hidden;

    transition: filter 0.3s ease;
  }

  .sticker-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: filter 0.3s ease;
  }

  .sticker-select input[type="radio"]:checked + .sticker-box img {
    filter: brightness(0.6); /* oscurecer */
  }
  .sticker-scroll {
  max-height: 150px;
  overflow-y: auto;
  padding: 1px;
  margin-bottom: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border: none; /* <- Elimina el borde */
}
.sticker-select {
  flex: 0 0 auto;
}
.parrafo-animado {
  animation: cambioColores 6s infinite alternate ease-in-out,
             movimientoSuave 3s infinite alternate ease-in-out;
}

/* Animación de colores */
@keyframes cambioColores {
  0%   { color: #ff6b6b; }
  33%  { color: #feca57; }
  66%  { color: #48dbfb; }
  100% { color: #1dd1a1; }
}

/* Animación suave de “respiración” y movimiento */
@keyframes movimientoSuave {
  0%   { transform: scale(1) translateY(0); }
  100% { transform: scale(1.05) translateY(-3px); }
}

.audio-floating{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 99999;
  display: flex; align-items: center; gap: 12px;
  background: #111; color: #fff;
  padding: 10px 14px;
  box-shadow: 0 2px 16px rgba(0,0,0,.4);
  transform: translateY(-100%);
  transition: transform .25s ease;
}
.audio-floating.show{ transform: translateY(0); }
.audio-floating.hidden{ transform: translateY(-100%); }
.audio-floating .audio-title{
  font-size: 14px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 40vw;
}
.audio-floating audio{ flex: 1 1 auto; width: 100%; }
.audio-close{
  background: transparent; border: 0; color: #fff; font-size: 22px; cursor: pointer;
  line-height: 1; padding: 0 6px;
}
@media (max-width: 600px){
  .audio-floating .audio-title{ display:none; }
}
.myButton {
	box-shadow:inset 0px 1px 0px 0px #54a3f7;
	background:linear-gradient(to bottom, #007dc1 5%, #0061a7 100%);
	background-color:#007dc1;
	border-radius:3px;
	border:1px solid #124d77;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-family:Arial;
	font-size:13px;
	padding:6px 24px;
	text-decoration:none;
	text-shadow:0px 1px 0px #154682;
}
.myButton:hover {
	background:linear-gradient(to bottom, #0061a7 5%, #007dc1 100%);
	background-color:#0061a7;
}
.myButton:active {
	position:relative;
	top:1px;
}

        