:root {
    --terminal-bg: #1e1e1e;
    --terminal-header-bg: #303030;
    --terminal-text: rgba(255, 255, 255, 0.87);
    --terminal-prompt: #3cd670;
    --terminal-cursor: #ffffff;
    --terminal-shadow: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
}

body {
    background-color: #f0f0f0;
    color: var(--terminal-text);
    line-height: 1.5;
    font-weight: 400;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

#app {
    width: 100%;
    max-width: 740px;
}

.terminal-container {
    width: 100%;
    height: 500px;
    background-color: var(--terminal-bg);
    border-radius: 8px;
    box-shadow: 0 10px 25px var(--terminal-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.terminal-header {
    background-color: var(--terminal-header-bg);
    height: 32px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    position: relative;
}

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

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: block;
}

.terminal-button.close {
    background-color: #ff5f56;
}

.terminal-button.minimize {
    background-color: #ffbd2e;
}

.terminal-button.maximize {
    background-color: #27c93f;
}

.terminal-title {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 14px;
    color: var(--terminal-text);
    opacity: 0.8;
    pointer-events: none;
}

.terminal-body {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

#terminal-output {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 10px;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    position: relative;
}

.terminal-prompt {
    color: var(--terminal-prompt);
    margin-right: 8px;
}

#terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--terminal-text);
    font-size: 14px;
    outline: none;
    caret-color: transparent;
}

.terminal-cursor {
    position: absolute;
    width: 8px;
    height: 16px;
    background-color: var(--terminal-cursor);
    left: 24px;
    animation: blink 1s infinite;
    display: inline-block;
    pointer-events: none;
}

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

.output-line {
    margin-bottom: 6px;
    white-space: pre-wrap;
    word-break: break-word;
}

.user-input {
    color: var(--terminal-text);
}

.system-output {
    color: var(--terminal-text);
}

.error-output {
    color: #ff5f5f;
}

.success-output {
    color: #27c93f;
}

.info-output {
    color: #3b82f6;
}

.warning-output {
    color: #f97316;
}

.game-choice {
    color: #ffbd2e;
}

.typing {
    position: relative;
    display: inline-block;
}

.typing::after {
    content: '▌';
    animation: cursor 0.8s infinite;
}

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

.copyright {
    text-align: center;
    color: #666;
    margin-top: 1rem;
    font-size: 0.875rem;
}

@media (max-width: 600px) {
    .terminal-container {
        height: 80vh;
    }

    .terminal-title {
        font-size: 12px;
    }
}