/* TikTok-подобный видеоплеер */

.tiktok-video-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
}

.tiktok-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
    z-index: 10;
}

.video-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.video-counter {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.video-counter .current {
    color: #2dd4bf;
}

/* Анимации для свайпов */
.tiktok-video-container.swipe-up {
    animation: swipeUp 0.3s ease-out;
}

.tiktok-video-container.swipe-down {
    animation: swipeDown 0.3s ease-out;
}

@keyframes swipeUp {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

@keyframes swipeDown {
    0% { transform: translateY(0); }
    50% { transform: translateY(10px); }
    100% { transform: translateY(0); }
}

/* Индикаторы свайпов */
.swipe-indicator {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    pointer-events: none;
}

.swipe-indicator.up {
    top: 20px;
    animation: bounceUp 2s infinite;
}

.swipe-indicator.down {
    bottom: 20px;
    animation: bounceDown 2s infinite;
}

.swipe-indicator svg {
    width: 24px;
    height: 24px;
    fill: rgba(255, 255, 255, 0.8);
}

@keyframes bounceUp {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-5px); }
    60% { transform: translateX(-50%) translateY(-3px); }
}

@keyframes bounceDown {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(5px); }
    60% { transform: translateX(-50%) translateY(3px); }
}

/* Адаптивность */
@media (max-width: 768px) {
    .video-controls {
        top: 15px;
        right: 15px;
    }
    
    .video-counter {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .video-loading {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Улучшения для touch устройств */
@media (hover: none) and (pointer: coarse) {
    .tiktok-video-container {
        touch-action: pan-y;
    }
    
    .swipe-indicator {
        display: block;
    }
}

/* Скрыть индикаторы на desktop */
@media (hover: hover) and (pointer: fine) {
    .swipe-indicator {
        display: none;
    }
}
