/* YouTube Auto Sync - Frontend Styles */

/* Channel Header Styles */
.yt-channel-header {
    border-radius: 8px;
    overflow: hidden;
}

.yt-channel-banner {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.yt-channel-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yt-channel-info {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.yt-channel-avatar {
    flex-shrink: 0;
}

.yt-channel-avatar img {
    width: 180px;
    height: 180px;
    border-radius: 50% !important;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.yt-channel-details {
    flex: 1;
}

.yt-channel-title {
    margin: 0 0 10px 0;
    font-size: 36px;
    color: #0f0f0f;
    font-weight: 700;
    line-height: 1.2;
}

.yt-channel-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.yt-stat {
    color: #606060;
    font-size: 14px;
}

.yt-stat strong {
    color: #0f0f0f;
    font-weight: 700;
}

.yt-channel-description {
    color: #0f0f0f;
    font-size: 14px;
    line-height: 1.5;
}

.yt-channel-description p {
    margin: 0;
}

.yt-channel-description .yt-desc-toggle {
    color: #065fd4;
    font-weight: 600;
    margin-left: 6px;
    text-decoration: none;
}

.yt-channel-description .yt-desc-toggle:hover {
    text-decoration: underline;
}

.yt-channel-actions {
    margin-top: 6px;
}

.yt-subscribe-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #000;
    color: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
}

.yt-subscribe-btn:hover {
    opacity: 0.9;
    color: #fff;
}

/* Video Grid Styles */
.yt-video-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.yt-grid-columns-1 {
    grid-template-columns: 1fr;
}
.yt-grid-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}
.yt-grid-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}
.yt-grid-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}
.yt-grid-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* Video Card Styles */
.yt-video-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.yt-video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.yt-video-thumbnail {
    position: relative;
    overflow: hidden;
}

.yt-video-short .yt-video-thumbnail {
    aspect-ratio: 9/16; /* Shorts tỷ lệ dọc */
}

.yt-video-regular .yt-video-thumbnail {
    aspect-ratio: 16/9; /* Video thường tỷ lệ ngang */
}

.yt-video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.yt-video-card:hover .yt-video-thumbnail img {
    transform: scale(1.05);
}

.yt-video-link {
    display: block;
    position: relative;
    text-decoration: none;
}

.yt-video-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.yt-video-card:hover .yt-video-overlay {
    opacity: 1;
}

.yt-play-icon {
    width: 20px;
    height: 20px;
    color: #fff;
    margin-left: 2px;
}

.yt-video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.yt-video-short-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #ff0000;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.yt-video-info {
    padding: 16px;
}

.yt-video-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
}

.yt-video-title a {
    color: #0f0f0f;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.yt-video-title a:hover {
    color: #065fd4;
}

.yt-video-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #606060;
    flex-wrap: wrap;
}

.yt-video-meta span:not(:last-child)::after {
    content: "•";
    margin-left: 8px;
    color: #909090;
}

.yt-video-actions {
    display: flex;
    justify-content: flex-end;
}

.yt-external-link {
    color: #606060;
    text-decoration: none;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.yt-external-link:hover {
    color: #ff0000;
    background-color: #f9f9f9;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .yt-grid-columns-5 {
        grid-template-columns: repeat(4, 1fr);
    }
    .yt-grid-columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
    /* Hide 5th featured card on tablet */
    .yt-overlay-cards-container > .yt-overlay-card:nth-child(5),
    .yt-cards-container > .yt-premium-card:nth-child(5) {
        display: none;
    }
}

@media (max-width: 768px) {
    .yt-channel-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .yt-channel-avatar {
        align-self: center;
        margin: 0 auto 10px auto;
    }

    .yt-channel-stats {
        justify-content: center;
    }

    .yt-grid-columns-5,
    .yt-grid-columns-4,
    .yt-grid-columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .yt-video-grid {
        gap: 15px;
    }

    /* Hide 5th featured card on mobile */
    .yt-overlay-cards-container > .yt-overlay-card:nth-child(5),
    .yt-cards-container > .yt-premium-card:nth-child(5) {
        display: none;
    }

    .yt-channel-banner {
        height: 150px;
    }

    .yt-channel-title {
        font-size: 20px;
        text-align: center;
    }
    .yt-channel-actions {
        width: 100%;
        display: flex;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .yt-grid-columns-5,
    .yt-grid-columns-4,
    .yt-grid-columns-3,
    .yt-grid-columns-2 {
        grid-template-columns: 1fr;
    }

    .yt-channel-banner {
        height: 120px;
    }

    .yt-channel-avatar img {
        width: 60px;
        height: 60px;
    }

    .yt-channel-title {
        font-size: 18px;
    }

    .yt-channel-stats {
        gap: 15px;
    }

    .yt-stat {
        font-size: 13px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .yt-channel-header,
    .yt-video-card {
        background: #1f1f1f;
        color: #fff;
    }

    .yt-channel-title,
    .yt-video-title a {
        color: #fff;
    }

    .yt-video-title a:hover {
        color: #3ea6ff;
    }

    .yt-stat strong {
        color: #fff;
    }

    .yt-external-link:hover {
        background-color: #2a2a2a;
    }

    /* Force channel header text to visible colors even if banner is light */
    .yt-channel-header .yt-channel-title {
        color: #0f0f0f !important;
    }
    .yt-channel-header .yt-stat {
        color: #606060 !important;
    }
    .yt-channel-header .yt-stat strong {
        color: #0f0f0f !important;
    }
    .yt-channel-header .yt-channel-description {
        color: #0f0f0f !important;
    }
}

/* Animation for loading states */
.yt-video-card.loading {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover effects for better UX */
.yt-video-card {
    cursor: pointer;
}

.yt-video-card:focus-within {
    outline: 2px solid #065fd4;
    outline-offset: 2px;
}

/* Accessibility improvements */
.yt-video-link:focus {
    outline: none;
}

.yt-video-overlay,
.yt-video-duration,
.yt-video-short-badge {
    pointer-events: none;
}

/* Load More Button Styles */
.yt-load-more-wrapper {
    text-align: center;
    margin: 30px 0;
}

.yt-load-more-btn {
    background: #ff0000;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
}

.yt-load-more-btn:hover {
    background: #cc0000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

.yt-load-more-btn:active {
    transform: translateY(0);
}

.yt-load-more-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.yt-load-spinner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.yt-load-spinner svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Animation cho video mới load */
.yt-video-card.loaded {
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading skeleton effect */
.yt-video-card.loading {
    opacity: 0.7;
}

.yt-video-card.loading .yt-video-thumbnail {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive cho nút load more */
@media (max-width: 768px) {
    .yt-load-more-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Dark mode cho load more button */
@media (prefers-color-scheme: dark) {
    .yt-load-more-btn {
        background: #ff4444;
    }

    .yt-load-more-btn:hover {
        background: #ff6666;
    }
}

.yt-featured-grid {
    position: relative;
}

.yt-video-featured {
    position: relative;
    overflow: visible;
}

.yt-video-featured::before {
    content: "";
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #ff0000, #ff6600, #ffaa00, #ff0000);
    background-size: 300% 300%;
    border-radius: 15px;
    z-index: -1;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.yt-featured-empty {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border: 2px dashed #ddd;
    border-radius: 10px;
    margin: 20px 0;
}

.yt-featured-empty p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Hover effect cho featured videos */
.yt-video-featured:hover {
    transform: translateY(-5px) scale(1.02);
    transition: all 0.3s ease;
}

/* Responsive cho featured videos */
@media (max-width: 768px) {
    .yt-video-featured::before {
        top: -2px;
        left: -2px;
        right: -2px;
        bottom: -2px;
    }
}

/* Dark mode cho featured videos */
@media (prefers-color-scheme: dark) {
    .yt-featured-empty {
        background: #2a2a2a;
        border-color: #444;
    }

    .yt-featured-empty p {
        color: #ccc;
    }
}

/* Playlist Styles */
.yt-playlist-wrapper {
    margin: 30px 0;
}

.yt-playlist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px 0;
    border-bottom: 2px solid #f0f0f0;
}

.yt-playlist-title {
    font-size: 22px;
    font-weight: 600;
    color: #0f0f0f;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.yt-playlist-count {
    background: #f0f0f0;
    color: #606060;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
}

.yt-playlist-grid {
    position: relative;
}

.yt-playlist-error,
.yt-playlist-empty {
    text-align: center;
    padding: 40px 20px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    margin: 20px 0;
}

.yt-playlist-error p,
.yt-playlist-empty p {
    color: #856404;
    font-size: 16px;
    margin: 0;
}

/* Playlist load more button */
.yt-playlist-load-more {
    background: #065fd4;
    border-color: #065fd4;
}

.yt-playlist-load-more:hover {
    background: #0553c2;
}

/* Responsive cho playlist */
@media (max-width: 768px) {
    .yt-playlist-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .yt-playlist-title {
        font-size: 18px;
    }

    .yt-playlist-count {
        align-self: flex-end;
    }
}

/* Dark mode cho playlist */
@media (prefers-color-scheme: dark) {
    .yt-playlist-title {
        color: #fff;
    }

    .yt-playlist-header {
        border-bottom-color: #333;
    }

    .yt-playlist-count {
        background: #333;
        color: #ccc;
    }

    .yt-playlist-error,
    .yt-playlist-empty {
        background: #2a2a2a;
        border-color: #444;
    }

    .yt-playlist-error p,
    .yt-playlist-empty p {
        color: #ffc107;
    }
}

/* Featured overlay card */
.yt-video-featured-overlay .yt-video-thumbnail {
    position: relative;
    height: 480px;
    aspect-ratio: auto;
}

.yt-video-featured-overlay .yt-featured-overlay-info {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    color: #fff;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.yt-video-featured-overlay .yt-featured-overlay-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.yt-video-featured-overlay .yt-featured-overlay-meta {
    display: flex;
    gap: 10px;
    font-size: 13px;
    opacity: 0.95;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.yt-video-featured-overlay .yt-video-duration.yt-featured-duration {
    z-index: 2;
}

/* dark gradient to improve readability */
.yt-video-featured-overlay .yt-video-thumbnail::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 45%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0));
    z-index: 1;
}

@media (max-width: 768px) {
    .yt-video-featured-overlay .yt-video-thumbnail {
        height: 420px;
    }
    .yt-video-featured-overlay .yt-featured-overlay-title {
        font-size: 16px;
    }
    .yt-video-featured-overlay .yt-featured-overlay-meta {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .yt-video-featured-overlay .yt-video-thumbnail {
        height: 320px;
    }
}

/* ========================================
   FEATURED VIDEOS - NEW LAYOUTS
======================================== */

/* ========================================
   LAYOUT 0: OVERLAY CARDS LAYOUT
======================================== */

.yt-overlay-cards-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    max-width: 1400px;
    margin: 0 auto;
}

.yt-overlay-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: #fff;
}

.yt-overlay-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.yt-overlay-card-inner {
    position: relative;
    height: 100%;
}

.yt-overlay-image-container {
    position: relative;
    height: 420px;
    overflow: hidden;
}

.yt-overlay-link {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.yt-overlay-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.yt-overlay-image img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    object-position: top;
    transition: transform 0.3s ease;
}

/* Play Button Overlay */
.yt-overlay-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 3;
}

.yt-overlay-card:hover .yt-overlay-play-button {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Duration Badge */
.yt-overlay-duration {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    z-index: 4;
}

/* Content Overlay at Bottom */
.yt-overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.7) 50%,
        rgba(0, 0, 0, 0) 100%
    );
    color: white;
    padding: 40px 20px 20px 20px;
    z-index: 2;
}

.yt-overlay-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.yt-overlay-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    opacity: 0.9;
}

.yt-overlay-views,
.yt-overlay-date {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.yt-overlay-views svg,
.yt-overlay-date svg {
    opacity: 0.8;
}

/* External YouTube Button */
.yt-overlay-external {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 4;
}

.yt-overlay-youtube-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 0, 0, 0.9);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
}

.yt-overlay-card:hover .yt-overlay-youtube-btn {
    opacity: 1;
    transform: scale(1);
}

.yt-overlay-youtube-btn:hover {
    background: #cc0000;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

/* Hover Effects */
.yt-overlay-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.yt-overlay-card:hover::before {
    opacity: 1;
}

/* Responsive Design for Overlay Cards */
@media (max-width: 1024px) {
    .yt-overlay-cards-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        max-width: 1000px;
    }

    .yt-overlay-image-container {
        height: 480px;
    }

    .yt-overlay-title {
        font-size: 16px;
    }

    .yt-overlay-meta {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .yt-overlay-cards-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        max-width: 600px;
    }

    .yt-overlay-image-container {
        height: 420px;
    }

    .yt-overlay-content {
        padding: 30px 16px 16px 16px;
    }

    .yt-overlay-title {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .yt-overlay-meta {
        font-size: 12px;
        gap: 6px;
    }

    .yt-overlay-play-button {
        width: 60px;
        height: 60px;
    }

    .yt-overlay-youtube-btn {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .yt-overlay-cards-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        max-width: 400px;
    }

    .yt-overlay-image-container {
        height: 380px;
    }

    .yt-overlay-content {
        padding: 25px 14px 14px 14px;
    }

    .yt-overlay-title {
        font-size: 15px;
    }

    .yt-overlay-play-button {
        width: 50px;
        height: 50px;
    }

    .yt-overlay-play-button svg {
        width: 32px;
        height: 32px;
    }
}

/* Dark Mode Support for Overlay Cards */
@media (prefers-color-scheme: dark) {
    .yt-overlay-card {
        background: #1f1f1f;
    }

    .yt-overlay-content {
        background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.95) 0%,
            rgba(0, 0, 0, 0.8) 50%,
            rgba(0, 0, 0, 0) 100%
        );
    }
}

/* Common Featured Section Title */
.yt-featured-section-title {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.yt-featured-section-title h2 {
    font-size: 32px;
    font-weight: 700;
    color: #0f0f0f;
    margin: 0 0 15px 0;
    background: linear-gradient(135deg, #ff0000, #ff6600, #ffaa00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    position: relative;
    display: inline-block;
}

.yt-featured-title-line {
    height: 4px;
    width: 80px;
    background: linear-gradient(135deg, #ff0000, #ff6600, #ffaa00);
    margin: 0 auto;
    border-radius: 2px;
}

/* ========================================
   LAYOUT 1: HERO LAYOUT
======================================== */
.yt-featured-hero {
    margin: 40px 0;
}

.yt-hero-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Main Hero Video */
.yt-hero-main-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.yt-hero-main-card::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff0000, #ff6600, #ffaa00, #ff0000);
    background-size: 400% 400%;
    border-radius: 18px;
    z-index: -1;
    animation: heroGradient 4s ease infinite;
}

@keyframes heroGradient {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.yt-hero-main-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.yt-hero-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.yt-hero-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.yt-hero-main-card:hover .yt-hero-thumbnail img {
    transform: scale(1.05);
}

.yt-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.yt-hero-main-card:hover .yt-hero-overlay {
    opacity: 1;
}

.yt-hero-play-btn {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff0000;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.yt-hero-main-card:hover .yt-hero-play-btn {
    transform: scale(1);
}

.yt-hero-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

.yt-hero-info {
    padding: 24px;
}

.yt-hero-title {
    margin: 0 0 16px 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
}

.yt-hero-title a {
    color: #0f0f0f;
    text-decoration: none;
    transition: color 0.2s ease;
}

.yt-hero-title a:hover {
    color: #ff0000;
}

.yt-hero-meta {
    display: flex;
    gap: 20px;
    font-size: 16px;
    color: #606060;
    flex-wrap: wrap;
}

.yt-hero-views,
.yt-hero-date {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Hero Sidebar */
.yt-hero-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.yt-hero-side-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    gap: 16px;
    padding: 16px;
}

.yt-hero-side-card:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

.yt-hero-side-thumbnail {
    position: relative;
    width: 120px;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 8px;
    flex-shrink: 0;
}

.yt-hero-side-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.yt-hero-side-card:hover .yt-hero-side-thumbnail img {
    transform: scale(1.1);
}

.yt-hero-side-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.yt-hero-side-card:hover .yt-hero-side-overlay {
    opacity: 1;
}

.yt-hero-side-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

.yt-hero-side-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.yt-hero-side-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.yt-hero-side-title a {
    color: #0f0f0f;
    text-decoration: none;
    transition: color 0.2s ease;
}

.yt-hero-side-title a:hover {
    color: #ff0000;
}

.yt-hero-side-views {
    font-size: 14px;
    color: #606060;
}

/* ========================================
   LAYOUT 2: PREMIUM CARDS LAYOUT
======================================== */
.yt-featured-cards {
    margin: 40px 0;
}

.yt-cards-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    perspective: 1000px;
}

.yt-premium-card {
    height: 400px;
    position: relative;
    cursor: pointer;
}

.yt-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.yt-premium-card:hover .yt-card-inner {
    transform: rotateY(180deg);
}

.yt-card-front,
.yt-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.yt-card-front {
    background: #fff;
}

.yt-card-back {
    background: linear-gradient(135deg, #ff0000, #ff6600);
    color: white;
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Card Front Styling */
.yt-card-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.yt-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.yt-premium-card:hover .yt-card-thumbnail img {
    transform: scale(1.1);
}

.yt-card-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
}

.yt-card-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.yt-card-number {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
    background: rgba(255, 0, 0, 0.9);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

.yt-card-content {
    padding: 20px;
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.yt-card-title {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #0f0f0f;
}

.yt-card-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.yt-card-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #606060;
}

.yt-card-icon {
    font-size: 16px;
}

/* Card Back Styling */
.yt-card-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.yt-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid white;
    border-radius: 25px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 160px;
    justify-content: center;
}

.yt-card-btn:hover {
    background: white;
    color: #ff0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.yt-btn-youtube:hover {
    color: #ff0000;
}

/* ========================================
   LAYOUT 3: MOSAIC LAYOUT
======================================== */
.yt-featured-mosaic {
    margin: 40px 0;
}

.yt-mosaic-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 250px);
    gap: 16px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Mosaic Grid Layout - 4 video layout */
.yt-mosaic-1 {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
}

.yt-mosaic-2 {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
}

.yt-mosaic-3 {
    grid-column: 4 / 5;
    grid-row: 1 / 2;
}

.yt-mosaic-4 {
    grid-column: 3 / 5;
    grid-row: 2 / 3;
}

.yt-mosaic-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: #fff;
}

.yt-mosaic-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.yt-mosaic-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.yt-mosaic-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.yt-mosaic-image {
    position: relative;
    flex: 1;
    overflow: hidden;
}

.yt-mosaic-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.yt-mosaic-item:hover .yt-mosaic-image img {
    transform: scale(1.1);
}

.yt-mosaic-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.yt-mosaic-item:hover .yt-mosaic-overlay {
    opacity: 1;
}

.yt-mosaic-play {
    color: white;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.yt-mosaic-item:hover .yt-mosaic-play {
    transform: scale(1);
}

.yt-mosaic-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.yt-mosaic-info {
    padding: 16px;
    background: white;
    position: relative;
    z-index: 2;
}

.yt-mosaic-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #0f0f0f;
}

.yt-mosaic-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #606060;
    align-items: center;
}

.yt-mosaic-views,
.yt-mosaic-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.yt-mosaic-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
}

.yt-mosaic-youtube {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 0, 0, 0.9);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 0;
}

.yt-mosaic-item:hover .yt-mosaic-youtube {
    opacity: 1;
}

.yt-mosaic-youtube:hover {
    background: #cc0000;
    transform: scale(1.1);
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

/* Large Desktop - Tối ưu cho 4 video nằm ngang */
@media (min-width: 1400px) {
    .yt-cards-container {
        max-width: 1600px;
        gap: 24px;
    }

    .yt-premium-card {
        height: 420px;
    }

    .yt-card-title {
        font-size: 19px;
    }

    .yt-overlay-cards-container {
        max-width: 1600px;
        gap: 10px;
    }

    .yt-mosaic-container {
        max-width: 1600px;
        gap: 20px;
        grid-template-rows: repeat(2, 280px);
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .yt-hero-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .yt-hero-sidebar {
        flex-direction: row;
        overflow-x: auto;
        gap: 16px;
        padding: 0 0 10px 0;
    }

    .yt-hero-side-card {
        min-width: 300px;
    }

    .yt-cards-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        max-width: 1000px;
    }

    .yt-mosaic-container {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(2, 180px);
        max-width: 1000px;
    }

    .yt-mosaic-1 {
        grid-column: 1 / 3;
        grid-row: 1 / 2;
    }

    .yt-mosaic-2 {
        grid-column: 3 / 4;
        grid-row: 1 / 2;
    }

    .yt-mosaic-3 {
        grid-column: 4 / 5;
        grid-row: 1 / 2;
    }

    .yt-mosaic-4 {
        grid-column: 1 / 5;
        grid-row: 2 / 3;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .yt-featured-section-title h2 {
        font-size: 24px;
    }

    .yt-hero-container {
        gap: 16px;
    }

    .yt-hero-sidebar {
        flex-direction: column;
    }

    .yt-hero-side-card {
        min-width: auto;
    }

    .yt-hero-side-thumbnail {
        width: 100px;
    }

    .yt-cards-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        max-width: 600px;
    }

    .yt-premium-card {
        height: 350px;
    }

    .yt-mosaic-container {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        max-width: 600px;
    }

    .yt-mosaic-1,
    .yt-mosaic-2,
    .yt-mosaic-3,
    .yt-mosaic-4 {
        grid-column: auto;
        grid-row: auto;
        height: 250px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .yt-hero-info {
        padding: 16px;
    }

    .yt-hero-title {
        font-size: 20px;
    }

    .yt-hero-meta {
        font-size: 14px;
        gap: 16px;
    }

    .yt-hero-side-card {
        padding: 12px;
        gap: 12px;
    }

    .yt-hero-side-thumbnail {
        width: 80px;
    }

    .yt-hero-side-title {
        font-size: 14px;
    }

    .yt-premium-card {
        height: 320px;
    }

    .yt-card-content {
        padding: 16px;
    }

    .yt-card-title {
        font-size: 16px;
    }

    .yt-mosaic-container {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .yt-mosaic-1,
    .yt-mosaic-2,
    .yt-mosaic-3,
    .yt-mosaic-4 {
        height: 200px;
    }

    .yt-cards-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        max-width: 400px;
    }
}

/* Dark Mode Support for New Layouts */
@media (prefers-color-scheme: dark) {
    .yt-hero-main-card,
    .yt-hero-side-card,
    .yt-card-front,
    .yt-mosaic-item {
        background: #1f1f1f;
        color: #fff;
    }

    .yt-hero-title a,
    .yt-hero-side-title a,
    .yt-card-title,
    .yt-mosaic-title {
        color: #fff;
    }

    .yt-hero-title a:hover,
    .yt-hero-side-title a:hover {
        color: #3ea6ff;
    }

    .yt-mosaic-info {
        background: #1f1f1f;
    }
}
