/* TikTok-Like Video Player Styles */

.tiktok-video-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: #000;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.video-list {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    transform: translateY(0);
}

.video-item {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    outline: none;
    border: none;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    pointer-events: none;
    background: linear-gradient(
        transparent 60%, 
        rgba(0, 0, 0, 0.3) 80%, 
        rgba(0, 0, 0, 0.6) 100%
    );
}

.video-info {
    position: absolute;
    bottom: 100px;
    left: 20px;
    right: 80px;
    z-index: 20;
    color: white;
    pointer-events: auto;
}

.video-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.video-description {
    font-size: 14px;
    line-height: 1.4;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    max-height: 60px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.video-controls {
    position: absolute;
    right: 20px;
    bottom: 120px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.control-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.control-btn:active {
    transform: scale(0.95);
}

.play-pause-btn {
    width: 60px;
    height: 60px;
    font-size: 24px;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 30;
    color: white;
    font-size: 48px;
}

.loading-spinner::before {
    content: '⟳';
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.navigation-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 25;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.navigation-hint.show {
    opacity: 1;
}

.progress-indicator {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.progress-dot {
    width: 4px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.progress-dot.active {
    background: white;
}

/* Touch interaction styles */
.video-container.touching .video-overlay {
    background: linear-gradient(
        transparent 40%, 
        rgba(0, 0, 0, 0.2) 60%, 
        rgba(0, 0, 0, 0.5) 100%
    );
}

/* Mobile responsive */
@media (max-width: 768px) {
    .video-info {
        bottom: 80px;
        left: 15px;
        right: 70px;
    }
    
    .video-title {
        font-size: 15px;
    }
    
    .video-description {
        font-size: 13px;
    }
    
    .video-controls {
        right: 15px;
        bottom: 100px;
        gap: 15px;
    }
    
    .control-btn {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .play-pause-btn {
        width: 54px;
        height: 54px;
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .video-info {
        bottom: 60px;
        left: 12px;
        right: 60px;
    }
    
    .video-controls {
        right: 12px;
        bottom: 80px;
        gap: 12px;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .play-pause-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* Fullscreen mode */
.tiktok-video-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    width: 100vw;
    height: 100vh;
}

/* Error state */
.video-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    z-index: 30;
}

.video-error h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.video-error p {
    opacity: 0.7;
    font-size: 14px;
}

/* Smooth scrolling animations */
@media (prefers-reduced-motion: reduce) {
    .video-list {
        transition: none;
    }
    
    .control-btn {
        transition: none;
    }
    
    .navigation-hint {
        transition: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .control-btn {
        background: rgba(0, 0, 0, 0.8);
        border: 2px solid white;
    }
    
    .video-overlay {
        background: linear-gradient(
            transparent 50%, 
            rgba(0, 0, 0, 0.8) 100%
        );
    }
}
