:root {
    --bg: #1a1b26;
    --bg-alt: #24283b;
    --bg-dark: #16161e;
    --fg: #c0caf5;
    --fg-bright: #e0eafc;
    --prompt: #7aa2f7;
    --error: #ff757f;
    --warning: #ffdb6e;
    --success: #9ece6a;
    --directory: #7dcfff;
    --link: #7aa2f7;
    --string: #9ece6a;
    --keyword: #bb9af7;
    --function: #82aaff;
    --number: #ff9e64;
    --comment: #565f89;
    --border: #3b4261;
    --font: 'Fira Code', 'Consolas', 'Monaco', monospace;
}

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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--fg);
    font-size: 20px;
    line-height: 1.6;
}

.terminal {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.status-bar {
    height: 36px;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    font-size: 14px;
    flex-shrink: 0;
}

.status-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-bar {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-item.mode {
    color: var(--warning);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-link {
    background: none;
    border: none;
    color: var(--fg);
    font-family: var(--font);
    font-size: 28px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.nav-link:hover {
    background: var(--bg-alt);
    color: var(--fg-bright);
}

.nav-link[data-action*="cd"] {
    color: var(--directory);
}

.nav-link[data-action*="curl"] {
    color: var(--link);
}

.nav-link.chat {
    color: var(--success);
}

.nav-link.home {
    color: var(--fg-muted);
}

.nav-link.home:hover {
    color: var(--fg-bright);
}

.terminal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.output-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
}

.output-wrapper::-webkit-scrollbar {
    width: 8px;
}

.output-wrapper::-webkit-scrollbar-track {
    background: var(--bg);
}

.output-wrapper::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.output-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--comment);
}

.output {
    white-space: pre-wrap;
}

.output .command {
    color: var(--fg-bright);
    font-weight: 600;
}

.output .result {
    color: var(--fg-bright);
}

.output .error {
    color: var(--error);
    font-weight: 700;
}

.output .directory {
    color: var(--directory);
    font-weight: 700;
}

.output .file {
    color: var(--fg-bright);
}

.output .url-file {
    color: var(--function);
    font-weight: 600;
}

.output .prompt-text {
    color: var(--prompt);
    font-weight: 700;
}

.output .warning {
    color: var(--warning);
    font-weight: 600;
}

.output .success {
    color: var(--success);
    font-weight: 600;
}

.output .string {
    color: var(--string);
    font-weight: 600;
}

.input-area {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.prompt {
    color: var(--prompt);
    margin-right: 10px;
    white-space: nowrap;
    font-weight: 700;
    font-size: 20px;
}

#commandInput {
    background: transparent;
    border: none;
    color: var(--fg-bright);
    font-family: var(--font);
    font-size: 20px;
    flex: 1;
    outline: none;
    caret-color: var(--prompt);
    min-width: 0;
}

@media (max-width: 600px) {
    .output-wrapper {
        padding: 12px;
    }

    .input-area {
        padding: 10px 12px;
    }

    .nav-bar {
        gap: 8px;
    }

    .nav-link {
        padding: 4px 6px;
        font-size: 20px;
    }
}
