﻿body {
    background-color: #073b4c;
    margin: 0;
}

.body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh; /* Sử dụng chiều cao của viewport để đảm bảo thẻ nằm trọn trong màn hình */
}

.christmasCard {
    width: 75%;
    max-width: 600px;
    margin: auto;
    height: 70vh;
}

.cardFront, .cardInside {
    width: 100%;
    height: 100%;
}


.christmasCard {
    position: relative;
    width: 250px;
    height: 350px;
    cursor: pointer;
    transform-style: preserve-3d;
    transform: perspective(2500px);
    transition: 1s;
}

.cardFront {
    position: relative;
    background-color: #fff;
    width: 250px;
    height: 350px;
    overflow: hidden;
    transform-origin: left;
    box-shadow: inset 100px 20px 100px rgba(0, 0, 0, .2), 30px 0 50px rgba(0, 0, 0, 0.4);
    transition: .6s;
}

.cardCover {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url('../img/nodels.png'); /* Corrected path */
    background-size: cover;
    background-position: center;
    object-fit: cover; /* Ensures the image maintains aspect ratio and fills the element */
}


.cardInside {
    position: absolute;
    background-color: #fff;
    width: 250px;
    height: 350px;
    z-index: -1;
    left: 0;
    top: 0;
    box-shadow: inset 100px 20px 100px rgba(0, 0, 0, 0.2);
}

p {
    font-family: 'Quicksand', sans-serif;
    margin: 15px 10px 10px 30px;
    color: #333;
}

.name {
    position: absolute;
    left: 150px;
    color: #333;
    text-decoration: underline;
}

.back {
    font-family: 'Pacifico', cursive;
    color: #333;
    text-align: center;
    margin: 30px;
    outline-color: #333;
    outline-style: dashed;
}

.christmasCard:hover {
    transform: perspective(2500px) rotate(5deg);
    box-shadow: inset 100px 20px 100px rgba(0, 0, 0, .2), 0 10px 100px rgba(0, 0, 0, 0.5);
}

    .christmasCard:hover .cardFront {
        transform: rotateY(-160deg);
    }

    .christmasCard:hover .merryChristmas {
        visibility: hidden;
    }

footer {
    font-size: 10px;
    color: white;
    position: absolute;
    bottom: 0px;
}

    footer a {
        color: white;
    }

/* Thêm vào phần CSS để tạo hiệu ứng lấp lánh */
@keyframes sparkle {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.5);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}

.sparkle {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: #fff;
    border-radius: 50%;
    animation: sparkle 1s infinite;
}

/* Thêm vào phần CSS để tạo hiệu ứng tuyết rơi */
@keyframes sparkle {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}

.sparkle {
    position: absolute;
    width: 2px;
    height: 2px;
    background-color: #fff;
    border-radius: 50%;
    animation: sparkle 1s infinite;
}




/* Thêm vào phần CSS để tạo hiệu ứng tuyết rơi */
/* Thêm vào phần CSS để tạo hiệu ứng lấp lánh và tuyết rơi */
@keyframes sparkle {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}

.sparkle {
    position: absolute;
    width: 2px;
    height: 2px;
    background-color: #fff;
    border-radius: 50%;
    animation: sparkle 1s infinite;
}

@keyframes snowfall {
    to {
        transform: translateY(120vh); /* Điều chỉnh chiều dài để tăng khoảng cách rơi xuống */
    }
}

.snowflake {
    position: absolute;
    width: 20px; /* Điều chỉnh kích thước nếu cần */
    height: 20px; /* Điều chỉnh kích thước nếu cần */
    background-image: url('../img/hinhtuyet2.png'); /* Sử dụng hình ảnh bông tuyết */
    background-size: contain;
    background-repeat: no-repeat;
    animation: snowfall linear infinite;
    animation-duration: 5s; /* Adjust duration as needed */
    top: 0;
}

.body {
    position: relative;
    overflow: hidden;
    width: 100%; /* Tự động mở rộng theo chiều ngang */
    height: 100vh; /* Chiều cao tối đa theo viewport height */
}

/* Các phần tử giáng sinh */
.christmasCard {
    width: 70%; /* Điều chỉnh chiều rộng của thẻ */
    max-width: 600px; /* Điều chỉnh chiều rộng tối đa nếu màn hình lớn hơn */
    margin: auto; /* Canh giữa thẻ */
    height: 65vh; /* Điều chỉnh chiều dài của thẻ */
}

.cardFront, .cardInside {
    width: 100%; /* Chiều rộng tối đa */
    height: 100%; /* Chiều dài tối đa */
}
