/* Secret Terminal Styles */

.terminal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 100000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.terminal-overlay.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
}

.terminal-container {
    width: 100%;
    max-width: 1000px;
    height: 80vh;
    margin: auto;
    background: #0a0a0a;
    border: 2px solid #00ff00;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.3),
        inset 0 0 50px rgba(0, 255, 0, 0.05);
    position: relative;
    overflow: hidden;
}

/* CRT Scanlines Effect */
.terminal-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        transparent 50%,
        rgba(0, 0, 0, 0.25) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 10;
}

/* CRT Flicker */
.terminal-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 255, 0, 0.03);
    pointer-events: none;
    animation: crt-flicker 0.15s infinite;
    z-index: 11;
}

@keyframes crt-flicker {
    0%, 100% { opacity: 0.03; }
    50% { opacity: 0.05; }
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #1a1a1a;
    border-bottom: 1px solid #00ff00;
}

.terminal-title {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    color: #00ff00;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.terminal-title::before {
    content: '>';
    animation: blink 1s infinite;
}

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

.terminal-btn {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.terminal-btn:hover {
    transform: scale(1.2);
}

.terminal-btn.close { background: #ff5f56; }
.terminal-btn.minimize { background: #ffbd2e; }
.terminal-btn.maximize { background: #27ca40; }

.terminal-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #00ff00;
    position: relative;
}

.terminal-output {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.terminal-line {
    margin-bottom: 5px;
}

.terminal-line.command {
    color: #00ffff;
}

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

.terminal-line.success {
    color: #00ff88;
}

.terminal-line.warning {
    color: #ffaa00;
}

.terminal-line.info {
    color: #888888;
}

.terminal-line.ascii-art {
    color: #00ff00;
    font-size: 10px;
    line-height: 1.2;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.terminal-prompt {
    color: #00ffff;
    margin-right: 8px;
    white-space: nowrap;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #00ff00;
    font-family: inherit;
    font-size: inherit;
    outline: none;
    caret-color: #00ff00;
}

.terminal-input::placeholder {
    color: #444444;
}

/* Blinking cursor */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.cursor-blink::after {
    content: '█';
    animation: blink 1s infinite;
}

/* Matrix Mode */
.matrix-mode .terminal-container {
    border-color: #00ff00;
}

.matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99999;
    opacity: 0.15;
}

.matrix-column {
    position: absolute;
    top: -100%;
    font-family: 'MS Gothic', monospace;
    font-size: 16px;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
    writing-mode: vertical-rl;
    animation: matrix-drop linear infinite;
}

@keyframes matrix-drop {
    0% {
        transform: translateY(-100%);
        opacity: 1;
    }
    100% {
        transform: translateY(200vh);
        opacity: 0;
    }
}

/* Hacker Mode */
.hacker-mode .terminal-container {
    border-color: #ff0000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
}

.hacker-mode .terminal-body {
    color: #ff0000;
}

.hacker-mode .terminal-prompt {
    color: #ff6600;
}

/* Retro Mode */
.retro-mode .terminal-container {
    border-color: #ffaa00;
    background: #000800;
}

.retro-mode .terminal-body {
    color: #ffaa00;
}

/* Easter Egg Hint */
.easter-egg-hint {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    border-radius: 8px;
    font-family: 'SF Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 9999;
    pointer-events: none;
}

.easter-egg-hint.visible {
    opacity: 1;
    transform: translateY(0);
}

.easter-egg-hint code {
    color: var(--accent-color);
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 3px;
}

/* Responsive */
@media (max-width: 768px) {
    .terminal-container {
        width: 95%;
        height: 90vh;
        border-radius: 0;
    }
    
    .terminal-body {
        font-size: 12px;
        padding: 15px;
    }
}
