/* Terminal Window Modal Styles */
.terminal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none;
    pointer-events: none;
}

.terminal-overlay.show {
    display: block;
    pointer-events: auto;
}

.terminal-window {
    background: #1e1e1e;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 90vw;
    height: 80vh;
    max-width: 1400px;
    max-height: 900px;
    min-width: 400px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    top: 10vh;
    left: 5vw;
    transition: none;
    will-change: transform;
}

.terminal-titlebar {
    background: #333;
    height: 30px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    cursor: move;
    user-select: none;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
    margin-right: 10px;
}

.terminal-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    outline: none;
}

.terminal-btn.close { background: #ff5f57; }
.terminal-btn.minimize { background: #ffbd2e; }
.terminal-btn.maximize { background: #28ca42; }

.terminal-btn:hover {
    opacity: 0.8;
}

.terminal-title {
    color: #fff;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    flex: 1;
    text-align: center;
    margin-right: 50px; /* Account for buttons */
}

.terminal-content {
    flex: 1;
    background: #1e1e1e;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    overflow: hidden;
    position: relative;
}

#terminal {
    width: 100%;
    height: 100%;
    padding: 10px;
    box-sizing: border-box;
    background: transparent;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.2;
    overflow-y: auto;
}

/* jQuery Terminal Overrides */
.terminal-window .terminal {
    background: transparent !important;
    border: none !important;
    color: #00ff00 !important;
    font-family: 'Courier New', monospace !important;
    font-size: 14px !important;
    padding: 0 !important;
    margin: 0 !important;
}

.terminal-window .terminal .terminal-output {
    color: #00ff00 !important;
}

.terminal-window .terminal .terminal-output .terminal-error {
    color: #ff6b6b !important;
}

.terminal-window .terminal .cmd {
    color: #00ff00 !important;
}

.terminal-window .terminal .terminal-cursor {
    background: #00ff00 !important;
}

.terminal-window .figlet-art {
    color: #00ff00;
    font-family: monospace;
    font-size: 12px;
    line-height: 1;
    margin: 0 0 10px 0;
    white-space: pre;
}

/* Draggable functionality */
.terminal-window.dragging {
    user-select: none;
    transition: none !important;
    cursor: move;
}

.terminal-window:not(.dragging) {
    transition: opacity 0.2s ease-out;
}

/* Hide scrollbars but keep functionality */
.terminal-content::-webkit-scrollbar {
    width: 8px;
}

.terminal-content::-webkit-scrollbar-track {
    background: #2d2d2d;
}

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

.terminal-content::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* Responsive design */
@media (max-width: 768px) {
    .terminal-window {
        width: 95%;
        height: 80%;
        min-width: 300px;
    }
    
    .terminal-content {
        font-size: 12px;
    }
    
    .terminal-window .figlet-art {
        font-size: 10px;
    }
}

/* Animation for window appearance */
.terminal-window {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.terminal-overlay.show .terminal-window {
    opacity: 1;
}