/* 全局样式设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh;
    overflow-x: hidden;
    color: #fff;
    position: relative;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* 雪花动画 */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.snowflake {
    position: absolute;
    top: -20px;
    color: #fff;
    font-size: 1.2em;
    animation: fall linear infinite;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

.snowflake:nth-child(1) {
    left: 10%;
    animation-duration: 10s;
}

.snowflake:nth-child(2) {
    left: 20%;
    animation-duration: 8s;
    animation-delay: 1s;
}

.snowflake:nth-child(3) {
    left: 30%;
    animation-duration: 12s;
    animation-delay: 2s;
}

.snowflake:nth-child(4) {
    left: 40%;
    animation-duration: 9s;
    animation-delay: 3s;
}

.snowflake:nth-child(5) {
    left: 50%;
    animation-duration: 11s;
    animation-delay: 4s;
}

.snowflake:nth-child(6) {
    left: 60%;
    animation-duration: 10s;
    animation-delay: 5s;
}

.snowflake:nth-child(7) {
    left: 70%;
    animation-duration: 8s;
    animation-delay: 6s;
}

.snowflake:nth-child(8) {
    left: 80%;
    animation-duration: 13s;
    animation-delay: 7s;
}

.snowflake:nth-child(9) {
    left: 90%;
    animation-duration: 9s;
    animation-delay: 8s;
}

.snowflake:nth-child(10) {
    left: 95%;
    animation-duration: 10s;
    animation-delay: 9s;
}

@keyframes fall {
    to {
        transform: translateY(105vh) rotate(360deg);
    }
}

/* 烟花动画 */
.firework {
    position: fixed;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

#firework1 {
    background: radial-gradient(circle, #ff0000, #ff9900, #ffff00);
    top: 20%;
    left: 20%;
    animation: explode 3s infinite;
}

#firework2 {
    background: radial-gradient(circle, #00ff00, #00ffff, #ff00ff);
    top: 60%;
    left: 70%;
    animation: explode 4s infinite 1s;
}

#firework3 {
    background: radial-gradient(circle, #ffcc00, #ff66cc, #66ccff);
    top: 30%;
    right: 20%;
    animation: explode 5s infinite 2s;
}

@keyframes explode {
    0% {
        width: 5px;
        height: 5px;
        opacity: 1;
    }

    50% {
        width: 100px;
        height: 100px;
        opacity: 0.7;
    }

    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

/* 主容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 2;
}

/* 头部样式 */
header {
    text-align: center;
    margin: 30px 0;
    animation: fadeInDown 1s ease;
}

.main-title {
    font-size: 3.5rem;
    margin-bottom: 10px;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #ffb700, 0 0 40px #ff8c00;
    }

    to {
        text-shadow: 0 0 15px #fff, 0 0 25px #ffdf00, 0 0 35px #ff8c00, 0 0 45px #ff4500;
    }
}

.subtitle {
    font-size: 1.5rem;
    opacity: 0.9;
    letter-spacing: 3px;
}

/* 内容包装器 */
.content-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 40px 0;
}

/* 祝福卡片 */
.greeting-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 600px;
    animation: slideInUp 1s ease;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 15px;
}

.card-header h2 {
    font-size: 1.8rem;
    color: #ffd700;
}

.heart {
    font-size: 2rem;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.blessing-text {
    line-height: 1.8;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.blessing-text p {
    margin-bottom: 10px;
    animation: fadeInUp 1s ease;
    animation-fill-mode: both;
}

.blessing-text p:nth-child(1) {
    animation-delay: 0.1s;
}

.blessing-text p:nth-child(2) {
    animation-delay: 0.2s;
}

.blessing-text p:nth-child(3) {
    animation-delay: 0.3s;
}

.blessing-text p:nth-child(4) {
    animation-delay: 0.4s;
}

.blessing-text p:nth-child(5) {
    animation-delay: 0.5s;
}

.blessing-text p:nth-child(6) {
    animation-delay: 0.6s;
}

.blessing-text p:nth-child(7) {
    animation-delay: 0.7s;
}

.blessing-text p:nth-child(8) {
    animation-delay: 0.8s;
}

.blessing-text p:nth-child(9) {
    animation-delay: 0.9s;
}

.blessing-text p:nth-child(10) {
    animation-delay: 1.0s;
}

.blessing-text p:nth-child(11) {
    animation-delay: 1.1s;
}

.blessing-text p:nth-child(12) {
    animation-delay: 1.2s;
}

.blessing-text p:nth-child(13) {
    animation-delay: 1.3s;
}

.warm-wishes {
    font-weight: bold;
    color: #ffd700;
    font-size: 1.2rem;
    text-align: center;
    margin: 15px 0;
}

.signature {
    text-align: right;
    font-style: italic;
    color: #ffd700;
    font-size: 1.1rem;
}

/* 倒计时部分 */
.countdown-section {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 600px;
    margin: 30px auto;
    animation: slideInDown 1s ease;
}

.countdown-title {
    text-align: center;
    font-size: 1.8rem;
    margin: 20px 0 10px 0;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.countdown-section h3 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #ffd700;
}

.countdown-timer {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.countdown-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 0 15px;
}

.countdown-number {
    display: block;
    width: 70px;
    height: 70px;
    line-height: 70px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 1.8rem;
    font-weight: bold;
    margin-right: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: countdownPulse 2s infinite;
}

.countdown-label {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

/* 祝福语部分 */
.wishes-section {
    text-align: center;
    margin: 40px 0;
    animation: fadeIn 1.5s ease;
}

.wishes-section h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.wishes-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.wish-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.wish-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 215, 0, 0.3);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

/* 页脚 */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    font-size: 1.1rem;
    opacity: 0.9;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* 动画定义 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes countdownPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .content-wrapper {
        flex-direction: column;
    }

    .greeting-card,
    .countdown-section {
        max-width: 100%;
        padding: 15px;
    }

    .countdown-timer {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .countdown-item {
        margin: 5px;
    }

    .countdown-number {
        width: 50px;
        height: 50px;
        line-height: 50px;
        font-size: 1.2rem;
    }

    .countdown-label {
        font-size: 0.9rem;
    }

    .wishes-container {
        flex-direction: column;
        align-items: center;
    }

    .wish-item {
        width: 80%;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }

    .blessing-text {
        font-size: 1rem;
    }

    .countdown-number {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 1rem;
    }

    .countdown-label {
        font-size: 0.8rem;
    }

    .countdown-item {
        margin: 3px;
        flex-direction: column;
        align-items: center;
    }

    .countdown-number {
        margin-right: 0;
        margin-bottom: 5px;
    }
}