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

body {
    font-family: 'Courier New', monospace;
    background: #000;
    min-height: 100vh;
    padding: 1rem;
    overflow: hidden;
    margin: 0;
}

.terminal-container {
    width: 100%;
    height: 100vh;
    background: #000;
    display: flex;
    flex-direction: column;
}

.terminal-body {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #000;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.4;
}

.output {
    margin-bottom: 1rem;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.input-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    position: relative;
}

.prompt {
    color: #00ff00;
    font-weight: bold;
    user-select: none;
    flex-shrink: 0;
}

.terminal-input {
    background: transparent;
    border: none;
    color: #00ff00;
    font-family: inherit;
    font-size: inherit;
    outline: none;
    flex: 1;
    min-width: 50px;
    caret-color: transparent;
    position: relative;
    z-index: 2;
    white-space: pre;
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 1.2em;
    background: #00ff00;
    animation: blink 1s infinite;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    pointer-events: none;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.command-output {
    margin: 0.5rem 0;
    padding: 0.25rem 0;
}

.error {
    color: #ff6b6b;
}

.success {
    color: #51cf66;
}

.info {
    color: #74c0fc;
}

.warning {
    color: #ffd43b;
}

.game-area {
    background: #111;
    border: 1px solid #333;
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: 4px;
    font-family: monospace;
}

.ascii-art {
    color: #00ff00;
    font-size: 0.75rem;
    line-height: 1.2;
    white-space: pre;
    overflow-x: auto;
}

.help-section {
    margin: 1rem 0;
}

.help-category {
    color: #ffd43b;
    font-weight: bold;
    margin: 0.5rem 0 0.25rem 0;
}

.help-command {
    margin-left: 1rem;
    color: #00ff00;
}

.help-desc {
    margin-left: 2rem;
    color: #888;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    body {
        padding: 0.5rem;
    }
    
    .terminal-container {
        height: 95vh;
        max-height: none;
        border-radius: 8px;
    }
    
    .terminal-header {
        padding: 0.5rem 0.75rem;
    }
    
    .terminal-body {
        padding: 0.75rem;
        font-size: 0.8rem;
    }
    
    .button {
        width: 10px;
        height: 10px;
    }
    
    .terminal-title {
        font-size: 0.75rem;
    }
    
    .cursor {
        width: 6px;
    }
}

@media (max-width: 480px) {
    .terminal-body {
        font-size: 0.75rem;
        padding: 0.5rem;
    }
    
    .terminal-header {
        padding: 0.4rem 0.6rem;
    }
    
    .input-line {
        gap: 0.25rem;
    }
    
    .terminal-input {
        min-width: 30px;
    }
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}