/* Custom CSS Animations - No JavaScript Required */

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Glow Animation */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
    }
    50% {
        box-shadow: 0 0 30px rgba(139, 92, 246, 0.8);
    }
}

/* Slide In Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Scale In Animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Neon Glow Animation */
@keyframes neonGlow {
    0%, 100% {
        text-shadow: 0 0 5px var(--neon-purple),
                     0 0 10px var(--neon-purple),
                     0 0 15px var(--neon-purple);
    }
    50% {
        text-shadow: 0 0 10px var(--neon-cyan),
                     0 0 20px var(--neon-cyan),
                     0 0 30px var(--neon-cyan);
    }
}

/* Particle Animation */
@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Slide Up Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Wobble Animation */
@keyframes wobble {
    0% {
        transform: translateX(0%);
    }
    15% {
        transform: translateX(-25%) rotate(-5deg);
    }
    30% {
        transform: translateX(20%) rotate(3deg);
    }
    45% {
        transform: translateX(-15%) rotate(-3deg);
    }
    60% {
        transform: translateX(10%) rotate(2deg);
    }
    75% {
        transform: translateX(-5%) rotate(-1deg);
    }
    100% {
        transform: translateX(0%);
    }
}

/* Zoom In Animation */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Loading Spinner */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Hover Animations */
.hover-float:hover {
    animation: float 2s ease-in-out infinite;
}

.hover-pulse:hover {
    animation: pulse 2s ease-in-out infinite;
}

.hover-glow:hover {
    animation: glow 2s ease-in-out infinite;
}

.hover-bounce:hover {
    animation: bounce 1s ease-in-out infinite;
}

.hover-wobble:hover {
    animation: wobble 1s ease-in-out;
}

/* Scroll Animations */
.scroll-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.scroll-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-slide-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease-out;
}

.scroll-slide-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.scroll-slide-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease-out;
}

.scroll-slide-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scroll-scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s ease-out;
}

.scroll-scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Particle System */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--neon-purple);
    border-radius: 50%;
    animation: particleFloat 10s linear infinite;
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 8s;
}

.particle:nth-child(2) {
    left: 20%;
    animation-delay: 2s;
    animation-duration: 10s;
}

.particle:nth-child(3) {
    left: 30%;
    animation-delay: 4s;
    animation-duration: 12s;
}

.particle:nth-child(4) {
    left: 40%;
    animation-delay: 1s;
    animation-duration: 9s;
}

.particle:nth-child(5) {
    left: 50%;
    animation-delay: 3s;
    animation-duration: 11s;
}

.particle:nth-child(6) {
    left: 60%;
    animation-delay: 5s;
    animation-duration: 13s;
}

/* Mobile Menu Animation */
.mobile-menu-enter {
    animation: slideIn 0.3s ease-out;
}

.mobile-menu-exit {
    animation: slideOut 0.3s ease-in;
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Typing Animation */
.typing-animation {
    overflow: hidden;
    border-right: 2px solid var(--neon-purple);
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--neon-purple);
    }
}

/* Stagger Animation */
.stagger-animation > * {
    opacity: 0;
    transform: translateY(30px);
    animation: staggerFadeIn 0.6s ease-out forwards;
}

.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation > *:nth-child(6) { animation-delay: 0.6s; }

@keyframes staggerFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

.duration-1 { animation-duration: 0.5s; }
.duration-2 { animation-duration: 1s; }
.duration-3 { animation-duration: 1.5s; }
.duration-4 { animation-duration: 2s; }
.duration-5 { animation-duration: 2.5s; }

/* Enhanced Mobile Menu Styles */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 1001;
    position: relative;
}

.mobile-menu-btn span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--white);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Navigation */
.nav-menu {
    transition: all 0.3s ease;
}

@media (max-width: 767px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: rgba(13, 2, 33, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: var(--space-lg);
        transition: left 0.3s ease;
        padding: var(--space-xl) 0;
        z-index: 999;
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        opacity: 0;
        transform: translateX(-50px);
        animation: slideIn 0.3s ease forwards;
    }

    .nav-menu li:nth-child(1) { animation-delay: 0.1s; }
    .nav-menu li:nth-child(2) { animation-delay: 0.2s; }
    .nav-menu li:nth-child(3) { animation-delay: 0.3s; }
    .nav-menu li:nth-child(4) { animation-delay: 0.4s; }
    .nav-menu li:nth-child(5) { animation-delay: 0.5s; }
    .nav-menu li:nth-child(6) { animation-delay: 0.6s; }

    .nav-menu li a {
        font-size: 1.2rem;
        padding: var(--space-md) var(--space-lg);
        display: block;
        text-align: center;
        border-radius: var(--border-radius-sm);
        transition: all 0.3s ease;
    }

    .nav-menu li a:hover {
        background-color: rgba(139, 92, 246, 0.2);
        transform: scale(1.05);
    }
}

/* Enhanced Responsive Typography */
@media (max-width: 575px) {
    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .game-content h3 {
        font-size: 1.1rem;
    }
    
    .feature-card h3 {
        font-size: 1.1rem;
    }
}

/* Enhanced Button Responsiveness */
@media (max-width: 767px) {
    .btn {
        padding: var(--space-md) var(--space-lg);
        font-size: 1rem;
        min-height: 44px; /* Touch target size */
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
}

/* Enhanced Card Responsiveness */
@media (max-width: 767px) {
    .game-card {
        margin-bottom: var(--space-lg);
    }
    
    .game-img {
        height: 180px;
    }
    
    .gallery-item {
        height: 200px;
        margin-bottom: var(--space-md);
    }
    
    .feature-card {
        margin-bottom: var(--space-lg);
    }
}

/* Enhanced Grid Responsiveness */
@media (max-width: 991px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }
}

@media (max-width: 767px) {
    .games-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
}

/* Enhanced Footer Responsiveness */
@media (max-width: 767px) {
    .footer-nav {
        flex-direction: column;
        gap: var(--space-lg);
        text-align: center;
    }
    
    .footer-nav-column {
        margin-bottom: var(--space-lg);
    }
    
    .social-icons {
        justify-content: center;
        gap: var(--space-md);
    }
}

/* Enhanced Image Responsiveness */
@media (max-width: 767px) {
    .hero-image {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .about-image {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
}

/* Enhanced Section Padding */
@media (max-width: 575px) {
    section {
        padding: var(--space-xl) 0;
    }
    
    .hero-section {
        padding: 100px 0 60px;
    }
}

/* Enhanced Container Responsiveness */
@media (max-width: 575px) {
    .container {
        padding: 0 var(--space-md);
    }
}

/* Enhanced Touch Interactions */
@media (hover: none) and (pointer: coarse) {
    .game-card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    .feature-card:hover {
        transform: none;
    }
}

/* Enhanced Loading States */
.loading-skeleton {
    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;
    }
}

/* Enhanced Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Enhanced Focus States */
.btn:focus,
.nav-menu a:focus,
.social-icon:focus {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 2px;
}

/* Enhanced High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --secondary-color: #ff0000;
        --accent-color: #ffff00;
    }
}