/* YouTube-Style Video Gallery CSS v2.0 - Complete Version */

/* CSS Variables for consistent theming */
:root {
    --yt-spec-base-background: #ffffff;
    --yt-spec-raised-background: #ffffff;
    --yt-spec-menu-background: #ffffff;
    --yt-spec-text-primary: #030303;
    --yt-spec-text-secondary: #606060;
    --yt-spec-brand-red: #ff0000;
    --yt-spec-brand-red-hover: #cc0000;
    --yt-spec-icon-inactive: #606060;
    --yt-spec-border: #e0e0e0;
    --yt-spec-10-percent-layer: rgba(0,0,0,0.1);
    --yt-spec-outline: #065fd4;
    --yt-thumbnail-radius: 12px;
    --yt-sidebar-width: 240px;
}

/* Dark mode variables */
body.cvg-dark,
body.dark-mode {
    --yt-spec-base-background: #0f0f0f;
    --yt-spec-raised-background: #212121;
    --yt-spec-menu-background: #212121;
    --yt-spec-text-primary: #ffffff;
    --yt-spec-text-secondary: #aaaaaa;
    --yt-spec-icon-inactive: #aaaaaa;
    --yt-spec-border: #303030;
    --yt-spec-10-percent-layer: rgba(255,255,255,0.1);
}

/* Global Reset and Base Styles */
.cvg-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
	
}

.cvg-container{
    font-family: 'Roboto', 'Arial', sans-serif !important;
   
    color: var(--yt-spec-text-primary) !important;
    min-height: 100vh;
    transition: background-color 0.3s ease;
	margin: 0 auto !important;
    width: 100% !important;
}

/* Header Styles */
.cvg-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 75px !important;
    padding: 0 44px !important;
    background: var(--yt-spec-raised-background) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 2000 !important;
    border-bottom: 1px solid var(--yt-spec-border) !important;
    gap: 24px !important;
}

.cvg-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
}

.cvg-menu-toggle {
    background: none !important;
    border: none !important;
    color: var(--yt-spec-text-primary) !important;
    font-size: 18px !important;
    padding: 8px !important;
    cursor: pointer !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.cvg-menu-toggle:hover {
    background: var(--yt-spec-10-percent-layer) !important;
}

.cvg-logo,
.logo {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    text-decoration: none !important;
    color: var(--yt-spec-text-primary) !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    letter-spacing: -0.5px !important;
}

.cvg-logo i {
    color: var(--yt-spec-brand-red) !important;
    font-size: 28px !important;
}

/* Search Section */
.cvg-header-center,
.search {
    flex: 0 1 640px !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin: 0 40px !important;
}

.cvg-search-form,
.search {
    display: flex !important;
    flex: 1 !important;
    max-width: 640px !important;
}

.cvg-search-input,
.search input[type="text"] {
    flex: 1 !important;
    height: 40px !important;
    padding: 0 4px 0 16px !important;
    font-size: 16px !important;
    border: 1px solid var(--yt-spec-border) !important;
    border-right: none !important;
    border-radius: 40px 0 0 40px !important;
    background: var(--yt-spec-base-background) !important;
    color: var(--yt-spec-text-primary) !important;
    outline: none !important;
}

.cvg-search-input:focus,
.search input[type="text"]:focus {
    border-color: var(--yt-spec-outline) !important;
}

.cvg-search-btn,
.search button {
    width: 64px !important;
    height: 40px !important;
    border: 1px solid var(--yt-spec-border) !important;
    border-radius: 0 40px 40px 0 !important;
    background: var(--yt-spec-raised-background) !important;
    color: var(--yt-spec-icon-inactive) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background-color 0.1s !important;
}

.cvg-search-btn:hover,
.search button:hover {
    background: var(--yt-spec-10-percent-layer) !important;
    color: var(--yt-spec-text-primary) !important;
}

/* Header Right */
.cvg-header-right,
.buttons {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.buttons a {
    color: var(--yt-spec-text-primary) !important;
    text-decoration: none !important;
    padding: 8px 16px !important;
    border-radius: 18px !important;
    background: var(--yt-spec-10-percent-layer) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: background-color 0.1s !important;
}

.buttons a:hover {
    background: var(--yt-spec-border) !important;
}

/* Dark Mode Toggle */
.dark-mode-switch,
.cvg-dark-toggle {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 14px !important;
    color: var(--yt-spec-text-secondary) !important;
    cursor: pointer !important;
}

.cvg-dark-toggle {
    width: 40px !important;
    height: 40px !important;
	padding: 0px !important;
    border: none !important;
    background: none !important;
    color: var(--yt-spec-text-primary) !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    text-decoration: none !important;
}

.cvg-dark-toggle:hover {
    background: var(--yt-spec-10-percent-layer) !important;
}

/* Categories */
.cvg-categories {
    display: flex !important;
    gap: 12px !important;
    padding: 16px !important;
    overflow-x: auto !important;
	border:none !important;
margin-top: 8px !important;
    background: var(--yt-spec-base-background) !important;
}

.cvg-cat-chip {
    padding: 8px 12px !important;
    border: 1px solid var(--yt-spec-border) !important;
    border-radius: 32px !important;
    background: var(--yt-spec-raised-background) !important;
    color: var(--yt-spec-text-primary) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: all 0.1s !important;
}

.cvg-cat-chip:hover,
.cvg-cat-chip.cvg-active {
    background: var(--yt-spec-text-primary) !important;
    color: var(--yt-spec-base-background) !important;
}

/* Video Grid */
.cvg-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    gap: 20px !important;
    padding: 20px !important;
    background: var(--yt-spec-base-background) !important;
}

.cvg-video-item {
    cursor: pointer !important;
    transition: transform 0.1s !important;
}

.cvg-video-item:hover {
    transform: translateY(-2px) !important;
}

.cvg-thumbnail {
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 16/9 !important;
    border-radius: var(--yt-thumbnail-radius) !important;
    overflow: hidden !important;
    background: #000 !important;
}

.cvg-thumbnail img,
.cvg-thumbnail video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: var(--yt-thumbnail-radius) !important;
}

.cvg-duration {
    position: absolute !important;
    bottom: 8px !important;
    right: 8px !important;
    background: rgba(0, 0, 0, 0.8) !important;
    color: white !important;
    padding: 2px 4px !important;
    border-radius: 2px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
}

.cvg-hover-actions {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    display: flex !important;
    gap: 4px !important;
    opacity: 0 !important;
    transition: opacity 0.1s !important;
}

.cvg-video-item:hover .cvg-hover-actions {
    opacity: 1 !important;
}

.cvg-hover-actions button {
    width: 28px !important;
    height: 28px !important;
    border: none !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.8) !important;
    color: white !important;
    font-size: 12px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Video Details */
.cvg-video-details {
    display: flex !important;
    gap: 12px !important;
    padding: 12px 0 0 0 !important;
    align-items: flex-start !important;
}

.cvg-channel-avatar {
    flex-shrink: 0 !important;
}

.cvg-channel-avatar img {
   width: 100%;
    border-radius: 50% !important;
    object-fit: cover;
    max-width: 40px !important;
    height: 100% !important;
}

.cvg-video-meta {
    flex: 1 !important;
    min-width: 0 !important;
}

.cvg-video-title {
    font-size: 16px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    margin-bottom: 4px !important;
}

.cvg-video-title a {
    color: var(--yt-spec-text-primary) !important;
    text-decoration: none !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}
.head-alink{
	color: var(--yt-spec-text-primary) !important;
}
.cvg-channel-name {
    color: var(--yt-spec-text-secondary) !important;
    font-size: 14px !important;
    text-decoration: none !important;
    display: block !important;
    margin-bottom: 4px !important;
}

.cvg-video-stats {
    color: var(--yt-spec-text-secondary) !important;
    font-size: 14px !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.cvg-dot {
    font-weight: bold !important;
}

.cvg-more-options {
    background: none !important;
    border: none !important;
    color: var(--yt-spec-text-secondary) !important;
    cursor: pointer !important;
    padding: 8px !important;
    border-radius: 50% !important;
    opacity: 0 !important;
    transition: all 0.1s !important;
}

.cvg-video-item:hover .cvg-more-options {
    opacity: 1 !important;
}

.cvg-more-options:hover {
    background: var(--yt-spec-10-percent-layer) !important;
}

/* Single Video Page */
.cvg-single-video {
    display: grid !important;
    grid-template-columns: 1fr 400px !important;
    gap: 24px !important;
    padding: 24px 0px !important;
    max-width: 1280px !important;
    margin: 0 auto !important;
    background: var(--yt-spec-base-background) !important;
}

.cvg-single-left {
    min-width: 0 !important;
}

.cvg-single-left video {
    width: 100% !important;
    aspect-ratio: 16/9 !important;
    background: #000 !important;
    border-radius: var(--yt-thumbnail-radius) !important;
    margin-bottom: 16px !important;
}

.cvg-single-left h1 {
    font-size: 20px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    color: var(--yt-spec-text-primary) !important;
    margin-bottom: 8px !important;
}

.cvg-single-left .desc {
    color: var(--yt-spec-text-secondary) !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    margin-bottom: 16px !important;
    background: var(--yt-spec-raised-background) !important;
    padding: 12px !important;
    border-radius: 12px !important;
}

.cvg-single-left p {
    color: var(--yt-spec-text-secondary) !important;
    font-size: 14px !important;
    margin-bottom: 8px !important;
}

/* Video Actions Bar */
.cvg-video-actions {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid var(--yt-spec-border) !important;
    margin-bottom: 16px !important;
}

.cvg-video-info {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: var(--yt-spec-text-secondary) !important;
    font-size: 14px !important;
}

.cvg-actions-right {
    display: flex !important;
    gap: 8px !important;
}

.cvg-action-btn {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 16px !important;
    border: none !important;
    border-radius: 18px !important;
    background: var(--yt-spec-raised-background) !important;
    color: var(--yt-spec-text-primary) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background-color 0.1s !important;
}

.cvg-action-btn:hover {
    background: var(--yt-spec-10-percent-layer) !important;
}

.cvg-action-btn.liked {
    color: var(--yt-spec-brand-red) !important;
}

/* Share Buttons */
.cvg-share-buttons {
    display: flex !important;
    gap: 12px !important;
    margin-top: 16px !important;
    padding-top: 16px !important;
    border-top: 1px solid var(--yt-spec-border) !important;
}

.cvg-share-buttons a {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 16px !important;
    border-radius: 18px !important;
    background: var(--yt-spec-10-percent-layer) !important;
    color: var(--yt-spec-text-primary) !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: background-color 0.1s !important;
}

.cvg-share-buttons a:hover {
    background: var(--yt-spec-border) !important;
}

/* Right Sidebar - Recommended Videos */
.cvg-single-right {
    background: var(--yt-spec-base-background) !important;
}

.cvg-single-right h3 {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--yt-spec-text-primary) !important;
    margin-bottom: 16px !important;
}

.cvg-rec-item {
    display: flex !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
    cursor: pointer !important;
    padding: 4px !important;
    border-radius: 8px !important;
    transition: background-color 0.1s !important;
}

.cvg-rec-item:hover {
    background: var(--yt-spec-10-percent-layer) !important;
}

.cvg-rec-item img {
    width: 168px !important;
    height: 94px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
}

.cvg-rec-item a {
    color: var(--yt-spec-text-primary) !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .cvg-single-video {
        grid-template-columns: 1fr !important;
    }
    
    
    
    .cvg-header-center,
    .search {
        margin: 0 16px !important;
    }
}

@media (max-width: 768px) {
    .cvg-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
        padding: 16px !important;
        gap: 16px !important;
    }
    
    .cvg-header {
        padding: 0 8px !important;
    }
    
    .cvg-header-center,
    .search {
        margin: 0 8px !important;
        flex: 1 !important;
    }
    
    .buttons {
        display: none !important;
    }
    
    .cvg-single-video {
        padding: 16px !important;
        gap: 16px !important;
    }
    
    .cvg-rec-item {
        flex-direction: column !important;
    }
    
    .cvg-rec-item img {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16/9 !important;
    }
}

@media (max-width: 480px) {
    .cvg-grid {
        grid-template-columns: 1fr !important;
    }
    
    .cvg-categories {
        padding: 12px !important;
    }
    
    .cvg-single-video {
        padding: 12px !important;
    }
    
    .cvg-video-actions {
        flex-direction: column !important;
        gap: 12px !important;
        align-items: flex-start !important;
    }
}

/* Loading States */
.cvg-loading {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 40px !important;
    color: var(--yt-spec-text-secondary) !important;
}

/* No Results */
.cvg-no-videos {
    text-align: center !important;
    padding: 40px !important;
    color: var(--yt-spec-text-secondary) !important;
    font-size: 16px !important;
}

/* User Avatar */
.cvg-user-avatar {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
}

.cvg-user-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Scrollbar Styling */
.cvg-container ::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
}

.cvg-container ::-webkit-scrollbar-track {
    background: var(--yt-spec-base-background) !important;
}

.cvg-container ::-webkit-scrollbar-thumb {
    background: var(--yt-spec-border) !important;
    border-radius: 4px !important;
}

.cvg-container ::-webkit-scrollbar-thumb:hover {
    background: var(--yt-spec-text-secondary) !important;
}

/* Focus States */
.cvg-container *:focus {
    outline: 2px solid var(--yt-spec-outline) !important;
    outline-offset: 2px !important;
}


/* Additional CSS for Single Video Page Improvements */

/* Channel Info Section */
.cvg-channel-info {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 20px 0 !important;
    border-bottom: 1px solid var(--yt-spec-border) !important;
    margin-bottom: 16px !important;
}

.cvg-channel-left {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
}

.cvg-channel-avatar-large {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
}

.cvg-channel-details h3 {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--yt-spec-text-primary) !important;
    margin-bottom: 2px !important;
}

.cvg-subscribers {
    font-size: 14px !important;
    color: var(--yt-spec-text-secondary) !important;
    margin: 0 !important;
}

.cvg-subscribe-btn {
    background: var(--yt-spec-brand-red) !important;
    color: white !important;
    border: none !important;
    padding: 10px 16px !important;
    border-radius: 18px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background-color 0.1s !important;
}

.cvg-subscribe-btn:hover {
    background: var(--yt-spec-brand-red-hover) !important;
}

/* Description Section */
.cvg-description {
    background: var(--yt-spec-raised-background) !important;
    border-radius: 12px !important;
    padding: 16px !important;
    margin-bottom: 16px !important;
}

.cvg-description-content {
    color: var(--yt-spec-text-secondary) !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
}

/* Enhanced Action Buttons */
.cvg-action-btn {
    position: relative !important;
}

.cvg-action-btn.liked {
    color: var(--yt-spec-brand-red) !important;
}

.cvg-action-btn.disliked {
    color: var(--yt-spec-brand-red) !important;
}

.cvg-action-btn.cvg-processing {
    opacity: 0.6 !important;
    pointer-events: none !important;
}

/* Enhanced Recommended Videos */
.cvg-rec-item {
    margin-bottom: 12px !important;
    transition: background-color 0.1s !important;
}

.cvg-rec-thumbnail {
    position: relative !important;
    display: block !important;
    width: 168px !important;
    height: 94px !important;
    flex-shrink: 0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

.cvg-rec-thumbnail img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.cvg-rec-thumbnail .cvg-duration {
    position: absolute !important;
    bottom: 4px !important;
    right: 4px !important;
    background: rgba(0, 0, 0, 0.8) !important;
    color: white !important;
    padding: 2px 4px !important;
    border-radius: 2px !important;
    font-size: 11px !important;
}

.cvg-rec-details {
    flex: 1 !important;
    min-width: 0 !important;
    padding-left: 8px !important;
}

.cvg-rec-details h4 {
    margin: 0 0 4px 0 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
}

.cvg-rec-details h4 a {
    color: var(--yt-spec-text-primary) !important;
    text-decoration: none !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.cvg-rec-channel {
    color: var(--yt-spec-text-secondary) !important;
    font-size: 12px !important;
    margin: 0 0 2px 0 !important;
}

.cvg-rec-stats {
    color: var(--yt-spec-text-secondary) !important;
    font-size: 12px !important;
    margin: 0 !important;
}

.cvg-item-clicked {
    background: var(--yt-spec-10-percent-layer) !important;
}

/* Notification System */
.cvg-notification {
    position: fixed !important;
    top: 80px !important;
    right: 20px !important;
    background: var(--yt-spec-raised-background) !important;
    color: var(--yt-spec-text-primary) !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    z-index: 9999 !important;
    opacity: 0 !important;
    transform: translateX(100%) !important;
    transition: all 0.3s ease !important;
    border-left: 4px solid var(--yt-spec-brand-red) !important;
}

.cvg-notification-success {
    border-left-color: #00d562 !important;
}

.cvg-notification-error {
    border-left-color: #ff4444 !important;
}

.cvg-notification-show {
    opacity: 1 !important;
    transform: translateX(0) !important;
}

/* Enhanced Video Player */
.cvg-single-left video {
    outline: none !important;
}

.cvg-single-left video:focus {
    box-shadow: 0 0 0 2px var(--yt-spec-outline) !important;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    .cvg-channel-info {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    
    .cvg-channel-left {
        width: 100% !important;
    }
    
    .cvg-subscribe-btn {
        align-self: stretch !important;
    }
    
    .cvg-rec-item {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .cvg-rec-thumbnail {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16/9 !important;
    }
    
    .cvg-rec-details {
        padding-left: 0 !important;
    }
    
    .cvg-notification {
        right: 10px !important;
        left: 10px !important;
        top: 70px !important;
    }
}

.ndfHFb-c4YZDc-Wrql6b {
    display: none !important;
}