body {
    margin: 0;
    height: 100vh;
    overflow: hidden;
    background: #000;
    font-family: Arial, sans-serif;
}

.tiktok-container {
    height: 100vh;
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
}

.video-slide {
    width: 100%;
    height: 100vh;
    position: relative;
    scroll-snap-align: start;
    background: #000;
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Info del video */
.video-info {
    position: absolute;
    bottom: 90px;
    left: 20px;
    color: #fff;
    width: 70%;
    text-shadow: 0 0 6px #000;
}

.video-info h3 {
    margin: 0 0 6px 0;
    font-size: 20px;
}

.video-info p {
    margin: 0;
    font-size: 16px;
}

/* Acciones */
.video-actions {
    position: absolute;
    right: 20px;
    top: 55%; /* SUBIMOS TODO EL BLOQUE */
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}


.video-actions .btn {
    background: none;
    border: none;
    color: #fff;
    margin-bottom: 18px;
    font-size: 28px;
    cursor: pointer;
}

.video-actions .btn span {
    display: block;
    font-size: 14px;
    margin-top: 4px;
}



.profile-pic-ring {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: none !important; /* evita distorsión */
}

.profile-pic-ring::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--ring-gif);
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    z-index: 1;
}

.profile-pic {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    z-index: 2;
}





/* BADGE LIVE */
.avatar .small_live {
    position: absolute;
    bottom: -5px; /* un poquito más abajo del avatar */
    left: 50%;
    transform: translateX(-50%);
    background-color: #fe2c55; /* rojo TikTok */
    font-size: 10px;
    width: fit-content;
    padding: 2px 6px;
    border-radius: 5px;
    font-weight: bold;
    color: #fff;
    z-index: 9999;
    line-height: 1;
    letter-spacing: 0.5px;
}

.video-actions a {
    text-decoration: none !important;
}

/* ===== MENÚ INFERIOR ESTILO TIKTOK (ALINEACIÓN PERFECTA) ===== */
.tiktok-footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 70px;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around; /* separación proporcional */
    align-items: center;
    z-index: 99999;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Cada botón */
.footer-item {
    flex: 1;                          /* cada ícono ocupa el mismo espacio */
    text-align: center;               
    color: #fff;
    font-size: 12px;
    position: relative;
}

/* Iconos */
.footer-item img.footer-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Texto debajo */
.footer-text {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ===== Botón LIVE ===== */
.liveBtn {
    display: flex;
    justify-content: center;
    align-items: center;
}

.liveBtn .plus {
    background: #fff;
    color: #000;
    padding: 8px 14px;
    border-radius: 6px;
    border-left: 4px solid #1fd5ec;
    border-right: 4px solid #fd033a;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 14px;
}

/* ===== Notificación Pulse ===== */
.pulse {
    animation: pulse 1.1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ===== Contador rojo + corazones ===== */
.shape-container {
    position: absolute;
    top: -6px;
    right: 12%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.shape-count {
    background: #ff2b55;
    color: #fff;
    padding: 1px 5px;
    font-size: 9px;
    border-radius: 6px;
    font-weight: bold;
    margin-bottom: 2px;
}

/* Corazón */
.shape-wrapper .heart {
    width: 14px;
    height: 14px;
    position: relative;
}

.shape-wrapper .heart div {
    background-color: #ff2b55;
    width: 60%;
    height: 60%;
    border-radius: 50%;
    position: absolute;
}

.heart div:nth-child(1) { left: 0; top: 10%; }
.heart div:nth-child(2) { right: 0; top: 10%; }
.heart div:nth-child(3) {
    width: 70%;
    height: 70%;
    right: 15%;
    bottom: 10%;
    transform: rotate(45deg);
    border-radius: 10% 0 10% 0;
}

/* Latido */
.shape-pulse {
    position: absolute;
    transform: scale(1);
    opacity: .5;
    animation: heartPulse 1.4s infinite;
}

@keyframes heartPulse {
    0%   { transform: scale(1); opacity: .5; }
    50%  { transform: scale(1.5); opacity: 1; }
    100% { transform: scale(1); opacity: .5; }
}

/* ===== TOP ICONS (HEADER TIKTOK) ===== */
.top_icons {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    display: flex;
    z-index: 9999;
    box-sizing: border-box;
    align-items: center;
    justify-content: space-between;
}

/* Logo superior */
.main_logo {
    cursor: pointer;
}
.main_logo h1 {
    margin: 0;
    font-size: 28px;
    color: #fff;
    font-family: sans-serif;
    font-weight: bold;
    animation: tiktok 500ms linear infinite;
}

/* Iconos sonido */
.toggle-sound {
    cursor: pointer;
}
.toggle-sound img {
    width: 30px;
    object-fit: contain;
}

/* Estado sonido encendido */
.sound_on {
    display: none;
}
.toggle-sound.toggle-sound__on .sound_on {
    display: block;
}
.toggle-sound.toggle-sound__on .sound_off {
    display: none;
}

/* TikTok Text Shadow Animation */
@keyframes tiktok {
    0%, 100% {
        text-shadow: -1.5px -1.5px 0 #0ff,
                      1.5px 1.5px   0 #f00;
    }
    25% {
        text-shadow: 1.5px 1.5px   0 #0ff,
                     -1.5px -1.5px 0 #f00;
    }
    50% {
        text-shadow: 1.5px -1.5px  0 #0ff,
                     1.5px -1.5px  0 #f00;
    }
    75% {
        text-shadow: -1.5px 1.5px  0 #0ff,
                      -1.5px 1.5px  0 #f00;
    }
}


/* Corazón rojo cuando está likeado */
.btn.like.liked i {
    color: #ff2b55;
    transform: scale(1.15);
    transition: transform 0.2s ease, color 0.2s ease;
}

/* Popup tipo push arriba */
.like-popup {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%) translateY(-140%);
    width: 92%;
    max-width: 420px;
    z-index: 99999;
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
    pointer-events: none;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.like-popup.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.like-popup-link {
    display: block;
    text-decoration: none;
    color: #fff;
}

.like-popup-inner {
    background: rgba(0, 0, 0, 0.9);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(0,0,0,0.45);
}

/* Cabecera: icono redondo + texto */
.like-popup-header {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    gap: 10px;
}

.like-popup-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid #ff2b55;
}

.like-popup-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.like-popup-text {
    display: flex;
    flex-direction: column;
}

.like-popup-title {
    font-size: 14px;
    font-weight: 700;
}

.like-popup-desc {
    font-size: 12px;
    opacity: 0.85;
}

/* Imagen grande .gif */
.like-popup-image {
    width: 100%;
    max-height: 180px;
    overflow: hidden;
}

.like-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============================
   POPUP DE COMENTARIOS (INFERIOR)
   ============================ */
.comment_wrap {
    display: none;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 999999999 !important; /* ADELANTE DEL MENU */
    background-color: #fff;
    border-top-right-radius: 12px;
    border-top-left-radius: 12px;
    padding: 28px 20px 15px;
    box-sizing: border-box;
    flex-direction: column;
    animation-duration: 0.35s;
}

.comment_overlay {
    z-index: 999999998 !important;
}

/* Cuando se muestra */
.comment_wrap.show {
    display: flex;
    animation: pl__slideInUp 0.35s ease forwards;
}

/* Animación */
@keyframes pl__slideInUp {
  from {
    transform: translateY(100%);
    visibility: visible;
  }
  to {
    transform: translateY(0);
  }
}

/* Parte superior */
.comment_top {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    margin-bottom: 15px;
}

/* Avatar */
.comment_avatar{
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #fe2c55;
    overflow: hidden;
}
.comment_avatar img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Texto del comentario */
.comment_text {
    display: inline-block;
    margin: 0 10px;
    width: 80%;
    font-size: 14px;
}
.comment_text span {
    color: #00aaf7;
    text-decoration: underline;
    cursor: pointer;
}

/* Likes del comentario */
.comment_likes {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    margin-left: auto;
}
.comment_likes img{
    width: 15px;
    margin-bottom: 4px;
}
.comment_likes_count{
    font-size: 10px;
    color: #565656;
}

/* Botón "mostrar más" */
.comment_bottom {
    display: flex;
    color: #00aaf7;
    font-size: 14px;
    cursor: pointer;
    padding-top: 10px;
}

/* Botón cerrar X */
.comment_close {
    position: absolute;
    top: 5px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 4px;
    cursor: pointer;
    z-index: 999999;
}
.comment_close img{
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Oscurecer fondo cuando aparece popup (opcional) */
.comment_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
}
.comment_overlay.show {
    display: block;
}

.comment_text a {
    color: #00aaf7;
    text-decoration: underline;
    font-weight: bold;
}

.comment_bottom a {
    color: #00aaf7;
    text-decoration: underline;
    font-size: 14px;
    font-weight: bold;
}

.progress-range {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: rgba(255,255,255,0.3);
    z-index: 99999;
}

.progress-bar {
    width: 0%;
    height: 100%;
    border-radius: 100px;
    background: linear-gradient(
        90deg,
        rgba(238, 29, 82, 1) 0%,
        rgba(255, 255, 255, 1) 34%,
        rgba(105, 201, 208, 1) 65%
    );
    transition: width 0.25s ease;
}

.more-videos-alert {
    position: absolute;
    top: 58%;               /* 🔥 ajustado para mostrarse abajo de la mitad */
    left: -30px;
    width: 100%;
    z-index: 999999;        /* 🔥 por encima del video */
    pointer-events: none;
}

.more-videos-alert .button-container {
    position: relative;
    left: -1000px;          /* oculto */
    transition: left 0.6s ease;
    pointer-events: auto;   /* clickable */
    margin-left: 15px;
    width: fit-content;
}

/* Colores del botón (original tuyo) */
.button-container-text {
    background-color: #fff;
    padding: 12px 25px;
    text-transform: uppercase;
    font-weight: bold;
    font-family: Roboto;
    font-size: 20px;
}

.button-container:before {
    display: flex;
    content: "";
    top: -6px;
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #1fd5ec;
    left: 0;
    z-index: -1;
}

.button-container:after {
    display: flex;
    content: "";
    right: -6px;
    bottom: -6px;
    position: absolute;
    width: calc(100% + 5px);
    height: 100%;
    background-color: #fd033a;
    z-index: -1;
}


.more-videos-alert a {
    text-decoration: none !important;
    color: inherit !important;     /* usa el color del texto del botón */
}

.more-videos-alert a:visited,
.more-videos-alert a:active,
.more-videos-alert a:hover {
    text-decoration: none !important;
    color: inherit !important;
}


/* === Bounce suave del avatar === */
.avatar-bounce {
    animation: bounceAvatar 1.8s infinite ease-in-out;
}

@keyframes bounceAvatar {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(-6px); }
    100% { transform: translateY(0); }
}




.like-popup-close {
    position: absolute;
    top: 6px;
    right: 10px;
    font-size: 18px;
    color: #fff;
    background: rgba(255,255,255,0.15);
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 999999;
    transition: background 0.2s ease;
}

.like-popup-close:hover {
    background: rgba(255,255,255,0.35);
}

/* ==============================
   AVISO: SIGUIENTE VIDEO (TikTok style)
   ============================== */

.next-video-alert {
    position: absolute;
    bottom: 110px;    /* arriba del menú inferior */
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 9999;
    pointer-events: none;  /* no bloquear video */
}

.next-video-btn {
    background: rgba(0,0,0,0.75);
    border: 1px solid rgba(255,255,255,0.8);
    color: #fff;
    padding: 12px 22px;
    font-size: 16px;
    border-radius: 40px;
    opacity: 0;
    transform: translateY(25px);
    transition: all .45s ease;
    pointer-events: auto; /* clickable */
}

/* Cuando aparece */
.next-video-alert.show .next-video-btn {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   SWIPER LITE — SOLO LO NECESARIO PARA TIKTOK
   ========================================= */

.swiper-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.swiper-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;     /* vertical */
    transition-property: transform;
    box-sizing: content-box;
}

.swiper-slide {
    width: 100%;
    height: 100%;
    position: relative;
    flex-shrink: 0;
}

/* Movimiento suave tipo TikTok */
.swiper-wrapper {
    transition-timing-function: ease;
}

/* Evita bug en Android */
.swiper-container-android .swiper-slide,
.swiper-container-android .swiper-wrapper {
    transform: translate3d(0,0,0);
}

/* Touch control vertical */
.swiper-container-pointer-events {
    touch-action: pan-y;
}

/* CSS Mode (fallback) */
.swiper-container-css-mode > .swiper-wrapper {
    overflow: auto;
    scrollbar-width: none;
}

.swiper-container-css-mode > .swiper-wrapper::-webkit-scrollbar {
    display: none;
}

.swiper-container-css-mode > .swiper-wrapper > .swiper-slide {
    scroll-snap-align: start start;
}

/* Animación de preloader (aunque no la uses, previene bugs) */
@keyframes swiper-preloader-spin {
    100% {
        transform: rotate(360deg);
    }
}

/* ============================
   AVISO "SIGUIENTE VIDEO"
   ============================ */
.hint__next-video {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);   /* Centrado perfecto */
    bottom: 110px;                 /* Ajusta según tu menú inferior */
    z-index: 9999999;

    /* Layout */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    /* Estilos */
    opacity: 0;                    /* Se activa con JS */
    transition: opacity 0.5s ease;
    pointer-events: none;

    /* Contorno estilo TikTok */
    text-shadow:
        2px 2px 0px white,
        -2px -2px 0px white,
         2px -2px 0px white,
        -2px 2px 0px white;
}

.hint__next-video-text {
    font-size: 27px;
    text-transform: uppercase;
    color: #000;
    font-weight: 700;
    margin-bottom: 10px;
}

.hint__next-video-arrow {
    width: 45px;               
    animation: bounceArrow 1.5s infinite;
}

.hint__next-video-arrow img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

@keyframes bounceArrow {
    0%,20%,50%,80%,100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Animación de entrada + salida */
.hint__next-video.show {
    opacity: 1;
}

.hint__next-video.hide {
    opacity: 0;
}
