* {
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100vw;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    background-color: #000;
    font-family: 'Courier New', Courier, monospace;
    color: #ff0;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 800px;
    padding: 10px 20px;
    font-size: 24px;
    font-weight: bold;
    color: #ffd700;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
    flex-grow: 1;
    position: relative;
}

canvas {
    background-color: #000;
    image-rendering: pixelated;
    display: block;
    width: 100%;
    height: 100%;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    color: #ffd700;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.overlay.show {
    display: flex;
}

.ascii-title {
    color: #0f0;
    font-weight: bold;
    font-size: clamp(8px, 2vw, 16px);
    line-height: 1.2;
    margin-bottom: 30px;
    text-shadow: 2px 2px 0px #005500;
}

.instructions {
    color: #4444ff;
    margin-bottom: 30px;
    text-align: center;
    font-size: 1.2rem;
}

.instructions p {
    margin: 5px 0;
}

.blink {
    color: #ffd700;
    animation: blinker 1s linear infinite;
    font-size: 1.5rem;
}

@keyframes blinker {
    50% { opacity: 0; }
}

.multiplayer-ui {
    margin-bottom: 20px;
    text-align: center;
    color: #0f0;
}
.multiplayer-ui input {
    background: #000;
    color: #0f0;
    border: 1px solid #0f0;
    padding: 5px;
    font-family: inherit;
}
.multiplayer-ui button {
    background: #0f0;
    color: #000;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
}
#conn-status {
    margin-top: 5px;
    font-size: 14px;
}
