.youtube-feed-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.youtube-feed-modal.active {
    display: flex;
}

.youtube-feed-modal-inner {
    position: relative;
    width: min(1100px, 100%);
    max-height: 90vh;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 24px;
    background: #141415;
    box-shadow:
        0 30px 100px rgba(0, 0, 0, 0.55),
        0 0 60px rgba(244, 102, 146, 0.05);
}

.youtube-feed-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 26px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.youtube-feed-modal-title {
    margin: 0;
    color: #fff;
    font-family: Manrope, sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.youtube-feed-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition:
        background 0.25s ease,
        transform 0.25s ease;
}

.youtube-feed-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(90deg);
}

.youtube-feed-modal-body {
    max-height: calc(90vh - 85px);
    overflow-y: auto;
    padding: 24px;

    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.20) transparent;
}

.youtube-feed-modal-body::-webkit-scrollbar {
    width: 6px;
}

.youtube-feed-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.youtube-feed-modal-body::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.20);
}

.youtube-feed-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

.youtube-feed-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.youtube-feed-item {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: #1a1a1c;
    cursor: pointer;

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.youtube-feed-item:hover {
    transform: translateY(-4px);
    border-color: rgba(244, 102, 146, 0.45);
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.30),
        0 0 25px rgba(244, 102, 146, 0.06);
}

.youtube-feed-item-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0d0d0e;
}

.youtube-feed-item-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.02) 45%,
        rgba(0, 0, 0, 0.30) 100%
    );
}

.youtube-feed-item-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;

    transition:
        transform 0.35s ease,
        filter 0.35s ease;
}

.youtube-feed-item:hover .youtube-feed-item-thumb img {
    transform: scale(1.05);
    filter: brightness(0.90);
}

.youtube-feed-item-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;

    transform: translate(-50%, -50%);

    border-radius: 50%;

    background: linear-gradient(
        135deg,
        #fa5853,
        #f46692
    );

    color: #fff;
    font-size: 17px;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.35),
        0 0 25px rgba(244, 102, 146, 0.18);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.youtube-feed-item:hover .youtube-feed-item-play {
    transform: translate(-50%, -50%) scale(1.08);

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.45),
        0 0 35px rgba(244, 102, 146, 0.25);
}

.youtube-feed-item-duration {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 4;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 38px;
    height: 24px;
    padding: 0 7px;

    border-radius: 5px;

    background: rgba(0, 0, 0, 0.78);

    color: #fff;

    font-family: Open Sans, sans-serif;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;

    letter-spacing: 0.1px;

    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.25);

    pointer-events: none;
}

.youtube-feed-item-info {
    padding: 15px 15px 17px;
}

.youtube-feed-item-title {
    display: -webkit-box;
    margin: 0;

    overflow: hidden;

    color: #fff;

    font-family: Open Sans, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;

    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.youtube-video-player {
    position: absolute;
    inset: 0;
    z-index: 10;

    display: none;

    align-items: center;
    justify-content: center;

    background: #000;
}

.youtube-video-player.active {
    display: flex;
}

.youtube-video-player iframe {
    width: 100%;
    height: 100%;
    min-height: 500px;

    display: block;

    border: 0;
    background: #000;
}

.youtube-video-player-close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 20;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: rgba(0, 0, 0, 0.75);

    color: #fff;
    font-size: 18px;

    cursor: pointer;

    transition:
        background 0.25s ease,
        transform 0.25s ease;
}

.youtube-video-player-close:hover {
    background: rgba(0, 0, 0, 0.95);
    transform: rotate(90deg);
}

.youtube-feed-loading {
    grid-column: 1 / -1;

    padding: 60px 20px;

    text-align: center;

    color: rgba(255, 255, 255, 0.65);

    font-family: Open Sans, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

@media (max-width: 991px) {

    .youtube-feed-modal {
        padding: 20px;
    }

    .youtube-feed-grid {
        grid-template-columns: repeat(
            2,
            minmax(0, 1fr)
        );
    }

    .youtube-feed-modal-inner {
        max-height: 92vh;
    }

    .youtube-feed-modal-body {
        max-height: calc(92vh - 85px);
    }

}

@media (max-width: 600px) {

    .youtube-feed-modal {
        padding: 10px;
    }

    .youtube-feed-modal-inner {
        width: 100%;
        max-height: 95vh;
        border-radius: 18px;
    }

    .youtube-feed-modal-header {
        padding: 16px 17px;
    }

    .youtube-feed-modal-title {
        font-size: 17px;
    }

    .youtube-feed-modal-close {
        width: 36px;
        height: 36px;
        font-size: 17px;
    }

    .youtube-feed-modal-body {
        padding: 14px;
        max-height: calc(95vh - 70px);
    }

    .youtube-feed-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .youtube-feed-item {
        border-radius: 14px;
    }

    .youtube-feed-item-info {
        padding: 13px 14px 15px;
    }

    .youtube-feed-item-title {
        font-size: 13px;
    }

    .youtube-feed-item-play {
        width: 44px;
        height: 44px;
        font-size: 15px;
    }

    .youtube-feed-item-duration {
        right: 8px;
        bottom: 8px;
        min-width: 36px;
        height: 22px;
        padding: 0 6px;
        font-size: 10px;
    }

    .youtube-video-player iframe {
        min-height: 250px;
    }

    .youtube-video-player-close {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

}

@media (max-width: 380px) {

    .youtube-feed-modal {
        padding: 7px;
    }

    .youtube-feed-modal-inner {
        border-radius: 16px;
    }

    .youtube-feed-modal-body {
        padding: 11px;
    }

    .youtube-feed-grid {
        gap: 12px;
    }

    .youtube-feed-item-title {
        font-size: 12.5px;
    }

}