
/* =========================
   CARD CONTAINER
========================= */
.ytx-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: #000;
}

/* =========================
   MEDIA / THUMBNAIL
========================= */
.ytx-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    background: #111;
}

.ytx-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

/* hover zoom ringan */
.ytx-card:hover .ytx-media img {
    transform: scale(1.05);
}

/* =========================
   OVERLAY TITLE
========================= */
.library-overlay {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85),
        transparent
    );
}

.library-overlay-title {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

/* =========================
   META INFO (USER + VIEWS)
========================= */
.ytx-meta {
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    padding: 0 10px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #ddd;
    z-index: 2;
}

/* =========================
   GRID WRAPPER
========================= */
.ytx-grid {
    margin-bottom: 15px;
}

/* =========================
   MOBILE RESPONSIVE
========================= */
@media (max-width: 600px) {

    .library-overlay-title {
        font-size: 12px;
    }

    .ytx-meta {
        font-size: 11px;
        padding: 0 8px;
    }

    .library-overlay {
        bottom: 28px;
        padding: 8px;
    }
}

/* =========================
   YOUTUBE PAGE
========================= */

.youtube-content {
    padding: 12px;
}

/* =========================
   SEARCH
========================= */

.youtube-content form {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.youtube-content input[type="text"] {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    box-sizing: border-box;
}

.youtube-content button {
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
}

/* =========================
   GRID
========================= */

.youtube-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* =========================
   CARD LINK
========================= */

.youtube-grid > a {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* =========================
   CARD
========================= */

.video-card {
    width: 100%;
}

/* =========================
   THUMBNAIL
========================= */

.thumb-wrap {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
}

/* =========================
   TITLE
========================= */

.video-title {
    padding-top: 10px;
}

.video-title h1 {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 600;
    color: inherit;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

/* =========================
   CHANNEL
========================= */

.video-channel {
    margin-top: 5px;
    font-size: 13px;
    opacity: .75;
}

/* =========================
   TABLET
========================= */

@media (min-width: 768px) {

    .youtube-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .video-title h1 {
        font-size: 14px;
    }
}

/* =========================
   LAPTOP
========================= */

@media (min-width: 1024px) {

    .youtube-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }

    .video-title h1 {
        font-size: 14px;
    }
}

/* =========================
   DESKTOP
========================= */

@media (min-width: 1400px) {

    .youtube-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* =========================
   LARGE DESKTOP
========================= */

@media (min-width: 1800px) {

    .youtube-grid {