/* YouTube Elegant Feed Styles */
.yt-elegant-wrapper {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.yt-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.yt-container:hover {
    transform: translateY(-5px);
}

/* HEADER STYLES */
.yt-header {
    background: linear-gradient(135deg, #1e1e2f 0%, #2d2d44 100%);
    padding: 40px;
    display: flex;
    gap: 30px;
    align-items: center;
    position: relative;
}

.yt-avatar-wrapper {
    position: relative;
    display: inline-block;
}

.yt-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid #ff4444;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    object-fit: cover;
}

img#yt-avatar {
    border-radius: 50px;
}

.yt-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #ff4444;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 20px;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    display:none;
}

.yt-info {
    flex: 1;
    color: white;
}

.yt-info h1 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #ff4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.yt-stats {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.stat-badge {
    background: rgba(255,68,68,0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #ff8888;
}

.stat-separator {
    color: #666;
    font-size: 14px;
}

#yt-videos, #yt-views {
    font-size: 14px;
    color: #ccc;
}

.yt-description {
    font-size: 14px;
    color: #aaa;
    margin: 0;
    line-height: 1.6;
}

/* FEED HEADER */
.yt-feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px 0 40px;
    margin-bottom: 20px;
}

.yt-feed-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #1e1e2f;
    position: relative;
    padding-left: 15px;
}

.yt-feed-header h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: #ff4444;
    border-radius: 2px;
}

.yt-subscribe-btn {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: white;
    padding: 10px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.yt-subscribe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,68,68,0.3);
    color: white;
}

/* SLIDER WRAPPER - Desktop dengan arrow di samping */
.yt-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 40px;
}

.yt-slider-container {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.yt-slider {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
}

.yt-slider::-webkit-scrollbar {
    display: none;
}

/* Navigation Buttons */
.slider-nav {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e0e0e0;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #ff4444;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
    z-index: 10;
}

.slider-nav:hover {
    background: #ff4444;
    color: white;
    border-color: #ff4444;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255,68,68,0.3);
}

.slider-nav:active {
    transform: scale(0.95);
}

/* VIDEO CARDS */
.yt-card {
    flex: 0 0 calc(25% - 18.75px);
    min-width: calc(25% - 18.75px);
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    scroll-snap-align: start;
}

.yt-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.yt-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.yt-thumb {
    position: relative;
    overflow: hidden;
    background: #000;
}

.yt-thumb img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.yt-card:hover .yt-thumb img {
    transform: scale(1.05);
}

/* PLAY BUTTON OVERLAY */
.yt-thumb::before {
    content: "▶";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(255,68,68,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.yt-card:hover .yt-thumb::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* DURATION BADGE */
.yt-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
    letter-spacing: 0.5px;
    z-index: 3;
}

/* VIDEO INFO */
.yt-title {
    padding: 12px 12px 8px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #1e1e2f;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.yt-extra {
    padding: 0 12px 12px 12px;
    font-size: 12px;
    color: #888;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.yt-views {
    display: flex;
    align-items: center;
    gap: 4px;
}

.yt-views::before {
    content: "👁";
    font-size: 11px;
}

/* SLIDER DOTS */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding-bottom: 30px;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    width: 24px;
    border-radius: 4px;
    background: #ff4444;
}

/* LOADING STATE */
.yt-loading {
    text-align: center;
    padding: 60px;
    color: white;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .yt-card {
        flex: 0 0 calc(33.333% - 16.67px);
        min-width: calc(33.333% - 16.67px);
    }
    
    .yt-header {
        padding: 30px;
    }
    
    .yt-slider-wrapper {
        padding: 0 30px;
    }
}

@media (max-width: 768px) {
    .yt-elegant-wrapper {
        padding: 40px 15px;
    }
    
    .yt-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .yt-stats {
        justify-content: center;
    }
    
    /* Mobile: 1.5 kolom */
    .yt-card {
        flex: 0 0 calc(66.666% - 8.33px);
        min-width: calc(66.666% - 8.33px);
    }
    
    .yt-feed-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
        padding: 20px 20px 0 20px;
    }
    
    .yt-info h1 {
        font-size: 24px;
    }
    
    .yt-avatar {
        width: 80px;
        height: 80px;
    }
    
    .yt-slider-wrapper {
        padding: 0 20px;
        gap: 10px;
    }
    
    /* Sembunyikan arrow di mobile */
    .slider-nav {
        display: none;
    }
    
    /* Mobile tetap bisa scroll horizontal */
    .yt-slider {
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    
    .yt-card {
        scroll-snap-align: start;
    }
}

@media (max-width: 480px) {
    /* Untuk layar sangat kecil, tetap 1.5 kolom */
    .yt-card {
        flex: 0 0 calc(75% - 6.25px);
        min-width: calc(75% - 6.25px);
    }
    
    .yt-stats {
        flex-direction: column;
        gap: 8px;
    }
    
    .stat-separator {
        display: none;
    }
    
    .slider-dots {
        margin-top: 15px;
        padding-bottom: 20px;
    }
}

/* ANIMATIONS */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.yt-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.yt-card:nth-child(1) { animation-delay: 0.1s; }
.yt-card:nth-child(2) { animation-delay: 0.2s; }
.yt-card:nth-child(3) { animation-delay: 0.3s; }
.yt-card:nth-child(4) { animation-delay: 0.4s; }
.yt-card:nth-child(5) { animation-delay: 0.5s; }
.yt-card:nth-child(6) { animation-delay: 0.6s; }
.yt-card:nth-child(7) { animation-delay: 0.7s; }
.yt-card:nth-child(8) { animation-delay: 0.8s; }