/* ============================================================
   TERMINAL WINDOW — old-school Windows terminal x cybersecurity
   Reuses the existing XP window chrome (header/controls/drag).
   ============================================================ */

.terminal-window {
    width: 720px;
    height: 460px;
    min-width: 360px;
    min-height: 240px;
    background: rgba(4, 10, 22, 0.97);
    border: 2px solid #fff;
    box-shadow: 4px 4px 0 #000, 0 0 22px rgba(0, 180, 255, 0.18);
    animation: terminalGlow 6s ease-in-out infinite;
}

@keyframes terminalGlow {
    0%, 100% { box-shadow: 4px 4px 0 #000, 0 0 16px rgba(0, 180, 255, 0.12); }
    50%      { box-shadow: 4px 4px 0 #000, 0 0 26px rgba(0, 220, 255, 0.30); }
}

/* Terminal body */
.terminal {
    height: calc(100% - 27px);
    box-sizing: border-box;
    background: rgba(3, 8, 18, 0.93);
    border: 1px inset #0a2a4a;
    box-shadow: inset 0 0 26px rgba(0, 0, 0, 0.85), inset 0 0 60px rgba(0, 60, 120, 0.25);
    color: #cde6ff;
    font-family: 'Consolas', 'Lucida Console', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.45;
    padding: 8px 12px 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.terminal-output {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    word-break: break-word;
}

.terminal-output::-webkit-scrollbar { width: 12px; }
.terminal-output::-webkit-scrollbar-track { background: #060d18; }
.terminal-output::-webkit-scrollbar-thumb { background: #1c3b5e; border: 1px solid #0a1c30; }
.terminal-output::-webkit-scrollbar-thumb:hover { background: #2a5580; }

.terminal-line {
    white-space: pre-wrap;
    word-break: break-word;
}

.terminal-cmd-line {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
}

.terminal-prompt {
    color: #5aff8a;
    text-shadow: 0 0 6px rgba(0, 255, 110, 0.55);
    white-space: pre;
}

.terminal-cmd-text {
    color: #f2f8ff;
}

.terminal-head       { color: #7ec8ff; text-shadow: 0 0 8px rgba(90, 180, 255, 0.5); }
.terminal-green      { color: #7cffa0; text-shadow: 0 0 6px rgba(0, 255, 120, 0.35); }
.terminal-cyan       { color: #66e0ff; }
.terminal-dim        { color: #8fa3ad; }
.terminal-neofetch   { color: #76ff9c; text-shadow: 0 0 6px rgba(0, 255, 120, 0.30); white-space: pre; }

.terminal-input-line {
    flex: 0 0 auto;
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding-top: 4px;
    border-top: 1px solid rgba(90, 180, 255, 0.18);
    margin-top: 4px;
}

.terminal-input-line .terminal-prompt {
    flex: 0 0 auto;
}

#terminalInput {
    flex: 1 1 auto;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: #e8f6ff;
    font-family: inherit;
    font-size: inherit;
    caret-color: #6aff8e;
    padding: 0;
    margin: 0;
}

#terminalInput::selection {
    background: rgba(90, 180, 255, 0.35);
}

/* ============================================================
   MOBILE / RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .terminal-window {
        min-width: 0;
        min-height: 0;
    }
    .terminal {
        font-size: 12px;
        padding: 6px 8px 8px;
    }
    .terminal-output {
        font-size: 12px;
    }
    /* 16px avoids iOS auto-zoom on focus */
    #terminalInput {
        font-size: 16px;
    }
    .terminal-neofetch {
        font-size: 11px;
    }
}