/* Enhanced Scroll Blend Effects for Page Panels */
/* Smooth blend-in animations with background images */

/* Base Setup for Section Transitions */
body {
    overflow-x: hidden;
}

.section-container {
    position: relative;
}

/* Enhanced Section Blend Effects */
.section-blend {
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(60px) scale(0.95);
    transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, opacity;
}

.section-blend.blend-in {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Panel Blend Effects */
.panel-blend {
    opacity: 0;
    transform: translateY(40px) rotateX(10deg);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center bottom;
    will-change: transform, opacity;
}

.panel-blend.panel-in {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
}

/* Staggered Panel Animation */
.features-grid .panel-blend:nth-child(1) { transition-delay: 0.1s; }
.features-grid .panel-blend:nth-child(2) { transition-delay: 0.2s; }
.features-grid .panel-blend:nth-child(3) { transition-delay: 0.3s; }
.features-grid .panel-blend:nth-child(4) { transition-delay: 0.4s; }
.features-grid .panel-blend:nth-child(5) { transition-delay: 0.5s; }
.features-grid .panel-blend:nth-child(6) { transition-delay: 0.6s; }

.gameplay-modes .panel-blend:nth-child(1) { transition-delay: 0.2s; }
.gameplay-modes .panel-blend:nth-child(2) { transition-delay: 0.4s; }
.gameplay-modes .panel-blend:nth-child(3) { transition-delay: 0.6s; }

.steam-hero .panel-blend:nth-child(1) { transition-delay: 0.1s; }
.steam-hero .panel-blend:nth-child(2) { transition-delay: 0.3s; }

/* Parallax Background Image System */
.page-background {
    position: absolute;
    top: -20%;
    left: -10%;
    width: 120%;
    height: 140%;
    z-index: -2;
    overflow: hidden;
    will-change: transform;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.page-background.loaded {
    opacity: 1;
}

.page-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) brightness(0.4) contrast(1.1) saturate(1.0);
    transform: scale(1.2) translateY(0px);
    transition: filter 0.3s ease;
    will-change: transform;
}

.page-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 11, 0.4);
    z-index: 1;
}

/* Content Blend Effects */
.content-blend {
    opacity: 0;
    transform: scale(0.98);
    transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, opacity;
}

.content-blend.content-in {
    opacity: 1;
    transform: scale(1);
}

/* Card Blend Effects */
.card-blend {
    opacity: 0;
    transform: translateY(50px) rotateY(5deg) scale(0.95);
    transition: all 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center;
    will-change: transform, opacity;
}

.card-blend.card-in {
    opacity: 1;
    transform: translateY(0) rotateY(0deg) scale(1);
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1000;
}

.scroll-progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.1s ease;
}

/* Section Navigation Dots */
.section-nav {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
}

.nav-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--electric-cyan);
    opacity: 0;
    transition: var(--transition-smooth);
}

.nav-dot.active::before {
    opacity: 1;
}

.nav-dot:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

/* Advanced Blend Animations */
.fade-slide-blend {
    opacity: 0;
    transform: translateX(-30px) translateY(20px);
    transition: all 1.1s cubic-bezier(0.23, 1, 0.32, 1);
}

.fade-slide-blend.fade-slide-in {
    opacity: 1;
    transform: translateX(0) translateY(0);
}

.scale-blend {
    opacity: 0;
    transform: scale(0.9) rotateZ(2deg);
    transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scale-blend.scale-in {
    opacity: 1;
    transform: scale(1) rotateZ(0deg);
}

/* Text Blend Effects */
.text-blend {
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.text-blend.text-in {
    opacity: 1;
}

/* Header Specific Blend Effects */
.header-blend {
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.header-blend.header-in {
    opacity: 1;
}

/* Staggered Text Animation */
.text-blend:nth-child(1) { transition-delay: 0.1s; }
.text-blend:nth-child(2) { transition-delay: 0.2s; }
.text-blend:nth-child(3) { transition-delay: 0.3s; }

/* Enhanced Panel Hover Effects */
.panel-blend.panel-in:hover {
    transform: translateY(-5px) rotateX(-2deg) scale(1.02);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card-blend.card-in:hover {
    transform: translateY(-8px) rotateY(2deg) scale(1.03);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Smooth Loading Animation for Backgrounds */
@keyframes backgroundFadeIn {
    0% {
        opacity: 0;
        transform: scale(1.3) translateY(0px);
        filter: blur(15px) brightness(0.2) contrast(1.3);
    }
    100% {
        opacity: 1;
        transform: scale(1.2) translateY(0px);
        filter: blur(8px) brightness(0.4) contrast(1.1);
    }
}

.page-background img {
    animation: backgroundFadeIn 2s ease-out forwards;
}

/* Glow Effect for Active Elements */
.panel-in,
.card-in {
    box-shadow: 0 0 20px rgba(108, 43, 217, 0.1);
    transition: box-shadow 0.3s ease;
}

.panel-in:hover,
.card-in:hover {
    box-shadow: 0 0 30px rgba(108, 43, 217, 0.2);
}

/* Special Gallery Effects */
.gallery-showcase.scale-in {
    transform: scale(1) rotateZ(0deg);
}

.gallery-showcase.scale-in:hover {
    transform: scale(1.02) rotateZ(0.5deg);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Steam Section Special Effects */
.steam-price-card.panel-in {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.steam-badge.panel-in {
    background: linear-gradient(135deg, rgba(108, 43, 217, 0.2), rgba(0, 212, 255, 0.1));
    backdrop-filter: blur(8px);
}

/* Gameplay Mode Special Effects */
.gameplay-modes .mode-item.panel-in {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(5px);
    border-left: 3px solid transparent;
    transition: all 0.4s ease;
}

.gameplay-modes .mode-item.panel-in:hover {
    border-left-color: var(--electric-cyan);
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(10px) translateY(-2px);
}



/* Performance Optimizations */
.gpu-optimized {
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    will-change: transform;
}

/* Force GPU acceleration for all blend elements */
.section-blend,
.panel-blend,
.content-blend,
.card-blend,
.text-blend,
.fade-slide-blend,
.scale-blend {
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

/* Smooth scrolling enhancement */
html {
    scroll-behavior: smooth;
}

/* Ultra-smooth scrolling for webkit browsers */
body {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Optimize background images for performance */
.page-background img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    transform-origin: center center;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .page-background {
        top: -5%;
        left: -5%;
        width: 110%;
        height: 110%;
    }

    .page-background img {
        filter: blur(8px) brightness(0.4) contrast(1.1);
    }

    .section-blend {
        transform: translateY(40px) scale(0.98);
    }

    .panel-blend {
        transform: translateY(30px) rotateX(5deg);
    }

    .section-nav {
        right: 1rem;
    }

    .nav-dot {
        width: 10px;
        height: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .section-blend,
    .panel-blend,
    .content-blend,
    .card-blend,
    .fade-slide-blend,
    .scale-blend,
    .text-blend,
    .page-background img {
        transition: none !important;
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}
