@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

:root {
    --bg-color: #050505;
    --text-color: #e0e0e0;
    --accent-color: #00ff41;
    --dim-color: #666;
    --button-hover: #1a1a1a;
}

body.light-mode {
    --bg-color: #f0f0f0;
    --text-color: #1a1a1a;
    --accent-color: #006400;
    --dim-color: #999;
    --button-hover: #e0e0e0;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'VT323', monospace;
    font-size: 20px;
    margin: 0;
    padding: 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#main-layout {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
    gap: 20px;
}

#sidebar {
    width: 250px;
    border: 2px solid var(--accent-color);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-shrink: 0;
}

.panel-section h3 {
    margin-top: 0;
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 5px;
}

#game-container {
    flex-grow: 1;
    width: 100%;
    /* Fallback */
    border: 2px solid var(--accent-color);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

#output {
    flex-grow: 1;
    overflow-y: auto;
    padding-bottom: 20px;
    scrollbar-width: none;
}

p {
    margin: 8px 0;
    line-height: 1.4;
}

.system-message {
    color: var(--dim-color);
    font-size: 0.8em;
}

.user-command {
    color: var(--accent-color);
    font-weight: bold;
}

.story-text {
    color: var(--text-color);
}

#input-area {
    display: flex;
    border-top: 1px dashed var(--dim-color);
    padding-top: 10px;
    margin-top: 10px;
    align-items: center;
}

input {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-family: inherit;
    font-size: inherit;
    flex-grow: 1;
    outline: none;
}

.overlay-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.menu-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

button {
    background: transparent;
    border: 1px solid var(--dim-color);
    color: var(--dim-color);
    font-family: 'VT323', monospace;
    font-size: 18px;
    padding: 5px 10px;
    cursor: pointer;
}

button:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.simple-mode #sidebar {
    display: none !important;
}

.simple-mode #game-container {
    border: none;
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    #main-layout {
        flex-direction: column-reverse;
    }

    #sidebar {
        width: 100%;
        height: auto;
        display: flex;
    }
}