body {
    background-color: #2c3e50;
    color: #ecf0f1;
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

#game-container {
    text-align: center;
}

canvas {
    background-color: #34495e;
    /* Fallback color */
    border: 4px solid #f1c40f;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

/* Mobile optimizations */
@media (max-width: 850px) {
    canvas {
        width: 100vw;
        max-width: 100vw;
        height: auto;
        border: 2px solid #f1c40f;
    }

    body {
        height: auto;
        padding: 10px 0;
    }

    h1 {
        font-size: 1.5rem;
        margin: 10px 0;
    }
}

h1 {
    margin-bottom: 10px;
    text-shadow: 2px 2px #e74c3c;
}

/* Mobile Controls */
#mobile-controls {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

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

.arrow-btn {
    width: 80px;
    height: 80px;
    font-size: 32px;
    background: #3498db;
    color: white;
    border: 2px solid #2980b9;
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    transition: all 0.1s;
}

.arrow-btn:active {
    background: #2980b9;
    transform: scale(0.95);
}

.arrow-btn:hover {
    background: #2c3e50;
}

.restart-btn {
    background: #e74c3c;
    border-color: #c0392b;
    font-weight: bold;
}

.restart-btn:active {
    background: #c0392b;
}

.restart-btn:hover {
    background: #a93226;
}