/* 超级玛丽游戏样式 */

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

@font-face {
    font-family: 'PixelFont';
    src: local('Courier New');
}

body {
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'PixelFont', 'Courier New', monospace;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 800px;
    height: 600px;
    background: #5c94fc;
    border: 4px solid #fff;
    box-shadow: 0 0 20px rgba(92, 148, 252, 0.5);
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* 屏幕层 */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10;
}

.screen.hidden {
    display: none;
}

.menu-content {
    text-align: center;
    color: #fff;
}

/* 标题样式 */
.title {
    font-size: 48px;
    color: #e44437;
    text-shadow: 
        4px 4px 0 #000,
        -2px -2px 0 #fbb03b;
    margin-bottom: 10px;
    letter-spacing: 4px;
}

.subtitle {
    font-size: 24px;
    color: #fbb03b;
    margin-bottom: 40px;
    text-shadow: 2px 2px 0 #000;
}

h2 {
    font-size: 36px;
    color: #fbb03b;
    text-shadow: 3px 3px 0 #000;
    margin-bottom: 30px;
}

/* 按钮样式 */
.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.pixel-btn {
    font-family: 'PixelFont', 'Courier New', monospace;
    font-size: 18px;
    padding: 12px 40px;
    background: linear-gradient(180deg, #e44437 0%, #b22222 100%);
    color: #fff;
    border: 3px solid #000;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 
        4px 4px 0 #000,
        inset 2px 2px 0 rgba(255,255,255,0.3);
    transition: all 0.1s;
}

.pixel-btn:hover {
    background: linear-gradient(180deg, #ff6b5b 0%, #d63030 100%);
    transform: translate(-2px, -2px);
    box-shadow: 
        6px 6px 0 #000,
        inset 2px 2px 0 rgba(255,255,255,0.3);
}

.pixel-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 
        2px 2px 0 #000,
        inset 2px 2px 0 rgba(0,0,0,0.2);
}

/* 操作说明 */
.controls-hint {
    font-size: 14px;
    color: #aaa;
    line-height: 1.8;
    background: rgba(0,0,0,0.5);
    padding: 20px;
    border: 2px solid #444;
}

.controls-hint p:first-child {
    color: #fbb03b;
    font-size: 16px;
    margin-bottom: 10px;
}

/* 分数显示 */
#final-score, #highscore-display {
    font-size: 24px;
    color: #fff;
    margin: 15px 0;
    text-shadow: 2px 2px 0 #000;
}

#highscore-display {
    color: #fbb03b;
}

/* 最高分列表 */
#highscore-list {
    background: rgba(0,0,0,0.5);
    padding: 20px 40px;
    margin: 20px 0;
    border: 2px solid #fbb03b;
    min-width: 300px;
}

#highscore-list p {
    font-size: 18px;
    margin: 10px 0;
    color: #fff;
}

#highscore-list .rank-1 { color: #ffd700; }
#highscore-list .rank-2 { color: #c0c0c0; }
#highscore-list .rank-3 { color: #cd7f32; }

/* 响应式 */
@media (max-width: 820px) {
    #game-container {
        width: 100vw;
        height: 75vw;
        max-height: 100vh;
        border: none;
    }
    
    .title {
        font-size: 36px;
    }
    
    .pixel-btn {
        font-size: 14px;
        padding: 10px 30px;
    }
}
