* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a0000 0%, #2d0a0a 25%, #3d1515 50%, #4d1a1a 75%, #5d2020 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Courier New', monospace;
    overflow: hidden;
}

.container {
    text-align: center;
    padding: 40px;
    animation: fadeIn 1.5s ease-in;
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 
        0 0 60px rgba(255, 107, 0, 0.3),
        inset 0 0 60px rgba(255, 107, 0, 0.1);
}

.container::before,
.container::after {
    content: '🏮';
    position: absolute;
    font-size: 30px;
    animation: swing 3s ease-in-out infinite;
}

.container::before {
    top: -15px;
    left: -15px;
}

.container::after {
    top: -15px;
    right: -15px;
    animation-delay: 1.5s;
}

/* 装饰边框 */
.decorative-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    border: 3px solid transparent;
    border-image: linear-gradient(45deg, #FFD700, #FF6B00, #FFD700, #FF6B00) 1;
    animation: borderRotate 4s linear infinite;
    border-radius: 20px;
}

@keyframes borderRotate {
    0% {
        filter: hue-rotate(0deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}

.corner {
    position: absolute;
    font-size: 24px;
    text-shadow: 0 0 10px #FF4500;
}

/* Emoji 装饰行 */
.emoji-row {
    margin: 15px 0;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.emoji {
    font-size: 28px;
    animation: bounce 2s ease-in-out infinite;
    display: inline-block;
}

.emoji:nth-child(1) { animation-delay: 0s; }
.emoji:nth-child(2) { animation-delay: 0.2s; }
.emoji:nth-child(3) { animation-delay: 0.4s; }
.emoji:nth-child(4) { animation-delay: 0.6s; }
.emoji:nth-child(5) { animation-delay: 0.8s; }

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.horse-ascii {
    font-size: 14px;
    line-height: 1.2;
    color: #FFD700;
    text-shadow:
        0 0 10px #FFD700,
        0 0 20px #FF6B00,
        0 0 30px #FF6B00,
        0 0 40px #FF4500,
        0 0 50px #FF4500;
    margin: 30px auto;
    white-space: pre;
    animation: glow 2s ease-in-out infinite alternate;
}

.horse-svg {
    width: 300px;
    height: 250px;
    margin: 20px auto;
    animation: bounce 2s ease-in-out infinite;
}

.horse-svg svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 15px #FFD700) drop-shadow(0 0 30px #FF6B00);
}

@keyframes glow {
    from {
        text-shadow: 
            0 0 10px #FFD700,
            0 0 20px #FF6B00,
            0 0 30px #FF6B00,
            0 0 40px #FF4500;
    }
    to {
        text-shadow: 
            0 0 20px #FFD700,
            0 0 30px #FF6B00,
            0 0 40px #FF6B00,
            0 0 50px #FF4500,
            0 0 60px #FF4500;
    }
}

.greeting {
    font-size: 24px;
    font-weight: bold;
    margin: 30px 0;
    background: linear-gradient(90deg, #FF0000, #FF4500, #FF6B00, #FFD700, #FF6B00, #FF4500, #FF0000);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientMove 3s linear infinite;
    transition: opacity 0.3s ease;
}

@keyframes gradientMove {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

.year-title {
    font-size: 48px;
    font-weight: bold;
    margin: 20px 0;
    color: #FFD700;
    text-shadow: 
        0 0 10px #FFD700,
        0 0 20px #FF6B00,
        0 0 30px #FF4500;
    animation: pulse 2s ease-in-out infinite;
}

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

.subtitle {
    font-size: 18px;
    color: #FF6B00;
    margin-bottom: 30px;
    text-shadow: 0 0 10px #FF4500;
}

.refresh-btn {
    padding: 15px 40px;
    font-size: 18px;
    background: linear-gradient(135deg, #FF0000, #FF4500);
    border: 2px solid #FFD700;
    border-radius: 50px;
    color: #FFD700;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    text-shadow: 0 0 5px #000;
    box-shadow: 
        0 0 15px rgba(255, 107, 0, 0.5),
        inset 0 0 15px rgba(255, 215, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.refresh-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
    transition: left 0.5s ease;
}

.refresh-btn:hover::before {
    left: 100%;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 0 25px rgba(255, 107, 0, 0.8),
        inset 0 0 25px rgba(255, 215, 0, 0.3);
    border-color: #FFD700;
}

.refresh-btn:active {
    transform: translateY(0);
}

/* 背景粒子效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 107, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 69, 0, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* 飘落的红包 */
.red-packet {
    position: fixed;
    font-size: 24px;
    animation: fall linear infinite;
    z-index: 1;
    opacity: 0.8;
}

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

/* 烟花效果 */
.firework {
    position: fixed;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: firework 3s ease-out infinite;
    z-index: 0;
}

@keyframes firework {
    0% {
        transform: scale(0);
        opacity: 1;
        box-shadow: 0 0 20px currentColor, 0 0 40px currentColor;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* 装饰灯笼 */
.lantern {
    position: fixed;
    font-size: 40px;
    animation: swing 3s ease-in-out infinite;
    z-index: 0;
}

@keyframes swing {
    0%, 100% {
        transform: rotate(-10deg);
    }
    50% {
        transform: rotate(10deg);
    }
}

/* 闪烁的星星 */
.star {
    position: fixed;
    font-size: 20px;
    animation: twinkle 2s ease-in-out infinite;
    z-index: 0;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* 彩带效果 */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    animation: confetti-fall linear infinite;
    z-index: 0;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .horse-ascii {
        font-size: 10px;
    }

    .greeting {
        font-size: 18px;
    }

    .year-title {
        font-size: 32px;
    }

    .subtitle {
        font-size: 14px;
    }

    .refresh-btn {
        padding: 12px 30px;
        font-size: 16px;
    }
}

/* 游戏按钮 */
.game-btn {
    margin-top: 15px;
    padding: 15px 40px;
    font-size: 18px;
    background: linear-gradient(135deg, #FF4500, #FF6347);
    border: 2px solid #FFD700;
    border-radius: 50px;
    color: #FFD700;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    text-shadow: 0 0 5px #000;
    box-shadow:
        0 0 15px rgba(255, 107, 0, 0.5),
        inset 0 0 15px rgba(255, 215, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.game-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
    transition: left 0.5s ease;
}

.game-btn:hover::before {
    left: 100%;
}

.game-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 25px rgba(255, 107, 0, 0.8),
        inset 0 0 25px rgba(255, 215, 0, 0.3);
}

/* 游戏容器 */
.game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
}

.game-header {
    width: 100%;
    max-width: 800px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    color: #FFD700;
    font-size: 20px;
}

.game-score, .game-time {
    font-weight: bold;
    text-shadow: 0 0 10px #FF4500;
}

.game-combo {
    font-weight: bold;
    text-shadow: 0 0 10px #FF4500;
    color: #FFD700;
    animation: comboPulse 0.3s ease-in-out;
}

@keyframes comboPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

#gameCanvas {
    border: 3px solid #FFD700;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
    background: linear-gradient(135deg, #1a0000, #2d0a0a);
}

.close-game-btn {
    padding: 10px 20px;
    font-size: 16px;
    background: linear-gradient(135deg, #FF0000, #FF4500);
    border: 2px solid #FFD700;
    border-radius: 20px;
    color: #FFD700;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    transition: all 0.3s ease;
}

.close-game-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 107, 0, 0.8);
}

.game-instructions {
    margin-top: 15px;
    color: #FFD700;
    font-size: 16px;
    text-align: center;
    text-shadow: 0 0 10px #FF4500;
}