/* Panel Transition CSS - Frutiger Aero Style with Y2K Glitch Effects */

/* Main Container Setup */
.main-content-container,
#content-window,
.dynamic-content {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
    min-height: 400px;
    perspective: 1000px; /* For 3D transforms */
}

/* Panel Content Base Styles - NO ANIMATIONS */
.panel-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Panel Exit/Enter - NO ANIMATIONS */
.panel-exit {
    opacity: 0;
    display: none;
}

.panel-enter {
    opacity: 1;
    transform: none;
    filter: none;
}

.panel-enter-active {
    opacity: 1;
    transform: none;
    filter: none;
}

/* All animations disabled for instant page switching */

/* Y2K Glitch Overlay */
.y2k-glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    mix-blend-mode: screen;
}

.y2k-glitch-overlay.active {
    animation: glitchFlash 0.2s ease-out forwards;
}

.glitch-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.glitch-layer.glitch-r {
    background: rgba(255, 0, 0, 0.3);
    animation: glitchR 0.2s ease-out;
}

.glitch-layer.glitch-g {
    background: rgba(0, 255, 0, 0.2);
    animation: glitchG 0.2s ease-out;
    animation-delay: 0.05s;
}

.glitch-layer.glitch-b {
    background: rgba(0, 0, 255, 0.3);
    animation: glitchB 0.2s ease-out;
    animation-delay: 0.1s;
}

/* Glitch Keyframes */
@keyframes glitchFlash {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

@keyframes glitchR {
    0% { 
        opacity: 0;
        transform: translateX(0);
    }
    25% {
        opacity: 0.8;
        transform: translateX(-3px);
    }
    50% {
        opacity: 0.6;
        transform: translateX(2px);
    }
    75% {
        opacity: 0.4;
        transform: translateX(-1px);
    }
    100% {
        opacity: 0;
        transform: translateX(0);
    }
}

@keyframes glitchG {
    0% { 
        opacity: 0;
        transform: translateX(0) translateY(0);
    }
    33% {
        opacity: 0.7;
        transform: translateX(2px) translateY(-1px);
    }
    66% {
        opacity: 0.5;
        transform: translateX(-1px) translateY(1px);
    }
    100% {
        opacity: 0;
        transform: translateX(0) translateY(0);
    }
}

@keyframes glitchB {
    0% { 
        opacity: 0;
        transform: translateY(0);
    }
    30% {
        opacity: 0.6;
        transform: translateY(1px);
    }
    60% {
        opacity: 0.4;
        transform: translateY(-2px);
    }
    100% {
        opacity: 0;
        transform: translateY(0);
    }
}

/* Enhanced Aero Effects */
.panel-content.aero-enhanced {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.12) 0%,
        rgba(78, 199, 212, 0.08) 50%,
        rgba(255, 255, 255, 0.06) 100%
    );
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 4px 16px rgba(78, 199, 212, 0.1),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

/* Navigation Active State Enhancement */
.nav-item.active,
.sidebar-nav a.active {
    background: rgba(0, 201, 215, 0.15) !important;
    border-left: 3px solid rgba(0, 201, 215, 0.8);
    box-shadow: 0 0 12px rgba(0, 201, 215, 0.2);
    transform: translateX(2px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Y2K Nav Items Styling */
.nav-item.y2k,
.sidebar-nav a.y2k {
    position: relative;
    overflow: hidden;
}

.nav-item.y2k::before,
.sidebar-nav a.y2k::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 0, 255, 0.1),
        rgba(0, 255, 255, 0.1),
        transparent
    );
    transition: left 0.5s ease;
}

.nav-item.y2k:hover::before,
.sidebar-nav a.y2k:hover::before {
    left: 100%;
}

/* Smooth Loading States */
.panel-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.panel-loading::after {
    content: '';
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid rgba(0, 201, 215, 0.8);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .panel-exit {
        animation-duration: 0.35s;
    }
    
    .panel-enter-active {
        animation-duration: 0.35s;
    }
    
    .y2k-glitch-overlay {
        animation-duration: 0.15s;
    }
}

/* Performance Optimizations */
.panel-content {
    will-change: transform, opacity, filter;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

/* Accessibility - Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .panel-exit,
    .panel-enter-active,
    .y2k-glitch-overlay,
    .nav-item,
    .sidebar-nav a {
        animation-duration: 0.1s !important;
        transition-duration: 0.1s !important;
    }
    
    .y2k-glitch-overlay {
        display: none !important;
    }
}