/* 
 * Modern Bash Console CSS
 * Simulates a bash/terminal emulator look for displaying text
 */

.bash-console {
    font-family: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', 'Consolas', 'Monaco', 'Andale Mono', monospace;
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.85) 0%, rgba(22, 33, 62, 0.85) 50%, rgba(15, 15, 35, 0.85) 100%);
    border: 1px solid rgba(51, 255, 51, 0.15);
    border-radius: 12px;
    padding: 0;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.7),
        0 0 40px rgba(0, 255, 0, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: fixed;
    overflow: hidden;
    width: 800px;
    height: 480px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    resize: none;
}

/* Terminal window title bar */
.bash-console::before {
    content: '';
    display: block;
    background: linear-gradient(180deg, rgba(45, 45, 68, 0.8) 0%, rgba(30, 30, 50, 0.8) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    height: 38px;
    border-radius: 12px 12px 0 0;
    position: relative;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Terminal window buttons (traffic lights) */
.bash-console::after {
    content: '';
    display: block;
    position: absolute;
    top: 12px;
    left: 16px;
    width: 12px;
    height: 12px;
    background: #ff5f56;
    border-radius: 50%;
    box-shadow:
        20px 0 #ffbd2e,
        40px 0 #27c93f;
    z-index: 1;
}

/* Terminal title text */
.bash-console .window-title {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 38px;
    line-height: 38px;
    text-align: center;
    color: rgba(255, 255, 255, 0.35);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    user-select: none;
    pointer-events: auto;
    z-index: 2;
    cursor: grab;
}

.bash-console .window-title:active {
    cursor: grabbing;
}

/* Terminal body content */
.bash-console .terminal-body {
    padding: 20px 24px 24px;
    color: #e0e0e0;
    font-size: 15px;
    line-height: 1.7;
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.05);
    position: relative;
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.2);
}

/* Subtle scan line effect */
.bash-console .terminal-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 0;
}

/* Ensure text is above scanlines */
.bash-console .terminal-body > * {
    position: relative;
    z-index: 1;
}

/* Prompt line - the bash prompt symbol */
.bash-console .prompt {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    margin: 0;
    padding: 0;
    word-break: break-word;
}

/* User@hostname prefix - appears first */
.bash-console .prompt::before {
    content: attr(data-user) '@' attr(data-host) ':';
    color: #00bfff;
    font-weight: 500;
    flex-shrink: 0;
    display: none;
}

.bash-console .prompt.show-user::before {
    display: inline;
}

/* Path/directory display in prompt */
.bash-console .prompt .path {
    color: #ff8c00;
    flex-shrink: 0;
    margin-left: 0;
    order: 1;
}

.bash-console .prompt .path::before {
    content: ' ';
    white-space: pre;
}

/* Prompt $ symbol - appears after the path */
.bash-console .prompt .path::after {
    content: '$';
    color: #33ff33;
    font-weight: 700;
    margin-left: 0;
    text-shadow: 0 0 10px rgba(51, 255, 51, 0.5);
}

.bash-console .prompt.root .path::after {
    content: '#';
    color: #ff3333;
    text-shadow: 0 0 10px rgba(255, 51, 51, 0.5);
}

/* Command text (what the user types) */
.bash-console .command {
    color: #ffffff;
    font-weight: 400;
    margin-left: 4px;
    order: 2;
}

/* Output text (what the terminal returns) */
.bash-console .output {
    color: #c0c0c0;
    margin: 0 0 4px 0;
    padding-left: 0;
}

.bash-console .output.dim {
    color: #888;
}

.bash-console .output.success {
    color: #33ff33;
}

.bash-console .output.error {
    color: #ff3333;
}

.bash-console .output.warning {
    color: #ffaa00;
}

.bash-console .output.info {
    color: #00bfff;
}

.bash-console .output.highlight {
    color: #ffffff;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

/* Blinking cursor animation */
.bash-console .cursor {
    display: inline-block;
    width: 8px;
    height: 17px;
    background: #33ff33;
    margin-left: 3px;
    animation: blinkCursor 1s step-end infinite;
    vertical-align: text-bottom;
    box-shadow: 0 0 8px rgba(51, 255, 51, 0.4);
}

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

/* Typing animation for commands */
.bash-console .type-command {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid transparent;
    animation:
        typing 2s steps(30, end) forwards,
        blinkCaret 0.75s step-end 3;
    max-width: fit-content;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blinkCaret {
    0%, 100% { border-color: transparent; }
    50% { border-color: #33ff33; }
}

/* Multi-line text block — pre-formatted code output */
.bash-console .code-block {
    font-family: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', 'Consolas', 'Monaco', 'Andale Mono', monospace;
    border-left: 3px solid rgba(51, 255, 51, 0.3);
    padding: 0 0 0 16px;
    margin: 6px 0;
    color: #b0b0b0;
    line-height: 1.5;
    font-size: 15px;
    background: none;
}

/* Directory/file listing styles */
.bash-console .ls-dir {
    color: #00bfff;
    font-weight: 500;
}

.bash-console .ls-file {
    color: #c0c0c0;
}

.bash-console .ls-exe {
    color: #33ff33;
}

.bash-console .ls-link {
    color: #70f0ff;
    font-style: italic;
}

/* Divider line */
.bash-console .divider {
    border: none;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    margin: 12px 0;
}

/* Typing effect container - each character appears */
.bash-console .typing-effect span {
    opacity: 0;
    animation: typeChar 0.05s forwards;
}

@keyframes typeChar {
    to { opacity: 1; }
}

/* Glow accent for special content */
.bash-console .glow {
    text-shadow: 0 0 20px rgba(51, 255, 51, 0.3);
}

/* Responsive */
@media (max-width: 640px) {
    .bash-console .terminal-body {
        padding: 14px;
        font-size: 13px;
        line-height: 1.5;
    }

    .bash-console .command,
    .bash-console .output,
    .bash-console .prompt {
        font-size: 13px;
    }

    .bash-console .cursor {
        height: 14px;
        width: 6px;
    }

    .bash-console .code-block {
        font-size: 12px;
        padding: 0 0 0 10px;
    }
}

/* Scrollbar styling for terminal */
.bash-console .terminal-body::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.bash-console .terminal-body::-webkit-scrollbar-track {
    background: transparent;
}

.bash-console .terminal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.bash-console .terminal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

