/* Terminal Specific Styles */

.terminal-container {
    min-height: 100vh;
    padding: 2rem 0;
    background: 
        radial-gradient(ellipse at top, rgba(0, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(255, 0, 255, 0.1) 0%, transparent 50%);
}

.terminal-header-section {
    text-align: center;
    margin-bottom: 3rem;
}

.terminal-main-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: var(--glow-cyan);
}

.terminal-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.title-accent {
    color: var(--primary-magenta);
    text-shadow: var(--glow-magenta);
}

/* Terminal Window */
.terminal-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.terminal-window {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid var(--primary-cyan);
    border-radius: 10px;
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(0, 255, 255, 0.05);
    overflow: hidden;
    backdrop-filter: blur(10px);
    position: relative;
}

.terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(255, 0, 255, 0.1));
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
}

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

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-fast);
}

.control.close {
    background: #ff5f56;
}

.control.minimize {
    background: #ffbd2e;
}

.control.maximize {
    background: #27ca3f;
}

.control:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

.terminal-title {
    font-family: var(--font-mono);
    color: var(--primary-cyan);
    font-size: 0.9rem;
    text-shadow: 0 0 10px var(--primary-cyan);
}

.terminal-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--primary-green);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-green);
    box-shadow: 0 0 10px var(--primary-green);
    animation: pulse 2s infinite;
}

/* Terminal Body */
.terminal-body {
    padding: 1.5rem;
    min-height: 400px;
    max-height: 600px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    line-height: 1.4;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 255, 0.02) 2px,
            rgba(0, 255, 255, 0.02) 4px
        );
}

.boot-sequence {
    margin-bottom: 2rem;
}

.boot-line {
    color: var(--primary-green);
    margin-bottom: 0.3rem;
    animation: terminal-typing 0.05s steps(1);
    text-shadow: 0 0 5px var(--primary-green);
}

.terminal-divider {
    color: var(--primary-cyan);
    margin: 1rem 0;
    text-shadow: 0 0 5px var(--primary-cyan);
}

.terminal-output {
    margin-bottom: 1rem;
}

.terminal-line {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.prompt {
    color: var(--primary-cyan);
    margin-right: 0.5rem;
    text-shadow: 0 0 5px var(--primary-cyan);
    white-space: nowrap;
}

.command {
    color: var(--primary-magenta);
    margin-right: 0.5rem;
}

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

.terminal-input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    outline: none;
    flex: 1;
    padding: 0;
    margin: 0 0.5rem;
}

.terminal-input::selection {
    background: rgba(0, 255, 255, 0.3);
}

/* Output Styling */
.output-success {
    color: var(--primary-green);
}

.output-error {
    color: #ff4444;
    text-shadow: 0 0 5px #ff4444;
}

.output-warning {
    color: var(--accent-orange);
}

.output-info {
    color: var(--primary-cyan);
}

.output-entity {
    color: var(--primary-magenta);
    font-style: italic;
    padding-left: 1rem;
    border-left: 2px solid var(--primary-magenta);
    margin: 0.5rem 0;
}

.output-system {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Entity Panel */
.entity-panel {
    position: fixed;
    top: 50%;
    right: -300px;
    transform: translateY(-50%);
    width: 280px;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid var(--primary-cyan);
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    transition: var(--transition-normal);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.entity-panel.active {
    right: 2rem;
}

.entity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(255, 0, 255, 0.1));
}

.entity-header h3 {
    color: var(--primary-cyan);
    font-size: 1.1rem;
    margin: 0;
}

.panel-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.panel-close:hover {
    background: rgba(255, 0, 0, 0.2);
    color: #ff4444;
}

.entity-content {
    padding: 1.5rem;
}

.entity-avatar {
    text-align: center;
    margin-bottom: 1rem;
}

.entity-avatar i {
    font-size: 3rem;
    color: var(--primary-cyan);
    text-shadow: 0 0 20px var(--primary-cyan);
}

.entity-info h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.entity-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.entity-capabilities {
    margin-top: 1rem;
}

.entity-capabilities h5 {
    color: var(--primary-magenta);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.entity-capabilities ul {
    list-style: none;
    padding: 0;
}

.entity-capabilities li {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
    padding-left: 1rem;
    position: relative;
}

.entity-capabilities li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-cyan);
}

/* Command Reference */
.command-reference {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding: 0 2rem;
}

.command-reference h3 {
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
}

.command-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.command-category {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
}

.command-category h4 {
    color: var(--primary-cyan);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    text-shadow: 0 0 10px var(--primary-cyan);
}

.command-category ul {
    list-style: none;
    padding: 0;
}

.command-category li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.command-category code {
    background: rgba(0, 255, 255, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    color: var(--primary-magenta);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Terminal Scrollbar */
.terminal-body::-webkit-scrollbar {
    width: 8px;
}

.terminal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.terminal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-cyan), var(--primary-magenta));
    border-radius: 4px;
    box-shadow: 0 0 10px var(--primary-cyan);
}

.terminal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-magenta), var(--primary-cyan));
}

/* Loading Animation */
.terminal-loading {
    display: inline-block;
    color: var(--primary-green);
}

.terminal-loading::after {
    content: '';
    animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Matrix Mode */
.matrix-mode {
    background: #000;
    color: var(--primary-green);
}

.matrix-mode .terminal-window {
    border-color: var(--primary-green);
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.3);
}

.matrix-mode .prompt {
    color: var(--primary-green);
    text-shadow: 0 0 5px var(--primary-green);
}

.matrix-mode .command {
    color: #88ff88;
}

/* Auto-complete Suggestions */
.autocomplete-suggestions {
    position: absolute;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid var(--primary-cyan);
    border-top: none;
    border-radius: 0 0 5px 5px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    width: 100%;
}

.autocomplete-suggestion {
    padding: 0.5rem 1rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
}

.autocomplete-suggestion:hover,
.autocomplete-suggestion.selected {
    background: rgba(0, 255, 255, 0.1);
    color: var(--primary-cyan);
}

/* Responsive Terminal */
@media (max-width: 768px) {
    .terminal-wrapper {
        padding: 0 1rem;
    }
    
    .terminal-main-title {
        font-size: 2.5rem;
    }
    
    .terminal-body {
        font-size: 0.85rem;
        padding: 1rem;
        max-height: 400px;
    }
    
    .command-grid {
        grid-template-columns: 1fr;
    }
    
    .entity-panel {
        width: 250px;
        right: -250px;
    }
    
    .entity-panel.active {
        right: 1rem;
    }
}

@media (max-width: 480px) {
    .terminal-header {
        padding: 0.5rem 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .terminal-title {
        font-size: 0.8rem;
    }
    
    .terminal-body {
        font-size: 0.8rem;
        padding: 0.8rem;
    }
    
    .entity-panel {
        width: calc(100vw - 2rem);
        right: -100vw;
        left: 1rem;
        transform: translateY(-50%);
    }
    
    .entity-panel.active {
        right: auto;
    }
}

/* Terminal Animations */
@keyframes terminal-typing {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Focus states */
.terminal-input:focus {
    outline: none;
    text-shadow: 0 0 5px var(--primary-cyan);
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .terminal-window {
        border-color: #ffffff;
        box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    }
    
    .prompt {
        color: #00ffff;
        text-shadow: none;
    }
    
    .command {
        color: #ff00ff;
    }
}

