/* ============================================================
   VIDEO KIẾN THỨC TRỌNG TÂM
   CHIBI UI
   Version 1.0.0
============================================================ */


/* ============================================================
   BODY
============================================================ */

body.core-video-open {
    overflow:
        hidden;
}


/* ============================================================
   DIALOG
============================================================ */

.core-video-dialog {
    width:
        min(
            97vw,
            1480px
        );

    max-width:
        1480px;

    max-height:
        96dvh;

    margin:
        auto;

    padding:
        0;

    border:
        0;

    border-radius:
        30px;

    overflow:
        hidden;

    background:
        #ffffff;

    color:
        #183c5d;

    box-shadow:
        0
        30px
        110px
        rgba(
            0,
            38,
            91,
            .42
        );
}


.core-video-dialog::backdrop {
    background:
        rgba(
            9,
            48,
            87,
            .63
        );

    backdrop-filter:
        blur(7px);
}


.core-video-shell {
    width:
        100%;

    max-height:
        96dvh;

    display:
        flex;

    flex-direction:
        column;

    overflow:
        hidden;
}


/* ============================================================
   HEADER
============================================================ */

.core-video-header {
    position:
        relative;

    flex:
        0
        0
        auto;

    min-height:
        94px;

    padding:
        17px
        92px
        16px
        22px;

    display:
        flex;

    align-items:
        center;

    border-bottom:
        2px solid
        #cfe9f4;

    background:

        radial-gradient(
            circle at 11% 20%,
            rgba(
                255,
                255,
                255,
                .95
            )
            0 5px,
            transparent
            6px
        ),

        linear-gradient(
            115deg,
            #e4f8ff,
            #fff8cf 50%,
            #f3e8ff
        );
}


.core-video-heading {
    min-width:
        0;

    display:
        flex;

    align-items:
        center;

    gap:
        14px;
}


.core-video-heading-icon {
    flex:
        0
        0
        58px;

    width:
        58px;

    height:
        58px;

    display:
        grid;

    place-items:
        center;

    border:
        3px solid
        rgba(
            255,
            255,
            255,
            .95
        );

    border-radius:
        19px;

    background:
        linear-gradient(
            145deg,
            #ffde78,
            #ff9ecf
        );

    font-size:
        31px;

    box-shadow:
        0
        6px
        16px
        rgba(
            62,
            89,
            155,
            .18
        );

    transform:
        rotate(-4deg);
}


.core-video-heading-text {
    min-width:
        0;
}


.core-video-title {
    margin:
        0;

    color:
        #06449a;

    font-size:
        clamp(
            25px,
            2.4vw,
            35px
        );

    line-height:
        1.15;

    font-weight:
        950;
}


.core-video-subtitle {
    margin:
        5px
        0
        0;

    color:
        #60788d;

    font-size:
        14px;

    font-weight:
        650;
}


/* ============================================================
   CLOSE
============================================================ */

.core-video-close {
    position:
        absolute;

    z-index:
        50;

    top:
        17px;

    right:
        18px;

    width:
        60px;

    height:
        60px;

    padding:
        0;

    display:
        grid;

    place-items:
        center;

    border:
        0;

    background:
        transparent;

    cursor:
        pointer;

    transition:
        transform
        150ms
        ease,
        filter
        150ms
        ease;
}


.core-video-close:hover {
    transform:
        scale(1.10)
        rotate(-5deg);

    filter:
        drop-shadow(
            0
            8px
            8px
            rgba(
                160,
                0,
                0,
                .25
            )
        );
}


.core-video-close:active {
    transform:
        scale(.90)
        rotate(3deg);
}


.core-video-close-icon {
    width:
        54px;

    height:
        54px;

    display:
        block;

    pointer-events:
        none;
}


/* ============================================================
   BODY
============================================================ */

.core-video-body {
    flex:
        1;

    min-height:
        0;

    padding:
        17px;

    overflow-x:
        hidden;

    overflow-y:
        auto;

    overscroll-behavior:
        contain;

    background:

        radial-gradient(
            circle at 16px 16px,
            rgba(
                45,
                173,
                232,
                .10
            )
            2px,
            transparent
            2.5px
        ),

        linear-gradient(
            135deg,
            #f5fcff,
            #fffaf0 51%,
            #faf5ff
        );

    background-size:
        34px 34px,
        auto;
}


/* ============================================================
   INTRO
============================================================ */

.core-video-intro {
    position:
        relative;

    padding:
        16px
        19px;

    display:
        grid;

    grid-template-columns:
        auto
        minmax(0, 1fr)
        auto;

    align-items:
        center;

    gap:
        14px;

    border:
        2px solid
        #cbeaf6;

    border-radius:
        23px;

    background:
        rgba(
            255,
            255,
            255,
            .94
        );

    box-shadow:
        0
        7px
        20px
        rgba(
            28,
            100,
            151,
            .09
        );
}


.core-video-intro::after {
    content:
        "⭐";

    position:
        absolute;

    top:
        -10px;

    right:
        88px;

    font-size:
        30px;

    transform:
        rotate(14deg);
}


.core-video-intro-mascot {
    font-size:
        47px;
}


.core-video-intro strong {
    color:
        #0756a6;

    font-size:
        18px;
}


.core-video-intro p {
    margin:
        4px
        0
        0;

    color:
        #668094;

    font-size:
        13px;

    line-height:
        1.45;
}


.core-video-total {
    min-width:
        76px;

    min-height:
        67px;

    padding:
        8px;

    display:
        flex;

    flex-direction:
        column;

    align-items:
        center;

    justify-content:
        center;

    border:
        2px solid
        #f4d675;

    border-radius:
        20px;

    background:
        linear-gradient(
            145deg,
            #fffceb,
            #fff0aa
        );

    transform:
        rotate(2deg);
}


.core-video-total strong {
    color:
        #db7112;

    font-size:
        26px;
}


.core-video-total small {
    color:
        #8b704e;

    font-weight:
        800;
}


/* ============================================================
   TOOLS
============================================================ */

.core-video-tools {
    margin:
        14px
        0;

    padding:
        12px;

    display:
        flex;

    align-items:
        center;

    gap:
        12px;

    border:
        1px solid
        #d3e8f2;

    border-radius:
        19px;

    background:
        rgba(
            255,
            255,
            255,
            .90
        );
}


.core-video-search {
    flex:
        1;

    min-width:
        230px;

    min-height:
        47px;

    padding:
        0
        13px;

    display:
        flex;

    align-items:
        center;

    gap:
        9px;

    border:
        2px solid
        #c7e4ef;

    border-radius:
        16px;

    background:
        #ffffff;
}


.core-video-search input {
    width:
        100%;

    min-width:
        0;

    padding:
        10px
        0;

    border:
        0;

    outline:
        0;

    color:
        #194666;

    background:
        transparent;

    font:
        inherit;

    font-weight:
        750;
}


.core-video-topic-chips {
    flex:
        0
        1
        auto;

    display:
        flex;

    flex-wrap:
        wrap;

    justify-content:
        flex-end;

    gap:
        5px;
}


.core-video-topic-chip {
    min-width:
        38px;

    min-height:
        38px;

    padding:
        5px
        10px;

    border:
        2px solid
        #d4e9f3;

    border-radius:
        999px;

    background:
        linear-gradient(
            180deg,
            #ffffff,
            #edf9ff
        );

    color:
        #146aa5;

    font-weight:
        900;

    cursor:
        pointer;

    transition:
        transform
        130ms
        ease;
}


.core-video-topic-chip:hover {
    transform:
        translateY(-2px);
}


.core-video-topic-chip.is-active {
    border-color:
        #52bdec;

    background:
        linear-gradient(
            145deg,
            #58c9f4,
            #258ed8
        );

    color:
        #ffffff;

    box-shadow:
        0
        4px
        10px
        rgba(
            26,
            134,
            199,
            .23
        );
}


/* ============================================================
   NHÓM VIDEO THEO CHỦ ĐỀ
   - Viền nhóm đậm hơn
   - Chủ đề có khung chibi nổi riêng
============================================================ */

.core-video-topic-section {
    position: relative;

    margin:
        18px
        0;

    padding:
        16px;

    border:
        3px solid
        #78c9ea;

    border-radius:
        25px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.96),
            rgba(241,250,255,.96)
        );

    box-shadow:
        0
        8px
        22px
        rgba(
            32,
            113,
            163,
            .13
        ),
        inset
        0
        0
        0
        2px
        rgba(
            255,
            255,
            255,
            .85
        );

    overflow:
        visible;
}


/* ============================================================
   MỖI CHỦ ĐỀ ĐỔI MÀU NHẸ THEO NHÓM

   Giúp phân biệt rõ từng block nhưng vẫn thống nhất.
============================================================ */

.core-video-topic-section:nth-of-type(4n + 1) {
    border-color:
        #5fc2ed;
}


.core-video-topic-section:nth-of-type(4n + 2) {
    border-color:
        #83cf8c;
}


.core-video-topic-section:nth-of-type(4n + 3) {
    border-color:
        #efbb67;
}


.core-video-topic-section:nth-of-type(4n + 4) {
    border-color:
        #bc8de8;
}


/* ============================================================
   KHUNG TÊN CHỦ ĐỀ

   Đây là khung nổi riêng,
   khác hẳn nền vùng các bài.
============================================================ */

.core-video-topic-heading {
    position:
        relative;

    z-index:
        3;

    min-height:
        72px;

    margin:
        -3px
        0
        15px;

    padding:
        10px
        16px
        10px
        11px;

    display:
        flex;

    align-items:
        center;

    gap:
        13px;

    border:
        3px solid
        #ffffff;

    border-radius:
        21px;

    background:
        linear-gradient(
            135deg,
            #dff7ff 0%,
            #fff5c9 52%,
            #f4e7ff 100%
        );

    box-shadow:
        0
        7px
        0
        #a8d7eb,
        0
        11px
        18px
        rgba(
            42,
            102,
            145,
            .17
        );

    transform:
        translateY(-3px);
}


/* ============================================================
   CHIBI DECORATIONS
============================================================ */

.core-video-topic-heading::before {
    content:
        "";

    position:
        absolute;

    z-index:
        -1;

    inset:
        -5px;

    border-radius:
        24px;

    background:
        linear-gradient(
            135deg,
            #68c9ef,
            #8bdc9a,
            #f4cf6f,
            #c59aec
        );
}


.core-video-topic-heading::after {
    content:
        "⭐";

    position:
        absolute;

    top:
        -15px;

    right:
        24px;

    font-size:
        28px;

    filter:
        drop-shadow(
            0
            3px
            2px
            rgba(
                132,
                91,
                0,
                .18
            )
        );

    transform:
        rotate(12deg);
}


/* ============================================================
   SỐ CHỦ ĐỀ
============================================================ */

.core-video-topic-number {
    flex:
        0
        0
        52px;

    width:
        52px;

    height:
        52px;

    display:
        grid;

    place-items:
        center;

    border:
        4px solid
        #ffffff;

    border-radius:
        17px;

    background:
        linear-gradient(
            145deg,
            #ff9dcf,
            #df4e9b
        );

    color:
        #ffffff;

    font-size:
        22px;

    line-height:
        1;

    font-weight:
        950;

    box-shadow:
        0
        5px
        0
        #b63278,
        0
        8px
        12px
        rgba(
            180,
            49,
            119,
            .22
        );

    transform:
        rotate(-4deg);
}


/* ============================================================
   NHÃN "CHỦ ĐỀ X"
============================================================ */

.core-video-topic-heading small {
    display:
        inline-block;

    margin-bottom:
        2px;

    padding:
        3px
        8px;

    border-radius:
        999px;

    background:
        rgba(
            255,
            255,
            255,
            .72
        );

    color:
        #617c91;

    font-size:
        11px;

    line-height:
        1;

    font-weight:
        900;

    letter-spacing:
        .3px;

    text-transform:
        uppercase;
}


/* ============================================================
   TÊN CHỦ ĐỀ
============================================================ */

.core-video-topic-heading h3 {
    margin:
        3px
        0
        0;

    color:
        #064a9e;

    font-size:
        21px;

    line-height:
        1.18;

    font-weight:
        950;

    text-shadow:
        0
        1px
        0
        #ffffff;
}


/* ============================================================
   SỐ VIDEO TRONG CHỦ ĐỀ
============================================================ */

.core-video-topic-count {
    margin-left:
        auto;

    padding:
        8px
        13px;

    flex:
        0
        0
        auto;

    border:
        2px solid
        #f0ca62;

    border-radius:
        999px;

    background:
        linear-gradient(
            145deg,
            #fff9cc,
            #ffe781
        );

    color:
        #9b6d14;

    font-size:
        12px;

    line-height:
        1;

    font-weight:
        950;

    box-shadow:
        0
        4px
        0
        #e2bf5e,
        0
        6px
        10px
        rgba(
            153,
            107,
            23,
            .13
        );
}


/* ============================================================
   VÙNG DANH SÁCH BÀI BÊN DƯỚI

   Tạo cảm giác đây là lớp nền thứ hai,
   khác rõ với header chủ đề.
============================================================ */

.core-video-lesson-grid {
    position:
        relative;

    padding:
        10px;

    display:
        grid;

    grid-template-columns:
        repeat(
            3,
            minmax(
                0,
                1fr
            )
        );

    gap:
        10px;

    border:
        2px solid
        rgba(
            169,
            212,
            232,
            .66
        );

    border-radius:
        19px;

    background:
        linear-gradient(
            145deg,
            #f9fdff,
            #edf8fc
        );

    box-shadow:
        inset
        0
        2px
        6px
        rgba(
            67,
            134,
            171,
            .07
        );
}


/* ============================================================
   HOVER KHUNG CHỦ ĐỀ

   Rất nhẹ, không làm giao diện rung.
============================================================ */

.core-video-topic-section:hover {
    border-color:
        #45b4e2;

    box-shadow:
        0
        10px
        26px
        rgba(
            32,
            113,
            163,
            .17
        ),
        inset
        0
        0
        0
        2px
        rgba(
            255,
            255,
            255,
            .9
        );
}


/* ============================================================
   TABLET
============================================================ */

@media (
    max-width:
    1050px
) {

    .core-video-topic-section {
        padding:
            13px;
    }


    .core-video-topic-heading {
        min-height:
            67px;

        padding:
            9px
            13px
            9px
            10px;
    }


    .core-video-topic-number {
        width:
            48px;

        height:
            48px;

        flex-basis:
            48px;

        font-size:
            19px;
    }


    .core-video-topic-heading h3 {
        font-size:
            19px;
    }


    .core-video-lesson-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(
                    0,
                    1fr
                )
            );
    }

}


/* ============================================================
   MOBILE
============================================================ */

@media (
    max-width:
    680px
) {

    .core-video-topic-section {
        margin:
            14px
            0;

        padding:
            9px;

        border-width:
            3px;

        border-radius:
            20px;
    }


    .core-video-topic-heading {
        min-height:
            61px;

        margin-bottom:
            11px;

        padding:
            7px
            9px
            7px
            8px;

        gap:
            8px;

        border-radius:
            17px;

        box-shadow:
            0
            5px
            0
            #a8d7eb,
            0
            8px
            13px
            rgba(
                42,
                102,
                145,
                .15
            );
    }


    .core-video-topic-heading::before {
        inset:
            -4px;

        border-radius:
            20px;
    }


    .core-video-topic-heading::after {
        top:
            -11px;

        right:
            11px;

        font-size:
            21px;
    }


    .core-video-topic-number {
        width:
            43px;

        height:
            43px;

        flex-basis:
            43px;

        border-radius:
            14px;

        font-size:
            17px;
    }


    .core-video-topic-heading small {
        padding:
            2px
            6px;

        font-size:
            9px;
    }


    .core-video-topic-heading h3 {
        font-size:
            16px;
    }


    .core-video-topic-count {
        display:
            none;
    }


    .core-video-lesson-grid {
        padding:
            7px;

        grid-template-columns:
            minmax(
                0,
                1fr
            );

        gap:
            7px;

        border-radius:
            15px;
    }

}


/* ============================================================
   LESSON GRID
============================================================ */

.core-video-lesson-grid {
    display:
        grid;

    grid-template-columns:
        repeat(
            3,
            minmax(
                0,
                1fr
            )
        );

    gap:
        10px;
}


/* ============================================================
   LESSON CARD
============================================================ */

.core-video-lesson-card {
    position:
        relative;

    min-width:
        0;

    min-height:
        91px;

    padding:
        10px
        58px
        10px
        63px;

    border:
        2px solid
        #d0e6f0;

    border-radius:
        19px;

    background:
        linear-gradient(
            145deg,
            #ffffff,
            #f3fbff
        );

    color:
        #183f5c;

    text-align:
        left;

    cursor:
        pointer;

    box-shadow:
        0
        5px
        13px
        rgba(
            37,
            101,
            145,
            .08
        );

    transition:
        transform
        140ms
        ease,
        box-shadow
        140ms
        ease,
        border-color
        140ms
        ease;
}


.core-video-lesson-card:hover {
    z-index:
        3;

    transform:
        translateY(-3px)
        rotate(-.3deg);

    border-color:
        #66c9ed;

    box-shadow:
        0
        10px
        20px
        rgba(
            30,
            127,
            185,
            .16
        );
}


.core-video-lesson-card.is-current {
    border-color:
        #f2bb38;

    background:
        linear-gradient(
            145deg,
            #fffdf1,
            #fff3b8
        );
}


.core-video-lesson-number {
    position:
        absolute;

    left:
        11px;

    top:
        50%;

    width:
        42px;

    height:
        42px;

    display:
        grid;

    place-items:
        center;

    border-radius:
        14px;

    background:
        linear-gradient(
            145deg,
            #55cdf5,
            #248fd8
        );

    color:
        #ffffff;

    font-size:
        16px;

    font-weight:
        950;

    transform:
        translateY(-50%)
        rotate(-3deg);

    box-shadow:
        0
        4px
        9px
        rgba(
            24,
            128,
            195,
            .20
        );
}


.core-video-lesson-content {
    min-width:
        0;

    display:
        flex;

    flex-direction:
        column;
}


.core-video-lesson-content small {
    color:
        #7490a3;

    font-size:
        10px;

    font-weight:
        900;
}


.core-video-lesson-content strong {
    margin-top:
        3px;

    color:
        #18496a;

    font-size:
        14px;

    line-height:
        1.25;

    font-weight:
        900;
}


.core-video-lesson-content em {
    margin-top:
        4px;

    color:
        #d08613;

    font-size:
        9px;

    font-style:
        normal;

    font-weight:
        900;
}


.core-video-play-bubble {
    position:
        absolute;

    right:
        12px;

    top:
        50%;

    width:
        38px;

    height:
        38px;

    display:
        grid;

    place-items:
        center;

    border:
        3px solid
        #ffffff;

    border-radius:
        50%;

    background:
        linear-gradient(
            145deg,
            #5ed16e,
            #20a64d
        );

    color:
        #ffffff;

    font-size:
        14px;

    box-shadow:
        0
        4px
        10px
        rgba(
            21,
            145,
            68,
            .22
        );

    transform:
        translateY(-50%);
}


/* ============================================================
   EMPTY
============================================================ */

.core-video-empty {
    margin:
        30px
        auto;

    padding:
        30px;

    max-width:
        620px;

    border:
        2px dashed
        #c6e3ee;

    border-radius:
        23px;

    background:
        rgba(
            255,
            255,
            255,
            .88
        );

    color:
        #698294;

    text-align:
        center;
}


.core-video-empty > div {
    font-size:
        52px;
}


.core-video-empty strong {
    display:
        block;

    margin:
        8px
        0;

    color:
        #2c6a94;

    font-size:
        19px;
}


/* ============================================================
   VIEWER
============================================================ */

.core-video-viewer {
    width:
        min(
            100%,
            1250px
        );

    margin:
        0
        auto;
}


.core-video-viewer-toolbar {
    margin-bottom:
        10px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        12px;
}


.core-video-chibi-button {
    min-height:
        52px;

    padding:
        4px
        14px
        4px
        5px;

    display:
        inline-flex;

    align-items:
        center;

    gap:
        7px;

    border:
        2px solid
        #c7e5f1;

    border-radius:
        18px;

    background:
        linear-gradient(
            145deg,
            #ffffff,
            #eaf8ff
        );

    color:
        #17649a;

    font-weight:
        900;

    cursor:
        pointer;
}


.core-video-arrow-icon {
    width:
        42px;

    height:
        42px;

    display:
        block;

    pointer-events:
        none;
}


.core-video-position {
    padding:
        9px
        14px;

    border:
        2px solid
        #efd678;

    border-radius:
        17px;

    background:
        #fff8ce;

    color:
        #a06a11;

    font-size:
        13px;
}


/* ============================================================
   LESSON BANNER
============================================================ */

.core-video-lesson-banner {
    position:
        relative;

    margin-bottom:
        10px;

    padding:
        13px
        65px
        13px
        76px;

    min-height:
        73px;

    display:
        flex;

    align-items:
        center;

    border:
        2px solid
        #c6e7f3;

    border-radius:
        21px;

    background:
        linear-gradient(
            105deg,
            #e8faff,
            #fff9d7,
            #f5eaff
        );
}


.core-video-lesson-banner-number {
    position:
        absolute;

    left:
        15px;

    top:
        50%;

    width:
        48px;

    height:
        48px;

    display:
        grid;

    place-items:
        center;

    border:
        3px solid
        white;

    border-radius:
        16px;

    background:
        linear-gradient(
            145deg,
            #ff9ccf,
            #de4c9a
        );

    color:
        #fff;

    font-size:
        19px;

    font-weight:
        950;

    transform:
        translateY(-50%)
        rotate(-3deg);
}


.core-video-lesson-banner small {
    color:
        #71879a;

    font-size:
        11px;

    font-weight:
        800;
}


.core-video-lesson-banner h3 {
    margin:
        3px
        0
        0;

    color:
        #074690;

    font-size:
        clamp(
            19px,
            2vw,
            28px
        );

    line-height:
        1.18;
}


.core-video-banner-sticker {
    position:
        absolute;

    right:
        17px;

    top:
        50%;

    font-size:
        31px;

    transform:
        translateY(-50%)
        rotate(14deg);
}


/* ============================================================
   VIDEO PLAYER
============================================================ */

.core-video-player-shell {
    position:
        relative;

    width:
        100%;

    aspect-ratio:
        16 / 9;

    max-height:
        67dvh;

    display:
        grid;

    place-items:
        center;

    overflow:
        hidden;

    border:
        5px solid
        #ffffff;

    border-radius:
        25px;

    background:
        #0b1017;

    box-shadow:
        0
        10px
        28px
        rgba(
            0,
            42,
            75,
            .23
        );

    outline:
        2px solid
        #bcddea;
}


.core-video-player {
    width:
        100%;

    height:
        100%;

    display:
        block;

    object-fit:
        contain;

    background:
        #000000;
}


.core-video-player.has-error {
    opacity:
        .18;
}


/* ============================================================
   VIDEO FALLBACK
============================================================ */

.core-video-video-fallback {
    position:
        absolute;

    inset:
        0;

    z-index:
        5;

    padding:
        25px;

    display:
        flex;

    flex-direction:
        column;

    align-items:
        center;

    justify-content:
        center;

    background:
        linear-gradient(
            145deg,
            rgba(
                13,
                39,
                61,
                .95
            ),
            rgba(
                31,
                57,
                90,
                .96
            )
        );

    color:
        #ffffff;

    text-align:
        center;
}


.core-video-video-fallback[hidden] {
    display:
        none !important;
}


.core-video-video-fallback-icon {
    margin-bottom:
        8px;

    font-size:
        53px;
}


.core-video-video-fallback strong {
    color:
        #ffe993;

    font-size:
        21px;
}


.core-video-video-fallback p {
    margin:
        8px
        0;

    color:
        #dceaf3;
}


/* ============================================================
   TIP
============================================================ */

.core-video-tip {
    margin:
        10px
        0;

    padding:
        9px
        13px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    gap:
        7px;

    border:
        1px solid
        #dbeac2;

    border-radius:
        15px;

    background:
        #f7ffe7;

    color:
        #61773d;

    font-size:
        12px;

    font-weight:
        750;

    text-align:
        center;
}


/* ============================================================
   PAGINATION
============================================================ */

.core-video-pagination {
    margin-top:
        10px;

    display:
        grid;

    grid-template-columns:
        repeat(
            3,
            minmax(
                0,
                1fr
            )
        );

    gap:
        10px;
}


.core-video-nav-button {
    min-width:
        0;

    min-height:
        62px;

    padding:
        5px
        14px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    gap:
        9px;

    border:
        3px solid
        #ffffff;

    border-radius:
        20px;

    color:
        #ffffff;

    font-size:
        14px;

    font-weight:
        950;

    cursor:
        pointer;

    box-shadow:
        0
        6px
        14px
        rgba(
            42,
            85,
            130,
            .17
        );

    transition:
        transform
        140ms
        ease,
        filter
        140ms
        ease;
}


.core-video-nav-button:hover:not(:disabled) {
    transform:
        translateY(-2px)
        scale(1.015);
}


.core-video-nav-button--previous {
    background:
        linear-gradient(
            145deg,
            #64ccef,
            #268ed2
        );
}


.core-video-nav-button--list {
    background:
        linear-gradient(
            145deg,
            #ffc85c,
            #f09a18
        );
}


.core-video-nav-button--next {
    background:
        linear-gradient(
            145deg,
            #ab78ec,
            #7744ca
        );
}


.core-video-list-icon {
    font-size:
        26px;
}


.core-video-nav-button:disabled {
    opacity:
        .34;

    cursor:
        not-allowed;

    filter:
        grayscale(.45);
}


.core-video-nav-button
.core-video-arrow-icon {
    width:
        45px;

    height:
        45px;
}


/* ============================================================
   RESPONSIVE
============================================================ */

@media (
    max-width:
    1050px
) {

    .core-video-lesson-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(
                    0,
                    1fr
                )
            );
    }


    .core-video-tools {
        align-items:
            stretch;

        flex-direction:
            column;
    }


    .core-video-topic-chips {
        justify-content:
            flex-start;
    }

}


@media (
    max-width:
    680px
) {

    .core-video-dialog {
        width:
            97vw;

        max-height:
            97dvh;

        border-radius:
            21px;
    }


    .core-video-shell {
        max-height:
            97dvh;
    }


    .core-video-header {
        min-height:
            78px;

        padding:
            11px
            67px
            10px
            11px;
    }


    .core-video-heading {
        gap:
            8px;
    }


    .core-video-heading-icon {
        flex-basis:
            43px;

        width:
            43px;

        height:
            43px;

        border-radius:
            14px;

        font-size:
            23px;
    }


    .core-video-title {
        font-size:
            20px;
    }


    .core-video-subtitle {
        font-size:
            10px;
    }


    .core-video-close {
        top:
            8px;

        right:
            6px;

        width:
            54px;

        height:
            54px;
    }


    .core-video-close-icon {
        width:
            47px;

        height:
            47px;
    }


    .core-video-body {
        padding:
            9px;
    }


    .core-video-intro {
        grid-template-columns:
            auto
            minmax(
                0,
                1fr
            );

        padding:
            11px;
    }


    .core-video-total {
        display:
            none;
    }


    .core-video-intro-mascot {
        font-size:
            36px;
    }


    .core-video-lesson-grid {
        grid-template-columns:
            minmax(
                0,
                1fr
            );
    }


    .core-video-topic-section {
        padding:
            9px;
    }


    .core-video-topic-count {
        display:
            none;
    }


    .core-video-lesson-card {
        min-height:
            79px;
    }


    .core-video-player-shell {
        max-height:
            52dvh;

        border-width:
            3px;

        border-radius:
            18px;
    }


    .core-video-lesson-banner {
        min-height:
            66px;

        padding:
            10px
            47px
            10px
            65px;
    }


    .core-video-lesson-banner h3 {
        font-size:
            18px;
    }


    .core-video-banner-sticker {
        right:
            8px;

        font-size:
            24px;
    }


    .core-video-pagination {
        grid-template-columns:
            1fr
            1fr;
    }


    .core-video-nav-button--list {
        grid-column:
            1 / -1;

        grid-row:
            1;
    }


    .core-video-nav-button--previous {
        grid-column:
            1;

        grid-row:
            2;
    }


    .core-video-nav-button--next {
        grid-column:
            2;

        grid-row:
            2;
    }


    .core-video-nav-button {
        min-height:
            55px;

        padding:
            4px
            8px;

        font-size:
            12px;
    }


    .core-video-nav-button
    .core-video-arrow-icon {
        width:
            37px;

        height:
            37px;
    }

}


/* ============================================================
   REDUCED MOTION
============================================================ */

@media (
    prefers-reduced-motion:
    reduce
) {

    .core-video-close,
    .core-video-topic-chip,
    .core-video-lesson-card,
    .core-video-nav-button {
        transition:
            none !important;
    }

}

/* ============================================================
   RESPONSIVE VIDEO FRAME
   Version 1.1.0

   Player và popup tự thay đổi theo
   tỉ lệ khung hình thật của video.
============================================================ */


/* ============================================================
   POPUP

   Ở danh sách bài:
   vẫn rộng như bình thường.

   Khi vào video:
   JS truyền --core-video-dialog-width.
============================================================ */

.core-video-dialog {
    transition:
        width
        220ms
        ease,
        max-width
        220ms
        ease;
}


.core-video-dialog.is-video-mode {
    width:
        min(
            97vw,
            var(
                --core-video-dialog-width,
                1280px
            )
        ) !important;

    max-width:
        min(
            97vw,
            var(
                --core-video-dialog-width,
                1280px
            )
        ) !important;
}


/* ============================================================
   VIEWER

   Căn giữa toàn bộ player.
============================================================ */

.core-video-viewer {
    width:
        100% !important;

    max-width:
        none !important;

    margin:
        0
        auto;

    display:
        flex;

    flex-direction:
        column;

    align-items:
        stretch;
}


/* ============================================================
   PLAYER SHELL

   KHÔNG CÒN ép 16:9.

   JS sẽ truyền:

   --core-video-player-ratio: 1920 / 1080;
   --core-video-ratio-number: 1.7777;
   --core-video-player-height: ...px;
============================================================ */

.core-video-player-shell {
    position:
        relative;

    /*
    Chiều rộng tối đa được tính từ:

    chiều cao tối đa × tỉ lệ video.

    Ví dụ:

    16:9
    600px × 1.777 ≈ 1066px

    4:3
    600px × 1.333 ≈ 800px

    9:16
    600px × .5625 ≈ 338px
    */

    width:
        min(
            100%,
            calc(
                var(
                    --core-video-player-height,
                    640px
                )
                *
                var(
                    --core-video-ratio-number,
                    1.7777778
                )
            )
        ) !important;

    height:
        auto !important;

    min-height:
        0 !important;

    max-height:
        var(
            --core-video-player-height,
            640px
        ) !important;

    aspect-ratio:
        var(
            --core-video-player-ratio,
            16 / 9
        ) !important;

    margin:
        0
        auto !important;

    display:
        grid;

    place-items:
        center;

    overflow:
        hidden;

    border:
        5px solid
        #ffffff;

    border-radius:
        25px;

    background:
        #000000;

    box-shadow:
        0
        10px
        28px
        rgba(
            0,
            42,
            75,
            .23
        );

    outline:
        2px solid
        #bcddea;

    transition:
        width
        220ms
        ease,
        aspect-ratio
        220ms
        ease;
}


/* ============================================================
   VIDEO

   QUAN TRỌNG:

   object-fit: contain
   => luôn nhìn thấy TOÀN BỘ khung hình.

   Không dùng cover vì cover sẽ cắt hình.
============================================================ */

.core-video-player {
    width:
        100% !important;

    height:
        100% !important;

    min-width:
        0;

    min-height:
        0;

    max-width:
        100%;

    max-height:
        100%;

    display:
        block;

    object-fit:
        contain !important;

    object-position:
        center
        center !important;

    background:
        #000000;
}


/* ============================================================
   VIDEO NGANG
============================================================ */

.core-video-dialog[
    data-video-orientation="landscape"
]
.core-video-player-shell {

    border-radius:
        25px;

}


/* ============================================================
   VIDEO 4:3 / STANDARD
============================================================ */

.core-video-dialog[
    data-video-orientation="standard"
]
.core-video-player-shell {

    border-radius:
        23px;

}


/* ============================================================
   VIDEO VUÔNG
============================================================ */

.core-video-dialog[
    data-video-orientation="square"
]
.core-video-player-shell {

    max-width:
        min(
            100%,
            680px
        );

    border-radius:
        24px;

}


/* ============================================================
   VIDEO DỌC

   Không để popup quá rộng gây khoảng trắng lớn.
============================================================ */

.core-video-dialog[
    data-video-orientation="portrait"
] {

    --core-video-dialog-min-width:
        500px;

}


.core-video-dialog[
    data-video-orientation="portrait"
]
.core-video-player-shell {

    margin:
        0
        auto !important;

    border-radius:
        26px;

}


/* ============================================================
   BANNER TRONG VIDEO DỌC / VUÔNG

   Không cần kéo rộng nội dung vô ích.
============================================================ */

.core-video-dialog[
    data-video-orientation="portrait"
]
.core-video-lesson-banner,

.core-video-dialog[
    data-video-orientation="square"
]
.core-video-lesson-banner {

    width:
        100%;

}


/* ============================================================
   FALLBACK

   Luôn phủ đúng player mới.
============================================================ */

.core-video-video-fallback {
    position:
        absolute;

    inset:
        0;

    width:
        100%;

    height:
        100%;
}


/* ============================================================
   TABLET
============================================================ */

@media (
    max-width:
    1050px
) {

    .core-video-player-shell {
        --core-video-player-height:
            min(
                60dvh,
                620px
            );
    }

}


/* ============================================================
   MOBILE
============================================================ */

@media (
    max-width:
    680px
) {

    .core-video-dialog.is-video-mode {
        width:
            97vw !important;

        max-width:
            97vw !important;
    }


    .core-video-player-shell {
        width:
            min(
                100%,
                calc(
                    min(
                        54dvh,
                        520px
                    )
                    *
                    var(
                        --core-video-ratio-number,
                        1.7777778
                    )
                )
            ) !important;

        max-height:
            min(
                54dvh,
                520px
            ) !important;

        border-width:
            3px;

        border-radius:
            18px;
    }


    /*
    Video dọc trên điện thoại:
    cho phép cao hơn một chút.
    */

    .core-video-dialog[
        data-video-orientation="portrait"
    ]
    .core-video-player-shell {

        width:
            auto !important;

        height:
            min(
                57dvh,
                520px
            ) !important;

        max-width:
            100%;

        aspect-ratio:
            var(
                --core-video-player-ratio
            ) !important;
    }

}


/* ============================================================
   VERY SHORT SCREEN
============================================================ */

@media (
    max-height:
    700px
) {

    .core-video-player-shell {
        --core-video-player-height:
            48dvh;
    }


    .core-video-tip {
        margin:
            6px
            0;

        padding:
            6px
            9px;
    }


    .core-video-pagination {
        margin-top:
            6px;
    }


    .core-video-nav-button {
        min-height:
            50px;
    }

}


/* ============================================================
   REDUCED MOTION
============================================================ */

@media (
    prefers-reduced-motion:
    reduce
) {

    .core-video-dialog,
    .core-video-player-shell {
        transition:
            none !important;
    }

}