/* 超级马里奥游戏样式 */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'Press Start 2P', monospace;
    flex-direction: column;
    animation: backgroundShift 30s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); }
    50% { background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%); }
}

#game-container {
    border: 4px solid #444;
    border-radius: 12px;
    background: #000;
    box-shadow: 
        0 0 30px rgba(0,0,0,0.8),
        inset 0 0 20px rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}

#game-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57, #ff9ff3);
    border-radius: 14px;
    z-index: -1;
    animation: borderGlow 3s linear infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.title {
    color: #ff6b6b;
    font-size: 28px;
    font-weight: normal;
    margin-bottom: 20px;
    text-shadow: 
        3px 3px 0px #000,
        -1px -1px 0px #000,  
        1px -1px 0px #000,
        -1px 1px 0px #000,
        1px 1px 0px #000;
    animation: titlePulse 2s ease-in-out infinite;
    letter-spacing: 2px;
}

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

.controls {
    color: #fff;
    text-align: center;
    margin-top: 20px;
    font-size: 10px;
    line-height: 1.6;
    background: rgba(0,0,0,0.6);
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #444;
    max-width: 500px;
}

.controls p {
    margin: 8px 0;
}

.controls p:first-child {
    font-size: 12px;
    color: #feca57;
    margin-bottom: 10px;
}

.controls p:last-child {
    color: #4ecdc4;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .title {
        font-size: 20px;
    }
    
    .controls {
        font-size: 8px;
    }
    
    #game-container {
        border-width: 2px;
    }
}

/* 游戏加载动画 */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
    z-index: 100;
}

.loading::after {
    content: '...';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 80% { content: '...'; }
}

/* 分数和生命显示样式增强 */
.game-ui {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 50;
    font-family: 'Press Start 2P', monospace;
    font-size: 12px;
}