body {
    font-family: 'Roboto', sans-serif;
    background-color: #f0f2f5;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #005691;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #003d66;
}

/* Khung hình đứng tỷ lệ 9:16 chuẩn video ngắn */
.video-container {
    aspect-ratio: 9 / 16;
    max-height: calc(100vh - 180px);
    width: 100%;
    position: relative;
    margin: 0 auto;
}

/* Tối ưu hóa trình phát Plyr cho khung đứng 9:16 */
.video-container .plyr {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    background-color: #000 !important;
    border-radius: 8px;
    overflow: hidden;
}

.video-container .plyr__video-wrapper {
    height: 100% !important;
    width: 100% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000 !important;
}

.video-container .plyr video {
    object-fit: contain !important;
    width: 100% !important;
    height: 100% !important;
}

/* Đảm bảo giao diện controls của Plyr hiển thị đẹp mắt */
.video-container .plyr--full-ui {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.video-container .plyr__controls {
    background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.75)) !important;
    padding: 15px 10px 10px 10px !important;
}

/* Custom Tab menu */
.nav-link-custom {
    text-decoration: none;
    color: #6c757d;
    font-weight: 500;
    font-size: 0.875rem;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    padding: 0.75rem 0.5rem;
    transition: all 0.2s ease;
    background: none;
    border: none;
}
.nav-link-custom:hover {
    color: #005691;
}
.nav-link-custom.active-tab {
    border-bottom-color: #005691;
    color: #005691 !important;
    font-weight: 900;
}

/* Ô tập phim vuông tối giản */
.ep-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

/* Giới hạn chiều cao cho đúng 2 dòng tập phim */
.episode-grid-collapsed {
    max-height: 84px; 
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

/* Tự động cuộn mượt */
html {
    scroll-behavior: smooth;
}

/* Ẩn thanh cuộn ngang di động */
.scrollbar-none::-webkit-scrollbar {
    display: none;
}
.scrollbar-none {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Hiệu ứng trượt xuất hiện bình luận */
.animate-slide-up {
    animation: slideUp 0.35s ease forwards;
}
@keyframes slideUp {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Hover opacity utilities */
.hover-opacity:hover {
    opacity: 1 !important;
}
.transition {
    transition: all 0.2s ease;
}
.cursor-pointer {
    cursor: pointer;
}
.hover-shadow:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.075);
}

/* Tối ưu hóa nút tương tác và căn chỉnh trên di động */
.interaction-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease;
}

@media (max-width: 576px) {
    .interaction-btn {
        font-size: 11px !important;
        padding: 5px 8px !important;
        gap: 4px;
    }
    .score-display {
        font-size: 0.8rem !important;
        padding-left: 2px !important;
        padding-right: 2px !important;
    }
    #toast-container {
        left: 0 !important;
        right: 0 !important;
        padding: 10px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    #toast-container .toast {
        width: 100% !important;
        max-width: calc(100vw - 20px) !important;
    }
}
