/* ── YouTube View Styles ─────────────────────────────────────── */

.video-grid { display: grid; gap: var(--spacing-lg); grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.shorts-grid { display: grid; gap: var(--spacing-md); grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); }
@media (max-width: 640px) { .video-grid { grid-template-columns: 1fr; } .shorts-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── Video Card ── */
.video-card { padding: 0; overflow: hidden; position: relative; transition: all var(--transition-smooth); border: 1px solid var(--toi-border); background: var(--toi-surface); border-radius: var(--radius-lg); display: flex; flex-direction: column; }
.video-card.is-short { max-width: 280px; margin: 0 auto; }
@media (max-width: 640px) { .video-card.is-short { max-width: none; } }

.video-card:hover { 
    transform: translateY(-4px); 
    box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(96,200,240,0.12); 
    border-color: rgba(96, 200, 240, 0.2); 
}

.video-thumb-link { display: block; position: relative; background-color: #000; overflow: hidden; width: 100%; }
.video-thumb-link::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 50%; background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%); pointer-events: none; z-index: 1; }
.video-thumb-img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease-out); display: block; }
.video-card:hover .video-thumb-img { transform: scale(1.06); }

/* ── Overlays & Badges ── */
.video-overlay { position: absolute; inset: 0; background: rgba(6, 8, 11, 0.25); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity var(--transition-smooth); z-index: 2; }
.video-thumb-link:hover .video-overlay { opacity: 1; }

.play-btn-circle { width: 52px; height: 52px; background: var(--toi-accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--toi-bg); box-shadow: 0 0 24px rgba(96,200,240,0.5); transform: scale(0.85); transition: all var(--transition-smooth); }
.video-thumb-link:hover .play-btn-circle { transform: scale(1); box-shadow: 0 0 36px rgba(96,200,240,0.7); }

.video-badge-new {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--toi-accent);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    z-index: 5;
    box-shadow: 0 4px 12px rgba(96, 200, 240, 0.4);
}

.video-badge-live, .badge-live {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff0000;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    z-index: 5;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.video-card.is-live {
    border-color: rgba(255, 0, 0, 0.2);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.05);
}

.video-card.is-live:hover {
    border-color: rgba(255, 0, 0, 0.4);
    box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 15px rgba(255, 0, 0, 0.1);
}

.video-card.is-live .play-btn-circle {
    background: #ff0000;
    box-shadow: 0 0 24px rgba(255, 0, 0, 0.5);
}

.video-card.is-live .video-card-trigger:hover .play-btn-circle {
    box-shadow: 0 0 36px rgba(255, 0, 0, 0.7);
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: pulse-white 1.5s infinite;
}

@keyframes pulse-white {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.video-badges {
    position: absolute;
    bottom: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    z-index: 5;
}

.badge-black {
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.badge-accent {
    background: var(--toi-accent);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 5;
}

/* ── Content ── */
.video-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--toi-text);
    margin: 0;
    transition: color var(--transition-fast);
}

.video-card:hover .video-card-title {
    color: var(--toi-accent);
}

/* ── Tabs & Nav ── */
.yt-tab-nav { display: flex; gap: 4px; margin-bottom: var(--spacing-xl); background: var(--toi-surface); padding: 4px; border-radius: var(--radius-md); border: 1px solid var(--toi-border); align-self: flex-start; width: fit-content; }
.yt-tab-count { font-size: 0.7em; opacity: 0.6; margin-left: 3px; font-weight: 400; }

/* ── Modal ── */
.yt-modal { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, 0.88); backdrop-filter: blur(12px); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity var(--transition-smooth); padding: var(--spacing-md); }
.yt-modal.active { opacity: 1; pointer-events: auto; }
.yt-modal-content { width: 100%; max-width: 1000px; aspect-ratio: 16/9; background: #000; position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 0 60px rgba(0,0,0,0.9), 0 0 0 1px rgba(96,200,240,0.2); }
.yt-modal-content.is-short { max-width: 400px; aspect-ratio: 9/16; }
.yt-modal-close { position: absolute; top: -48px; right: 0; background: none; border: none; color: rgba(255,255,255,0.7); cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; transition: color var(--transition-fast); }
.yt-modal-close:hover { color: var(--toi-accent); }
@media (max-width: 768px) { .yt-modal-close { top: var(--spacing-md); right: var(--spacing-md); background: rgba(0,0,0,0.6); padding: 8px; border-radius: 50%; backdrop-filter: blur(4px); } .yt-modal-close span { display: none; } }
.yt-iframe-container { width: 100%; height: 100%; }
.yt-iframe-container iframe { width: 100%; height: 100%; border: none; }

/* ── Stats Banner ── */
.stats-banner {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xl);
    background: var(--toi-surface);
    padding: var(--spacing-lg) var(--spacing-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--toi-border);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-sm);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--toi-accent);
    font-family: var(--font-display);
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    opacity: 0.7;
}

@media (max-width: 640px) {
    .stats-banner {
        gap: var(--spacing-lg);
        padding: var(--spacing-md);
        justify-content: space-around;
    }
    .stat-value {
        font-size: 1.25rem;
    }
}
