@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

.cyf-wrapper {
    --cyf-black: #0b0b0f;
    --cyf-red: #ff1744;
    --cyf-red-dark: #d10036;
    --cyf-text: #14141a;
    --cyf-sub: #6b6f76;
    --cyf-radius: 16px;
    margin: 0 auto;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    box-sizing: border-box;
    position: relative;
    isolation: isolate;
    display: flow-root;
    clear: both;
    float: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}

.cyf-wrapper::before,
.cyf-wrapper::after {
    content: "";
    display: table;
}
.cyf-wrapper * { box-sizing: border-box; }
.cyf-wrapper ul { margin: 0; padding: 0; list-style: none; }

.cyf-header {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #16161d 0%, #1f1f29 100%);
    isolation: isolate;
}

.cyf-header-banner {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.1);
}

.cyf-header-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(8,8,12,0.92) 10%, rgba(8,8,12,0.72) 55%, rgba(8,8,12,0.55) 100%);
}

.cyf-header-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 26px;
}

.cyf-img-wrapper {
    flex-shrink: 0;
}

.cyf-wrapper img.cyf-channel-logo {
    width: 68px !important;
    height: 68px !important;
    max-width: 68px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2.5px solid rgba(255,255,255,0.9);
    display: block;
    margin: 0 !important;
    box-shadow: 0 4px 18px rgba(0,0,0,0.35);
}

.cyf-channel-info {
    flex: 1;
    min-width: 0;
}

.cyf-channel-info h2 {
    margin: 0 0 6px 0;
    font-family: 'Poppins', sans-serif;
    font-size: 21px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cyf-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: rgba(255,255,255,0.72);
    font-weight: 500;
}

.cyf-dot { opacity: 0.5; }

.cyf-sub-btn {
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--cyf-red) 0%, var(--cyf-red-dark) 100%);
    color: #fff !important;
    padding: 11px 20px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    font-size: 13.5px;
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    box-shadow: 0 6px 16px rgba(255,23,68,0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    white-space: nowrap;
}
.cyf-sub-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(255,23,68,0.45);
}

.cyf-wrapper .cyf-sub-btn svg {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 15px !important;
    height: 15px !important;
    fill: currentColor !important;
    flex-shrink: 0 !important;
    overflow: visible !important;
}

.cyf-carousel-wrapper {
    position: relative;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.cyf-video-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    padding: 18px 0 42px;
    margin: -18px 0 -24px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: none;
    mask-image: none;
}
.cyf-video-track::-webkit-scrollbar { display: none; }

.cyf-chunk {
    display: contents;
}
.cyf-chunk.cyf-chunk-hidden {
    display: none;
}

.cyf-video-item {
    flex: 0 0 calc((100% - 14px * 5.5) / 6.5);
    scroll-snap-align: start;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.cyf-thumb-wrapper {
    position: relative !important;
    display: block;
    width: 100%;
    height: 0 !important;
    padding: 0 0 177.78% 0 !important;
    border-radius: var(--cyf-radius);
    overflow: hidden;
    background: #111;
    box-shadow: 0 2px 8px rgba(11, 11, 15, 0.10);
    transform: translateZ(0);
    will-change: transform;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) and (pointer: fine) {
    .cyf-video-item:hover .cyf-thumb-wrapper {
        transform: translateY(-8px);
    }
}

.cyf-video-item.cyf-touched .cyf-thumb-wrapper {
    transform: translateY(-6px);
    box-shadow:
        0 2px 6px rgba(11, 11, 15, 0.06),
        0 8px 16px rgba(11, 11, 15, 0.10),
        0 16px 30px rgba(11, 11, 15, 0.13),
        0 26px 52px rgba(11, 11, 15, 0.11);
}

.cyf-thumb-wrapper.cyf-skeleton {
    background: linear-gradient(100deg, #15151b 8%, #23232d 18%, #15151b 33%);
    background-size: 200% 100%;
    animation: cyf-shimmer 1.6s ease-in-out infinite;
}
.cyf-thumb-wrapper.cyf-skeleton .cyf-thumb {
    opacity: 0 !important;
}
.cyf-wrapper .cyf-video-item .cyf-thumb-wrapper img.cyf-thumb {
    opacity: 1;
    transition: opacity 0.45s ease, transform 0.6s ease;
}
@keyframes cyf-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.cyf-video-item {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.cyf-video-item.cyf-reveal-in {
    opacity: 1;
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    .cyf-video-item,
    .cyf-thumb-wrapper.cyf-skeleton,
    .cyf-wrapper .cyf-video-item .cyf-thumb-wrapper img.cyf-thumb,
    .cyf-modal-content {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    .cyf-thumb-wrapper { transition: none !important; }
}

.cyf-wrapper .cyf-video-item .cyf-thumb-wrapper img.cyf-thumb {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: transform 0.6s ease;
}

.cyf-video-item:hover .cyf-thumb {
    transform: scale(1.08);
}

.cyf-thumb-wrapper::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 55%, rgba(0,0,0,0.85) 100%);
    pointer-events: none;
    z-index: 1;
}

.cyf-card-top {
    position: absolute;
    top: 10px; left: 10px; right: 10px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cyf-wrapper img.cyf-mini-logo {
    position: static !important;
    width: 22px !important; height: 22px !important;
    max-width: 22px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 1.5px solid rgba(255,255,255,0.9);
    margin: 0 !important;
    flex-shrink: 0;
}

.cyf-mini-name {
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cyf-play-overlay {
    position: absolute; inset: 0;
    z-index: 2;
    display: flex; align-items: center; justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.cyf-play-icon {
    width: 50px; height: 50px;
    background: rgba(0,0,0,0.34);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1.5px solid rgba(255,255,255,0.55);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cyf-video-item:hover .cyf-play-icon {
    transform: scale(1);
    background: var(--cyf-red);
    border-color: var(--cyf-red);
}

.cyf-wrapper .cyf-play-icon svg {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 20px !important;
    height: 20px !important;
    fill: #ffffff !important;
    stroke: none !important;
    overflow: visible !important;
}

@media (hover: none), (pointer: coarse) {
    .cyf-play-icon {
        background: rgba(0,0,0,0.4);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        border: 1.5px solid rgba(255,255,255,0.6);
    }
}

.cyf-card-bottom {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 2;
    padding: 10px 11px 12px;
}

.cyf-video-title {
    font-family: 'Inter', sans-serif;
    font-size: 12.8px;
    font-weight: 600;
    color: #fff !important;
    margin: 0 0 6px 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.cyf-video-meta {
    font-size: 10.5px;
    color: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.cyf-nav-btn {
    position: absolute;
    top: calc(50% - 12px);
    transform: translateY(-50%);
    width: 44px; height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--cyf-red);
    color: #fff;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    z-index: 5;
    transition: background 0.25s ease, transform 0.25s ease;
}
.cyf-nav-btn:hover {
    background: rgba(15,15,20,0.72);
    transform: translateY(-50%) scale(1.08);
}
.cyf-nav-prev { left: 4px; }
.cyf-nav-next { right: 4px; }

.cyf-wrapper .cyf-nav-btn svg {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 18px !important;
    height: 18px !important;
    fill: none !important;
    stroke: #ffffff !important;
    stroke-width: 2.5px !important;
    overflow: visible !important;
    flex-shrink: 0 !important;
}

.cyf-modal {
    display: none;
    position: fixed;
    z-index: 2147483647 !important;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(6,6,10,0.92);
    align-items: center; justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 20px;
}

.cyf-modal-content {
    background: #0c0c10;
    width: auto;
    max-width: min(92vw, 480px);
    max-height: 94vh;
    position: relative;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 30px 90px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04), 0 0 120px rgba(255,23,68,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.94) translateY(10px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease, width 0.25s ease, height 0.25s ease;
}

.cyf-modal.cyf-modal-open .cyf-modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.cyf-modal.cyf-mobile-fullscreen {
    padding: 0;
    background-color: #000;
    align-items: stretch;
    justify-content: stretch;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.cyf-modal.cyf-mobile-fullscreen .cyf-modal-content {
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: 100vw;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: #000;
}

.cyf-modal.cyf-mobile-fullscreen .cyf-modal-header {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 6;
    background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.35) 55%, rgba(0,0,0,0) 100%);
    border-bottom: none;
    padding: max(18px, env(safe-area-inset-top)) 14px 34px;
}

.cyf-modal.cyf-mobile-fullscreen .cyf-modal-draghandle {
    display: block;
}

.cyf-modal.cyf-mobile-fullscreen .cyf-modal-title {
    font-size: 13.5px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    margin-top: 4px;
}

.cyf-modal.cyf-mobile-fullscreen .cyf-close-modal {
    margin-top: 4px !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    background: rgba(20,20,24,0.55) !important;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.cyf-modal.cyf-mobile-fullscreen .cyf-video-container {
    width: 100%;
    height: 100%;
    flex: 1 1 auto;
    aspect-ratio: unset;
}

.cyf-modal.cyf-mobile-fullscreen .cyf-modal-content.cyf-dragging {
    transition: none !important;
}

.cyf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    background: linear-gradient(180deg, #141419 0%, #0c0c10 100%);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: relative;
    flex-shrink: 0;
    touch-action: none;
}

.cyf-modal-draghandle {
    display: none;
    position: absolute;
    top: 8px; left: 50%;
    transform: translateX(-50%);
    width: 38px; height: 4px;
    border-radius: 4px;
    background: rgba(255,255,255,0.35);
}

.cyf-modal-title {
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: -0.1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.cyf-close-modal {
    flex-shrink: 0;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    background: rgba(255,255,255,0.08) !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255,255,255,0.14) !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff;
    cursor: pointer;
    outline: none;
    box-sizing: border-box !important;
    transition: background 0.2s ease, transform 0.2s ease !important;
}
.cyf-close-modal:hover {
    background: var(--cyf-red) !important;
    border-color: var(--cyf-red) !important;
    transform: rotate(90deg) !important;
}
.cyf-wrapper .cyf-close-modal svg,
body .cyf-close-modal svg {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 18px !important;
    height: 18px !important;
    fill: none !important;
    stroke: #ffffff !important;
    stroke-width: 2.5px !important;
    overflow: visible !important;
}

.cyf-video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
    background: #000;
    flex: 1 1 auto;
    min-height: 0;
}
.cyf-video-container iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 2;
    border: 0;
    transition: width 0.2s ease, height 0.2s ease, top 0.2s ease, left 0.2s ease;
}

.cyf-video-loader {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    z-index: 1;
    background: radial-gradient(circle at center, #17171d 0%, #000 100%);
}
.cyf-video-loader span {
    width: 42px; height: 42px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.15);
    border-top-color: var(--cyf-red);
    animation: cyf-spin 0.85s linear infinite;
}
@keyframes cyf-spin {
    to { transform: rotate(360deg); }
}

/* RESPONSIVE DESIGN */
@media (min-width: 1600px) {
    .cyf-video-item { flex: 0 0 calc((100% - 16px * 6.5) / 7.5); }
    .cyf-video-track { gap: 16px; }
}

@media (max-width: 1300px) {
    .cyf-video-item { flex: 0 0 calc((100% - 14px * 4.5) / 5.5); }
}

@media (max-width: 1024px) {
    .cyf-video-track { gap: 14px; padding: 16px 0 38px; margin: -16px 0 -22px; }
    .cyf-video-item { flex: 0 0 calc((100% - 14px * 3.5) / 4.5); }
    .cyf-header-inner { padding: 18px 20px; }
}

@media (max-width: 820px) {
    .cyf-video-track { gap: 12px; }
    .cyf-video-item { flex: 0 0 calc((100% - 12px * 2.5) / 3.5); }
}

@media (max-width: 768px) {
    .cyf-header-inner { flex-wrap: wrap; text-align: left; padding: 16px; }
    .cyf-sub-btn { order: 3; margin-top: 4px; }
    .cyf-channel-info h2 { font-size: 17px; }
    .cyf-nav-btn { width: 38px; height: 38px; }
    .cyf-video-track { gap: 10px; padding: 14px 2px 34px; margin: -14px 0 -20px; }
    .cyf-video-item { flex: 0 0 calc((100% - 10px * 1.3) / 2.3); }
}

@media (max-width: 480px) {
    .cyf-play-icon { width: 46px; height: 46px; transform: scale(1); }
    .cyf-wrapper .cyf-play-icon svg { width: 22px !important; height: 22px !important; }
    .cyf-video-title { font-size: 11.5px; }
    .cyf-video-meta { font-size: 9.5px; }
    .cyf-nav-btn { width: 34px; height: 34px; }
    .cyf-modal { padding: 0; align-items: center; }
    .cyf-modal-content {
        width: auto; max-width: 100vw; max-height: 100vh; max-height: 100dvh;
        border-radius: 0; display: flex; flex-direction: column;
    }
    .cyf-modal-title { font-size: 13px; }
    .cyf-close-modal { width: 36px !important; height: 36px !important; min-width: 36px !important; min-height: 36px !important; }
    .cyf-wrapper img.cyf-channel-logo { width: 54px !important; height: 54px !important; max-width: 54px !important; }
}

@media (max-width: 380px) {
    .cyf-video-track { gap: 9px; }
    .cyf-video-item { flex: 0 0 calc((100% - 9px * 1.3) / 2.3); }
    .cyf-video-title { font-size: 11px; }
    .cyf-video-meta { font-size: 9px; }
    .cyf-play-icon { width: 42px; height: 42px; }
    .cyf-nav-btn { width: 32px; height: 32px; }
    .cyf-header-inner { padding: 14px; }
}