/* TikTok-style Video Player CSS */
.tiktok-player {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #000;
    overflow: hidden;
}

/* Category Navigation */
.category-nav {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px 15px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    max-height: 80vh;
    overflow-y: auto;
}

.category-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid transparent;
    padding: 12px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 80px;
    text-align: center;
    white-space: nowrap;
}

.category-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.category-btn.active {
    background: #ff0050;
    color: white;
    border-color: #ff0050;
    box-shadow: 0 0 20px rgba(255, 0, 80, 0.5);
}

/* Video Container */
.video-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.main-video {
    max-width: 100%;
    max-height: 100vh;
    width: auto;
    height: auto;
    object-fit: contain;
    background: #000;
}

/* For portrait videos - make them fill height */
.main-video.portrait {
    height: 100vh;
    width: auto;
}

/* For landscape videos - make them fill width but limit height */
.main-video.landscape {
    width: 100vw;
    height: auto;
    max-height: 100vh;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ff0050;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Navigation Controls */
.nav-controls {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nav-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.nav-btn:active {
    transform: scale(0.95);
}

.nav-icon {
    width: 24px;
    height: 24px;
}

/* Video Info Overlay */
.video-info {
    position: absolute;
    bottom: 100px;
    left: 20px;
    z-index: 10;
    color: white;
}

.video-type {
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .category-nav {
        left: 5px;
        top: 20px;
        transform: none;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 8px 6px;
        gap: 4px;
        max-height: none;
        max-width: calc(100vw - 80px);
        border-radius: 15px;
        overflow: visible;
    }
    
    .category-btn {
        font-size: 11px;
        padding: 6px 10px;
        min-width: 50px;
        border-radius: 12px;
        flex-shrink: 0;
    }
    
    .category-btn:hover {
        transform: none;
    }
    
    .nav-controls {
        right: 15px;
        gap: 15px;
    }
    
    .nav-btn {
        width: 45px;
        height: 45px;
    }
    
    .nav-icon {
        width: 20px;
        height: 20px;
    }
    
    .video-info {
        bottom: 80px;
        left: 15px;
    }
    
    .video-type {
        font-size: 12px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .category-nav {
        left: 3px;
        top: 10px;
        padding: 6px 4px;
        gap: 3px;
        max-width: calc(100vw - 60px);
        border-radius: 12px;
    }
    
    .category-btn {
        font-size: 10px;
        padding: 4px 8px;
        min-width: 45px;
        border-radius: 10px;
    }
    
    .nav-controls {
        right: 10px;
        gap: 12px;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .nav-icon {
        width: 18px;
        height: 18px;
    }
    
    .video-info {
        bottom: 70px;
        left: 10px;
    }
    
    .video-type {
        font-size: 11px;
        padding: 4px 8px;
    }
}

/* Fade transition for video switching */
.video-transition {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-transition.fade-in {
    opacity: 1;
}

/* Hide scrollbar */
body::-webkit-scrollbar {
    display: none;
}

body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}