/* ========================================
   YOUTUBE CONNECTOR — CLEAN REFACTORED CSS
   (Stable + Improved Hover Play)
======================================== */


/* ========================================
   WRAPPER
======================================== */
.ytc-wrapper {
    max-width: 1080px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
}


/* ========================================
   CHANNEL HEADER
======================================== */
.ytc-channel {
    display: block;
    text-decoration: none;
    margin-bottom: 24px;
    color: inherit;
}

.ytc-channel-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

/* Logo container */

.ytc-channel-logo {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
}

/* image */
.ytc-channel-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* dark hover overlay */
.ytc-channel-logo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1;
}


/* play triangle ONLY */
.ytc-channel-logo::before {
    content: '';
    position: absolute;

    top: 50%;
    left: 50%;

    transform: translate(-40%, -50%) scale(0.9);

    border-left: 10px solid #fff;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;

    opacity: 0;
    transition: all 0.2s ease;
    z-index: 2;
}

/* hover state */
.ytc-channel:hover .ytc-channel-logo::after {
    opacity: 1;
}

.ytc-channel:hover .ytc-channel-logo::before {
    opacity: 1;
    transform: translate(-40%, -50%) scale(1);
}


.ytc-channel-logo::after,
.ytc-channel-logo::before {
    pointer-events: none;
}

/* Triangle inside button */
.ytc-channel-logo span {
    display: none;
}

.ytc-channel-logo::before::after {
    content: '';
}

/* Triangle (separate pseudo for clarity) */
.ytc-channel-logo::before {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ytc-channel-logo::before {
    content: '';
}

/* Real triangle using extra layer */
.ytc-channel-logo::after,
.ytc-channel-logo::before {}

.ytc-channel-logo::before {
    background:
        rgba(255,0,0,0.95);
}

.ytc-channel-logo::before {
    /* Inject triangle */
}

.ytc-channel-logo::before {
    position: absolute;
}

.ytc-channel-logo::before::after {
    content: '';
}

/* Replace triangle cleanly */
.ytc-channel-logo::before {
    background-color: rgba(255, 0, 0, 0.95);
}

/* Add triangle via inner element using mask trick */
.ytc-channel-logo::after,
.ytc-channel-logo::before {}

.ytc-channel-logo::before {
    position: absolute;
}

.ytc-channel-logo::before::after {
    content: '';
}

/* CLEAN triangle method */
.ytc-channel-logo::before {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ytc-channel-logo::before:after {
    content: '';
    border-left: 14px solid #fff;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    margin-left: 4px;
}

/* Hover states */
.ytc-channel:hover .ytc-channel-logo::after {
    opacity: 1;
}

.ytc-channel:hover .ytc-channel-logo::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}


/* ========================================
   CHANNEL TEXT
======================================== */
.ytc-channel-title {
    font-weight: 500;
    color: #333;
}

.ytc-channel-line {
    font-size: 14px;
    line-height: 1.3;
}

.ytc-meta {
    color: #2ea3f2;
}

.ytc-sep {
    margin: 0 5px;
    color: #bbb;
}

.ytc-channel-desc {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.6;
    color: #2ea3f2;
}


/* ========================================
   FEATURED VIDEO
======================================== */
.ytc-featured {
    margin-bottom: 10px;
}
.ytc-featured-title {
    font-size:14px;
    color: #000000;
    font-weight: 600;
}
.ytc-featured-meta {
    font-size:11px;
    color: #000000;
}
.ytc-featured iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    display: block;
}


/* ========================================
   SUBSCRIBE BAR
======================================== */
.ytc-sub-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f1f3f4;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 20px;
    color: #000000;
    font-size: 14px;
}
.ytc-sub-name {
    font-weight: 600;
}

.ytc-sub-left {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 20px;
}

.ytc-sub-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
}


/* ========================================
   BUTTONS
======================================== */
.ytc-load-more,
.ytc-sub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
}

/* Load more */
.ytc-load-more {
    background: #2b2b2b;
    color: #fff;
    border: none;
    cursor: pointer;
}

.ytc-load-more:hover {
    background: #1f1f1f;
}

/* ========================================
   SUBSCRIBE BUTTON (RESTORED)
======================================== */

.ytc-sub-btn {
    background: rgb(64, 139, 209);;
    color: #fff;
    text-decoration: none;

    gap: 8px;
}

/* hover */
.ytc-sub-btn:hover {
    background: rgba(64, 139, 209,0.7);
}

/* icon (THIS is what got lost) */
.ytc-sub-btn::before {
    content: '';
    width: 16px;
    height: 12px;
    display: inline-block;
    flex-shrink: 0;

    background: url('data:image/svg+xml;utf8,\
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\
<rect x="2" y="5" width="20" height="14" rx="3" fill="white"/>\
<polygon points="10,9 16,12 10,15" fill="%23d93025"/>\
</svg>') no-repeat center;

    background-size: contain;
}


/* ========================================
   GRID
======================================== */
.ytc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top:30px;
}


/* ========================================
   VIDEO CARD
======================================== */
.ytc-video-thumb {
    position: relative;
    cursor: pointer;
}

.ytc-video-thumb img,
.ytc-video-thumb iframe {
    width: 100%;
    aspect-ratio: 16/9;
    display: block;
}
.ytc-video-thumb img {
    object-fit: cover;
}

.ytc-video-thumb iframe {
    border: none;
}


/* ========================================
   PLAY BUTTON (GRID)
======================================== */
.ytc-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);

    width: 64px;
    height: 45px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 10px;

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 2;
    pointer-events: none;

    transition: transform 0.2s ease;
}

.ytc-play-button::after {
    content: '';
    border-left: 16px solid #fff;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

.ytc-video-thumb:hover .ytc-play-button {
    transform: translate(-50%, -50%) scale(1.1);
}


/* ========================================
   META
======================================== */
.ytc-video-meta {
    padding-top: 10px;
}

.ytc-video-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: #666;
    margin-bottom: 4px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align:center;
}

.ytc-video-sub {
    font-size: 13px;
    color: #666;
    text-align:center;
}

.ytc-dot {
    margin: 0 6px;
    color: #aaa;
}


/* ========================================
   ACTION BAR
======================================== */
.ytc-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 30px 0;
}


/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 768px) {
    .ytc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .ytc-grid {
        grid-template-columns: 1fr;
    }
}