/* Base styles */
body {
    font-family: monospace;
    background-color: #000;
    color: #fff;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

input, button {
    background-color: #444;
    color: #fff;
    border: none;
    padding: 5px;
}

button {
    cursor: pointer;
}

/* Stats & Skills */
.stats, .skills {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
}

.selected {
    background-color: #ff0; /* High-contrast yellow */
    color: black;
}

.highlight {
    border: 2px solid red;
}

.flashing {
    animation: flash 1s infinite;
}

@keyframes flash {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* Three-column layout */
#game-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    height: 100vh;
    box-sizing: border-box;
}

/* Left column: Character Creator/Info */
#left-panel {
    width: 300px;
    background-color: #222;
    color: #fff;
    padding: 10px;
    overflow-y: auto;
    box-sizing: border-box;
}

/* Middle column: Map and Console */
#middle-panel {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-sizing: border-box;
}

#console {
    height: 80%;
    overflow-y: auto;
    background: #111;
    color: #0f0;
    padding: 5px;
    font-family: monospace;
}

/* Right column: Game Controls */
#right-panel {
    width: 350px;
    background-color: #222;
    padding: 10px;
    overflow-y: auto;
    box-sizing: border-box;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

table, th, td {
    border: 1px solid #555;
}

th, td {
    padding: 4px;
    text-align: left;
}

.hidden {
    display: none;
}

/* Map container: let it size to your grid of spans + <br> */
#mapContainer {
    flex-grow: 1;
    position: relative;
    background-color: #000;
    font-family: 'Courier New', Courier, monospace;
    white-space: pre; /* respect spaces/newlines */
    line-height: 1em; /* one line per row */
    overflow: auto; /* scroll if too big */
    padding: 10px;
    box-sizing: border-box;
}

/* Layers are stacked on top of each other */
.mapLayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* clicks pass through */
}

/* Each tile is one character wide & high */
.tile {
    display: inline-block;
    width: 1ch; /* exactly one “0” width */
    height: 1em; /* exactly one line height */
    font-size: 1em;
    text-align: center;
    vertical-align: top;
    pointer-events: auto; /* if you want to click on tiles */
}
