/* Performance optimizations and custom animations */
/* Vice City inspired color scheme with Discord accents */

:root {
    /* Nowa paleta kolorów - 60% fiolet, 20% niebieski, 20% żółty */
    
    /* Dominujący fiolet (60%) - tła i główne obszary */
    --primary-purple: #3B82F6;
    --primary-purple-dark: #1E40AF;
    --primary-purple-light: #60A5FA;
    --background-purple: rgba(59, 130, 246, 0.95);
    --background-purple-dark: rgba(30, 64, 175, 0.95);
    
    /* Niebieski (20%) - przyciski, linki, akcenty */
    --accent-blue: #4169E1;
    --accent-blue-light: #6495ED;
    --accent-blue-dark: #191970;
    
    /* Żółty (20%) - hover, wyróżnienia */
    --highlight-yellow: #FFD700;
    --highlight-yellow-light: #FFFF00;
    --highlight-yellow-dark: #DAA520;
    
    /* Neutralne kolory */
    --dark-bg: #0a0a0a;
    --gray-bg: #1a1a1a;
    --light-gray: #2a2a2a;
    
    /* Kompatybilność z istniejącymi zmiennymi */
    --vice-pink: var(--highlight-yellow);
    --vice-purple: var(--accent-yellow);
    --vice-cyan: var(--accent-blue);
    --vice-orange: var(--highlight-yellow);
    --vice-dark: var(--dark-bg);
    --vice-gray: var(--gray-bg);
    --vice-light-gray: var(--light-gray);
    
    --discord-blurple: var(--accent-blue);
    --discord-purple: var(--accent-blue-light);
    --discord-dark: var(--gray-bg);
    --discord-darker: var(--dark-bg);
    
    --gta-gold: var(--highlight-yellow);
    --gta-dark: var(--dark-bg);
    --gta-accent: var(--highlight-yellow);
    --gta-secondary: var(--accent-blue);
}

/* Dark theme base - gta-dark color */
body {
    background: #374151;
    background-attachment: fixed;
    font-family: 'Inter', sans-serif;
    color: white;
    overflow-x: hidden;
}

/* Smooth scrolling for better UX */
html {
    scroll-behavior: smooth;
}

/* Optimize animations for performance */
* {
    will-change: auto;
}

/* GPU acceleration for transforms */
.transform,
.hover\:scale-105:hover,
.hover\:scale-110:hover,
.animate-pulse,
.animate-spin {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Optimize map container for better performance */
#map-container {
    contain: layout style paint;
    transform: translateZ(0);
}

/* Smooth transitions for interactive elements */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

/* Nowe hover efekty - żółte wyróżnienia (20%) */
.hover-glow {
    transition: all 0.3s ease-in-out;
    position: relative;
}

.hover-glow:hover {
    box-shadow: 0 0 20px var(--highlight-yellow), 0 0 40px var(--highlight-yellow), 0 0 60px var(--highlight-yellow);
    transform: translateY(-2px);
}

.hover-discord {
    transition: all 0.3s ease-in-out;
}

.hover-discord:hover {
    background: linear-gradient(45deg, var(--highlight-yellow), var(--highlight-yellow-dark));
    box-shadow: 0 0 15px var(--highlight-yellow);
    color: var(--dark-bg);
    transform: scale(1.05);
}

/* Sidebar animations */
.sidebar {
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    will-change: transform;
    transform: translateZ(0);
    contain: layout style paint;
    position: relative;
    /* Odsunięcie od góry i dołu */
    top: 2rem;
    height: calc(100vh - 4rem);
    /* Nowa kolorystyka: 60% fiolet */
    background: linear-gradient(135deg, 
        rgba(138, 43, 226, 0.95) 0%,
        rgba(75, 0, 130, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-radius: 0 20px 20px 0;
    /* Charakterystyczne wcięcie po prawej stronie z mask-image */
    -webkit-clip-path: polygon(
        0% 0%, 
        80% 0%, 
        90% 8%, 
        85% 15%, 
        92% 25%, 
        88% 35%, 
        94% 45%, 
        86% 55%, 
        91% 65%, 
        87% 75%, 
        93% 85%, 
        85% 92%, 
        80% 100%, 
        0% 100%
    );
    clip-path: polygon(
        0% 0%, 
        80% 0%, 
        90% 8%, 
        85% 15%, 
        92% 25%, 
        88% 35%, 
        94% 45%, 
        86% 55%, 
        91% 65%, 
        87% 75%, 
        93% 85%, 
        85% 92%, 
        80% 100%, 
        0% 100%
    );
    /* Zaawansowana maska dla dodatkowego efektu */
    -webkit-mask-image: radial-gradient(
        ellipse 120% 100% at 85% 50%,
        transparent 0%,
        black 20%,
        black 80%,
        transparent 100%
    );
    mask-image: radial-gradient(
        ellipse 120% 100% at 85% 50%,
        transparent 0%,
        black 20%,
        black 80%,
        transparent 100%
    );
    -webkit-mask-composite: intersect;
    mask-composite: intersect;
    /* Nowoczesny cień */
    box-shadow: 
        0 10px 30px rgba(138, 43, 226, 0.3),
        0 5px 15px rgba(138, 43, 226, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        #4169E1 20%,
        #FFD700 50%,
        #4169E1 80%,
        transparent 100%
    );
    filter: blur(1px);
    animation: modernPulse 3s ease-in-out infinite alternate;
}

@keyframes modernPulse {
    0% {
        opacity: 0.6;
        filter: blur(1px);
    }
    100% {
        opacity: 0.9;
        filter: blur(1.5px);
    }
}

/* Sidebar navigation links - 20% niebieski */
.sidebar nav ul li a {
    color: #4169E1;
    transition: all 0.3s ease;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

/* Hover effect - 20% żółty */
.sidebar nav ul li a:hover {
    color: #FFD700;
    background: rgba(255, 215, 0, 0.1);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.sidebar nav ul li a:hover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: #FFD700;
    border-radius: 0 2px 2px 0;
}

.sidebar.closed {
    transform: translateX(-100%);
    opacity: 0;
}

.sidebar.open {
    transform: translateX(0);
    opacity: 1;
}

/* Button hover effects - niebieski (20%) z żółtymi akcentami */
.btn-vice {
    background: linear-gradient(45deg, var(--accent-blue), var(--accent-blue-dark));
    border: 2px solid transparent;
    position: relative;
    color: white;
    transition: all 0.3s ease-in-out;
}

.btn-vice:hover {
    background: linear-gradient(45deg, var(--highlight-yellow), var(--highlight-yellow-dark));
    border-color: var(--accent-blue);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
    transform: translateY(-2px);
    color: var(--dark-bg);
}

/* Custom loading animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Optimize accordion animations */
.accordion-content {
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
}

.accordion-content.active {
    opacity: 1;
}

.accordion-item.active .accordion-content {
    opacity: 1;
}

/* Optimize hover effects */
.hover-lift {
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Critical CSS for above-the-fold content */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Optimize font loading */
@font-face {
    font-family: 'Orbitron';
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    font-display: swap;
}

/* Lazy loading placeholder */
.lazy-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Dark theme optimizations */
.dark .lazy-placeholder {
    background: linear-gradient(90deg, #2a2a2a 25%, #1a1a1a 50%, #2a2a2a 75%);
    background-size: 200% 100%;
}

/* Optimize Discord widget performance */
.discord-widget {
    contain: layout style;
    transform: translateZ(0);
}

/* Mobile hamburger menu */
#mobile-menu-btn {
    background: linear-gradient(135deg, 
        rgba(138, 43, 226, 0.9) 0%,
        rgba(75, 0, 130, 0.9) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(65, 105, 225, 0.3);
    transition: all 0.3s ease;
}

#mobile-menu-btn:hover {
    background: linear-gradient(135deg, 
        rgba(138, 43, 226, 1) 0%,
        rgba(75, 0, 130, 1) 100%);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    transform: scale(1.05);
}

#mobile-menu-btn span {
    background: #4169E1;
    transition: all 0.3s ease;
}

#mobile-menu-btn:hover span {
    background: #FFD700;
}

#mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

#mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Sidebar group hover effect */
.sidebar:hover {
    width: 20rem;
}

.sidebar:hover .lg\:opacity-0 {
    opacity: 1;
}

.sidebar:hover .lg\:group-hover\:opacity-100 {
    opacity: 1;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .transform {
        transform: none;
    }
    
    .hover\:scale-105:hover,
    .hover\:scale-110:hover {
        transform: none;
    }
    
    /* Reduce animations on mobile for better performance */
    .animate-pulse {
        animation: none;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
}