/* YouTube Widget Styles - COMPACT VERSION */
.youtube-widget {
    background:
        linear-gradient(150deg, rgba(255,169,169,0.18), rgba(255,246,185,0.16), rgba(172,224,255,0.14), rgba(219,161,255,0.16)),
        repeating-linear-gradient(0deg, rgba(255,255,255,0.05), rgba(255,255,255,0.05) 1px, transparent 1px, transparent 13px),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.04) 1px, transparent 1px, transparent 18px),
        #1a1a1a;
    background-blend-mode: screen, normal, normal, normal;
    border-radius: 24px 18px 24px 12px;
    padding: 20px;
    margin: 15px 0;
    box-shadow:
        0 25px 55px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255,255,255,0.08);
    max-width: 500px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.youtube-widget::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 250%;
    height: 250%;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.12), transparent 25%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.08), transparent 26%);
    pointer-events: none;
    animation: paperShimmer 11s ease-in-out infinite;
}

.youtube-widget::after {
    content: '';
    position: absolute;
    top: auto;
    bottom: -14px;
    right: 1.5rem;
    width: 170px;
    height: 78px;
    background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0) 56%);
    border-radius: 0 0 22px 22px;
    transform: rotate(3deg);
    opacity: 0.32;
    pointer-events: none;
}

/* Channel Header - Compacto */
.channel-header {
    margin-bottom: 20px;
}

.channel-banner img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    display: none;
}

.channel-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.channel-avatar {
    flex-shrink: 0;
}

.channel-avatar img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #333;
    display: none;
}

.channel-details {
    flex-grow: 1;
}

/* NOME DO CANAL - BRANCO */
.channel-details h1 {
    font-size: 18px;
    margin-bottom: 5px;
    color: #ffffff;
    line-height: 1.2;
    font-weight: 600;
}

/* @ HANDLE - BRANCO */
#channelHandle {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 10px;
}

.channel-stats {
    display: flex;
    gap: 15px;
    margin: 8px 0;
    font-size: 12px;
    color: #888;
    flex-wrap: wrap;
}

.channel-description {
    margin: 10px 0;
    line-height: 1.4;
    color: #ccc;
    font-size: 14px;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.channel-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.channel-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-subscribe {
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: white;
}

.btn-share {
    background: #333;
    color: white;
}

/* Videos Section - Compacta */
.videos-section h2 {
    margin-bottom: 15px;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    font-weight: 600;
}

.videos-section h2 .view-all {
    font-size: 13px;
    color: #ff4444;
    text-decoration: none;
    font-weight: normal;
    transition: all 0.3s;
}

.videos-section h2 .view-all:hover {
    color: #ff6666;
    text-decoration: underline;
}

/* Featured Videos (3 primeiros) - Compactos */
.featured-videos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.featured-video {
    background-color: #222;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid #333;
}

.featured-video:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: #444;
}

.featured-thumbnail {
    position: relative;
    display: block;
    width: 100%;
    height: 100px;
    overflow: hidden;
}

.featured-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.featured-video:hover .featured-thumbnail img {
    transform: scale(1.05);
}

.featured-duration {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
}

.featured-info {
    padding: 10px;
}

.featured-title {
    font-size: 13px;
    margin-bottom: 5px;
    line-height: 1.3;
    height: 34px;
    overflow: hidden;
}

.featured-title a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.featured-title a:hover {
    color: #ff4444;
}

.featured-meta {
    font-size: 11px;
    color: #888;
}

/* Scrollable Videos List - Compacta */
.scrollable-videos {
    background-color: #222;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    border: 1px solid #333;
}

/* TÍTULO "MAIS VÍDEOS" - BRANCO */
.scrollable-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
}

.scrollable-header h3 {
    font-size: 15px;
    color: #ffffff;
    font-weight: 600;
}

.scroll-controls {
    display: flex;
    gap: 8px;
}

.scroll-btn {
    background-color: #333;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.3s;
}

.scroll-btn:hover:not(:disabled) {
    background-color: #444;
    transform: scale(1.1);
}

.scroll-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.scrollable-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 5px;
    scroll-behavior: smooth;
}

.scrollable-list::-webkit-scrollbar {
    height: 6px;
}

.scrollable-list::-webkit-scrollbar-track {
    background: #333;
    border-radius: 3px;
}

.scrollable-list::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 3px;
}

.scrollable-video {
    flex: 0 0 150px;
    background-color: #1a1a1a;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid #333;
}

.scrollable-video:hover {
    transform: translateY(-3px);
    border-color: #444;
}

.scrollable-thumbnail {
    position: relative;
    display: block;
    width: 100%;
    height: 85px;
    overflow: hidden;
}

.scrollable-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scrollable-duration {
    position: absolute;
    bottom: 3px;
    right: 3px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 4px;
    border-radius: 2px;
    font-size: 10px;
}

.scrollable-video-info {
    padding: 8px;
}

.scrollable-video-title {
    font-size: 12px;
    line-height: 1.3;
    height: 32px;
    overflow: hidden;
    margin-bottom: 4px;
}

.scrollable-video-title a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.scrollable-video-title a:hover {
    color: #ff4444;
}

.scrollable-video-date {
    font-size: 10px;
    color: #888;
}

/* Loading e Error States - Compactos */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #aaa;
    grid-column: 1 / -1;
    font-size: 14px;
}

.loading i {
    font-size: 24px;
    margin-bottom: 10px;
}

.error-message {
    text-align: center;
    padding: 40px;
    color: #ff4444;
    grid-column: 1 / -1;
    font-size: 14px;
    background: rgba(255, 68, 68, 0.05);
    border-radius: 8px;
    border: 2px solid rgba(255, 68, 68, 0.2);
}

.error-message i {
    font-size: 32px;
    margin-bottom: 15px;
}

.error-message button {
    margin-top: 15px;
    padding: 8px 16px;
    background-color: #ff4444;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s;
}

.error-message button:hover {
    background-color: #ff3333;
    transform: translateY(-2px);
}

.no-videos {
    text-align: center;
    padding: 40px;
    color: #aaa;
    grid-column: 1 / -1;
    font-size: 14px;
}

/* Responsividade para o widget compacto */
@media (max-width: 900px) {
    .featured-videos {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .youtube-widget {
        max-width: 100%;
    }
}

@media (max-width: 500px) {
    .featured-videos {
        grid-template-columns: 1fr;
    }
    
    .channel-info {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .channel-stats {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .channel-actions {
        justify-content: center;
    }
    
    .scrollable-video {
        flex: 0 0 130px;
    }
    
    .scrollable-thumbnail {
        height: 75px;
    }
}

/* Para ajustar dentro do portfolio */
.embeds .youtube-widget {
    width: 500px;
    flex-shrink: 0;
}

@media (max-width: 1100px) {
    .embeds .youtube-widget {
        width: 100%;
        max-width: 500px;
    }
}
@keyframes paperShimmer {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}
