/* Animations CSS */

/* Hero Section Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes textGlow {
    0% {
        text-shadow: 0 0 5px rgba(157, 70, 255, 0.3);
    }
    50% {
        text-shadow: 0 0 20px rgba(157, 70, 255, 0.6), 0 0 40px rgba(3, 218, 198, 0.4);
    }
    100% {
        text-shadow: 0 0 5px rgba(157, 70, 255, 0.3);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(98, 0, 234, 0.5);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(98, 0, 234, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(98, 0, 234, 0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 20px rgba(157, 70, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(157, 70, 255, 0.6), 0 0 60px rgba(3, 218, 198, 0.4);
    }
    100% {
        box-shadow: 0 0 20px rgba(157, 70, 255, 0.3);
    }
}

/* Animation Classes */
.animate-text {
    animation: fadeIn 1s ease forwards, textGlow 3s ease-in-out infinite;
}

.animate-text-delay {
    opacity: 0;
    animation: fadeIn 1s ease 0.3s forwards;
}

.animate-fade-in {
    opacity: 0;
    animation: fadeIn 1s ease 0.6s forwards;
}

.pulse {
    animation: pulse 2s infinite;
}

.float {
    animation: float 6s ease-in-out infinite;
}

/* Hero Section Styles with Animations */
.hero {
    padding: 180px 0 120px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(18, 18, 18, 0.9), rgba(30, 30, 30, 0.9)), 
                url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIj4KICA8ZmlsdGVyIGlkPSJub2lzZSIgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSI+CiAgICA8ZmVUdXJidWxlbmNlIGJhc2VGcmVxdWVuY3k9IjAuNjUiIG51bU9jdGF2ZXM9IjMiIHN0aXRjaFRpbGVzPSJzdGl0Y2giIHR5cGU9ImZyYWN0YWxOb2lzZSIvPgogIDwvZmlsdGVyPgogIDxyZWN0IHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIiBmaWx0ZXI9InVybCgjbm9pc2UpIiBvcGFjaXR5PSIwLjA2Ii8+Cjwvc3ZnPg==');
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, rgba(98, 0, 234, 0.2), transparent 70%);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 600px;
    margin-bottom: var(--spacing-xl);
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: var(--spacing-sm);
    letter-spacing: 2px;
}

.tagline {
    font-size: 1.5rem;
    color: var(--on-surface);
    margin-bottom: var(--spacing-xl);
}

.cta-container {
    display: flex;
    gap: var(--spacing-md);
}

.hero-decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.glow-circle {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(157, 70, 255, 0.2), rgba(157, 70, 255, 0.05) 70%, transparent);
    top: 10%;
    right: 15%;
    animation: glow 4s ease-in-out infinite, float 8s ease-in-out infinite;
}

.glow-circle.secondary {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(3, 218, 198, 0.2), rgba(3, 218, 198, 0.05) 70%, transparent);
    top: 50%;
    right: 30%;
    animation: glow 5s ease-in-out infinite, float 10s ease-in-out infinite;
    animation-delay: 1s;
}

/* About Section Animations */
.about {
    padding: var(--spacing-xxl) 0;
    position: relative;
    overflow: hidden;
}

.about-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-xl);
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
    position: relative;
    min-height: 400px;
}

.image-container {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: linear-gradient(135deg, var(--surface-light), var(--surface));
    box-shadow: var(--shadow-lg);
    
}

.glow-effect {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(157, 70, 255, 0.2), transparent 70%);
    animation: glow 4s ease-in-out infinite;
}

.image-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent, 
        transparent, 
        transparent, 
        var(--primary-light)
    );
    animation: rotate 4s linear infinite;
}

.image-container::after {
    content: '';
    position: absolute;
    border-radius: calc(var(--radius-lg) - 3px);
    background: var(--surface);
}

/* Games Section Animations */
.games {
    padding: var(--spacing-xxl) 0;
    position: relative;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-xl);
}

.game-card {
    background: linear-gradient(135deg, var(--surface-light), var(--surface));
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    position: relative;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(157, 70, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.game-card:hover::before {
    transform: translateX(100%);
}

.game-image {
    height: 180px;
    overflow: hidden;
    position: relative;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.game-card:hover .game-image img {
    transform: scale(1.05);
}

.game-info {
    padding: var(--spacing-lg);
    position: relative;
}

.game-info h3 {
    margin-bottom: var(--spacing-sm);
}

.game-info p {
    margin-bottom: var(--spacing-lg);
    font-size: 0.9rem;
    color: var(--on-surface-medium);
}

/* Features Section Animations */
.features {
    padding: var(--spacing-xxl) 0;
    position: relative;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-xl);
}

.feature-card {
    background: linear-gradient(135deg, var(--surface-light), var(--surface));
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-lg);
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.feature-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: inherit;
    filter: blur(8px);
    opacity: 0.7;
    z-index: -1;
}

.feature-card:hover .feature-icon {
    animation: pulse 2s infinite;
}

/* Disclaimer Section Animations */
.disclaimer {
    padding: var(--spacing-xxl) 0;
    background-color: rgba(98, 0, 234, 0.05);
    position: relative;
}

.disclaimer-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: var(--spacing-xl);
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.7), rgba(45, 45, 45, 0.7));
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Media Queries for Animations */
@media (max-width: 768px) {
    .hero {
        padding: 150px 0 100px;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .tagline {
        font-size: 1.2rem;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .about-image {
        width: 100%;
        min-height: 300px;
        margin-top: var(--spacing-xl);
    }
    
    .features-grid, .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .cta-container {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
    }
}

/* Feature Icon Specific Styles */
.fast-loading {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.fast-loading::after {
    content: '⚡';
    font-size: 2rem;
    color: var(--on-background);
}

.no-registration {
    background: linear-gradient(135deg, var(--secondary-dark), var(--secondary));
}

.no-registration::after {
    content: '🔓';
    font-size: 2rem;
    color: var(--on-background);
}

.responsive {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
}

.responsive::after {
    content: '📱';
    font-size: 2rem;
    color: var(--on-background);
}

.immersive {
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
}

.immersive::after {
    content: '🎮';
    font-size: 2rem;
    color: var(--on-background);
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}