/* Harmony 5 Terminal Styles */

.harmony5-terminal-wrapper {
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
    background-color: #000;
}

.harmony5-terminal {
    background-color: #000;
    color: #00ff00;
    padding: 0;
    position: relative;
    overflow: hidden;
}

/* Color Themes */
.harmony5-terminal.classic_green {
    background-color: #001100;
    color: #00ff00;
}

.harmony5-terminal.amber {
    background-color: #1a1100;
    color: #ffb000;
}

.harmony5-terminal.blue {
    background-color: #001122;
    color: #00aaff;
}

.harmony5-terminal.red_alert {
    background-color: #220000;
    color: #ff4444;
}

.terminal-header {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-bottom: 1px solid currentColor;
    font-size: 11px;
    display: block;
    line-height: 1.2;
}

.terminal-title {
    font-weight: bold;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 2px;
}

.terminal-status {
    opacity: 0.7;
    font-size: 10px;
    display: block;
}

.terminal-content {
    padding: 15px;
    height: calc(100% - 90px); /* Account for header + controls */
    min-height: 250px;
    position: relative;
    overflow-y: auto;
    line-height: 1.4;
}

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

.terminal-cursor {
    display: inline-block;
    animation: blink 1s infinite;
    font-weight: bold;
}

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

.terminal-cursor.typing {
    animation: none;
    opacity: 1;
}

/* Text Formatting */
.terminal-timestamp {
    color: #888;
    font-size: 11px;
    margin-right: 5px;
}

.terminal-speaker {
    font-weight: bold;
    margin-right: 10px;
}

.terminal-system {
    color: #ffaa00;
    font-weight: bold;
}

.terminal-personal {
    color: inherit;
    font-style: italic;
}

/* Color variations */
.classic_green .terminal-timestamp { color: #006600; }
.classic_green .terminal-system { color: #ffff00; }

.amber .terminal-timestamp { color: #996600; }
.amber .terminal-system { color: #ffffff; }

.blue .terminal-timestamp { color: #004466; }
.blue .terminal-system { color: #00ffff; }

.red_alert .terminal-timestamp { color: #660000; }
.red_alert .terminal-system { color: #ffaaaa; }

/* Terminal Controls */
.terminal-controls {
    background-color: #333;
    padding: 10px 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.terminal-btn {
    background-color: #555;
    border: 1px solid #777;
    color: #fff;
    padding: 5px 12px;
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s;
}

.terminal-btn:hover {
    background-color: #666;
    border-color: #999;
}

.terminal-btn:active {
    background-color: #444;
}

.terminal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .harmony5-terminal-wrapper {
        margin: 10px 0;
    }
    
    .terminal-content {
        padding: 10px;
        font-size: 12px;
    }
    
    .terminal-header {
        padding: 6px 10px;
        font-size: 10px;
    }
    
    .terminal-controls {
        padding: 8px 10px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .terminal-btn {
        font-size: 10px;
        padding: 4px 8px;
    }
}

/* Special Effects */
.terminal-loading {
    animation: pulse 2s infinite;
}

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

.terminal-glitch {
    animation: glitch 0.3s;
}

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

/* Scrollbar styling for webkit browsers */
.terminal-content::-webkit-scrollbar {
    width: 8px;
}

.terminal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.terminal-content::-webkit-scrollbar-thumb {
    background: currentColor;
    opacity: 0.5;
    border-radius: 4px;
}

.terminal-content::-webkit-scrollbar-thumb:hover {
    opacity: 0.8;
}