/* --- Professional Terminal UI --- */
.terminal-toggle {
    position: fixed;
    bottom: 3rem;
    left: 3rem;
    width: 5.5rem;
    height: 5.5rem;
    background: #000;
    border: 1px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    color: var(--primary);
    font-size: 2.4rem;
    box-shadow: 0 0 20px var(--primary-glow);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.terminal-toggle:hover {
    transform: scale(1.1) rotate(10deg);
    background: var(--primary);
    color: #000;
}

.terminal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    padding: 2rem;
}

.terminal-window {
    width: 100%;
    max-width: 850px;
    height: 550px;
    background: #0a0a0a;
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 50px 100px rgba(0,0,0,0.7);
    position: relative;
}

/* تأثير خطوط المسح Matrix/CRT */
.terminal-window::before {
    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.25) 50%),
                linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 10;
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
}

.terminal-header {
    background: #151515;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.t-controls { display: flex; gap: 1rem; }
.t-dot { width: 12px; height: 12px; border-radius: 50%; }
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; cursor: pointer; }

.t-title { font-family: var(--font-mono); font-size: 1.1rem; color: #666; }

.terminal-body {
    flex: 1;
    padding: 2.5rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.5rem;
    color: #00ffcc;
    overflow-y: auto;
    position: relative;
}

/* تخصيص السكرول بار داخل التيرمينال */
.terminal-body::-webkit-scrollbar { width: 6px; }
.terminal-body::-webkit-scrollbar-track { background: transparent; }
.terminal-body::-webkit-scrollbar-thumb { background: #222; border-radius: 10px; }

.t-prompt { color: var(--primary); font-weight: bold; margin-right: 1rem; }
.t-input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: inherit;
    font-size: inherit;
    width: 100%;
}

.t-output { margin-bottom: 1.5rem; white-space: pre-wrap; color: #ccc; }
.t-keyword { color: var(--primary); font-weight: bold; }
.t-command-line { display: flex; align-items: center; }

@media (max-width: 768px) {
    .terminal-window { height: 80vh; }
    .terminal-toggle { bottom: 2rem; left: 2rem; width: 4.5rem; height: 4.5rem; }
}
