/* linux terminal - desktop only */
.terminal-window {
    position: fixed;
    bottom: 60px;
    right: 20px;
    width: 700px;
    height: 450px;
    background: #000000;
    border: 1px solid #333333;
    border-radius: 0;
    font-family: 'Ubuntu Mono', 'DejaVu Sans Mono', 'Courier New', monospace;
    font-size: 13px;
    z-index: 10000;
    display: none;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.terminal-header {
    background: #2d2d2d;
    padding: 6px 10px;
    border-bottom: 1px solid #404040;
    color: #cccccc;
    font-size: 11px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 30px;
}

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

.terminal-close {
    background: #555555;
    color: #cccccc;
    border: 1px solid #666666;
    width: 16px;
    height: 16px;
    border-radius: 0;
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.terminal-close:hover {
    background: #777777;
}

.terminal-body {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    background: #000000;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.3;
}

.terminal-line {
    margin: 2px 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.terminal-prompt {
    color: #ffffff;
    font-weight: normal;
}

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

.terminal-input {
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: 'Ubuntu Mono', 'DejaVu Sans Mono', 'Courier New', monospace;
    font-size: 13px;
    outline: none;
    flex: 1;
    margin-left: 5px;
}


/* special text colors for different types */
.terminal-error { color: #ff5555; }
.terminal-warning { color: #ffb86c; }
.terminal-success { color: #50fa7b; }
.terminal-info { color: #8be9fd; }
.terminal-fsociety { color: #ff79c6; }

/* glitch effect for corrupted text */
.terminal-glitch {
    position: relative;
    animation: glitch 0.3s infinite;
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 1px); }
    40% { transform: translate(-1px, -1px); }
    60% { transform: translate(1px, 1px); }
    80% { transform: translate(1px, -1px); }
    100% { transform: translate(0); }
}

/* hide on mobile/touchscreen */
@media (max-width: 768px), (pointer: coarse) {
    .terminal-window {
        display: none !important;
    }
}

/* terminal button */
.terminal-access-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1a1a1a;
    border: 1px solid #555555;
    color: #cccccc;
    padding: 8px 12px;
    font-family: 'Ubuntu Mono', 'DejaVu Sans Mono', 'Courier New', monospace;
    font-size: 11px;
    cursor: pointer;
    border-radius: 0;
    z-index: 9999;
    transition: all 0.2s ease;
    display: none;
}

.terminal-access-button:hover {
    background: #333333;
    border-color: #777777;
}

.terminal-access-button.unlocked {
    animation: accessGranted 0.5s ease-out;
}

@keyframes accessGranted {
    0% { transform: scale(0) rotate(180deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(90deg); opacity: 0.7; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* hide terminal button on mobile */
@media (max-width: 768px), (pointer: coarse) {
    .terminal-access-button {
        display: none !important;
    }
}

/* KDE Plasma style video modal */
.fsociety-video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kde-window {
    background: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.kde-titlebar {
    background: linear-gradient(to bottom, #4a5568, #2d3748);
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    border-bottom: 1px solid #1a202c;
}

.kde-title {
    color: #e2e8f0;
    font-family: 'Ubuntu', sans-serif;
    font-size: 13px;
    font-weight: 500;
}

.kde-controls {
    display: flex;
    gap: 4px;
}

.kde-btn {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.2s ease;
}

.kde-btn.minimize {
    background: #fbbf24;
    color: #92400e;
}

.kde-btn.maximize {
    background: #34d399;
    color: #065f46;
}

.kde-btn.close {
    background: #f87171;
    color: #991b1b;
}

.kde-btn:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
}

.kde-content {
    background: #1a202c;
    padding: 0;
}

.kde-content video {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
}

/* Hide video modal on mobile */
@media (max-width: 768px), (pointer: coarse) {
    .fsociety-video-modal {
        display: none !important;
    }
}

/* Terminal color schemes */
.terminal-window.term-green {
    background: rgba(0, 20, 0, 0.95);
    border-color: #00ff00;
}

.terminal-window.term-green .terminal-line,
.terminal-window.term-green .terminal-prompt {
    color: #00ff00;
}

.terminal-window.term-amber {
    background: rgba(30, 20, 0, 0.95);
    border-color: #ffb000;
}

.terminal-window.term-amber .terminal-line,
.terminal-window.term-amber .terminal-prompt {
    color: #ffb000;
}

.terminal-window.term-blue {
    background: rgba(0, 10, 30, 0.95);
    border-color: #0080ff;
}

.terminal-window.term-blue .terminal-line,
.terminal-window.term-blue .terminal-prompt {
    color: #0080ff;
}

.terminal-window.term-red {
    background: rgba(30, 0, 0, 0.95);
    border-color: #ff4444;
}

.terminal-window.term-red .terminal-line,
.terminal-window.term-red .terminal-prompt {
    color: #ff4444;
}

.terminal-window.term-purple {
    background: rgba(20, 0, 30, 0.95);
    border-color: #aa44ff;
}

.terminal-window.term-purple .terminal-line,
.terminal-window.term-purple .terminal-prompt {
    color: #aa44ff;
}

.terminal-window.term-matrix {
    background: rgba(0, 0, 0, 0.98);
    border-color: #00ff41;
    animation: matrixGlow 2s ease-in-out infinite alternate;
}

.terminal-window.term-matrix .terminal-line,
.terminal-window.term-matrix .terminal-prompt {
    color: #00ff41;
    text-shadow: 0 0 5px #00ff41;
}

.terminal-window.term-hacker {
    background: rgba(10, 0, 10, 0.95);
    border-color: #ff00ff;
    animation: hackerFlicker 0.5s infinite;
}

.terminal-window.term-hacker .terminal-line,
.terminal-window.term-hacker .terminal-prompt {
    color: #ff00ff;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 3px #ff00ff;
}

@keyframes matrixGlow {
    0% { border-color: #00ff41; box-shadow: 0 0 10px rgba(0, 255, 65, 0.5); }
    100% { border-color: #00aa33; box-shadow: 0 0 20px rgba(0, 255, 65, 0.8); }
}

@keyframes hackerFlicker {
    0%, 95% { opacity: 1; }
    96%, 100% { opacity: 0.8; }
}