@font-face {
    font-family: fontTet;
    src: url("./SVN-AGENCY\ FB.TTF");
}

#canvas {
    position: absolute;
    display: block;
    z-index: 3;
}

.box-bottom{
    position: absolute;
    bottom: -80px;
    left: 0;
}

.box-right{
    position: absolute;
    bottom: 0;
    right: 0;
    overflow: hidden;
}

.top-right{
    position: absolute;
    right: 0;
    top: 0;
    width: 50%;
}
.top-right > img{
    width: 100%;
    max-width: 500px;
    position: absolute;
    right: 0;
}

.box-fan{
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    bottom: -220px;
    right: -200px;
    width: 541px;
    height: 541px;
}

.fan,
.fan-red {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: spin 20s linear infinite;
    transform-origin: 50% 50%;
}
.fan{
    top: -50px;
    right: 380px;
    max-width: 281px;
    max-height: 281px;
}
.fan-red{
    z-index: 10;
}
.fan > img,
.fan-red > img{
    width: 100%;
    height: 100%;
}

/*lantern*/
.rope-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.rope {
    position: absolute;
    transform-origin: top center; /* Tâm xoay ở đỉnh dây */
    animation: shake 1.5s infinite ease-in-out;
    width: 243px;
    height: auto;
}
.lantern{
    position: absolute;
    top: 0;
    left: 150px;
    z-index: 5;
    max-width: 243px;
}
.lantern img{
    width: 100%;
    height: auto;
}
.cloud-top{
    position: absolute;
    top: 20px;
    left: -220px;
    z-index: 6;
    width: 314px;
}

.cloud-top > img{
    width: 100%;
}
/*lantern*/

.cloud-bt{
    position: absolute;
    right: -40px;
}
.cloud-bt > img{
    width: 150px;
}
.flower-bt{
    position: absolute;
    bottom: -30px;
    left: 130px;
}

.flower-top{
    position: absolute;
    bottom: 350px;
    left: -50px;
}

.text-center{
    position: absolute;
    display: grid;
    text-align: center;
    top: 50px;
    width: 80%;
}
.text-center > img.text{
    margin: 0 auto;
    width: 85%;
    max-width: 600px;
    min-width: 300px;
}
.text-center > img.logo{
    margin: 0 auto;
    width: 150px;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fff1d6;
    border-radius: 50%;
    box-shadow: 0 0 12px 5px #ffebaa;
    animation: pulse 1.5s infinite alternate;
}

.top-right > .star{
    right: 80px;
    top: 120px;
}


.star::before,
.star::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1px;
    height: 1px;
    background: #ffebaa;
    transform: translate(-50%, -50%) rotate(0deg);
    border-radius: 2px;
    animation: flicker1 1.2s infinite alternate;
}

.star::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 10px 12px #ffebaa;
        transform: scale(1);
    }
    100% {
        box-shadow: 0 0 50px 15px #ffebaa;
        transform: scale(3);
    }
}

@keyframes flicker {
    0% {
        opacity: 0.6;
    }
    100% {
        opacity: 1;
    }
}

/* Animation cho quạt xoay */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
@keyframes shake {
    0% {
        transform: rotate(-3deg); 
    }
    50% {
        transform: rotate(3deg); 
    }
    100% {
        transform: rotate(-3deg); 
    }
}

/*bling snow*/
#snow-container,
#light-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    right: 0;
}


.snowflake {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgb(233, 226, 217);
    border-radius: 50%;
    box-shadow: 0 0 10px 5px rgba(229, 230, 206, 0.8);
    opacity: 0;
    transform: translate(-50%, -50%);
    animation: moveOut 7s ease-out forwards;
}

.lightflake {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgb(233, 162, 70);
    border-radius: 50%;
    box-shadow: 0 0 15px 5px rgba(247, 165, 71, 0.8);
    opacity: 0;
    transform: translate(-50%, -50%);
    animation: moveOut11 4s ease-out forwards;
}

@keyframes moveOut {
    0% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(0.5); /* Bắt đầu nhỏ */
    }
    100% {
        opacity: 1;
        transform: translate(calc(var(--dx) * 200px), calc(var(--dy) * 200px)) scale(1.5); /* Phóng to */
    }
}

@keyframes moveOut1 {
    0% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1.5); /* Bắt đầu nhỏ */
    }
    25% {
        opacity: 0.2;
        transform: translate(-50%, -50%) scale(1.5); /* Bắt đầu nhỏ */
    }
    100% {
        opacity: 0.8;
        transform: translate(calc(var(--dx) * 200px), calc(var(--dy) * 200px)) scale(2.5); /* Phóng to */
    }
}

.slogan{
    font-family: fontTet;
    color: #ffe4c2;
    font-size: 40px;
    line-height: 1.5;
    text-align: center;
    white-space: pre-wrap;
}

@media( max-width: 1100px ){
    .text-center{
        max-width: 400px;
        width: 85%;
        top: 160px;
    }
    .slogan{
        font-size: 22px;
        margin-top: 15px;
    }
    .rope{
        left: -130px;
        width: 110px;
    }
    .cloud-top{
        left: -200px;
        width: 150px;
    }
    .box-fan{
        width: 300px;
        height: 300px;
        right: -150px;
        bottom: -150px;
    }
    .cloud-bt{ display: none; }
    .fan{
        width: 150px;
        height: 150px;
        right: 180px;
    }
    .flower-top{
        bottom: 170px;
    }
    .flower-top > img{
        width: 120px;
    }
    .flower-bt{
        bottom: 20px;
        left: 30px;
    }
    .flower-bt > img{
        width: 150px;
    }
}