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

body {
    background: #000;
    height: 100vh;
    overflow: hidden;
    font-family: 'Courier New', monospace;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 玫瑰花瀑布样式 */
.roses-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.rose {
    position: absolute;
    animation: fall linear infinite;
    opacity: 0.9;
    font-size: 32px;
    line-height: 1;
    user-select: none;
    pointer-events: none;
}

.rose::before {
    content: '';
}

.rose::after {
    content: '';
}

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

/* 生日祝福文字样式 */
.birthday-message {
    position: relative;
    z-index: 10;
    font-size: 4rem;
    font-weight: bold;
    color: #00ff00;
    text-shadow: 
        2px 0 0 #00ff00,
        0 2px 0 #00ff00,
        -2px 0 0 #00ff00,
        0 -2px 0 #00ff00,
        4px 4px 0 #008000,
        6px 6px 0 #004000;
    margin-bottom: 50px;
    letter-spacing: 4px;
    image-rendering: pixelated;
}

.char {
    display: inline-block;
    opacity: 0;
    transform: translateY(32px);
    animation: pixelFadeIn 0.8s steps(8) forwards;
    background: linear-gradient(90deg, #00ff00 0%, #00ff00 50%, #ffffff 50%, #ffffff 100%);
    background-size: 8px 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes pixelFadeIn {
    0% {
        opacity: 0;
        transform: translateY(32px) scale(0);
        filter: blur(4px);
    }
    25% {
        opacity: 0.3;
        transform: translateY(24px) scale(0.5);
        filter: blur(2px);
    }
    50% {
        opacity: 0.6;
        transform: translateY(16px) scale(0.75);
        filter: blur(1px);
    }
    75% {
        opacity: 0.8;
        transform: translateY(8px) scale(0.9);
        filter: blur(0.5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* 蛋糕容器样式 */
.cake-container {
    position: relative;
    z-index: 10;
    opacity: 0;
    transform: scale(0.5);
    animation: cakeAppear 1s ease-out forwards;
    animation-delay: 7s;
}

@keyframes cakeAppear {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 蛋糕样式 */
.cake {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    image-rendering: pixelated;
}

.cake-layer {
    position: relative;
    margin: -2px 0;
    image-rendering: pixelated;
}

.cake-bottom {
    width: 192px;
    height: 48px;
    background: #8B4513;
    box-shadow: 
        0 0 0 2px #654321,
        2px 2px 0 2px #5D4037,
        4px 4px 0 2px #3E2723,
        inset 8px 8px 0 0 #A0522D,
        inset 16px 16px 0 0 #CD853F;
}

.cake-middle {
    width: 144px;
    height: 40px;
    background: #FFB6C1;
    box-shadow: 
        0 0 0 2px #FF91A4,
        2px 2px 0 2px #FF69B4,
        4px 4px 0 2px #FF1493,
        inset 8px 8px 0 0 #FFC0CB,
        inset 16px 16px 0 0 #FFCCCB;
}

.cake-top {
    width: 96px;
    height: 32px;
    background: #FFFACD;
    box-shadow: 
        0 0 0 2px #F0E68C,
        2px 2px 0 2px #DAA520,
        4px 4px 0 2px #B8860B,
        inset 8px 8px 0 0 #FFFFE0,
        inset 16px 16px 0 0 #FFFFF0;
}

/* 蜡烛样式 */
.candles {
    position: absolute;
    top: -24px;
    display: flex;
    gap: 16px;
}

.candle {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wax {
    width: 8px;
    height: 24px;
    background: #FFD700;
    box-shadow: 
        0 0 0 1px #FFA500,
        1px 1px 0 1px #FF8C00,
        2px 2px 0 1px #FF7F00;
    image-rendering: pixelated;
}

.wick {
    width: 2px;
    height: 4px;
    background: #333;
    image-rendering: pixelated;
}

.flame {
    width: 8px;
    height: 8px;
    background: #FFD700;
    box-shadow: 
        0 0 0 1px #FF4500,
        1px 1px 0 1px #FF6347,
        2px 2px 0 1px #FF0000;
    animation: pixelFlicker 0.5s steps(4) infinite alternate;
    image-rendering: pixelated;
}

@keyframes pixelFlicker {
    0% {
        background: #FFD700;
        transform: scale(1);
    }
    25% {
        background: #FFA500;
        transform: scale(1.1);
    }
    50% {
        background: #FF4500;
        transform: scale(0.9);
    }
    75% {
        background: #FF6347;
        transform: scale(1.05);
    }
    100% {
        background: #FF0000;
        transform: scale(1);
    }
}

/* 装饰樱桃 */
.decorations {
    position: absolute;
    top: -8px;
    display: flex;
    gap: 24px;
}

.cherry {
    width: 8px;
    height: 8px;
    background: #DC143C;
    box-shadow: 
        0 0 0 1px #B22222,
        1px 1px 0 1px #8B0000;
    image-rendering: pixelated;
    position: relative;
}

.cherry::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    width: 2px;
    height: 6px;
    background: #228B22;
    transform: translateX(-50%);
    image-rendering: pixelated;
}

.cherry::after {
    content: '';
    position: absolute;
    top: -4px;
    left: 60%;
    width: 4px;
    height: 2px;
    background: #32CD32;
    transform: rotate(45deg);
    image-rendering: pixelated;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .birthday-message {
        font-size: 2.5rem;
    }
    
    .cake-bottom {
        width: 150px;
        height: 45px;
    }
    
    .cake-middle {
        width: 120px;
        height: 38px;
    }
    
    .cake-top {
        width: 90px;
        height: 30px;
    }
}
