/* ==================== */
/* TERMINAL SIDEBAR     */
/* ==================== */

/* Terminal Hero Container - Bottom Right Quadrant */
.terminal-sidebar {
    position: fixed;
    bottom: 3rem;
    right: 3rem;
    width: min(750px, 85vw);
    max-height: 500px;
    z-index: 500;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(0, 245, 255, 0.5);
    border-radius: 12px;
    box-shadow:
        0 0 80px rgba(0, 245, 255, 0.25),
        0 0 160px rgba(0, 245, 255, 0.1),
        0 4px 30px rgba(212, 175, 55, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

/* Hamburger Menu Button (Minimized State) */
.terminal-hamburger {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    z-index: 501;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(0, 245, 255, 0.5);
    border-radius: 12px;
    box-shadow:
        0 0 40px rgba(0, 245, 255, 0.3),
        0 0 80px rgba(0, 245, 255, 0.15),
        0 4px 20px rgba(212, 175, 55, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
}

.terminal-hamburger i {
    font-size: 1.5rem;
    color: #00f5ff;
    transition: all 0.3s ease;
}

.terminal-hamburger:hover {
    transform: scale(1.05);
    box-shadow:
        0 0 60px rgba(0, 245, 255, 0.5),
        0 0 120px rgba(0, 245, 255, 0.25),
        0 4px 30px rgba(212, 175, 55, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.terminal-hamburger:hover i {
    color: #ffffff;
    text-shadow: 0 0 15px rgba(0, 245, 255, 0.8);
}

.terminal-hamburger:active {
    transform: scale(0.95);
}

/* Scanline effect for hamburger */
.terminal-hamburger::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 245, 255, 0.03) 2px,
        rgba(0, 245, 255, 0.03) 4px
    );
    pointer-events: none;
    border-radius: inherit;
    z-index: -1;
}

/* Scanline effect for authenticity */
.terminal-sidebar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 245, 255, 0.03) 2px,
        rgba(0, 245, 255, 0.03) 4px
    );
    pointer-events: none;
    border-radius: inherit;
    z-index: 1;
}

/* Terminal Header */
.terminal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 245, 255, 0.3);
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.05) 0%, rgba(0, 0, 0, 0.3) 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.terminal-brand {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #00f5ff 0%, #D4AF37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(0, 245, 255, 0.3));
}

.terminal-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Courier New', 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #00f5ff;
    letter-spacing: 0.05em;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00f5ff;
    box-shadow: 0 0 10px rgba(0, 245, 255, 0.8);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 10px rgba(0, 245, 255, 0.8);
    }
    50% {
        opacity: 0.6;
        box-shadow: 0 0 20px rgba(0, 245, 255, 1);
    }
}

/* Terminal Output/Content Area */
.terminal-output {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: 'Courier New', 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #00f5ff;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 245, 255, 0.3) transparent;
}

/* Custom Scrollbar for Webkit Browsers */
.terminal-output::-webkit-scrollbar {
    width: 8px;
}

.terminal-output::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-left: 1px solid rgba(0, 245, 255, 0.1);
}

.terminal-output::-webkit-scrollbar-thumb {
    background: rgba(0, 245, 255, 0.3);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.terminal-output::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 245, 255, 0.5);
}

/* Terminal Text Lines */
.terminal-line {
    margin-bottom: 0.5rem;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.terminal-line:hover {
    opacity: 1;
}

.terminal-prompt {
    color: rgba(0, 245, 255, 0.6);
    margin-right: 0.5rem;
}

/* Terminal Menu Items */
.terminal-menu {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.terminal-menu-item {
    padding: 0.75rem 0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.terminal-menu-item::before {
    content: '>';
    color: rgba(0, 245, 255, 0.5);
    font-weight: bold;
    transition: all 0.2s ease;
}

.terminal-menu-item:hover {
    color: #ffffff;
    text-shadow: 0 0 15px rgba(0, 245, 255, 0.8);
    padding-left: 0.5rem;
}

.terminal-menu-item:hover::before {
    color: #00f5ff;
    text-shadow: 0 0 10px rgba(0, 245, 255, 1);
}

.terminal-menu-item.active {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.6);
    background: linear-gradient(90deg, rgba(0, 245, 255, 0.1), transparent);
    padding-left: 0.5rem;
}

.terminal-menu-item.active::before {
    color: #00f5ff;
}

/* Terminal Command Input Area */
.terminal-input-wrapper {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(0, 245, 255, 0.3);
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: 'Courier New', 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #00f5ff;
    caret-color: #00f5ff;
}

.terminal-input::placeholder {
    color: rgba(0, 245, 255, 0.3);
}

/* Blinking Cursor */
.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 1rem;
    background: #00f5ff;
    margin-left: 2px;
    animation: blink-cursor 1s step-end infinite;
}

@keyframes blink-cursor {
    0%, 50% {
        opacity: 1;
    }
    50.1%, 100% {
        opacity: 0;
    }
}

/* Separator Lines */
.terminal-separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 245, 255, 0.3), transparent);
    margin: 1rem 0;
}

/* Terminal Icons */
.terminal-icon {
    font-size: 1rem;
    color: rgba(0, 245, 255, 0.7);
    transition: color 0.2s ease;
}

.terminal-menu-item:hover .terminal-icon,
.terminal-menu-item.active .terminal-icon {
    color: #00f5ff;
}

/* ==================== */
/* RESPONSIVE STYLES    */
/* ==================== */

/* Tablet - Maintain Bottom Right Positioning */
@media (max-width: 1200px) {
    .terminal-sidebar {
        width: min(650px, 85vw);
        max-height: 450px;
        bottom: 2rem;
        right: 2rem;
    }

    .terminal-output {
        max-height: 350px;
    }
}

/* Mobile Optimization - Hide Terminal (Navigation via sphere points instead) */
@media (max-width: 768px) {
    .terminal-sidebar {
        display: none !important;
    }
}


/* High Performance Mode - GPU Acceleration */
.terminal-sidebar,
.terminal-hamburger,
.terminal-menu-item,
.status-dot,
.terminal-cursor {
    transform: translateZ(0);
    will-change: transform;
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .terminal-sidebar,
    .terminal-hamburger,
    .terminal-menu-item,
    .terminal-line {
        transition: none;
    }

    .status-dot {
        animation: none;
        opacity: 1;
    }

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

/* Print Styles - Hide Terminal */
@media print {
    .terminal-sidebar,
    .terminal-hamburger {
        display: none;
    }
}
