@font-face {
    font-family: FZCWRYT;
    font-weight: 900;
    font-display: swap;
    src: url("https://lc-RAZGOrF5.cn-n1.lcfile.com/3Ne2knJf4fI1w8QpCNmKKxAePjvpsYoO/FC36664.woff2") format("woff2");
}

.birthday-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 248, 240, 0.97) 100%);
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 0 30px rgba(255, 64, 129, 0.15);
    overflow: hidden;
    position: relative;
    border: 6px solid #ffeb3b;
    height: 300px;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    max-width: 1200px;

}

.card-header {
    background: linear-gradient(to right, #ff4081, #7c4dff);
    padding: 15px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.card-title {
    font-family: 'Pacifico', 'FZCWRYT', cursive;
    color: white;
    font-size: 2rem;
    margin: 0;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
}

.card-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin-top: 5px;
    font-weight: 500;
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
}

.countdown-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    margin-bottom: 15px;
    width: 100%;
    overflow-x: auto;
    padding: 8px 0;
    /* 增加上下内边距 */
}

.countdown-item {
    background: white;
    border-radius: 12px;
    padding: 18px 8px;
    /* 从15px改为18px，增加3px上下内边距 */
    min-width: 80px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 3px solid;
    flex: 1;
    min-width: 70px;
    margin: 2px 0;
    /* 增加上下外边距 */
}

.countdown-days {
    border-color: #ff4081;
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
}

.countdown-hours {
    border-color: #7c4dff;
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
}

.countdown-minutes {
    border-color: #18ffff;
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
}

.countdown-seconds {
    border-color: #ffeb3b;
    background: linear-gradient(135deg, #fffde7 0%, #fff9c4 100%);
}

.countdown-value {
    font-size: 2.2rem;
    font-weight: 800;
    font-family: 'Pacifico', 'FZCWRYT', cursive;
    line-height: 1;
    color: #333;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1);
}

.countdown-label {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 5px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.age-display {
    background: linear-gradient(45deg, #ff4081, #7c4dff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 1.8rem;
    font-weight: 800;
    margin: 10px 0;
    padding: 8px 20px;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 3px dashed #ffeb3b;
    font-family: 'Pacifico', 'FZCWRYT', cursive;
    text-align: center;
    flex-shrink: 0;
}

.birthday-message {
    font-size: 1.4rem;
    text-align: center;
    color: #333;
    line-height: 1.4;
    font-family: 'Pacifico', 'FZCWRYT', cursive;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.birthday-greeting {
    color: #ff4081;
    font-weight: bold;
}

/* 动画区域 */
.animation-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
}

/* 彩纸动画 */
.confetti {
    position: absolute;
    width: 12px;
    height: 12px;
    opacity: 0;
    animation: fall 5s linear infinite;
}

@keyframes fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(400px) rotate(720deg);
        opacity: 0;
    }
}

/* 气球动画 */
.balloon {
    position: absolute;
    width: 40px;
    height: 50px;
    border-radius: 50%;
    bottom: -80px;
    animation: float 6s ease-in infinite;
}

.balloon:before {
    content: "";
    position: absolute;
    width: 2px;
    height: 40px;
    background: rgba(0, 0, 0, 0.2);
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(-400px) rotate(20deg);
        opacity: 0;
    }
}

/* 祝福动画 */
.birthday-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3.2rem;
    font-weight: 900;
    color: #ff4081;
    text-align: center;
    opacity: 0;
    z-index: 20;
    text-shadow: 3px 3px 0 #ffeb3b, 6px 6px 0 rgba(0, 0, 0, 0.1);
    font-family: 'Pacifico', 'FZCWRYT', cursive;
    pointer-events: none;
}

.replay-button {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #ff4081;
    border-radius: 20px;
    padding: 8px 15px;
    color: #ff4081;
    font-weight: bold;
    cursor: pointer;
    z-index: 30;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    opacity: 0.8;
    font-family: 'Pacifico', 'FZCWRYT', sans-serif;
    font-size: 0.9rem;
}

.replay-button:hover {
    opacity: 1;
}

.birthday-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

@keyframes flicker {

    0%,
    100% {
        transform: translateX(-50%) scale(1);
    }

    50% {
        transform: translateX(-50%) scale(0.9);
    }
}

@media (max-width: 768px) {
    .card-title {
        font-size: 1.6rem;
    }

    .card-subtitle {
        font-size: 0.9rem;
    }

    .countdown-item {
        min-width: 60px;
        padding: 10px 5px;
    }

    .countdown-value {
        font-size: 1.8rem;
    }

    .countdown-label {
        font-size: 0.8rem;
    }

    .age-display {
        font-size: 1.4rem;
        padding: 6px 15px;
    }

    .birthday-message {
        font-size: 1.2rem;
    }

    .birthday-animation {
        font-size: 2.5rem;
    }

    .cake,
    .gift {
        transform: scale(0.7);
    }

    .cake {
        left: 10px;
    }

    .gift {
        right: 15px;
    }
}

@media (max-width: 480px) {
    .countdown-container {
        gap: 5px;
    }

    .countdown-item {
        min-width: 55px;
        padding: 8px 4px;
    }

    .countdown-value {
        font-size: 1.5rem;
    }

    .countdown-label {
        font-size: 0.7rem;
    }

    .age-display {
        font-size: 1.2rem;
        padding: 5px 12px;
    }

    .birthday-message {
        font-size: 1.1rem;
    }
}