body {
    margin: 0;
    padding: 0;
    background-color: #1a1a1a;
    color: #f0f0f0;
    font-family: 'Forum', serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    overflow: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

#game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#game-display {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.1;
    background-color: #000;
    padding: 10px;
    border: 2px solid #555;
    border-radius: 5px;
    white-space: pre;
    overflow: hidden;
}

#ui-panels {
    display: flex;
    justify-content: space-between;
    width: 90%;
    max-width: 400px;
    margin-top: 10px;
    gap: 10px;
}

#status-container, #inventory-container {
    background: #111;
    border: 1px solid #555;
    border-radius: 5px;
    padding: 8px;
    width: 48%;
    box-sizing: border-box;
    height: 130px; /* Fixed height */
    overflow-y: auto;
}

#ui-panels h4 {
    margin: 0 0 5px 0;
    text-align: center;
    color: #fca311;
    border-bottom: 1px solid #555;
    padding-bottom: 3px;
}

#ui-panels ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    font-size: 0.8em;
}
#status-container ul {
     font-family: 'Courier New', monospace;
}

#ui-panels li {
    padding: 1px 0;
}

#log-container {
    width: 90%;
    max-width: 400px;
    height: 80px;
    background: #000;
    border: 1px solid #555;
    overflow-y: scroll;
    margin-top: 10px;
}

#game-log {
    list-style-type: none;
    padding: 5px;
    margin: 0;
    text-align: left;
    font-size: 0.9em;
}

#controls {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

#controls button {
    width: 55px;
    height: 55px;
    margin: 4px;
    border: 2px solid #888;
    background-color: #333;
    color: #fff;
    font-size: 22px;
    border-radius: 10px;
    cursor: pointer;
}

#controls button:active {
    background-color: #555;
}
