/* --- Page Transitions & Animations --- */
.page {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.page:not(.active) {
    opacity: 0;
    pointer-events: none;
    transform: translateX(0);
}
.page.slide-out-left { transform: translateX(-100%); opacity: 0; }
.page.slide-in-from-right { transform: translateX(100%); }
.page.slide-out-right { transform: translateX(100%); opacity: 0; }
.page.slide-in-from-left { transform: translateX(-100%); }

.game-selection, .game-list-container {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#home-page::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, var(--bg-secondary), transparent);
    pointer-events: none;
    transition: opacity 0.4s ease;
    opacity: 1;
    z-index: 99;
}

.page-container.scrolled #home-page::after {
    opacity: 0;
}

.animate-on-load {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.top-bar.animate-on-load { animation-delay: 0.2s; }
.hero-content > h1.animate-on-load { animation-delay: 0.4s; }
.hero-content > p.animate-on-load { animation-delay: 0.6s; }
.showcase-images.animate-on-load { animation-delay: 0.8s; }
.action-buttons.animate-on-load { animation-delay: 1.0s; }
.why-us-section.animate-on-load { animation-delay: 1.2s; }
.login-container.animate-on-load { animation-delay: 0.4s; }

@keyframes grid-move {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

.cursor {
    display: inline-block;
    width: 2px;
    background-color: var(--text-secondary);
    animation: blink 0.7s infinite;
    position: relative;
    bottom: -2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
