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

.container {
    width: 95%;
    max-width: 900px;
    background-color: #1e1e1e;
    border: 1px solid #333;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.1);
    padding: 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    height: 90vh; /* Fixed height for better UI stability */
}

header {
    border-bottom: 1px solid #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 10000;
}

h1 {
    color: #4caf50;
    margin: 0;
    font-size: 1.5rem;
    text-align: center;
}

#stats-bar, #status-effects {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #bbb;
    background-color: #252525;
    padding: 5px 10px;
    border-radius: 4px;
}

.stat-item span {
    color: #fff;
    font-weight: bold;
}

#game-container {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

#scene-image-container {
    text-align: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

#scene-image {
    max-width: 100%;
    max-height: 250px;
    border: 1px solid #444;
    border-radius: 4px;
    object-fit: cover;
}

.story-text {
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 1.1rem;
    flex-grow: 1;
    white-space: pre-wrap;
}

.choices-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto; /* Push to bottom */
    padding-top: 10px;
}

button.choice-btn {
    background-color: #2c2c2c;
    color: #fff;
    border: 1px solid #4caf50;
    padding: 12px 20px;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
    border-radius: 4px;
}

button.choice-btn:hover, button.choice-btn.selected {
    background-color: #4caf50;
    color: #000;
}

body.keyboard-mode {
    cursor: none;
}

body.keyboard-mode .choice-btn:hover {
    background-color: #2c2c2c;
    color: #fff;
    cursor: none;
}

footer {
    border-top: 1px solid #333;
    margin-top: 20px;
    padding-top: 10px;
}

#persistent-inventory {
    width: 100%;
    background-color: #252525;
    padding: 10px;
    border-radius: 4px;
    color: #bbb;
    font-size: 0.9rem;
    box-sizing: border-box;
}

#persistent-inventory strong {
    color: #4caf50;
    margin-right: 10px;
}

.inv-display {
    color: #fff;
}

.inventory-item {
    display: inline-block;
    background-color: #333;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    border: 1px solid #555;
    margin: 5px;
}

.hidden {
    display: none !important;
}

#input-area {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#player-input {
    flex-grow: 1;
    padding: 10px;
    background-color: #222;
    border: 1px solid #4caf50;
    color: #fff;
    font-family: inherit;
}
