/* ============================================================
   FEED - ESTILOS TIKTOK PARA BORI (VERSIÓN ESTABLE)
   ACTUALIZADO: OCUPA MÁS ESPACIO, REDUCE MÁRGENES
   ============================================================ */

/* Contenedor principal - ocupa todo el espacio disponible */
.feed-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    height: 100%;
    width: 100%;
    min-height: 0;
    max-height: 100%;
    background: #000000 !important;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    border-radius: 0 !important;
}

/* Track - contenedor de slides */
.feed-track {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000000 !important;
    overflow: hidden;
}

/* Cada slide - ocupa 100% del contenedor */
.feed-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000 !important;
    touch-action: none;
    will-change: transform, opacity;
    transition: opacity 0.3s ease;
    padding: 0 !important;
}

/* Wrapper de la imagen - fullscreen con padding mínimo */
.feed-slide-wrapper-fullscreen {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000 !important;
    padding: 0 !important;
}

/* Imagen - ajustada sin estirar, ocupa casi todo */
.feed-slide-wrapper-fullscreen img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    display: block;
    background: #000000 !important;
    pointer-events: none;
    border-radius: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;
}

/* Placeholder cuando no hay imagen */
.feed-slide-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #94a3b8;
    background: #000000 !important;
}

/* ============================================================
   ACCIONES FLOTANTES - MÁS COMPACTAS
   ============================================================ */
.feed-actions {
    position: absolute;
    right: 12px;
    bottom: 90px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.feed-actions > * {
    pointer-events: auto;
}

.feed-action-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    gap: 2px;
}
.feed-action-btn:hover {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.2);
}
.feed-action-btn:active {
    transform: scale(0.92);
}
.feed-action-btn .feed-count {
    font-size: 0.5rem;
    font-weight: 700;
    line-height: 1;
    color: rgba(255, 255, 255, 0.9);
}

.feed-btn-like {
    background: rgba(239, 68, 68, 0.2);
}
.feed-btn-like:hover {
    background: rgba(239, 68, 68, 0.35);
}
.feed-btn-like.liked {
    background: rgba(239, 68, 68, 0.5);
}
.feed-btn-like.liked i {
    color: #ef4444;
}
.feed-btn-like .fa-beat {
    animation: feedHeartBeat 0.5s ease-in-out;
}
@keyframes feedHeartBeat {
    0%, 100% { transform: scale(1); }
    30% { transform: scale(1.4); }
    60% { transform: scale(0.9); }
}

.feed-btn-comment {
    background: rgba(0, 102, 204, 0.2);
}
.feed-btn-comment:hover {
    background: rgba(0, 102, 204, 0.35);
}

.feed-btn-zoom {
    background: rgba(255, 255, 255, 0.1);
}
.feed-btn-zoom:hover {
    background: rgba(255, 255, 255, 0.2);
}

.feed-btn-delete {
    background: rgba(239, 68, 68, 0.2);
}
.feed-btn-delete:hover {
    background: rgba(239, 68, 68, 0.35);
}

/* ============================================================
   INDICADORES
   ============================================================ */
.feed-autoplay-indicator {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 8;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.5);
    padding: 3px 12px;
    border-radius: 60px;
    backdrop-filter: blur(4px);
}
.feed-autoplay-indicator i {
    font-size: 0.45rem;
}

.feed-swipe-indicator {
    position: absolute;
    top: 13%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 9px 15px;
    background: rgba(0, 0, 0, 0.42);
    border-radius: 16px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.7s ease;
}
.feed-swipe-indicator.hide { opacity: 0; }
.feed-swipe-indicator .arrows {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.feed-swipe-indicator .arrows i {
    animation: feedArrowBounce 1.4s ease-in-out infinite;
    font-size: 1.4rem;
}
.feed-swipe-indicator .arrows i:nth-child(2) {
    animation-delay: 0.2s;
}
@keyframes feedArrowBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

/* CONTADOR OCULTO */
.feed-counter {
    display: none !important;
}

/* ============================================================
   ESTADOS DE CARGA / VACÍO
   ============================================================ */
.feed-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    display: none;
}
.feed-loading .spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-top: 3px solid #f59e0b;
    border-radius: 50%;
    animation: feedSpin 0.8s linear infinite;
}
@keyframes feedSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.feed-loading p {
    margin-top: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.feed-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    display: none;
}
.feed-empty .icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 12px;
}
.feed-empty p {
    font-size: 0.9rem;
    font-weight: 500;
}
.feed-empty .sub {
    font-size: 0.7rem;
    font-weight: 300;
    margin-top: 4px;
}

.feed-retry-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 8px 24px;
    border-radius: 60px;
    font-size: 0.7rem;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.2s;
}
.feed-retry-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
    .feed-actions {
        right: 8px;
        bottom: 70px;
        gap: 8px;
    }
    .feed-action-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    .feed-action-btn .feed-count {
        font-size: 0.4rem;
    }
    .feed-autoplay-indicator {
        font-size: 0.4rem;
        padding: 2px 10px;
        bottom: 12px;
    }
    .feed-swipe-indicator {
        font-size: 0.68rem;
        padding: 8px 14px;
    }
    .feed-swipe-indicator .arrows i {
        font-size: 1.3rem;
    }
    .feed-loading .spinner {
        width: 32px;
        height: 32px;
    }
    .feed-loading p {
        font-size: 0.75rem;
    }
    .feed-empty .icon {
        font-size: 3.5rem;
    }
    .feed-empty p {
        font-size: 0.85rem;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .feed-actions {
        right: 12px;
        bottom: 100px;
        gap: 10px;
    }
    .feed-action-btn {
        width: 46px;
        height: 46px;
        font-size: 1.1rem;
    }
}

@media (min-width: 1025px) {
    .feed-actions {
        right: 16px;
        bottom: 120px;
        gap: 12px;
    }
    .feed-action-btn {
        width: 52px;
        height: 52px;
        font-size: 1.3rem;
    }
}

/* ============================================================
   SCROLLBAR OCULTA
   ============================================================ */
.feed-container::-webkit-scrollbar {
    display: none;
}
.feed-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}