* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

body {
    background: #1a1a2e;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'Press Start 2P', monospace;
    overflow: hidden;
    padding: 10px;
}

.game-container {
    background: #2d2d44;
    border: 8px solid #4a4a6a;
    border-radius: 4px;
    padding: 20px;
    max-width: 500px;
    width: 100%;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.title {
    color: #00ff88;
    text-align: center;
    font-size: 24px;
    margin-bottom: 15px;
    text-shadow: 3px 3px 0 #006644;
    letter-spacing: 1px;
}

.score-display, .high-score {
    color: #ffcc00;
    font-size: 14px;
    margin-bottom: 10px;
    display: inline-block;
    width: 50%;
}

.high-score {
    text-align: right;
}

#gameCanvas {
    width: 100%;
    height: 400px;
    background: #1a1a2e;
    border: 4px solid #4a4a6a;
    display: block;
    margin: 10px auto;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 15px 0;
}

.control-btn {
    background: #4a4a6a;
    color: #00ff88;
    border: 4px solid #00ff88;
    font-size: 24px;
    width: 70px;
    height: 70px;
    cursor: pointer;
    font-family: 'Press Start 2P';
    border-radius: 8px;
    transition: all 0.1s;
}

.control-btn:active {
    background: #00ff88;
    color: #1a1a2e;
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 15px 0;
}

.main-btn {
    background: #ff3366;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    font-family: 'Press Start 2P';
    border-radius: 4px;
    transition: all 0.2s;
    min-width: 140px;
}

.main-btn:hover {
    background: #ff5588;
    transform: translateY(-2px);
}

.main-btn:active {
    transform: translateY(0);
}

#restartBtn {
    background: #3366ff;
    display: none;
}

#restartBtn:hover {
    background: #5588ff;
}

.instructions {
    color: #88ccff;
    text-align: center;
    font-size: 10px;
    line-height: 1.6;
    margin: 15px 0;
    border-top: 2px solid #4a4a6a;
    padding-top: 10px;
}

.footer {
    color: #666;
    text-align: center;
    font-size: 8px;
    margin-top: 10px;
    letter-spacing: 2px;
}

@media (max-width: 500px) {
    .game-container {
        padding: 10px;
    }
    
    .title {
        font-size: 18px;
    }
    
    #gameCanvas {
        height: 300px;
    }
    
    .control-btn {
        width: 60px;
        height: 60px;
        font-size: 20px;
    }
    
    .main-btn {
        padding: 10px 15px;
        font-size: 12px;
        min-width: 120px;
    }
}