:root{
    --background-color: #fffef5;
    --background-color-dark:#343436;
    --footer-start:#FFD54F;
    --footer-end:#FF8A00;
    --text:#111;
    --text-color-dark:#cfb5df;

    --color-expand-message: #fbd7ad59;

    --primary-color: #4a90e2;
    --overlay-color: rgba(0, 0, 0, 0.5);
    --transition-speed: 0.4s;
    }

*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}
html{
    overflow-x: hidden;
    scroll-behavior: smooth;

    height: 100%;
}

body{
    overflow: hidden;
    font-family: 'Poppins', sans-serif;

    overflow-y: scroll;
    /* scroll-snap-type: y mandatory; */
}

.page-container{
    display: flex;
    flex-direction: column; /* Stack children vertically (content on top, footer below) */
    position: relative;

    min-height: 100vh; /* Ensure the container takes at least the full viewport height */ 
    max-width: 2500px; 
    margin: 0 auto;     /* auto center */

    background-color: var(--background-color);
    transition: background-color 0.3s ease;
}

a{
    color: var(--text);
    text-decoration: none;
}

nav{
    display: flex;
    margin-bottom: 100px;
}

nav button{
    border: none;
    background-color: transparent;
}

nav .left img{
    height: auto;
    color: var(--footer-start);
    padding: 20px 20px;
    max-width: 100%;
    width:80px;
} 

main{
    flex-grow: 1; /* Allow hero-section to grow and fill available space */
}

/* SECTION: Hero */
.hero-section{
    display: flex;
    justify-content: flex-end;
    flex-direction: column;
    align-items: center;
    /* z-index: 101; */
    height: 60vh;
}
.hero-section .group{
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    
    padding: 10px 10px;
    width: 500px;
    height: 500px;

    border: 5px solid var(--text);
    opacity: 0.8;
    border-radius: 10%;
    
    margin-left: 210px;
    transition: 0.3s ease;
      z-index: 101;
}


.hero-section .group h2{
    text-align: center;
    color: var(--text);

    font-size: 45px;
    letter-spacing: 7px;
    transition: 0.3s ease;
    margin-top: 10px;
}

.hero-section .group h2 span{
    color: var(--footer-end);
    font-weight: 600;
    transition: 0.3s ease;
} 

.hero-section .group .text p{
    font-family: 'MeizFont',Arial, sans-serif;
    text-align: center;

    padding: 0 16px;
    font-size: 1.6rem;
    opacity: 0.9;
    color: var(--text);
    transition: 0.3s ease;
}
.hero-section .group .line{
    padding: 0 10px;
    width: 100%;
    border: 1px solid var(--text);
    opacity: 0.2;
    margin-top: 20px;
    transition: 0.3s ease;
}

.hero-section .group .links{
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    z-index: 2;
    margin-top: 50px;
    margin-left: 100px;
    gap: 20px;

}

.hero-section .group .links .btn:hover{
    opacity: 0.8;
}
 
.hero-section .group .links button{
    background-color: transparent;
    border: none;
    cursor: pointer;
}

.hero-section .group .links button:hover{
    color: violet;
}

.hero-section .group .links span{
    font-family: 'MeizFont',Arial, sans-serif;
    font-size: 25px;
}

.hero-section .group .links img{
    width: 100px;
}


.hero-section .image-wrapper{
    position: absolute;
    z-index: 1;
    transition: 0.3s ease;}

.hero-section .image-wrapper .cat-image-left{
    position: absolute;
    width: 150px;
    left: -410px;
    bottom: -200px;
    transition: 0.3s ease;
}

.hero-section .image-wrapper .cat-image-right{
    position: absolute;
    width: 150px;
    left: 130px;
    bottom: -550px;
    transition: 0.3s ease;
}  

.meiAva {
    transform-origin: bottom center;
}
.meiAva:hover{
    transform: scale(0.98) ;
}
.meiAva:active{
    transform: scale(0.96) ;
}

.hero-section .image-wrapper img{
    position: absolute;
    width: 500px;
    left: -480px;
    bottom: -600px;
    transition: 0s ease;
}

.clickable-img .img-normal { opacity: 1;}
.clickable-img .img-hover { opacity: 0;}

/* --- OVERLAY (Background Dimmer) --- */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-color);
    z-index: 99; /* Below popups, above content */
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-speed), visibility var(--transition-speed);
}

.popup-overlay.show {
    opacity: 1; 
    visibility: visible; 
}

/* =========================================
POPUP BASE STYLES
========================================= */
.popup {
    position: fixed;
    background-color: var(--background-color);

    z-index: 100; /* Starting z-index */
    display: flex;
    flex-direction: column;
    
    height: 70vh;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);

    /* Default Hidden State */
    visibility: hidden;
    opacity: 0;
    
    /* Smooth transition for appearance */
    transition: transform var(--transition-speed) cubic-bezier(0.18, 0.89, 0.32, 1), 
                opacity var(--transition-speed), 
                visibility var(--transition-speed);
}

.popup.show {
visibility: visible;
opacity: 1;
}

/* Header (The Draggable Area) */
.popup-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid var(--text);
    background-color: var(--background-color-dark);

    flex-shrink: 0; /* Prevent shrinking */
    user-select: none; /* Prevent text selection while dragging */
}

.popup .img-header{
z-index: 999;    
position: absolute;
top: -45px;
right: 50px;
width: 100px;
}

.popup-title{
    font-size: 18px;
    font-weight: 600;
    color: var(--background-color);
}
.close-btn{
    background: none;
    border: none;
    cursor: pointer;
    font-weight: bold;

    font-size: 24px;
    color: var(--background-color);
}
.close-btn:hover { color: #deb1b1; }

/* Body (Scrollable Content) */
.popup-body{
    padding: 20px;
    font-size: 15px;
    color: var(--text);
    overflow: hidden;

    max-height: calc(100% - var(--header-height));
    /* font-family: 'MeizFont',Arial, sans-serif; */
    flex-grow: 1;
    overflow-y: auto; /* Enable vertical scrollbar */
    padding-bottom: 0;
}

/* Custom Scrollbar for Webkit */
.popup-body::-webkit-scrollbar { width: 8px; }
.popup-body::-webkit-scrollbar-track { background: #f1f1f1; }
.popup-body::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }




/* =========================================
SECTION: ABOUT 
========================================= */
.about-section .popup-body{
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-section .image-wrapper{
    display: grid;
    grid-template-areas: "stack";

    justify-items: center;
    align-items: center;

    margin-bottom: 20px;
}

.about-section .image-wrapper img{
    grid-area: stack;

    width: 80%;
    height: auto;
}

.about-section .title-text{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.about-section .title-text img:first-child{
    width: 35%;
}

.about-section .title-text img:last-child{
    width: 60%;
}

.about-section .title-line{
    display: grid;
    place-items: center;
    grid-template-columns: 1fr 1fr 1fr;
    margin: 20px;
}
.about-section .title-line img{
    width: 40%;
}

.about-section .title-line .line{
    width: 150%;
    height: 6px;
    margin-top: 20px;
    transition: 0.3s ease;
}

.about-section .body-content{
    margin-top: 10px;
    margin-bottom: 10px;

}

.about-section .body-content span{
    /* font-family: 'Meizfont'; */
    font-weight: bold;
    opacity: 80%;
}

.about-section .line{
    width: 110%;
    height: 1%;
}

.about-section .bot-group{
display: flex;
position: relative;
justify-content: space-between;

width: 100%;    
margin-top: 150px;
margin-bottom: 30px;
}

.about-section .img-text img:first-child{
    position: absolute;
    top: -60px;
    width: 150px;
}

.about-section .img-text img:last-child{
    position: absolute;
    width: 85px;
    top: -5px;
    left: 150px;
}

.about-section .bot-left-group .img-cat{
    display: grid;

    grid-template-areas: "stack";
    justify-items: start;
}

.about-section .bot-left-group .img-cat img{
    grid-area: stack;

    width: 70%;
    height: auto;
}

.about-section .bot-right-group{
    display: flex;
    align-items: center;
}

.about-section .bot-right-group img{
    position: absolute;
    top: -110px;
    right: 10px;
    width: 30%
}

.about-section .footer-about{
 flex-grow: 1;
 width: 100%;
 margin-top: 10px;
}

.about-section .footer-about img{
    margin-left: 20px;
    margin-top: 10px;
    width: 50px;
}

/* =========================================
SECTION: ABOUT : POPUP REWARD
========================================= */
.popup-reward{
    display: none; position: fixed; 
    justify-content: center; align-items: center;
    z-index: 1000; left: 0; top: 0;
    width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5);
}

.popup-reward-content {
    background-color: var(--background-color);
    padding: 15px; border-radius: 10px;
    width: 400px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    
    position: relative; text-align: center;
    animation: popIn 0.2s ease-out;
}

.popup-reward-content .line{
    padding: 0 10px;
    width: 100%;
    border: 1px solid var(--text);
    opacity: 0.1;
    margin-top: 20px;
    margin-bottom: 10px;
    transition: 0.3s ease;
}

/* --- CUSTOM DYNAMIC TOGGLE --- */
.lang-toggle-wrapper {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
    
    display: flex;
    width: 40px;
    height: 20px;
    border-radius: 6px;
    background-color: #f0f0f0;
    cursor: pointer;
    overflow: hidden;
    border: 1px solid #ccc;
    transition: all 0.3s ease;
}

.lang-option {
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 12px;
        font-weight: bold;

        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* Smooth resize animation */
        white-space: nowrap; /* Prevent text wrapping during resize */
        overflow: hidden;    /* Hide text when squeezed */
    }

/* --- STATE A: English (EN) is Active --- */
.lang-toggle-wrapper[data-state="en"] .opt-en {
    flex: 2; /* Takes 80% space */
    background-color: #fff; 
    color: #333;
}
.lang-toggle-wrapper[data-state="en"] .opt-vn {
    flex: 1; /* Takes 20% space */
    opacity: 60%;
    background-color: #a2a2a2; /* Inactive Color */
    color: transparent; /* Hide text */
}

/* --- STATE B: Vietnamese (VN) is Active --- */
.lang-toggle-wrapper[data-state="vi"] .opt-en {
    flex: 1; /* Takes 20% space */
    opacity: 60%;
    background-color: #a2a2a2; /* Inactive Color */
    color: transparent; /* Hide text */
}
.lang-toggle-wrapper[data-state="vi"] .opt-vn {
    flex: 2; /* Takes 80% space */
    background-color: #fff;
    color: #333;
}

/* Lang-Btn Hover effect */
.lang-toggle-wrapper:hover {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* --- CONTENT STYLES --- */
.close-btn-reward { position: absolute; top: 5px; right: 10px; color: #aaa; font-size: 24px; font-weight: bold; cursor: pointer; z-index: 10; }
.close-btn-reward:hover { color: #333; }
.intro-text { font-size: 16px; color: #555; margin-top: 35px; font-style: italic; }
#drink-img { width: 100%; height: 300px; border-radius: 8px; object-fit: cover; margin-bottom: 10px; border: 1px solid #ddd; }
#drink-name { font-size: 20px; font-weight: bold; color: #333; margin: 5px 0; }
#drink-desc { font-size: 14px; color: #666; margin-bottom: 5px; }
@keyframes popIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }

/* --- EXPANDABLE MESSAGE SECTION --- */
.expand-bar {
    height: 30px;
    padding-left:  10px;
    padding-right: 10px;
    background-color: var(--color-expand-message);
    gap: 5px; 

    font-size: 14px; font-weight: bold; 
    color: rgba(21, 18, 18, 0.627); 

    border-radius: 15px 15px 0 0;
    display: flex; 
    justify-content: center; align-items: center; 
    transition: color 0.2s;
    cursor: pointer;
}
.expand-bar:hover { background-color: rgba(252, 210, 223, 0.5); }
.arrow { transition: transform 0.3s ease; display: inline-block; }
.expand-bar.active .arrow { transform: rotate(180deg); }

.message-box {
    text-align: center;
    overflow: hidden;
    background-color: var(--background-color);
    border: 1px solid var(--color-expand-message);

    max-height: 0;
    border-radius: 0 0 15px 15px; 
    transition: max-height 0.4s ease-out;
}
.message-content {
    padding: 15px;
    font-size: 14px; 
    color: #555;
    
}

footer{
    position: fixed;
    z-index: 2;
    bottom: 0;
    width: 100%;
    padding-top: 30px;
    padding-bottom: 10px;
    background-color: #fff1d6c8;
}

footer .text p{
    text-align:center;
    color: var(--background-color-dark);
    opacity: 0.6;
}

/* Dark Mode Setting */
nav .light-image{ display: block;}
nav .dark-image{ display: none;}

.page-container .dark-image {display: none;}
.page-container .light-image {display: block;}

.page-container.dark-mode .dark-image{
    display: block;
}
.page-container.dark-mode .light-image{
    display: none;
}
.page-container.dark-mode nav .light-image{
    display: none;
}

.page-container.dark-mode nav .dark-image{
    display: block;
}

.page-container.dark-mode {
    background-color: var(--background-color-dark);
}

.page-container.dark-mode .hero-section .group {
    border: 5px solid var(--background-color);
}

.page-container.dark-mode .hero-section .group .text h2{
    color: var(--background-color);
}

.page-container.dark-mode .hero-section .group .text p{
    color: var(--text-color-dark);
    opacity: 0.5;
}

.page-container.dark-mode .hero-section .group .line{
    border: 1px solid var(--background-color);
}

.page-container.dark-mode .hero-section .group .links button{
    color: var(--background-color);
}

.page-container.dark-mode .hero-section .group .links button:hover{
    color: violet;
}

.page-container.dark-mode a{
    color: var(--background-color);
}

.page-container.dark-mode footer .text p{
    color: var(--background-color);
}

.page-container.dark-mode footer{
    background-color: #9684b42a;
}

/* =========================================
SETTING FOR MOBILE
========================================= */
@media (max-width: 700px){
    nav{
    margin-bottom: 60px;   
    }

    /* =========================================
    SECTION: HERO
    ========================================= */
    .hero-section{
        height: 60vh;
    }

    .hero-section .group{
        margin-left: 10px;
        width: 350px;
        height: 400px;
    }

    .hero-section .group h2{
        font-size: 30px;
    }

    .hero-section .group .text p{
        font-size: 20px;
    }

    .hero-section .group .links{
    display: grid;
    grid-template-columns: auto auto auto;
    margin-left: 100px;
    gap: 20px;
    }

    .hero-section .group .links img{
        width: 70px;
    }
    
    .hero-section .image-wrapper img{
    position: absolute;

    width: 400px;
    left: -300px;
    bottom: -480px;
    transition: 0s ease;
    }

    .hero-section .image-wrapper .cat-image-left{
        width: 100px;
        left: -220px;
        bottom: -160px;
    }

    .hero-section .image-wrapper .cat-image-right{
    position: absolute;
    width: 120px;
    left: 100px;
    bottom: -440px;
    transition: 0.3s ease;
    }  

    /* =========================================
    SECTION: ABOUT
    ========================================= */
    .about-section .img-text img:first-child{
    width: 130px;
    }

    .about-section .img-text img:last-child{
    width: 70px;
    left: 130px;
    }

    footer{
        padding-top: 10px;
        padding-bottom: 5px;
    }
}   

/* =========================================
MOBILE STYLES (Bottom Sheet Animation)
========================================= */
@media (max-width: 767px) {
    .popup {
        top: auto !important;   /* skip top */
        left: 0 !important;     /* skip left */
        right: 0 !important;    /* justify */

        bottom: 0;
        width: 100%;
        height: 85vh;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        
        /* Start position: Pushed down below screen */
        transform: translateY(100%);
    }

    .popup.show {
        /* Slide up to normal position */
        transform: translateY(0);
    }
}

/* =========================================
DESKTOP STYLES (Centered Window & Draggable)
========================================= */
@media (min-width: 768px) {
    .popup {
        width: 500px;
        max-height: 600px;
        border-radius: 12px;
        
        /* Center Positioning using Transform */
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.9);
    }
    
    /* Specific initial offsets to prevent stacking */
    #popup-about   { top: 50%; left: 50%; }
    #popup-contact { top: 52%; left: 52%; }
    #popup-links   { top: 54%; left: 54%; }

    .popup.show {
        /* Scale up effect */
        transform: translate(-50%, -50%) scale(1);
    }

    /* Cursor change only on desktop */
    .popup-header {
        cursor: move;
    }
}


@font-face {
    font-family: 'MeizFont';
    src: url('/fonts/Meizfont-Regular.woff2') format('woff2'),
         url('/fonts/Meizfont-Regular.ttf') format('ttf');
         font-weight: normal;
         font-style: normal;
}

