* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Courier New', Courier, monospace;
    padding: 20px;
}

.terminal {
    width: 100%;
    max-width: 900px;
    height: 80vh;
    background: #0d1117;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.terminal-header {
    background: linear-gradient(180deg, #2d333b 0%, #22272e 100%);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #373e47;
}

.terminal-title {
    color: #7ee787;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.terminal-buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.btn-close { background: #f85149; }
.btn-minimize { background: #f0883e; }
.btn-maximize { background: #3fb950; }

.terminal-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    color: #c9d1d9;
    font-size: 15px;
    line-height: 1.6;
}

.terminal-body::-webkit-scrollbar {
    width: 8px;
}

.terminal-body::-webkit-scrollbar-track {
    background: #161b22;
}

.terminal-body::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 4px;
}

.terminal-body::-webkit-scrollbar-thumb:hover {
    background: #484f58;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: #161b22;
    border-top: 1px solid #30363d;
}

.prompt {
    color: #7ee787;
    font-size: 18px;
    font-weight: bold;
    margin-right: 12px;
}

#command-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #f0f6fc;
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    outline: none;
    caret-color: #7ee787;
}

#command-input::placeholder {
    color: #484f58;
}

.output-line {
    margin-bottom: 4px;
    word-wrap: break-word;
}

.location-header {
    color: #58a6ff;
    font-weight: bold;
    font-size: 18px;
    margin-top: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #30363d;
}

.description {
    color: #8b949e;
    margin: 12px 0;
}

.items-list {
    color: #f0883e;
    margin: 8px 0;
}

.exits-list {
    color: #a371f7;
    margin: 8px 0;
}

.command-echo {
    color: #7ee787;
    margin-top: 16px;
}

.message {
    color: #c9d1d9;
    margin: 8px 0;
}

.error {
    color: #f85149;
}

.success {
    color: #3fb950;
}

.separator {
    color: #30363d;
    margin: 12px 0;
}

.welcome-banner {
    color: #7ee787;
    text-align: center;
    margin-bottom: 20px;
    white-space: pre;
    font-size: 12px;
}

.help-text {
    color: #8b949e;
    font-size: 13px;
}

.inventory-item {
    color: #f0883e;
}

.victory {
    color: #3fb950;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    padding: 20px;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@media (max-width: 600px) {
    .terminal {
        height: 90vh;
        border-radius: 0;
    }
    
    .terminal-body {
        font-size: 14px;
        padding: 12px;
    }
    
    #command-input {
        font-size: 14px;
    }
}
