﻿@font-face {
    font-family: 'MTD-Snow-For-Santa';
    src: url('../fonts/MTD-Snow-For-Santa.otf') format('opentype');
}

.be-vietnam-pro-thin {
    font-family: "Be Vietnam Pro", serif;
    font-weight: 100;
    font-style: normal;
}

.be-vietnam-pro-extralight {
    font-family: "Be Vietnam Pro", serif;
    font-weight: 200;
    font-style: normal;
}

.be-vietnam-pro-light {
    font-family: "Be Vietnam Pro", serif;
    font-weight: 300;
    font-style: normal;
}

.be-vietnam-pro-regular {
    font-family: "Be Vietnam Pro", serif;
    font-weight: 400;
    font-style: normal;
}

.be-vietnam-pro-medium {
    font-family: "Be Vietnam Pro", serif;
    font-weight: 500;
    font-style: normal;
}

.be-vietnam-pro-semibold {
    font-family: "Be Vietnam Pro", serif;
    font-weight: 600;
    font-style: normal;
}

.be-vietnam-pro-bold {
    font-family: "Be Vietnam Pro", serif;
    font-weight: 700;
    font-style: normal;
}

.be-vietnam-pro-extrabold {
    font-family: "Be Vietnam Pro", serif;
    font-weight: 800;
    font-style: normal;
}

.be-vietnam-pro-black {
    font-family: "Be Vietnam Pro", serif;
    font-weight: 900;
    font-style: normal;
}

.be-vietnam-pro-thin-italic {
    font-family: "Be Vietnam Pro", serif;
    font-weight: 100;
    font-style: italic;
}

.be-vietnam-pro-extralight-italic {
    font-family: "Be Vietnam Pro", serif;
    font-weight: 200;
    font-style: italic;
}

.be-vietnam-pro-light-italic {
    font-family: "Be Vietnam Pro", serif;
    font-weight: 300;
    font-style: italic;
}

.be-vietnam-pro-regular-italic {
    font-family: "Be Vietnam Pro", serif;
    font-weight: 400;
    font-style: italic;
}

.be-vietnam-pro-medium-italic {
    font-family: "Be Vietnam Pro", serif;
    font-weight: 500;
    font-style: italic;
}

.be-vietnam-pro-semibold-italic {
    font-family: "Be Vietnam Pro", serif;
    font-weight: 600;
    font-style: italic;
}

.be-vietnam-pro-bold-italic {
    font-family: "Be Vietnam Pro", serif;
    font-weight: 700;
    font-style: italic;
}

.be-vietnam-pro-extrabold-italic {
    font-family: "Be Vietnam Pro", serif;
    font-weight: 800;
    font-style: italic;
}

.be-vietnam-pro-black-italic {
    font-family: "Be Vietnam Pro", serif;
    font-weight: 900;
    font-style: italic;
}

body {
    font-family: Arial, sans-serif;
    text-align: center;
    /*background: linear-gradient(to bottom, #4e54c8, #8f94fb);*/
    background: linear-gradient(to bottom, #8f94fb61, #4e54c8e0);
    color: #fff;
    height: 100vh;
    padding: 0;
    margin: 0;
    overflow: hidden;
    background-image: url('../images/bg.jpg');
    background-size: cover; /* Làm cho ảnh phủ toàn bộ */
    background-repeat: no-repeat; /* Không lặp lại ảnh */
    background-position: center; /* Canh giữa ảnh */
}

.container {
    /*margin-top: 50px;*/
}

.logo-th {
    display: block;
    position: relative;
    top: 20px;
    text-align: center;
    margin: 0 auto;
}

.login-th {
    display: block;
    position: absolute;
    /*right: 20px;*/
    bottom: 30px;
}

.txt-th {
    /*letter-spacing: 0.1em;*/
    font-weight: 600;
    /*color: #d62424;*/
    /*color: #1a3abc;*/
    color: #fff;
    padding: 15px;
    border-radius: 20px;
    background-color: #9b2325;
    font-family: 'Be Vietnam Pro', cursive;
}

.btn-logout {
    font-weight: 300;
    color: #fff;
    /*color: #1a3abc;*/
    text-decoration: none;
    font-family: 'Be Vietnam Pro', cursive;
}

.box-container {
    margin: 30px 0 0;
    position: relative;
}

    .box-container h1 {
        margin: 0 auto;
        font-size: 55px;
        color: #fff;
        /*color: #4CAF50;*/
        /*color: #d62424;*/
        letter-spacing: 0.1em;
        font-family: 'MTD-Snow-For-Santa', cursive;
    }

h1 {
}

.mystery-box {
    width: 250px;
    height: auto;
    position: relative;
    perspective: 1000px;
    cursor: pointer;
    animation-duration: 1.5s;
    animation-iteration-count: infinite;
    margin: 0 auto;
}

    .mystery-box img {
        width: 100%;
    }

@keyframes shake {
    0%,to {
        -webkit-transform: translateZ(0);
        transform: translateZ(0)
    }

    10%,30%,50%,70%,90% {
        -webkit-transform: translate3d(-10px,0,0);
        transform: translate3d(-10px,0,0)
    }

    20%,40%,60%,80% {
        -webkit-transform: translate3d(10px,0,0);
        transform: translate3d(10px,0,0)
    }
}

.shake {
    -webkit-animation-name: shake;
    animation-name: shake
}

.box-lid {
    width: 100%;
    height: 40px;
    background-color: #ffd700;
    border: 2px solid #ff8c00;
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top center;
    transition: transform 0.6s ease;
}

.box-body {
    width: 100%;
    height: 110px;
    background-color: #ffa500;
    border: 2px solid #ff8c00;
    position: absolute;
    bottom: 0;
    left: 0;
}

.mystery-box.open .box-lid {
    transform: rotateX(-100deg);
}

button {
    /*padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;*/
    /*background-color: #1A3ABC;*/
    background-color: #ffcc00;
    padding: 10px 30px;
    border-radius: 100px;
    /*color: seashell;*/
    color: #9b2325;
    text-decoration: none;
    box-shadow: 10px 10px 10px -7px rgba(27, 38, 49, 1);
    display: inline-block;
    border: none;
    cursor: pointer;
    font-weight: 800;
    font-size: 19px;
    letter-spacing: 1px;
    font-family: 'Be Vietnam Pro', cursive;
}

    button:hover {
        /*background-color: #45a049;*/
        /*background-color: #fe4a4b;*/
        background-color: #ffcc00;
    }

    button#openBoxButton, button#openPopup {
        margin-top: -25px;
    }

#resultMessage {
    margin-top: 10px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    font-family: 'Be Vietnam Pro', cursive;
}

/* Hiệu ứng ánh sáng khi mở */
.light-effect {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    pointer-events: none;
    animation: flash 1s ease-out forwards;
}

@keyframes flash {
    0% {
        opacity: 0.9;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(2);
    }
}

.open-popup {
    font-size: 16px;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    /*color: #9b2325;*/
    border: none;
    border-radius: 20px;
    cursor: pointer;
}

/* Popup nền */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none; /* Ẩn mặc định */
    justify-content: center;
    align-items: center;
}

/* Popup nội dung */
.popup-content {
    width: 300px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: popup-show 0.3s ease;
}

    .popup-content span {
        /* color: #d62424; */
        color: #1a3abc;
        margin-top: 10px;
        display: block;
        /*letter-spacing: 0.1em;*/
        font-family: 'Be Vietnam Pro', cursive;
    }

        .popup-content span a {
            text-decoration: none;
        }

/* Animation cho popup */
@keyframes popup-show {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Form login */
.popup-content h2 {
    margin: 0 0 15px;
    color: #333;
    letter-spacing: 1px;
    font-family: 'Be Vietnam Pro', cursive;
}

.popup-content input {
    width: 92%;
    margin: 10px 0;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.popup-content button {
    width: 100%;
    /*background-color: #007BFF;*/
    /*background-color: #1A3ABC;*/
    background-color: #ffcc00;
    padding: 10px;
}

/* Nút đóng */
.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    color: #888;
    cursor: pointer;
}

    .popup-close:hover {
        color: #333;
    }

.result-message {
    margin-top: 15px;
    color: #d62424;
}

/* Container tuyết */
.snow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Từng bông tuyết */
.snow {
    position: absolute;
    top: -50px;
    width: 10px;
    height: 10px;
    background-color: white;
    border-radius: 50%; /* Bo tròn */
    opacity: 0.8;
    animation: fall linear infinite, sway 3s ease-in-out infinite;
}

.fall {
    -webkit-animation-name: fall;
    animation-name: fall;
}

.sway {
    -webkit-animation-name: sway;
    animation-name: sway;
}

/* Hiệu ứng tuyết rơi */
@keyframes fall {
    0% {
        transform: translateY(-50px);
        opacity: 0.8;
    }

    100% {
        transform: translateY(100vh);
        opacity: 0.1;
    }
}

/* Hiệu ứng lắc qua lại */
@keyframes sway {
    0% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(20px);
    }

    100% {
        transform: translateX(0);
    }
}

/* Cài đặt cho từng bông tuyết */
.snow:nth-child(1) {
    left: 10%;
    animation-duration: 10s, 3s;
}

.snow:nth-child(2) {
    left: 25%;
    animation-duration: 8s, 4s;
}

.snow:nth-child(3) {
    left: 40%;
    animation-duration: 12s, 5s;
}

.snow:nth-child(4) {
    left: 55%;
    animation-duration: 9s, 4s;
}

.snow:nth-child(5) {
    left: 70%;
    animation-duration: 7s, 3.5s;
}

.snow:nth-child(6) {
    left: 85%;
    animation-duration: 11s, 5s;
}

.snow:nth-child(7) {
    left: 50%;
    animation-duration: 13s, 6s;
}

.snow:nth-child(8) {
    left: 20%;
    animation-duration: 10s, 4s;
}
