:root {
    --bg-color: #050505;
    --text-color: #33ff33; /* Classic terminal green */
    --dim-color: #1a801a;
    --highlight-color: #ccffcc;
    --error-color: #ff3333;
    --font-main: 'VT323', monospace;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
}

#game-container {
    width: 90%;
    max-width: 800px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    border: 2px solid var(--dim-color);
    padding: 20px;
    box-shadow: 0 0 20px rgba(51, 255, 51, 0.1);
    background-color: rgba(0, 0, 0, 0.9);
    position: relative;
    z-index: 2;
}

header {
    border-bottom: 1px solid var(--dim-color);
    margin-bottom: 20px;
    text-align: center;
}

h1 {
    margin: 0;
    font-size: 2.5rem;
    text-shadow: 0 0 10px var(--text-color);
    letter-spacing: 5px;
}

#output-area {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--dim-color) var(--bg-color);
}

#output-area::-webkit-scrollbar {
    width: 8px;
}

#output-area::-webkit-scrollbar-track {
    background: var(--bg-color);
}

#output-area::-webkit-scrollbar-thumb {
    background-color: var(--dim-color);
    border-radius: 4px;
}

.log-entry {
    margin-bottom: 15px;
    line-height: 1.4;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

.room-title {
    color: var(--highlight-color);
    font-size: 1.4rem;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 10px;
    text-transform: uppercase;
    border-bottom: 1px dashed var(--dim-color);
    display: inline-block;
}

.room-desc {
    margin-bottom: 10px;
}

.exits {
    color: var(--dim-color);
    font-size: 0.9rem;
}

.npc-say {
    color: #ffff33; /* Yellow for dialogue */
    font-style: italic;
}

.error-msg {
    color: var(--error-color);
}

#input-area {
    display: flex;
    align-items: center;
    border-top: 1px solid var(--dim-color);
    padding-top: 10px;
}

#prompt {
    margin-right: 10px;
    font-weight: bold;
    animation: blink 1s infinite;
}

#command-input {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 1.2rem;
    flex-grow: 1;
    outline: none;
}

/* CRT Overlay Effect */
#crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 10;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
