body {
    margin: 0;
    padding: 0;
    font-family: 'Noto Serif SC', serif;
    background: url('images/background.png') no-repeat center center;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
    color: #8b0000;
}

.main-page, .second-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cookie {
    width: 300px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.cookie-open {
    width: 500px;
    transition: transform 0.3s ease;
    margin-bottom: 1rem;
}

.cookie:hover {
    transform: scale(1.05);
}

.instruction {
    font-size: 1.8rem;
    margin-top: -0.5rem;
}

.fortune-text {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 2.8rem;
    margin-top: -2.3rem;
    opacity: 0;
    animation: fadeInBounce 1s forwards;
    animation-delay: 0.3s; /* slight delay so cookie appears first */
    animation-fill-mode: forwards; /* ensure it stays visible after animating */
}

@keyframes fadeInBounce {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    60% {
        opacity: 1;
        transform: translateY(-10px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.new-fortune-btn {
    margin-top: 0rem;
    padding: 0.7rem 1.2rem;
    font-size: 1.3rem;
    font-family: 'Noto Serif SC', serif;
    background-color: #f5d9b0;
    border: none;
    border-radius: 8px;
    color: #8b0000;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.new-fortune-btn:hover {
    background-color: #f7e4c4;
    transform: scale(1.05);
}

