/* ===========================
   FULL TERMINAL THEME
   =========================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-black: #000000;
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --terminal-bg: rgba(10, 10, 10, 0.98);
    --green-primary: #00ff41;
    --green-glow: #00ff41;
    --green-dim: #00cc33;
    --green-dark: #008822;
    --red-alert: #ff0040;
    --blue-cyber: #00d9ff;
    --text-primary: #00ff41;
    --text-secondary: #00cc33;
    --text-dim: #008822;
    --border-color: #00ff41;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

body {
    font-family: 'JetBrains Mono', 'Space Mono', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-black);
    position: relative;
}

/* ===========================
   Matrix Background
   =========================== */

#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.08;
    pointer-events: none;
}

/* ===========================
   Fullscreen Terminal
   =========================== */

.fullscreen-terminal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--terminal-bg);
    border: 2px solid var(--border-color);
    box-shadow:
        0 0 30px rgba(0, 255, 65, 0.4),
        inset 0 0 100px rgba(0, 255, 65, 0.03);
    display: flex;
    flex-direction: column;
    z-index: 1;
}

/* ===========================
   Terminal Bar (Top)
   =========================== */

.terminal-bar {
    background: var(--bg-darker);
    border-bottom: 2px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.terminal-buttons {
    display: flex;
    gap: 0.5rem;
}

.terminal-buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid var(--green-dim);
}

.btn-close {
    background: var(--red-alert);
    box-shadow: 0 0 5px var(--red-alert);
    cursor: pointer;
}

.btn-minimize {
    background: #ffd700;
    box-shadow: 0 0 5px #ffd700;
}

.btn-maximize {
    background: var(--green-primary);
    box-shadow: 0 0 5px var(--green-primary);
}

.terminal-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    flex: 1;
    text-align: center;
}

.terminal-info {
    display: flex;
    gap: 1rem;
}

.info-item {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ===========================
   Terminal Content
   =========================== */

.terminal-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    font-family: 'JetBrains Mono', monospace;
}

/* Custom scrollbar */
.terminal-content::-webkit-scrollbar {
    width: 10px;
}

.terminal-content::-webkit-scrollbar-track {
    background: var(--bg-black);
}

.terminal-content::-webkit-scrollbar-thumb {
    background: var(--green-dark);
    border: 1px solid var(--green-primary);
}

.terminal-content::-webkit-scrollbar-thumb:hover {
    background: var(--green-primary);
    box-shadow: 0 0 10px var(--green-glow);
}

/* ===========================
   System Info Box
   =========================== */

.system-info {
    color: var(--green-primary);
    margin-bottom: 2rem;
    font-size: 0.875rem;
    animation: fadeIn 0.5s ease;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.4;
    white-space: pre;
}

.info-highlight {
    color: var(--blue-cyber);
    font-weight: 700;
    text-shadow: 0 0 10px var(--blue-cyber);
}

.status-active {
    color: var(--green-primary);
    text-shadow: 0 0 5px var(--green-glow);
    animation: pulse 2s infinite;
}

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

/* ===========================
   Terminal Output
   =========================== */

#terminal-output {
    flex: 1;
    margin-bottom: 1rem;
}

.output-line {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    animation: fadeIn 0.2s ease;
}

.output-line .prompt {
    color: var(--green-primary);
    font-weight: 700;
    text-shadow: 0 0 5px var(--green-glow);
}

.output-line .command {
    color: var(--blue-cyber);
}

.output-header {
    color: var(--green-primary);
    font-weight: 700;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.output-error {
    color: var(--red-alert);
}

.output-line a {
    color: var(--blue-cyber);
    text-decoration: underline;
    transition: all 0.3s ease;
}

.output-line a:hover {
    color: var(--green-primary);
    text-shadow: 0 0 10px var(--green-glow);
    text-decoration: none;
}

.clickable-cmd {
    color: var(--blue-cyber);
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    transition: all 0.3s ease;
}

.clickable-cmd:hover {
    color: var(--green-primary);
    text-shadow: 0 0 10px var(--green-glow);
    text-decoration: none;
}


/* ===========================
   Terminal Input Line
   =========================== */

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
    margin-top: auto;
}

.prompt {
    color: var(--green-primary);
    font-weight: 700;
    text-shadow: 0 0 5px var(--green-glow);
    flex-shrink: 0;
    margin-right: 0.5rem;
}

#terminal-input-text {
    color: var(--green-primary);
    display: inline;
}

.prediction-text {
    color: var(--green-dark);
    opacity: 0.5;
    display: inline;
}

/* ===========================
   Blinking Cursor
   =========================== */

.cursor-blink {
    color: var(--green-primary);
    animation: blink 1s infinite;
    font-weight: 700;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* ===========================
   Animations
   =========================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===========================
   Selection
   =========================== */

::selection {
    background: var(--green-primary);
    color: var(--bg-black);
}

::-moz-selection {
    background: var(--green-primary);
    color: var(--bg-black);
}

/* ===========================
   Mobile Input (Hidden)
   =========================== */

#mobile-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    left: -9999px;
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .terminal-content {
        padding: 1rem;
        font-size: 14px;
    }

    .system-info {
        font-size: 0.85rem;
    }

    .terminal-title {
        font-size: 0.7rem;
    }

    .terminal-info {
        display: none;
    }

    .terminal-bar {
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .terminal-content {
        padding: 0.75rem;
        font-size: 13px;
    }

    .system-info {
        font-size: 0.75rem;
    }
}

/* ===========================
   Print Styles
   =========================== */

@media print {
    #matrix-bg {
        display: none;
    }

    .fullscreen-terminal {
        border: 1px solid #000;
        box-shadow: none;
    }

    .terminal-content {
        overflow: visible;
    }
}

/* Admin message styling - glowing cyan/blue */
.output-admin {
    color: var(--blue-cyber);
    text-shadow: 0 0 8px rgba(0, 217, 255, 0.6);
    padding-left: 1rem;
    border-left: 2px solid var(--blue-cyber);
    animation: adminGlow 2s ease-in-out infinite;
}

@keyframes adminGlow {
    0%, 100% {
        text-shadow: 0 0 8px rgba(0, 217, 255, 0.6);
        border-left-color: var(--blue-cyber);
    }
    50% {
        text-shadow: 0 0 15px rgba(0, 217, 255, 0.9);
        border-left-color: rgba(0, 217, 255, 0.8);
    }
}
