/* =======================================
   VLOGS/VIDEO PAGE STYLES
   ======================================= */

:root {
    --primary-red: #C41E3A;
    --dark-bg: #1a1a1a;
    --youtube-red: #FF0000;
}

/* Vlogs Hero */
.vlogs-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.search-box {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 5px;
}

.search-box .form-control {
    background: transparent;
    border: none;
    color: white;
}

.search-box .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-box .form-control:focus {
    background: transparent;
    color: white;
    box-shadow: none;
}

/* Category Filter */
.category-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
}

.category-tabs::-webkit-scrollbar {
    height: 4px;
}

.category-tabs::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.category-tabs::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 2px;
}

.category-btn {
    background: white;
    border: 2px solid #dee2e6;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    cursor: pointer;
}

.category-btn:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
}

.category-btn.active {
    background: var(--primary-red);
    border-color: var(--primary-red);
    color: white;
}

/* Video Card */
.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.video-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.video-card-link {
    text-decoration: none;
    color: inherit;
}

.video-thumbnail-wrapper {
    position: relative;
    overflow: hidden;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
}

.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail {
    transform: scale(1.05);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-card:hover .video-overlay {
    opacity: 1;
}

.video-overlay i {
    color: white;
    font-size: 4rem;
    transition: transform 0.3s ease;
}

.video-card:hover .video-overlay i {
    transform: scale(1.1);
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-new {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--youtube-red);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-featured {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #FFD700;
    color: #000;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Video Card Body */
.video-card-body {
    padding: 15px;
    display: flex;
    gap: 12px;
}

.video-channel-avatar img {
    object-fit: cover;
}

.video-info {
    flex: 1;
    min-width: 0; /* Prevent flex item from overflowing */
}

.video-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    color: var(--dark-bg);
}

.video-channel {
    font-size: 0.85rem;
    color: #606060;
    margin-bottom: 3px;
}

.video-meta {
    font-size: 0.8rem;
    color: #606060;
}

.video-meta .separator {
    margin: 0 5px;
}

.video-category-badge {
    display: inline-block;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    color: #606060;
    margin-top: 5px;
}

/* Single Video Page */
.video-player-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.video-player-iframe,
.video-player-html5 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-player-html5 {
    object-fit: contain;
}

.video-single-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-bg);
    margin-bottom: 10px;
}

.video-stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 15px;
}

.video-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #606060;
    font-size: 0.9rem;
}

.video-stats .separator {
    margin: 0 5px;
}

.video-actions {
    display: flex;
    gap: 10px;
}

.video-channel-info {
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.video-description {
    padding: 15px 0;
}

.description-content {
    color: #606060;
    line-height: 1.6;
    white-space: pre-wrap;
}

.video-tags {
    padding: 15px 0;
}

/* Related Videos Sidebar */
.related-videos-sidebar {
    position: sticky;
    top: 100px;
}

.related-video-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
    padding: 8px;
    border-radius: 8px;
}

.related-video-card:hover {
    background: #f9f9f9;
}

.related-video-thumbnail {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.related-video-thumbnail img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.related-video-duration {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
}

.related-video-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.related-video-channel {
    font-size: 0.75rem;
    color: #606060;
    margin-bottom: 3px;
}

.related-video-meta {
    font-size: 0.7rem;
    color: #606060;
}

.related-video-meta .separator {
    margin: 0 3px;
}

/* Playlists */
.playlist-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.playlist-card:hover {
    transform: translateY(-5px);
}

.playlist-thumbnail {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.playlist-thumbnail img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.playlist-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.playlist-overlay i {
    font-size: 3rem;
    margin-bottom: 10px;
}

.playlist-count {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Comments Section */
.comment-form textarea {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.comment-form textarea:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 0.2rem rgba(196, 30, 58, 0.25);
}

/* Responsive Design */
@media (max-width: 992px) {
    .video-single-title {
        font-size: 1.25rem;
    }
    
    .related-videos-sidebar {
        position: relative;
        top: 0;
        margin-top: 30px;
    }
    
    .video-stats-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .category-tabs {
        gap: 8px;
    }
    
    .category-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .video-overlay i {
        font-size: 3rem;
    }
    
    .video-card-body {
        padding: 12px;
    }
}

/* Loading States */
.video-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Video Player Controls Customization */
video::-webkit-media-controls-panel {
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.7));
}

/* Accessibility */
.video-card:focus-within {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .video-overlay,
    .video-actions,
    .related-videos-sidebar {
        display: none;
    }
}
