/* --- Terminal OS Easter Egg --- */
#os-terminal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 50vh;
    background: rgba(0, 8, 12, 0.95);
    border-bottom: 2px solid #00ffff;
    z-index: 9998;
    color: #00ffff;
    font-family: var(--font-tech);
    padding: 20px;
    display: flex;
    flex-direction: column;
    /* Translate slightly more than 100% to account for borders/mobile viewport quirks */
    transform: translateY(calc(-100% - 10px));
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, visibility 0s linear 0.4s;
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0);
}

#os-terminal.open {
    visibility: visible;
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, visibility 0s linear 0s;
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.1);
}

#os-output {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    scrollbar-width: none;
}

#os-output::-webkit-scrollbar {
    display: none;
}

.os-line {
    margin-bottom: 5px;
    font-size: 0.9rem;
    word-break: break-all;
    white-space: pre-wrap;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

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

.os-line.muted {
    color: #008b8b;
    text-shadow: none;
}

.os-line.warning {
    color: var(--accent-amber);
    text-shadow: 0 0 5px rgba(255, 179, 0, 0.5);
}

.os-input-container {
    display: flex;
    align-items: center;
    position: relative;
    font-size: 1rem;
}

.os-prompt {
    margin-right: 10px;
    color: #00ffff;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

#os-input {
    background: transparent;
    border: none;
    outline: none;
    color: transparent !important;
    caret-color: #00ffff;
    font-family: var(--font-tech);
    font-size: 1rem;
    z-index: 2;
    position: relative;
}

.os-input-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    color: #00ffff;
    font-family: var(--font-tech);
    font-size: 1rem;
    display: flex;
    align-items: center;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
    white-space: pre;
}