/* Terminal Page Styles */

.terminal-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px);
    background: #0d1117;
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #161b22;
    border-bottom: 1px solid #30363d;
    flex-wrap: wrap;
    gap: 12px;
}

.terminal-header h1 {
    margin: 0;
    font-size: 16px;
    color: #c9d1d9;
    font-weight: 500;
}

.terminal-info {
    flex: 1;
    text-align: center;
}

.terminal-host {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #8b949e;
    background: #0d1117;
    padding: 4px 12px;
    border-radius: 4px;
}

.terminal-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.terminal-controls .btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    font-size: 12px;
}

.auto-scroll-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #8b949e;
    cursor: pointer;
    user-select: none;
}

.auto-scroll-toggle input[type="checkbox"] {
    cursor: pointer;
}

.terminal-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #0d1117;
}

.terminal-output {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    overflow-x: auto;
    font-family: 'Courier New', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.5;
    color: #c9d1d9;
    white-space: pre-wrap;
    word-wrap: break-word;
}

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

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

.terminal-output::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 5px;
}

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

.terminal-line {
    margin: 0;
    padding: 0;
    font-family: 'Courier New', 'Monaco', monospace;
}

.terminal-line.success {
    color: #3fb950;
}

.terminal-line.error {
    color: #f85149;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #161b22;
    border-top: 1px solid #30363d;
}

.terminal-prompt {
    color: #58a6ff;
    font-family: 'Courier New', 'Monaco', monospace;
    font-size: 14px;
    margin-right: 8px;
    font-weight: bold;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #c9d1d9;
    font-family: 'Courier New', 'Monaco', monospace;
    font-size: 14px;
    padding: 0;
}

.terminal-input::placeholder {
    color: #484f58;
}

.terminal-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 20px;
    background: #161b22;
    border-top: 1px solid #30363d;
    font-size: 11px;
    color: #8b949e;
}

.status-connected {
    color: #3fb950;
    font-size: 16px;
}

.status-disconnected {
    color: #f85149;
    font-size: 16px;
}

.status-connecting {
    color: #d29922;
    font-size: 16px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

#terminalInfo {
    font-family: 'Courier New', monospace;
    margin-left: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .terminal-header {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .terminal-info {
        text-align: left;
    }

    .terminal-controls {
        width: 100%;
        justify-content: space-between;
    }

    .terminal-output {
        font-size: 12px;
        padding: 12px;
    }

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