/* Terminal Mode Styles */

/* Terminal Overlay */
.terminal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.terminal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Terminal Window */
.terminal-window {
    width: 90%;
    max-width: 900px;
    height: 80%;
    max-height: 600px;
    background: #0a0a0a;
    border: 2px solid #333;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 40px rgba(0, 255, 0, 0.1);
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* Terminal Header */
.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
    border-radius: 6px 6px 0 0;
}

.terminal-title {
    color: #0f0;
    font-size: 14px;
}

.terminal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 0 8px;
    line-height: 1;
    transition: color 0.2s;
}

.terminal-close:hover {
    color: #f00;
}

/* Terminal Tabs */
.terminal-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 16px;
    background: #111;
    border-bottom: 1px solid #333;
}

.terminal-tab {
    padding: 6px 12px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    color: #888;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.terminal-tab:hover {
    background: #252525;
    color: #0f0;
    border-color: #0f0;
}

.terminal-tab.active {
    background: #0f0;
    color: #000;
    border-color: #0f0;
    font-weight: bold;
}

/* Terminal Body */
.terminal-body {
    flex: 1;
    padding: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.terminal-output {
    flex: 1;
    overflow-y: auto;
    color: #0f0;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

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

.terminal-output::-webkit-scrollbar-track {
    background: #0a0a0a;
}

.terminal-output::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.terminal-output::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Terminal Input */
.terminal-input-line {
    display: flex;
    align-items: center;
    margin-top: 8px;
}

.terminal-prompt {
    color: #0f0;
    font-size: 14px;
    white-space: nowrap;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    caret-color: #0f0;
}

.terminal-input::placeholder {
    color: #444;
}

/* Terminal Line */
.terminal-line {
    margin-bottom: 2px;
}

/* Terminal Colors */
.terminal-green {
    color: #0f0;
}

.terminal-red {
    color: #f44;
}

.terminal-yellow {
    color: #ff0;
}

.terminal-blue {
    color: #4af;
}

.terminal-dim {
    color: #666;
}

.terminal-ascii {
    display: block;
    color: #0f0;
    font-size: 12px;
    line-height: 1.2;
}

/* Blinking cursor effect */
.terminal-input {
    animation: blink-caret 1s step-end infinite;
}

@keyframes blink-caret {

    from,
    to {
        border-right: 2px solid transparent;
    }

    50% {
        border-right: 2px solid #0f0;
    }
}

/* Scanlines effect (subtle) */
.terminal-window::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0.15),
            rgba(0, 0, 0, 0.15) 1px,
            transparent 1px,
            transparent 2px);
    pointer-events: none;
    border-radius: 8px;
    opacity: 0.5;
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .terminal-window {
        width: 95%;
        height: 90%;
        max-height: none;
        border-radius: 0;
    }

    .terminal-output,
    .terminal-prompt,
    .terminal-input {
        font-size: 12px;
    }

    .terminal-ascii {
        font-size: 8px;
    }
}