body {
    background-color: #111;
    color: #fff;
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
}

#game-container {
    position: relative;
    text-align: center;
    width: 100vw;
    display: flex;
    /* Center logic */
    flex-direction: column;
    align-items: center;
}

#game-area {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: nowrap;
    /* Force side-by-side */
    /* Scale down if screen is too narrow */
    transform-origin: top center;
}

@media (max-width: 1100px) {
    #game-area {
        transform: scale(0.8);
    }
}

@media (max-width: 900px) {
    #game-area {
        transform: scale(0.6);
    }
}

@media (max-width: 600px) {
    #game-area {
        gap: 5px;
        transform: scale(0.45);
    }
}

.player-container {
    position: relative;
    border: 4px solid #00aaff;
    box-shadow: 0 0 20px #00aaff, inset 0 0 20px #00aaff;
    background: linear-gradient(to bottom, #001133, #000);
}

#p2-container {
    border-color: #ffaa00;
    box-shadow: 0 0 20px #ffaa00, inset 0 0 20px #ffaa00;
}

canvas {
    display: block;
    /* Remove gap */
}

.ui-header {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    font-size: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    font-weight: bold;
    text-shadow: 2px 2px #ff00de;
}

.modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    border: 4px solid #fff;
    padding: 40px;
    text-align: center;
    z-index: 10;
    min-width: 300px;
}

.hidden {
    display: none !important;
}

button {
    background: #ff00de;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 20px;
    cursor: pointer;
    margin-top: 20px;
    font-family: inherit;
    text-shadow: 1px 1px #000;
    box-shadow: 4px 4px #00aaff;
    transition: transform 0.1s;
}

button:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px #00aaff;
}

.mode-selection {
    display: flex;
    gap: 10px;
    justify-content: center;
}

h1 {
    color: #00aaff;
    text-shadow: 4px 4px #ff00de;
    font-size: 40px;
    margin-bottom: 30px;
}