/* ============================================================
   wikopn Watch Videos & Highlights Styling
   Rich Modern Aesthetic with Infinite Scroll
   ============================================================ */

/* Page Container & Background */
.videos-page-wrapper {
    background: #fbfbfb;
    min-height: 85vh;
    padding-bottom: 4rem;
}

/* ===== HERO HEADER SECTION ===== */
.videos-hero-section {
    background: linear-gradient(135deg, #0e0e11 0%, #17171c 50%, #0a0a0d 100%);
    color: #ffffff;
    padding: 3.5rem 0 3rem;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(240, 33, 33, 0.18);
}

.videos-hero-section::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -80px;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(240, 33, 33, 0.22) 0%, transparent 70%);
    pointer-events: none;
    border-radius: 50%;
}

.videos-hero-section::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: 5%;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(240, 33, 33, 0.12) 0%, transparent 70%);
    pointer-events: none;
    border-radius: 50%;
}

.videos-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 2;
}

.videos-breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}

.videos-breadcrumb a:hover {
    color: #ffffff;
}

.videos-breadcrumb i {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
}

.videos-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(240, 33, 33, 0.16);
    border: 1px solid rgba(240, 33, 33, 0.4);
    color: #ff5252;
    padding: 0.4rem 0.95rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.videos-hero-badge i {
    font-size: 0.9rem;
    animation: badgePulse 2s infinite ease-in-out;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.videos-hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin: 0 0 0.8rem 0;
    font-family: var(--font-display, 'Outfit', sans-serif);
    position: relative;
    z-index: 2;
}

.videos-hero-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 680px;
    line-height: 1.6;
    margin: 0 0 1.8rem 0;
    position: relative;
    z-index: 2;
}

/* Stats Ribbon */
.videos-stats-ribbon {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
}

.videos-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 600;
}

.videos-stat-pill i {
    color: #F02121;
    font-size: 1rem;
}

.videos-stat-pill strong {
    color: #ffffff;
    font-weight: 800;
}

/* ===== CONTROLS & SEARCH BAR ===== */
.videos-controls-bar {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.2rem 1.6rem;
    margin: -1.75rem auto 2.5rem;
    position: relative;
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.videos-search-box {
    position: relative;
    flex: 1 1 300px;
    max-width: 450px;
}

.videos-search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #888888;
    font-size: 0.95rem;
}

.videos-search-input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.5rem;
    border-radius: 99px;
    border: 1.5px solid #e5e7eb;
    background: #f9fafb;
    font-size: 0.88rem;
    color: #111111;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.videos-search-input:focus {
    border-color: #F02121;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(240, 33, 33, 0.12);
}

.videos-counter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #4b5563;
}

.videos-counter-tag span {
    color: #F02121;
    font-weight: 800;
}

/* ===== VIDEO GRID ===== */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.75rem;
    width: 100%;
    margin-bottom: 2.5rem;
}

/* Specific styling for video cards in the full page */
.videos-grid .video-card {
    flex: initial;
    width: 100%;
    min-width: 0;
    border-radius: 20px;
    background: #111111;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(240, 33, 33, 0.14);
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.28s ease, border-color 0.28s ease;
    cursor: pointer;
    animation: videoCardFadeIn 0.45s ease forwards;
}

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

.videos-grid .video-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(240, 33, 33, 0.22);
    border-color: rgba(240, 33, 33, 0.45);
}

.videos-grid .video-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0a0a0a;
    overflow: hidden;
}

.videos-grid .video-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.videos-grid .video-card:hover .video-card-thumb img {
    transform: scale(1.08);
}

.videos-grid .video-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.65) 100%);
    transition: background 0.25s ease;
}

.videos-grid .video-card:hover .video-card-overlay {
    background: linear-gradient(180deg, rgba(240, 33, 33, 0.1) 0%, rgba(0, 0, 0, 0.8) 100%);
}

.videos-grid .video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #F02121;
    border: 3px solid #ffffff;
    color: #ffffff;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 6px 20px rgba(240, 33, 33, 0.5);
    z-index: 4;
}

.videos-grid .video-card:hover .video-play-btn {
    transform: translate(-50%, -50%) scale(1.12);
    background: #d91414;
    box-shadow: 0 10px 28px rgba(240, 33, 33, 0.7);
}

.videos-grid .video-card-body {
    padding: 1.1rem 1.25rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.videos-grid .video-card-label {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #F02121;
    font-family: var(--font-display, 'Outfit', sans-serif);
}

.videos-grid .video-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.35;
    letter-spacing: -0.01em;
    font-family: var(--font-display, 'Outfit', sans-serif);
}

.videos-grid .video-card-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.5;
    margin: 0.2rem 0 0.8rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-card-footer {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
}

.video-card-footer-play {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #ff5252;
    font-weight: 700;
    transition: color 0.2s ease;
}

.videos-grid .video-card:hover .video-card-footer-play {
    color: #ffffff;
}

/* ===== INFINITE SCROLL LOADER & SENTINEL ===== */
.videos-infinite-loader {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.75rem;
    padding: 2.5rem 0;
    margin: 1rem 0;
}

.videos-infinite-loader.active {
    display: flex;
}

.videos-spinner {
    width: 38px;
    height: 38px;
    border: 3.5px solid rgba(240, 33, 33, 0.18);
    border-top-color: #F02121;
    border-radius: 50%;
    animation: videosSpin 0.75s linear infinite;
}

@keyframes videosSpin {
    to { transform: rotate(360deg); }
}

.videos-infinite-loader span {
    font-size: 0.9rem;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: 0.02em;
}

.videos-end-notice {
    display: none;
    text-align: center;
    padding: 2.5rem 1.5rem;
    margin: 1rem auto;
    background: #ffffff;
    border: 1.5px dashed rgba(240, 33, 33, 0.25);
    border-radius: 18px;
    max-width: 500px;
    color: #4b5563;
    font-size: 0.95rem;
    font-weight: 700;
}

.videos-end-notice.active {
    display: block;
}

.videos-end-notice i {
    color: #10b981;
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.4rem;
}

/* Sentinel element for IntersectionObserver */
#videosScrollSentinel {
    height: 20px;
    width: 100%;
    pointer-events: none;
    visibility: hidden;
}

/* Empty State */
.videos-empty-state {
    text-align: center;
    padding: 4rem 1.5rem;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    margin: 2rem 0;
    display: none;
}

.videos-empty-state i {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.videos-empty-state h3 {
    font-size: 1.3rem;
    color: #111111;
    margin-bottom: 0.4rem;
}

.videos-empty-state p {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .videos-hero-title {
        font-size: 1.85rem;
    }
    .videos-hero-subtitle {
        font-size: 0.92rem;
    }
    .videos-hero-section {
        padding: 2.5rem 0 2rem;
    }
    .videos-controls-bar {
        margin-top: -1.2rem;
        padding: 1rem;
    }
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.1rem;
    }
}
