@font-face {
    font-family: "JasmineUPC";
    src: url("../font/upcjl.ttf") format("truetype");
    font-weight: 500;
    /* normal */
    font-style: normal;
}

@font-face {
    font-family: "JasmineUPC";
    src: url("../font/upcjb.ttf") format("truetype");
    font-weight: 800;
    /* Bold */
    font-style: normal;
}

.font-JasmineUPC {
    font-family: "JasmineUPC", sans-serif;
}

.ep19Hersoria_mainLayout {
    position: relative;
    width: 100%;
    height: 100dvh;

    color: #fff;
    background: #000;

    display: flex;
    overflow-x: hidden;
}

.ep19Hersoria_mainHr {
    width: 5px;
    min-width: 5px;
    height: 100%;
    position: relative;
    z-index: 2;
    box-shadow: 0px 0px 10px #0000008a;
}

/* Ep  */
.ep19_mainLayout {
    position: relative;
    overflow: hidden;
    z-index: 1;
    width: 50%;
    height: 100dvh;

    background: url("https://img.gnjoy.in.th/2025/13/ep19_herosria/BG1_ep19.png");
    background-position: top;
    background-size: cover;

    padding: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: end;
    gap: 20px;

    color: #000;
}

/* ตำแหน่งของหิมะ */
.ep19_mainLayout .snow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* เพื่อไม่ให้บังการคลิกปุ่ม */
    z-index: 5;
    /* ให้อยู่เหนือ background */
}

.ep_logoImg {
    position: relative;
    z-index: 10;
    width: 650px;
}

.ep_logoImg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.btn_ep19 {
    width: 245px;
    height: 66px;
    padding: 10px;
    border: 0px solid transparent;
    box-shadow: 1px 1px 2px 1px #000000cc;

    display: flex;
    align-items: center;
    justify-content: center;

    background: url("../images/botton_ep19.png");
    background-position: center;
    background-size: cover;

    font-size: 28px;
    font-weight: 800;
    color: #e0feff;
    text-shadow: 1px 1px 5px #000000cb;

    transition: all .5s;
}

.btn_ep19:hover {
    box-shadow: 1px 1px 10px 5px #85a5ffcc;
}

/* Hersoria  */
.hersoria_mainLayout {
    position: relative;
    overflow: hidden;
    z-index: 1;
    width: 50%;
    height: 100dvh;

    background: url("https://img.gnjoy.in.th/2025/13/ep19_herosria/BG2_herosria.png");
    background-position: top;
    background-size: cover;

    padding: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: end;

    color: #000;
}

.btn_hersoria {
    position: relative;
    z-index: 10;
    width: 245px;
    height: 66px;
    padding: 10px;
    border: 0px solid transparent;
    box-shadow: 1px 1px 2px 1px #000000cc;

    display: flex;
    align-items: center;
    justify-content: center;

    background: url("../images/botton_herosria.png");
    background-position: center;
    background-size: cover;

    font-size: 28px;
    font-weight: 800;
    transition: all .5s;
}

.btn_hersoria span {
    color: #e0feff;
    text-shadow: 1px 1px 5px #000000cb;
}

.btn_hersoria:hover {
    box-shadow: 1px 1px 10px 5px #ffc685cc;
}



/* Animation  */
.sparkles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.sparkle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgb(154, 198, 255);
    border-radius: 50%;
    opacity: 0;
    animation: sparkle 3s infinite;
}

@keyframes sparkle {
    0% {
        transform: scale(0) translateY(0);
        opacity: 0;
    }

    25% {
        transform: scale(1.5) translateY(-10px);
        opacity: 1;
    }

    50% {
        transform: scale(0) translateY(-20px);
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}


/* ❄️ หิมะ */
.snowflake {
    position: absolute;
    color: #fff;
    pointer-events: none;
    user-select: none;
    will-change: transform;
    z-index: 1;
}

/* ✨ วิ้งค์ */
.sparkle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: sparkleAnim 3s infinite;
}

@keyframes sparkleAnim {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    25% {
        transform: scale(1.8);
        opacity: 1;
    }

    50% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

/* 💫 แสงวิ่งผ่าน */
.light-streak {
    position: absolute;
    left: -200px;
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
    opacity: 0.6;
    transform: rotate(15deg);
    animation: streakMove 5s linear forwards;
    z-index: 0;
}

@keyframes streakMove {
    0% {
        left: -200px;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    50% {
        opacity: 1;
    }

    100% {
        left: 110%;
        opacity: 0;
    }
}



.storm-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

#lightningCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

/* แสงแฟลชเวลาเกิดฟ้าผ่า */
.lightning-flash {
    position: absolute;
    inset: 0;
    background: #ffffff70;
    opacity: 0;
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.2s ease-out;
}


@keyframes ember-float {
    0% {
        transform: translate(0, 0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    100% {
        transform: translate(-80px, -250px);
        opacity: 0;
    }
}



/* responsive  */
@media (max-width: 1190px) {
    .ep_logoImg {
        width: 550px;
    }
}

/* ≤ 992px (lg และต่ำกว่า) */
@media (max-width: 991.98px) {
    .ep_logoImg {
        width: 450px;
    }
}

/* ≤ 768px (md และต่ำกว่า) */
@media (max-width: 767.98px) {
    .ep19Hersoria_mainLayout {
        flex-direction: column;
    }

    .ep19Hersoria_mainHr {
        width: 100%;
        min-width: 100%;
        height: 5px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .ep19_mainLayout {
        width: 100%;
        height: 100%;
        background-position: center;
        justify-content: center;
        gap: 10px;
    }

    .hersoria_mainLayout {
        width: 100%;
        height: 100%;
        background-position: center;
        justify-content: center;
        gap: 10px;
    }

    .btn_ep19 {
        width: 200px;
        height: 53px;
        font-size: 20px;
    }

    .btn_hersoria {
        width: 200px;
        height: 53px;
        font-size: 20px;
    }
}

/* ≤ 576px (sm และต่ำกว่า — mobile เล็กสุด) */
@media (max-width: 575.98px) {
    .ep_logoImg {
        width: 350px;
    }

    .ep19Hersoria_mainLayout {
        height: 100%;
    }

    .ep19_mainLayout {
        min-height: 50dvh;
        padding: 20px;
        padding-top: 60px;
    }

    .hersoria_mainLayout {
        height: 50dvh;
    }

}