/* Enhanced Arch Linux Terminal Styling */
.terminal-font {
    font-family: 'Fira Code', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-feature-settings: "liga" 1;
}

.ui-font { 
    font-family: 'Inter', 'Roboto', sans-serif; 
}

/* Terminal cursor animation with Arch blue accent */
.terminal-cursor {
    animation: blink 1s infinite;
}

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

/* Enhanced scrollbar styling */
.scrollbar-hide { 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
}

.scrollbar-hide::-webkit-scrollbar { 
    display: none; 
}

.scrollbar-thin {
    scrollbar-width: thin;
}

.scrollbar-thin::-webkit-scrollbar {
    width: 6px;
}

.scrollbar-thin::-webkit-scrollbar-track {
    background: #1f2937;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background: #1793d1; /* Arch blue */
    border-radius: 3px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: #1e88e5;
}

/* Arch Linux inspired command card hover effects */
.command-card-hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(23, 147, 209, 0.15); /* Arch blue glow */
}

/* Enhanced CRT effect for authentic terminal feel */
@media (prefers-color-scheme: dark) {
    .terminal-font::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(transparent 50%, rgba(0, 255, 65, 0.02) 50%);
        background-size: 100% 2px;
        pointer-events: none;
        opacity: 0.3;
    }
}

/* v86 VM specific styling */
.vm-display {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.vm-boot-sequence {
    animation: boot-fade-in 0.5s ease-in-out;
}

@keyframes boot-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Real-time performance monitor styling */
.performance-indicator {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
}

/* Enhanced button transitions with Arch Linux theming */
button {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

button:active {
    transform: translateY(1px);
}

button:focus-visible {
    outline: 2px solid #1793d1; /* Arch blue focus */
    outline-offset: 2px;
}

/* Arch Linux achievement badge styling */
.achievement-glow {
    animation: arch-glow 2s ease-in-out infinite alternate;
}

@keyframes arch-glow {
    from {
        box-shadow: 0 0 5px #1793d1;
    }
    to {
        box-shadow: 0 0 20px #1793d1, 0 0 30px #1793d1;
    }
}

/* Enhanced safety indicators for real VM commands */
.safety-danger {
    animation: pulse-red 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.safety-warning {
    animation: pulse-yellow 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.3);
}

@keyframes pulse-red {
    0%, 100% { 
        border-color: #ef4444; 
        box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
    }
    50% { 
        border-color: #f87171; 
        box-shadow: 0 0 15px rgba(248, 113, 113, 0.4);
    }
}

@keyframes pulse-yellow {
    0%, 100% { 
        border-color: #eab308; 
        box-shadow: 0 0 10px rgba(234, 179, 8, 0.3);
    }
    50% { 
        border-color: #facc15; 
        box-shadow: 0 0 15px rgba(250, 204, 21, 0.4);
    }
}

/* Real VM status indicators */
.vm-status-ready {
    animation: pulse-green 2s ease-in-out infinite;
}

.vm-status-loading {
    animation: pulse-blue 2s ease-in-out infinite;
}

@keyframes pulse-green {
    0%, 100% { background-color: #059669; }
    50% { background-color: #10b981; }
}

@keyframes pulse-blue {
    0%, 100% { background-color: #1793d1; }
    50% { background-color: #1e88e5; }
}

/* Terminal text effects enhanced for Arch Linux */
.matrix-text {
    text-shadow: 0 0 10px #00ff41, 0 0 20px #00ff41;
}

.arch-text {
    text-shadow: 0 0 10px #1793d1, 0 0 15px #1793d1;
}

/* Real v86 loading animation */
.vm-loading {
    animation: vm-boot 5s ease-in-out;
}

@keyframes vm-boot {
    0% { 
        opacity: 0; 
        transform: scale(0.8); 
    }
    20% {
        opacity: 0.3;
        transform: scale(0.9);
    }
    60% { 
        opacity: 0.7; 
        transform: scale(1.05); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1); 
    }
}

/* Enhanced animation delays for loading sequences */
.animation-delay-75 {
    animation-delay: 75ms;
}

.animation-delay-150 {
    animation-delay: 150ms;
}

/* Mobile optimizations for v86 integration */
@media (max-width: 640px) {
    .terminal-font {
        font-size: 12px;
        line-height: 1.4;
    }
    
    .command-card {
        padding: 12px;
    }
    
    .virtual-keyboard {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        max-height: 50vh;
        overflow-y: auto;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
    }
    
    .vm-performance-mobile {
        font-size: 10px;
        padding: 2px 8px;
    }
}

/* High contrast support for accessibility */
@media (prefers-contrast: high) {
    .text-matrix-green {
        color: #00ff00 !important;
        text-shadow: 0 0 5px #00ff00;
    }
    
    .text-arch-blue {
        color: #00aaff !important;
        text-shadow: 0 0 5px #00aaff;
    }
    
    .border-gray-700 {
        border-color: #ffffff !important;
    }
}

/* Pacman package manager specific styling */
.pacman-output {
    color: #1793d1;
    font-family: 'Fira Code', monospace;
}

.pacman-progress {
    background: linear-gradient(90deg, #1793d1 0%, #00ff41 100%);
    animation: pacman-install 3s ease-in-out;
}

@keyframes pacman-install {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Real filesystem path highlighting */
.path-highlight {
    background: linear-gradient(135deg, #1793d1, #00bfff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
}

/* Retina display optimization for v86 output */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .terminal-font {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    .vm-display {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: optimize-contrast;
    }
}

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

.terminal-output::-webkit-scrollbar-track {
    background: #000000;
}

.terminal-output::-webkit-scrollbar-thumb {
    background: #1793d1;
    border-radius: 4px;
}

.terminal-output::-webkit-scrollbar-thumb:hover {
    background: #1e88e5;
}

/* Real command execution feedback */
.command-executing {
    animation: command-pulse 1s ease-in-out infinite;
}

@keyframes command-pulse {
    0%, 100% {
        background-color: rgba(23, 147, 209, 0.1);
    }
    50% {
        background-color: rgba(23, 147, 209, 0.3);
    }
}

/* VM resource monitor styling */
.resource-monitor {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(23, 147, 209, 0.1));
    backdrop-filter: blur(5px);
    border: 1px solid rgba(23, 147, 209, 0.3);
}