body {
    font-family: 'Courier New', monospace;
    background-color: #1a1a1a;
    color: #00ff00;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
}

#tagline {
    font-style: italic;
    color: #00cc00;
}

#game-container {
    background-color: #000;
    border: 2px solid #00ff00;
    box-shadow: 0 0 20px #00ff00;
    padding: 20px;
    width: 80%;
    max-width: 900px;
    margin-bottom: 30px;
}

.game-section {
    margin-bottom: 25px;
    border-bottom: 1px dashed #006600;
    padding-bottom: 15px;
}

.game-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

h2 {
    color: #00cc00;
    margin-top: 0;
}

/* --- NEW CSS FOR SCROLLING CHAT --- */
#narrative-output {
    height: 50vh; /* Set height to 50% of the viewport height */
    max-height: 450px; /* But don't let it get bigger than 450px */
    overflow-y: auto; /* Add a scrollbar if content overflows */
    border: 1px solid #003300;
    padding: 10px;
    margin-bottom: 15px;
    background-color: #050a05;
    scroll-behavior: smooth;
}

#narrative-output p {
    white-space: pre-wrap;
    margin: 0 0 10px 0;
}
/* --- END NEW CSS --- */


#player-input {
    width: calc(100% - 80px);
    padding: 10px;
    background-color: #0d0d0d;
    border: 1px solid #00ff00;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 1em;
}

#submit-input {
    width: 70px;
    padding: 10px;
    background-color: #006600;
    border: 1px solid #00ff00;
    color: #fff;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 1em;
}

#submit-input:hover {
    background-color: #009900;
}

#inventory-list, #clue-display {
    list-style: none;
    padding: 0;
    min-height: 20px; /* Ensure the area is visible even when empty */
}

#inventory-list li, .clue-item {
    background-color: #003300;
    margin-bottom: 5px;
    padding: 8px;
    border: 1px solid #006600;
}

.clue-item img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-top: 10px;
    border: 1px solid #00ff00;
}

.progress-bar-container {
    width: 100%;
    background-color: #333;
    border: 1px solid #00ff00;
    height: 20px;
    margin-top: 10px;
    position: relative;
}

#progress-fill {
    height: 100%;
    width: 0%;
    background-color: #00ff00;
    transition: width 0.5s ease-in-out;
}

#progress-text {
    text-align: center;
    margin-top: 10px;
    font-size: 0.9em;
}

footer {
    margin-top: 20px;
    color: #006600;
    font-size: 0.8em;
}