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

body {
    font-family: 'Courier New', monospace;
    background: #000;
    color: #00ff00;
    overflow: hidden;
    height: 100vh;
}

/* 矩阵背景效果 */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #000011, #001122);
    z-index: -2;
}

.matrix-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 25% 25%, #001100 0%, transparent 70%),
        radial-gradient(circle at 75% 75%, #000044 0%, transparent 70%);
    animation: matrix-glow 3s ease-in-out infinite alternate;
}

@keyframes matrix-glow {
    0% { opacity: 0.3; }
    100% { opacity: 0.6; }
}

/* 主容器 */
.main-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* 阶段容器 */
.stage {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.5s ease;
}

.stage.active {
    opacity: 1;
    transform: scale(1);
}

/* 终端样式 */
.terminal {
    background: rgba(0, 20, 0, 0.9);
    border: 2px solid #00ff00;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    min-height: 400px;
    box-shadow: 
        0 0 20px #00ff00,
        inset 0 0 20px rgba(0, 255, 0, 0.1);
    backdrop-filter: blur(10px);
}

.terminal-header {
    background: #00ff00;
    color: #000;
    padding: 10px 20px;
    font-weight: bold;
    border-radius: 8px 8px 0 0;
    text-align: center;
}

.terminal-body {
    padding: 20px;
    font-size: 16px;
    line-height: 1.4;
    min-height: 300px;
}

/* 代码行样式 */
.code-line {
    margin: 5px 0;
    opacity: 0;
    animation: code-appear 0.1s ease forwards;
}

@keyframes code-appear {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 闪电效果 */
.lightning {
    display: inline-block;
    animation: lightning-flash 0.3s ease;
}

@keyframes lightning-flash {
    0%, 100% { 
        color: #00ff00; 
        text-shadow: 0 0 5px #00ff00;
    }
    50% { 
        color: #ffff00; 
        text-shadow: 
            0 0 10px #ffff00,
            0 0 20px #ffff00,
            0 0 30px #ffffff;
    }
}

/* 编译状态 */
.compile-status {
    font-size: 18px;
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(0, 255, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff00, #44ff44);
    width: 0%;
    transition: width 0.1s ease;
    animation: progress-glow 1s ease-in-out infinite alternate;
}

@keyframes progress-glow {
    0% { box-shadow: 0 0 5px #00ff00; }
    100% { box-shadow: 0 0 15px #00ff00, 0 0 25px #00ff00; }
}

/* 像素艺术容器 */
#pixel-art-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.pixel-art {
    font-family: monospace;
    font-size: 12px;
    line-height: 1;
    white-space: pre;
    text-align: center;
    opacity: 0;
    animation: pixel-fade-in 0.5s ease forwards;
}

@keyframes pixel-fade-in {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.cake-explosion {
    animation: cake-explode 1s ease forwards;
}

@keyframes cake-explode {
    0% { transform: scale(1); }
    50% { transform: scale(1.2) rotate(5deg); }
    100% { transform: scale(0.8) rotate(-5deg); opacity: 0.3; }
}

/* 生日祝福样式 */
.wish-content {
    text-align: center;
    position: relative;
}

#birthday-text {
    font-size: 5rem;
    font-weight: bold;
    background: linear-gradient(45deg, #ff6b6b, #ffd93d, #6bcf7f, #4ecdc4, #45b7d1, #96ceb4);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbow-flow 3s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
}

@keyframes rainbow-flow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.celebration-effects {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* 弹幕样式 */
#danmaku-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
}

.danmaku-item {
    position: absolute;
    color: rgba(255, 255, 255, 0.8);
    font-size: 24px;
    font-weight: 500;
    white-space: nowrap;
    animation: danmaku-move linear;
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.8),
        0 0 5px rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 7px 16px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
}

@keyframes danmaku-move {
    from {
        left: 100%;
    }
    to {
        left: -100%;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .terminal {
        width: 95%;
        margin: 10px;
    }
    
    .terminal-body {
        font-size: 14px;
        padding: 15px;
    }
    
    #birthday-text {
        font-size: 2.5rem;
    }
    
    .danmaku-item {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    #birthday-text {
        font-size: 2rem;
    }
    
    .terminal-body {
        font-size: 12px;
    }
}
