@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=DM+Serif+Display&family=Old+Standard+TT:wght@400;700&display=swap');

/* Kiểu cơ bản của trang */
body {
    font-family: 'Old Standard TT', serif;
    background: #F3E5D8;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23998e86' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    text-align: center;
    color: #2C1810;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    min-height: 100vh;
    transition: background 2s, background-color 2s, color 2s;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 10;
}

h1 {
    font-family: 'DM Serif Display', serif;
    font-size: 4.5em;
    margin-bottom: 20px;
    color: #854D27;
    text-shadow: 2px 2px 0px #D4B08C;
    animation: pulse 2s infinite;
    position: relative;
    z-index: 20;
}

.countdown {
    font-family: 'DM Serif Display', serif;
    font-size: 1.5em;
    margin: 40px auto;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe9e9 100%);
    border: 3px solid #8B4513;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 20px rgba(139, 69, 19, 0.2);
    position: relative;
    z-index: 20;
    max-width: 800px;
    text-align: center;
}

.countdown h1 {
    color: #8B4513;
    font-size: 2.5em;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(139, 69, 19, 0.2);
    animation: titleFloat 3s ease-in-out infinite;
}

.countdown .time {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.countdown .time span {
    background: #8B4513;
    color: #fff;
    padding: 10px 15px;
    border-radius: 10px;
    min-width: 60px;
    display: inline-block;
    text-align: center;
    font-size: 1.8em;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(139, 69, 19, 0.3);
    animation: numberPulse 1s ease-in-out infinite;
}

.countdown .time > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #8B4513;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.cake-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 60px auto 30px;
    z-index: 20;
    animation: float 4s infinite ease-in-out;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
}

.cake {
    width: 100%;
    height: 100%;
    display: block;
}

.message {
    font-size: 1.5em;
    line-height: 1.6;
    margin-top: 30px;
    opacity: 0;
    transition: opacity 1s, transform 1s;
    transform: translateY(20px);
    position: relative;
    z-index: 20;
    background-color: #FFF9F3;
    padding: 20px;
    border: 2px solid #D4B08C;
    box-shadow: 6px 6px 0 #D4B08C;
}

.hidden {
    display: none;
}

/* Animations */
@keyframes pulse {
    0% {transform: scale(1);}
    50% {transform: scale(1.05);}
    100% {transform: scale(1);}
}

@keyframes titleFloat {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

@keyframes numberPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes borderRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}

@keyframes confettiFall {
    0% {transform: translateY(0) rotate(0deg); opacity: 1;}
    100% {transform: translateY(100vh) rotate(720deg); opacity: 0;}
}

@keyframes birthdayPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes writeText {
    0% { opacity: 0; width: 0; }
    100% { opacity: 1; width: 100%; }
}

/* Media Queries */
@media screen and (max-width: 768px) {
    h1 {
        font-size: 2.5em; /* Smaller heading for mobile */
    }

    .container {
        padding: 20px 10px;
    }

    .countdown {
        font-size: 1.2em;
        padding: 15px;
        margin: 20px 0;
    }

    .cake-container {
        width: 250px;
        height: 250px;
    }
}

@media screen and (max-width: 480px) {
    .cake-container {
        width: 200px;
        height: 200px;
    }
}

@media screen and (max-width: 320px) {
    h1 {
        font-size: 2em;
    }

    .countdown {
        font-size: 1em;
    }

    .cake-container {
        width: 150px;
        height: 150px;
    }
} 