html,
body {
    overflow-x: hidden;
}

body {
    font-family: 'Kanit', sans-serif;
}

/* ===== HERO VIDEO SECTION ===== */
.hero-video-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Background Video */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
}

@media (max-width: 768px) {
    .hero-video {
        display: none;
    }

    .hero-secondary-btns {
        padding-top: 15px;
    }
}

/* Content sits above overlay */
.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 3rem 0 1rem;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

/* Fallback when no video is present â€” dark gradient */
.hero-video-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url(../images/hero-bg.jpg);
    background-size: cover;
    background-position: center;
    z-index: -1;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    animation: pulse 2s ease-in-out infinite;
}

.scroll-indicator .chevron {
    width: 20px;
    height: 20px;
    border-right: 2px solid rgba(255, 255, 255, 0.4);
    border-bottom: 2px solid rgba(255, 255, 255, 0.4);
    transform: rotate(45deg);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

.hero-roof-decoration {
    width: 100%;
    z-index: 2;
    pointer-events: none;
    line-height: 0;
}

.hero-roof-decoration img {
    display: block;
    width: 100%;
}

.new-character-section,
.highlight-update-section,
.news-section {
    background: url('../images/section2-bg.jpg') no-repeat center top;
    background-size: cover;
    position: relative;
}

.text-frame-bg {
    background: url('../images/text-frame.png') no-repeat center;
    background-size: 100% 100%;
    display: inline-block;
    padding: 15px 45px;
    margin-top: 5px;
    color: #fff;
    font-weight: 500;
    font-size: 2rem;
}

.character-frame-wrapper {
    position: relative;
    padding: 70px;
    margin: 20px 0;
    background-image:
        url('../images/top-left-bor.png'),
        url('../images/top-right-bor.png'),
        url('../images/bottom-left-bor.png'),
        url('../images/bottom-right-bor.png');
    background-position:
        top left,
        top right,
        bottom left,
        bottom right;
    background-repeat: no-repeat;
}

.character-frame-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 60px;
    right: 60px;
    background-image:
        url('../images/bottom-top-bor.png'),
        url('../images/bottom-center-bor.png');
    background-position:
        top center,
        bottom center;
    background-repeat: repeat-x;
    pointer-events: none;
}

.character-frame-wrapper::after {
    content: "";
    position: absolute;
    top: 60px;
    bottom: 60px;
    left: 0;
    right: 0;
    background-image:
        url('../images/center-left-bor.png'),
        url('../images/center-right-bor.png');
    background-position:
        center left,
        center right;
    background-repeat: repeat-y;
    pointer-events: none;
}

.character-overflow-container {
    position: relative;
    /* min-height: 350px; */
}

.char-overflow-img {
    position: absolute;
    bottom: -15%;
    /* à¹ƒà¸«à¹‰à¸¥à¹‰à¸™à¸‚à¸­à¸šà¸¥à¹ˆà¸²à¸‡à¸­à¸­à¸à¸¡à¸² */
    left: -16%;
    /* transform: translateX(-50%); */
    width: 120%;
    /* à¸‚à¸¢à¸²à¸¢à¸‚à¸™à¸²à¸”à¹ƒà¸«à¹‰à¹€à¸•à¹‡à¸¡à¹à¸¥à¸°à¸¥à¹‰à¸™ */
    max-width: none;
    z-index: 10;
}

.wing-char-overflow-img {
    position: absolute;
    bottom: -25%;
    left: 50%;
    width: 150%;
    transform: translateX(-50%);
    max-width: none;
    z-index: 10;
}

@media (max-width: 768px) {
    .character-overflow-container {
        min-height: 250px;
        margin: 40px 0;
    }

    .char-overflow-img {
        width: 74%;
        bottom: 4%;
        left: 10%;
    }

    .wing-char-overflow-img {
        width: 130%;
        bottom: -45px;
    }
}

.item-custom-bg {
    background: url('../images/bg-item.png') no-repeat center;
    background-size: 100% 100%;
    border: none;
    background-color: transparent !important;
    padding: 10px 20px;
    margin-bottom: 10px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 300;
    border-radius: 5px;
}

.item-wing-bg {
    border: none;
    background-color: transparent !important;
    margin-bottom: 15px;
}

.list-group-custom {
    background: transparent;
    border: none;
}

.card-custom-bg {
    background: url('../images/bg-item.png') no-repeat center;
    background-size: 100% 100%;
    border: none;
    background-color: transparent !important;
    color: #fff;
}

.card-custom-bg .card-title {
    color: #FAD27A;
    font-size: 1.3rem;
    font-weight: 300;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.card-custom-bg .card-text {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 1rem;
    font-weight: 300;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.btn-details-custom {
    position: absolute;
    bottom: -37%;
    left: 2%;
    /* transform: translate(-50%, 50%); */
    z-index: 30;
    width: 100%;
}

.btn-details-custom:hover {
    filter: brightness(1.1);
}

.gacha-section {
    background: url('../images/gacha-section-bg.jpg') no-repeat center top;
    background-size: cover;
    color: #fff;
}

.gacha-container {
    position: relative;
    display: inline-block;
}

.gacha-bg-layer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    mix-blend-mode: plus-lighter;
    max-width: none;
}

.gacha-light-bg {
    width: 100%;
    z-index: 1;
}

.gacha-light-eff {
    width: 80%;
    z-index: 2;
}

.gacha-main-img {
    position: relative;
    z-index: 3;
    display: block;
}

.live-stream-section {
    background: url('../images/live-stream-bg.jpg') no-repeat center top;
    background-size: cover;
}

/* News Carousel Styling */
.news-carousel .owl-item {
    transition: transform 0.3s ease;
    transform: scale(0.85);
    opacity: 0.6;
}

.news-carousel .owl-item.center {
    transform: scale(1);
    opacity: 1;
    z-index: 10;
}

.news-carousel .owl-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7) !important;
    color: #fff !important;
    width: 50px;
    height: 50px;
    border-radius: 50% !important;
    font-size: 28px !important;
    z-index: 100;
    transition: background 0.3s;
}

.news-carousel .owl-nav button:hover {
    background: rgba(250, 210, 122, 0.9) !important;
    color: #000 !important;
}

.news-carousel .owl-nav button.owl-prev {
    left: 31%;
}

.news-carousel .owl-nav button.owl-next {
    right: 31%;
}

@media (max-width: 1200px) {
    .news-carousel .owl-nav button.owl-prev {
        left: 21%;
    }

    .news-carousel .owl-nav button.owl-next {
        right: 21%;
    }
}

@media (max-width: 768px) {
    .news-carousel .owl-nav button.owl-prev {
        left: 5%;
    }

    .news-carousel .owl-nav button.owl-next {
        right: 5%;
    }
}

.news-carousel .owl-dots {
    margin-top: 20px !important;
}

.news-carousel .owl-dots .owl-dot span {
    background: #ccc !important;
}

.news-carousel .owl-dots .owl-dot.active span {
    background: #FAD27A !important;
}

/* Floating Banner */
.floating-banner-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 250px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    animation: slideInRight 0.5s ease-out;
}

.floating-banner-container.hide {
    transform: translateX(120%);
    opacity: 0;
    pointer-events: none;
}

.floating-banner-container img {
    width: 100%;
    cursor: pointer;
}

.btn-close-banner {
    position: absolute;
    top: 5px;
    right: 5px;
    background: linear-gradient(135deg, #f5a623, #e8d44d);
    color: #1a0a00;
    border: 1px solid rgba(0, 0, 0, 0.2);
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    transition: transform 0.2s, filter 0.2s;
}

.btn-close-banner:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .floating-banner-container {
        max-width: 180px;
        bottom: 80px;
        /* Adjust if overlapping with other mobile elements */
        right: 10px;
    }
}

/* ===== FLOATING SIDE MENU ===== */
.floating-side-menu {
    position: fixed;
    left: -36px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    width: 227px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.5));
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-side-menu.collapsed {
    transform: translateY(-50%) translateX(-142px);
    /* Shifting left to hide */
}

.menu-toggle-btn {
    position: absolute;
    right: 42px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(to bottom, #7b592b, #4a341a);
    color: #ffd880;
    border: 1px solid #9c7c4b;
    border-left: none;
    width: 35px;
    height: 80px;
    border-radius: 0 10px 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    z-index: 10001;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.3);
    /* Push the button outside the container's bound if needed, 
       but here we use relative to the menu width */
    margin-right: -35px;
}

.menu-toggle-btn:hover {
    filter: brightness(1.2);
    color: #fff;
}

.menu-top {
    background: url('../images/ft-menu-top.png') no-repeat center top;
    background-size: contain;
    height: 63px;
    /* Adjust height based on image aspect ratio */
    width: 100%;
}

.menu-body {
    background: url('../images/ft-menu-body.png') repeat-y center;
    background-size: 100% auto;
    width: 100%;
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    gap: 0px;
    align-items: center;
}

.menu-bottom {
    background: url('../images/ft-menu-bottom.png') no-repeat center bottom;
    background-size: contain;
    height: 13px;
    /* Adjust height based on image aspect ratio */
    width: 100%;
}

.menu-body a {
    display: block;
    width: 100%;
    text-align: center;
    transition: all 0.2s;
}

.menu-body a img {
    max-width: 100%;
    height: auto;
}

.menu-body a:hover {
    transform: scale(1.08);
    filter: brightness(1.2);
}

@media (max-width: 1100px) {
    .floating-side-menu {
        display: none;
        /* Hide on smaller screens to avoid clutter */
    }
}

/* ===== CLOUD SECTION DIVIDERS â€” Base ===== */
.section-cloud-divider {
    position: relative;
    width: 100%;
    height: 0;
    overflow: visible;
    pointer-events: none;
    z-index: 20;
    /* display: none; */
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.section-cloud-divider .cloud-left-top,
.section-cloud-divider .cloud-right-top,
.section-cloud-divider .cloud-left-bottom,
.section-cloud-divider .cloud-right-bottom {
    position: absolute;
    /* pointer-events: none; */
    max-width: 45vw;
}

/* Bottom clouds â€” common (shared across all dividers) */
.section-cloud-divider .cloud-left-bottom {
    left: 0;
    top: -50px;
    animation: cloudFloatLeftBottom 9s ease-in-out infinite;
}

.section-cloud-divider .cloud-right-bottom {
    right: 0;
    top: 100px;
    animation: cloudFloatRightBottom 6.5s ease-in-out infinite;
}

/* ===== HERO â†’ NEW CHARACTER (header divider â€” bottom clouds only) ===== */
header .section-cloud-divider .cloud-left-bottom {
    top: 100px;
}

header .section-cloud-divider .cloud-right-bottom {
    top: 100px;
}

/* ===== NEW CHARACTER â†’ GACHA (#new-character divider) ===== */
#new-character .section-cloud-divider .cloud-left-top {
    left: 0;
    bottom: -170px;
    animation: cloudFloatLeftTop 7s ease-in-out infinite;
}

#new-character .section-cloud-divider .cloud-right-top {
    right: 0;
    bottom: 570px;
    animation: cloudFloatRightTop 8s ease-in-out infinite;
}

#new-character .section-cloud-divider .cloud-left-bottom {
    top: -110px;
}

#new-character .section-cloud-divider .cloud-right-bottom {
    top: 490px;
}

/* ===== GACHA â†’ HIGHLIGHT (#gacha divider) ===== */
#gacha .section-cloud-divider .cloud-left-top {
    left: 0;
    bottom: 0;
    animation: cloudFloatLeftTop 8s ease-in-out infinite;
}

#gacha .section-cloud-divider .cloud-right-top {
    right: 0;
    bottom: 0;
    animation: cloudFloatRightTop 7s ease-in-out infinite;
}

#gacha .section-cloud-divider .cloud-left-bottom {
    top: -240px;
}

#gacha .section-cloud-divider .cloud-right-bottom {
    top: -280px;
}

/* ===== HIGHLIGHT â†’ LIVE STREAM (#highlight divider) ===== */
#highlight .section-cloud-divider .cloud-left-top {
    left: 120px;
    bottom: -160px;
    animation: cloudFloatLeftTop 9s ease-in-out infinite;
}

#highlight .section-cloud-divider .cloud-right-top {
    right: 0;
    bottom: -50px;
    animation: cloudFloatRightTop 6.5s ease-in-out infinite;
}

#highlight .section-cloud-divider .cloud-left-bottom {
    top: -140px;
}

#highlight .section-cloud-divider .cloud-right-bottom {
    top: -90px;
}

/* ===== LIVE STREAM â†’ NEWS (#live-stream divider) ===== */
#live-stream .section-cloud-divider .cloud-left-top {
    left: 0;
    bottom: 0;
    animation: cloudFloatLeftTop 7.5s ease-in-out infinite;
}

#live-stream .section-cloud-divider .cloud-right-top {
    right: 0;
    bottom: 0;
    animation: cloudFloatRightTop 9s ease-in-out infinite;
}

#live-stream .section-cloud-divider .cloud-left-bottom {
    top: 100px;
}

#live-stream .section-cloud-divider .cloud-right-bottom {
    top: 200px;
}

/* ===== SHARED KEYFRAMES ===== */
/* Left clouds: translateX(-50%) shows right half of image from left edge */
@keyframes cloudFloatLeftTop {
    0% {
        transform: translateX(-50%) translateY(0px);
    }

    25% {
        transform: translateX(-50%) translateY(-8px);
    }

    50% {
        transform: translateX(-50%) translateY(-14px);
    }

    75% {
        transform: translateX(-50%) translateY(-6px);
    }

    100% {
        transform: translateX(-50%) translateY(0px);
    }
}

@keyframes cloudFloatLeftBottom {
    0% {
        transform: translateX(-50%) translateY(0px);
    }

    25% {
        transform: translateX(-50%) translateY(8px);
    }

    50% {
        transform: translateX(-50%) translateY(14px);
    }

    75% {
        transform: translateX(-50%) translateY(6px);
    }

    100% {
        transform: translateX(-50%) translateY(0px);
    }
}

/* Right clouds: translateX(50%) shows left half of image from right edge */
@keyframes cloudFloatRightTop {
    0% {
        transform: translateX(50%) translateY(0px);
    }

    25% {
        transform: translateX(50%) translateY(-10px);
    }

    50% {
        transform: translateX(50%) translateY(-16px);
    }

    75% {
        transform: translateX(50%) translateY(-7px);
    }

    100% {
        transform: translateX(50%) translateY(0px);
    }
}

@keyframes cloudFloatRightBottom {
    0% {
        transform: translateX(50%) translateY(0px);
    }

    25% {
        transform: translateX(50%) translateY(10px);
    }

    50% {
        transform: translateX(50%) translateY(16px);
    }

    75% {
        transform: translateX(50%) translateY(7px);
    }

    100% {
        transform: translateX(50%) translateY(0px);
    }
}

/* ===== HIDE CLOUDS ON MOBILE ===== */
@media (max-width: 768px) {
    .section-cloud-divider {
        display: none;
    }
}

.rem-container {
    width: 100%;

    max-width: 83rem;
}

.main-theme-border {
    border: 7rem solid transparent;
    padding: 15px;
    border-image: url(../images/theme-border.png) 140 fill stretch;
    position: relative
}

@media (max-width: 768px) {
    .main-theme-border {
        border: 4rem solid transparent;
        padding: 8px;
        border-image: url(../images/theme-border.png) 140 fill stretch;
        position: relative
    }
}

/* .main-theme-border::before{
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    content: "";
    z-index: 0
} */

/* ===== EXTRACTED FROM INLINE STYLES ===== */
.text-head-char-width {
    width: 32.625rem;
}

.text-highlight {
    color: #FAD27A;
}

.item-img-fg {
    z-index: 1;
}

.item-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    mix-blend-mode: screen;
    width: 260%;
    animation: spinLoop 8s linear infinite;
}

.gacha-main-width {
    width: 66.125rem;
}

.highlight-title-width {
    width: 48.6875rem;
}

.live-stream-title-width {
    width: 59.4375rem;
}

.news-title-width {
    width: 39.0625rem;
}

@keyframes spinLoop {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}