/* ============================================
   Windows93 - Terminal (MS-DOS Prompt) Styles
   ============================================ */

.terminal-app {
    background: var(--win-black);
    font-family: var(--font-mono);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.terminal-app .window-content {
    background: var(--win-black);
}

/* Terminal Tabs - Windows 93 Style */
.terminal-tabs {
    display: flex;
    background: var(--win-gray);
    border-bottom: 1px solid var(--win-btn-shadow);
    padding: 2px;
}

.terminal-tab {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: 11px;
    color: var(--win-black);
    background: var(--win-gray);
    border: 2px solid;
    border-color: var(--win-btn-highlight) var(--win-btn-dark-shadow) var(--win-btn-dark-shadow) var(--win-btn-highlight);
    border-bottom: none;
    cursor: pointer;
    position: relative;
    top: 1px;
}

.terminal-tab:hover {
    background: var(--win-gray-light);
}

.terminal-tab.active {
    background: var(--win-black);
    color: #c0c0c0;
    border-bottom: 2px solid var(--win-black);
}

.terminal-tab-close {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    opacity: 0;
}

.terminal-tab:hover .terminal-tab-close {
    opacity: 1;
}

.terminal-tab-close:hover {
    background: var(--win-selection);
    color: var(--win-white);
}

.terminal-new-tab {
    padding: 2px 8px;
    color: var(--win-black);
    cursor: pointer;
    font-size: 14px;
}

.terminal-new-tab:hover {
    background: var(--win-selection);
    color: var(--win-white);
}

/* Terminal Output Area */
.terminal-output {
    flex: 1;
    padding: 4px 8px;
    overflow-y: auto;
    overflow-x: hidden;
    font-size: 14px;
    line-height: 1.4;
    color: #c0c0c0;
    background: var(--win-black);
}

/* Terminal Lines */
.terminal-line {
    white-space: pre-wrap;
    word-break: break-all;
}

.terminal-line.input-line {
    display: flex;
    flex-wrap: wrap;
}

/* DOS-style Prompt styling */
.terminal-prompt {
    color: #c0c0c0;
}

.terminal-prompt-user {
    color: #55ff55;
}

.terminal-prompt-at {
    color: #c0c0c0;
}

.terminal-prompt-host {
    color: #ffff55;
}

.terminal-prompt-path {
    color: #55ffff;
}

.terminal-prompt-symbol {
    color: #c0c0c0;
}

/* Terminal Input */
.terminal-input-wrapper {
    display: inline;
}

.terminal-input {
    background: transparent;
    border: none;
    color: #c0c0c0;
    font-family: inherit;
    font-size: inherit;
    outline: none;
    width: auto;
    min-width: 10px;
    caret-color: #c0c0c0;
    padding: 0;
}

/* DOS Block Cursor */
.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: #c0c0c0;
    animation: dosCursor 0.5s step-end infinite;
    vertical-align: text-bottom;
}

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

/* Output colors - DOS style */
.terminal-output .success {
    color: #55ff55;
}

.terminal-output .error {
    color: #ff5555;
}

.terminal-output .warning {
    color: #ffff55;
}

.terminal-output .info {
    color: #55ffff;
}

.terminal-output .muted {
    color: #808080;
}

/* Neofetch styling - Retro */
.neofetch-output {
    display: flex;
    gap: 16px;
    font-size: 12px;
    line-height: 1.2;
}

.neofetch-ascii {
    color: #ffff55;
    white-space: pre;
    flex-shrink: 0;
}

.neofetch-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.neofetch-title {
    color: #55ff55;
    font-weight: bold;
}

.neofetch-separator {
    color: #808080;
}

.neofetch-label {
    color: #ff5555;
    font-weight: bold;
}

.neofetch-value {
    color: #c0c0c0;
}

.neofetch-colors {
    display: flex;
    margin-top: 8px;
}

.neofetch-color-block {
    width: 24px;
    height: 16px;
}

/* Htop styling - DOS */
.htop-output {
    font-size: 12px;
}

.htop-header {
    background: #000080;
    color: #ffffff;
    padding: 2px 4px;
    margin-bottom: 4px;
}

.htop-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0;
}

.htop-bar-label {
    width: 50px;
    color: #55ffff;
}

.htop-bar-track {
    flex: 1;
    height: 12px;
    background: #404040;
    border: 1px solid #808080;
}

.htop-bar-fill {
    height: 100%;
}

.htop-bar-fill.cpu {
    background: #55ff55;
}

.htop-bar-fill.mem {
    background: #55ffff;
}

.htop-process-list {
    margin-top: 8px;
    font-size: 11px;
}

.htop-process-header {
    display: grid;
    grid-template-columns: 50px 80px 60px 60px 1fr;
    gap: 4px;
    padding: 2px 4px;
    background: #000080;
    color: #ffffff;
}

.htop-process-row {
    display: grid;
    grid-template-columns: 50px 80px 60px 60px 1fr;
    gap: 4px;
    padding: 2px 4px;
    border-bottom: 1px solid #404040;
}

.htop-process-row:hover {
    background: #000080;
    color: #ffffff;
}

/* Matrix animation - Green DOS style */
.matrix-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--win-black);
    overflow: hidden;
}

.matrix-column {
    position: absolute;
    top: 0;
    color: #55ff55;
    font-size: 14px;
    writing-mode: vertical-rl;
    text-orientation: upright;
    animation: matrixFall linear infinite;
    text-shadow: 0 0 5px #55ff55;
}

@keyframes matrixFall {
    from { transform: translateY(-100%); }
    to { transform: translateY(100vh); }
}

/* Cowsay */
.cowsay-output {
    white-space: pre;
    font-size: 12px;
    color: #c0c0c0;
}

/* SL (Steam Locomotive) */
.sl-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--win-black);
    overflow: hidden;
    display: flex;
    align-items: center;
}

.sl-train {
    white-space: pre;
    font-size: 10px;
    color: #c0c0c0;
    animation: slMove 4s linear;
}

@keyframes slMove {
    from { transform: translateX(100vw); }
    to { transform: translateX(-100%); }
}

/* Autocomplete dropdown - Windows 93 */
.terminal-autocomplete {
    position: absolute;
    background: var(--win-gray);
    border: 2px solid;
    border-color: var(--win-btn-highlight) var(--win-btn-dark-shadow) var(--win-btn-dark-shadow) var(--win-btn-highlight);
    max-height: 150px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}

.autocomplete-item {
    padding: 2px 8px;
    cursor: pointer;
    font-size: 11px;
    color: var(--win-black);
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background: var(--win-selection);
    color: var(--win-white);
}

.autocomplete-item .match {
    color: #ff0000;
    font-weight: bold;
}

/* Vim mode - DOS style */
.vim-mode {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--win-black);
}

.vim-content {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.2;
    padding: 0;
    overflow: auto;
    color: #c0c0c0;
}

.vim-line {
    display: flex;
}

.vim-line-number {
    width: 40px;
    text-align: right;
    padding-right: 8px;
    color: #808080;
    user-select: none;
    flex-shrink: 0;
}

.vim-line-content {
    flex: 1;
    white-space: pre;
}

.vim-cursor {
    background: #c0c0c0;
    color: var(--win-black);
}

.vim-statusbar {
    display: flex;
    justify-content: space-between;
    padding: 2px 4px;
    background: #000080;
    color: #ffffff;
    font-size: 12px;
}

.vim-mode-indicator {
    color: #ffffff;
    font-weight: bold;
}

.vim-command-line {
    padding: 2px 4px;
    background: var(--win-black);
    color: #c0c0c0;
    font-size: 12px;
}
