/* Container Principal */
.ytpg-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 32px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    box-sizing: border-box;
}

.ytpg-wrapper *,
.ytpg-wrapper *::before,
.ytpg-wrapper *::after {
    box-sizing: border-box;
}

/* Cabeçalho do Canal */
.ytpg-channel-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.ytpg-channel-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background-color: #111;
}

.ytpg-channel-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ytpg-channel-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 15px;
    line-height: 1.3;
    color: #cc4b24;
}

.ytpg-channel-name {
    font-weight: 700;
}

.ytpg-channel-subs {
    font-weight: 400;
}

.ytpg-channel-desc {
    margin: 3px 0 0 0;
    font-size: 13px;
    line-height: 1.4;
    color: #c86d51;
}

/* Grade Responsiva */
.ytpg-grid {
    display: grid;
    grid-template-columns: repeat(var(--ytpg-cols, 3), minmax(0, 1fr));
    gap: 26px 20px;
}

@media (max-width: 992px) {
    .ytpg-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .ytpg-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    .ytpg-channel-header {
        align-items: flex-start;
    }
}

/* Card de Vídeo */
.ytpg-card {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}

.ytpg-card:focus {
    outline: 2px solid #cc4b24;
    outline-offset: 4px;
}

.ytpg-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #0f0f0f;
    overflow: hidden;
}

.ytpg-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.ytpg-card:hover .ytpg-thumb {
    transform: scale(1.04);
    filter: brightness(0.92);
}

/* Botão Play Centralizado */
.ytpg-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0.92;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.ytpg-card:hover .ytpg-play-btn {
    transform: translate(-50%, -50%) scale(1.12);
    opacity: 1;
}

/* Textos abaixo da Thumbnail */
.ytpg-info {
    padding: 10px 4px 0 4px;
    text-align: center;
}

.ytpg-title {
    margin: 0 0 5px 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: #333333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ytpg-card:hover .ytpg-title {
    color: #000000;
}

.ytpg-meta {
    font-size: 12.5px;
    line-height: 1.4;
    color: #767676;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}

.ytpg-dot {
    font-size: 10px;
    opacity: 0.8;
}

/* Avisos de Configuração */
.ytpg-notice {
    padding: 14px 18px;
    background: #fff8e5;
    border-left: 4px solid #ffb900;
    color: #333;
    font-size: 14px;
    margin: 16px 0;
}

/* Lightbox Modal */
.ytpg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ytpg-lightbox.is-open {
    display: flex;
}

.ytpg-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.ytpg-lightbox-dialog {
    position: relative;
    width: 100%;
    max-width: 920px;
    z-index: 2;
}

.ytpg-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
}

.ytpg-lightbox-ratio {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.ytpg-lightbox-ratio iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
