/* Global Terminal Styles */

#global-terminal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    animation: terminalFadeIn 0.2s ease-out forwards;
}

#global-terminal-overlay.active {
    display: flex;
}

#global-terminal-window {
    width: 90%;
    max-width: 1000px;
    height: 80%;
    background: rgba(8, 8, 8, 0.9);
    border: 1px solid var(--main-color, #72b6ff);
    border-radius: 4px; /* was 8px */
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.9), 
        0 0 20px rgba(var(--dropdown-color, 114, 182, 255), 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Terminus', 'Courier New', monospace;
    position: relative;
}

.term-header {
    background: rgba(20, 20, 20, 0.8);
    border-bottom: 1px solid var(--main-color, #72b6ff);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--main-color, #72b6ff);
    user-select: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.term-header .term-title {
    font-weight: bold;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.term-header .term-close {
    cursor: pointer;
    font-weight: bold;
    padding: 2px 10px;
    border: 1px solid var(--main-color, #72b6ff);
    background: rgba(var(--dropdown-color, 114, 182, 255), 0.1);
    border-radius: 2px;
    transition: all 0.2s;
}

.term-header .term-close:hover {
    background: var(--main-color, #72b6ff);
    color: #000;
}

.term-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    color: var(--main-color, #72b6ff);
    display: flex;
    flex-direction: column;
    font-size: 1.5rem; /* was 1.4rem */
    line-height: 1.6;
    text-shadow: 0 0 8px rgba(var(--dropdown-color, 114, 182, 255), 0.4);
}

.term-output {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.term-line {
    word-break: break-word;
}

.term-line.system {
    opacity: 0.8;
    font-style: italic;
}

.term-line.error {
    color: #ff5555;
    text-shadow: 0 0 5px rgba(255,0,0,0.5);
}

.term-input-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.term-prompt {
    font-weight: bold;
    white-space: nowrap;
}

.term-input {
    background: transparent;
    border: none;
    color: var(--main-color, #72b6ff);
    font-family: inherit;
    font-size: inherit;
    flex: 1;
    outline: none;
    text-shadow: inherit;
}

/* Blinking Cursor Simulation */
.term-input::after {
    content: "_";
    animation: term-blink 1s step-end infinite;
}

@keyframes term-blink {
    from, to { color: transparent; }
    50% { color: var(--main-color); }
}

/* Custom scrollbar for terminal */
.term-body::-webkit-scrollbar {
    width: 8px;
}
.term-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}
.term-body::-webkit-scrollbar-thumb {
    background: var(--main-color, #72b6ff);
    border-radius: 4px;
}

@keyframes terminalFadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* Scanline effect */
.term-body::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%);
    background-size: 100% 4px;
    z-index: 2;
    pointer-events: none;
}
