/* Quick Views Section */
.quick-views-section {
    margin-bottom: 2rem;
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.video-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* gap: 0.5rem; */
    flex: 1;
    height: 70vh;
    grid-template-rows: 1fr 1fr;
}

.video-card {
    position: relative;
    border-radius: 0px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #000;
}

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

.video-card.autoplaying {
    /* transform: scale(1.01); */
    box-shadow: 0 0 20px rgba(186, 104, 200, 0.4);
    border: 1px solid #8000805c;
}

/* Title visibility rules */
.video-card.playing .video-title-overlay {
    opacity: 0;
}

.video-card.autoplaying .play-overlay,
.video-card.playing .play-overlay {
    opacity: 0;
}

.video-card.autoplaying .video-title-overlay {
    opacity: 1;
    z-index: 25;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #333, #555);
    background-size: cover;
    background-position: center;
    position: relative;
}

.video-card.music .video-thumbnail {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.7)), #8B4513;
}

.video-card.sports .video-thumbnail {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.7)), #2a5634;
}

.video-card.racing .video-thumbnail {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.7)), #cc0000;
}

.video-card.politics .video-thumbnail {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.7)), #1a365d;
}

.category-label {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    z-index: 5;
    display: none;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 5;
    display: none;
}



.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
    z-index: 5;
}

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

.play-overlay::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 0 8px 14px;
    border-color: transparent transparent transparent #000;
    margin-left: 2px;
}

.youtube-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    transition: opacity 0.4s ease, transform 0.3s ease;
}

.video-card.playing .youtube-thumbnail {
    opacity: 0.3;
}

.video-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 2rem 0.75rem 0.75rem;
    z-index: 5;
    transition: opacity 0.3s ease;
    display: none;
}

.video-title-text {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section loading state */
.quick-views-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    opacity: 1;
}

.section-loader {
    text-align: center;
    color: #fff;
}

.section-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ba68c8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.section-loader-text {
    font-size: 0.9rem;
    color: #aaa;
    font-weight: 500;
}

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

/* Alternative: Skeleton loader - Fixed visibility */
.skeleton-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    grid-template-rows: 1fr 1fr;
    height: 300px;
}

.skeleton-card {
    background: linear-gradient(90deg, #222 25%, #333 50%, #222 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    position: relative;
}

.skeleton-card::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 60px;
    height: 20px;
    background: #444;
    border-radius: 4px;
}

.skeleton-card::after {
    content: '';
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 40px;
    height: 16px;
    background: #444;
    border-radius: 3px;
}

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

/* Skeleton title area */
.skeleton-title {
    height: 24px;
    background: linear-gradient(90deg, #222 25%, #333 50%, #222 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    width: 60%;
}

/* Center overlay for title and subtitle */
/* .center-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(0,0,0,0.8), rgba(0,0,0,0.6));
    backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
    border-radius: 8px;
    text-align: center;
    z-index: 30;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    min-width: 40vw;
} */

/* Center overlay for title and subtitle */
/* Center overlay for title and subtitle */

/* Need to add center-overlay-button with purple gradient background and white text - rounded corners */

.center-overlay-button {
    background: linear-gradient(135deg, #ba68c8, #8e24aa);
    color: white;
    padding: 1rem;
    /* border-radius: 12px; */
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease;
    text-align: center;
    margin-top: 0.5rem;
}

.center-overlay {
    position: absolute;
    background: linear-gradient(135deg, rgba(0,0,0,0.8), rgba(0,0,0,1));
    backdrop-filter: blur(10px);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 50;
    
    /* Always use translate for centering - this stays consistent */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    /* Default centered state dimensions */
    width: 50vw;
    height: auto;
    
    /* Smooth transition */
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1),
                height 1s cubic-bezier(0.4, 0, 0.2, 1),
                border-radius 1s cubic-bezier(0.4, 0, 0.2, 1),
                padding 1s cubic-bezier(0.4, 0, 0.2, 1);
    padding-top: 2rem;
    padding-bottom: 2rem;   
    border: 0.1px solid purple;
}

.center-overlay.full-screen {
    /* Full screen state - still centered but expanded */
    width: 100vw;
    height: 101vh;
    border-radius: 0px;
    padding: 2rem;
}

.center-overlay-title {
    font-size: 3vh;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    width: calc(50vw - 2rem);
}

.center-overlay-subtitle {
    font-size: 0.9rem;
    color: #aaa;
    line-height: 1.4;
    font-weight: 400;
    width: calc(50vw - 2rem);
}

/* Make the section title smaller and positioned differently */
.quick-views-section .section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #ccc;
    flex-shrink: 0;
    display: none;
}

/* Ensure center overlay appears above videos */
.video-grid {
    position: relative;
}

/* Height transition for vertical feed integration */
.quick-views-section {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    opacity: 1;
    overflow: hidden;
    transition: height 0.6s ease-out, padding 0.6s ease-out;
}

.quick-views-section.loading {
    height: 0 !important;
    padding: 0;
    margin-bottom: 0;
}

.quick-views-section.loaded {
    height: auto;
    min-height: 400px; /* Adjust based on your grid height */
}

/* Ensure smooth height calculation */
.quick-views-content {
    min-height: 400px; /* Match the loaded min-height */
}