/* 像素迷宫探险家 - 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

#game-container {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 100%;
}

#game-header {
    text-align: center;
    margin-bottom: 20px;
}

#game-header h1 {
    font-size: 24px;
    color: #4CAF50;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
}

#game-stats {
    display: flex;
    justify-content: space-around;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 5px;
}

#game-stats span {
    margin: 0 10px;
}

#game-canvas {
    border: 3px solid #4CAF50;
    display: block;
    margin: 0 auto 20px;
    background: #000;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

#game-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 300px;
    margin: 0 auto;
}

.control-row {
    grid-column: span 3;
    display: flex;
    justify-content: center;
    gap: 10px;
}

#game-controls button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#game-controls button:hover {
    background: #45a049;
    transform: translateY(-2px);
}

#game-controls button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#control-up {
    grid-column: 2;
}

#control-left {
    grid-column: 1;
}

#control-down {
    grid-column: 2;
}

#control-right {
    grid-column: 3;
}

#control-action {
    grid-column: span 3;
    background: #ff9800;
}

#control-action:hover {
    background: #e68900;
}

/* 移动端适配 */
@media (max-width: 480px) {
    #game-container {
        padding: 15px;
    }
    
    #game-header h1 {
        font-size: 20px;
    }
    
    #game-stats {
        font-size: 12px;
        padding: 8px;
    }
    
    #game-controls button {
        padding: 12px 16px;
        font-size: 16px;
    }
}

/* 像素风格效果 */
.pixel-text {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}

/* 游戏消息样式 */
#game-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    display: none;
    z-index: 100;
}

#game-message h2 {
    margin-bottom: 10px;
    color: #4CAF50;
}

#game-message button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}