/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #1a2980, #26d0ce, #1a2980);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.container {
    position: relative;
    min-height: 100vh;
    padding: 20px;
}

/* 雪花背景动画 */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* 装饰性圆形元素 */
.decorative-circles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    animation: floatCircle 20s infinite linear;
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 5%;
    animation-duration: 25s;
}

.circle-2 {
    width: 200px;
    height: 200px;
    bottom: 15%;
    right: 10%;
    animation-duration: 30s;
    animation-direction: reverse;
}

.circle-3 {
    width: 150px;
    height: 150px;
    top: 40%;
    right: 20%;
    animation-duration: 35s;
}

@keyframes floatCircle {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(20px, 30px) rotate(90deg);
    }

    50% {
        transform: translate(0, 60px) rotate(180deg);
    }

    75% {
        transform: translate(-20px, 30px) rotate(270deg);
    }

    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

.snowflake {
    position: absolute;
    top: -20px;
    color: #fff;
    font-size: 20px;
    animation: fall linear forwards;
    user-select: none;
}

@keyframes fall {
    to {
        transform: translateY(105vh) rotate(360deg);
    }
}

/* 主要内容区域 */
.main-content {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    z-index: 2;
    text-align: center;
}

/* 标题样式 */
.header {
    margin-bottom: 50px;
}

.title {
    font-size: 4rem;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    background: linear-gradient(to right, #ffd700, #ffa500, #ff8c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: glow 2s ease-in-out infinite alternate;
    position: relative;
}

.title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 4px;
    background: linear-gradient(to right, transparent, #ffd700, transparent);
    border-radius: 50%;
}

@keyframes glow {
    from {
        text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #e60073, 0 0 20px #e60073;
    }

    to {
        text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #ff4da6, 0 0 40px #ff4da6;
    }
}

.subtitle {
    font-size: 1.5rem;
    opacity: 0.9;
    letter-spacing: 2px;
}

/* 祝福卡片 */
.blessing-section {
    margin: 50px 0;
}

.blessing-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin: 30px auto;
    max-width: 800px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.blessing-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.2) 0%, transparent 70%);
    transform: rotate(30deg);
    z-index: -1;
    animation: shine 5s infinite;
}

@keyframes shine {
    0% {
        transform: rotate(30deg) translate(-100%, -100%);
    }

    50% {
        transform: rotate(30deg) translate(100%, 100%);
    }

    100% {
        transform: rotate(30deg) translate(-100%, -100%);
    }
}

.blessing-card:hover {
    transform: translateY(-10px);
}

.card-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #ffd700;
}

.card-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 15px;
    text-align: justify;
}

/* 食物展示 */
.food-display {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.food-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.food-item:hover {
    transform: scale(1.1);
}

.food-icon {
    font-size: 4rem;
    margin-bottom: 10px;
    animation: float 3s ease-in-out infinite;
}

.food-item span {
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.food-item span::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.food-item:hover span::before {
    left: 100%;
}

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

    50% {
        transform: translateY(-15px) rotate(10deg);
    }

    100% {
        transform: translateY(0) rotate(0deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        text-shadow: 0 0 0 rgba(255, 215, 0, 0.5);
    }

    50% {
        transform: scale(1.1);
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    }

    100% {
        transform: scale(1);
        text-shadow: 0 0 0 rgba(255, 215, 0, 0.5);
    }
}

.food-icon {
    animation: float 3s ease-in-out infinite, pulse 2s ease-in-out infinite;
}

/* 倒计时部分 */
.countdown-section {
    margin: 60px 0;
}

.countdown-section h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #ffd700;
}

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

.countdown-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    min-width: 100px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.countdown-box span {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    transition: all 0.3s ease;
    position: relative;
}

.countdown-box:hover span {
    transform: scale(1.1);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

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

/* 祝福按钮 */
.blessing-button {
    background: linear-gradient(45deg, #ff6b6b, #ffa502);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
    transition: all 0.3s ease;
    font-weight: bold;
    letter-spacing: 1px;
}

.blessing-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.6);
    background: linear-gradient(45deg, #ff5252, #ff9f1a);
}

.blessing-button:active {
    transform: translateY(1px);
}

/* 页脚 */
.footer {
    margin-top: 50px;
    padding: 20px;
    font-size: 1.2rem;
    position: relative;
}

.footer p {
    margin: 10px 0;
}

/* 控制按钮 */
.control-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.control-btn {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.3);
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.control-btn:hover {
    background: rgba(255, 215, 0, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.2);
}

.music-btn.playing {
    background: rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.stop-btn {
    background: rgba(255, 99, 99, 0.2);
    color: #ff6363;
    border: 1px solid rgba(255, 99, 99, 0.3);
}

.stop-btn:hover {
    background: rgba(255, 99, 99, 0.3);
    box-shadow: 0 5px 15px rgba(255, 99, 99, 0.2);
}

.footer-decoration {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.dot {
    width: 10px;
    height: 10px;
    background: #ffd700;
    border-radius: 50%;
    animation: dotPulse 1.5s infinite ease-in-out;
}

.dot:nth-child(2) {
    animation-delay: 0.5s;
}

.dot:nth-child(3) {
    animation-delay: 1s;
}

@keyframes dotPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
}

/* 动画延迟 */
.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .food-display {
        gap: 20px;
        flex-direction: column;
        align-items: center;
    }

    .food-icon {
        font-size: 3rem;
    }

    .countdown-box {
        min-width: 70px;
        padding: 15px;
    }

    .countdown-box span {
        font-size: 1.8rem;
    }

    .countdown-section h2 {
        font-size: 1.5rem;
    }

    /* 控制按钮在移动端的样式 */
    .control-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .control-btn {
        width: 80%;
        max-width: 250px;
    }

    /* 弹窗在移动端的样式 */
    .floating-modal .blessing-modal {
        max-width: 90vw;
        padding: 15px;
    }

    .blessing-modal h3 {
        font-size: 1.5rem;
    }

    .blessing-modal p {
        font-size: 1rem;
    }
}

/* 小屏幕设备适配 */
@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .blessing-card {
        padding: 20px;
    }

    .blessing-modal {
        padding: 15px;
    }

    .blessing-modal h3 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }

    .blessing-modal p {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 15px;
    }

    .countdown-container {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

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

    .countdown-box span {
        font-size: 1.5rem;
    }

    .footer {
        padding: 15px;
        font-size: 1rem;
    }

    .control-btn {
        width: 90%;
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.8) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(5px);
}

.floating-modal {
    background: rgba(0, 0, 0, 0.7);
    justify-content: flex-start;
    align-items: flex-start;
}

.no-backdrop {
    background: transparent;
    backdrop-filter: none;
    pointer-events: none;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.blessing-modal {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 80%;
    text-align: center;
    position: relative;
    transform: scale(0.7) rotate(10deg);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.modal-overlay.active .blessing-modal {
    transform: scale(1) rotate(0deg);
}

.blessing-modal::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: modalShine 3s infinite;
    z-index: -1;
}

@keyframes modalShine {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(50%, 50%) rotate(360deg);
    }
}

.blessing-modal h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    animation: headingGlow 2s ease-in-out infinite alternate;
}

@keyframes headingGlow {
    from {
        text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #ffd700, 0 0 20px #ffd700;
    }

    to {
        text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #ffae00, 0 0 40px #ffae00;
    }
}

.blessing-modal p {
    font-size: 1.3rem;
    line-height: 1.6;
    margin-bottom: 30px;
    animation: textAppear 0.8s ease-out forwards;
    opacity: 0;
}

@keyframes textAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.close-btn::after {
    content: '\00D7';
    font-weight: bold;
}

.floating-modal .close-btn {
    z-index: 1002;
}

/* 浮动弹窗样式 */
.floating-modal .blessing-modal {
    position: absolute;
    max-width: 300px;
    /* 稍微小一些 */
    width: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    border-radius: 15px;
    padding: 20px;
    /* 减少内边距 */
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.85) 0%, rgba(118, 75, 162, 0.85) 100%);
    /* 美观的透明度 */
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.floating-modal .blessing-modal h3 {
    font-size: 1.5rem;
    /* 调整标题大小 */
    margin-bottom: 15px;
}

.floating-modal .blessing-modal p {
    font-size: 1rem;
    /* 调整内容大小 */
    line-height: 1.5;
    margin-bottom: 20px;
}

/* 进度条样式 */
.progress-bar {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    margin: 15px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(to right, #ffd700, #ffae00);
    border-radius: 5px;
    animation: progress 5s linear forwards;
}

@keyframes progress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

/* 弹窗内容可交互 */
.no-backdrop .blessing-modal {
    pointer-events: auto;
}

/* 动画库 */
.animated {
    animation-duration: 1s;
    animation-fill-mode: both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fadeIn {
    animation-name: fadeIn;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -100%, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.fadeInDown {
    animation-name: fadeInDown;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 100%, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.fadeInUp {
    animation-name: fadeInUp;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale3d(0.3, 0.3, 0.3);
    }

    50% {
        opacity: 1;
    }
}

.zoomIn {
    animation-name: zoomIn;
}

@keyframes bounceInLeft {

    from,
    60%,
    75%,
    90%,
    to {
        animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    }

    0% {
        opacity: 0;
        transform: translate3d(-3000px, 0, 0);
    }

    60% {
        opacity: 1;
        transform: translate3d(25px, 0, 0);
    }

    75% {
        transform: translate3d(-10px, 0, 0);
    }

    90% {
        transform: translate3d(5px, 0, 0);
    }

    to {
        transform: translate3d(0, 0, 0);
    }
}

.bounceInLeft {
    animation-name: bounceInLeft;
}

@keyframes bounceInRight {

    from,
    60%,
    75%,
    90%,
    to {
        animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    }

    from {
        opacity: 0;
        transform: translate3d(3000px, 0, 0);
    }

    60% {
        opacity: 1;
        transform: translate3d(-25px, 0, 0);
    }

    75% {
        transform: translate3d(10px, 0, 0);
    }

    90% {
        transform: translate3d(-5px, 0, 0);
    }

    to {
        transform: translate3d(0, 0, 0);
    }
}

.bounceInRight {
    animation-name: bounceInRight;
}

@keyframes flipInX {
    from {
        transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
        animation-timing-function: ease-in;
        opacity: 0;
    }

    40% {
        transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
        animation-timing-function: ease-in;
    }

    60% {
        transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
        opacity: 1;
    }

    80% {
        transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
    }

    to {
        transform: perspective(400px);
    }
}

.flipInX {
    animation-name: flipInX;
    backface-visibility: visible;
}