/* Custom styles for effects that can't be easily achieved with Tailwind utilities */

/* Glitch effect for text */
@keyframes glitch {
    0% {
        text-shadow: 0.05em 0 0 #ff6b35, -0.05em -0.025em 0 #f7931e,
            0.025em 0.05em 0 #ffab00;
    }
    15% {
        text-shadow: 0.05em 0 0 #ff6b35, -0.05em -0.025em 0 #f7931e,
            0.025em 0.05em 0 #ffab00;
    }
    16% {
        text-shadow: -0.05em -0.025em 0 #ff6b35, 0.025em 0.025em 0 #f7931e,
            -0.05em -0.05em 0 #ffab00;
    }
    49% {
        text-shadow: -0.05em -0.025em 0 #ff6b35, 0.025em 0.025em 0 #f7931e,
            -0.05em -0.05em 0 #ffab00;
    }
    50% {
        text-shadow: 0.025em 0.05em 0 #ff6b35, 0.05em 0 0 #f7931e,
            0 -0.05em 0 #ffab00;
    }
    99% {
        text-shadow: 0.025em 0.05em 0 #ff6b35, 0.05em 0 0 #f7931e,
            0 -0.05em 0 #ffab00;
    }
    100% {
        text-shadow: -0.025em 0 0 #ff6b35, -0.025em -0.025em 0 #f7931e,
            -0.025em -0.05em 0 #ffab00;
    }
}

.glitch-text:hover {
    animation: glitch 0.5s infinite;
}

/* Energy shield effect */
.energy-shield {
    position: relative;
    overflow: hidden;
}

.energy-shield::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff6b35, #f7931e, #c1272d, #ff6b35);
    background-size: 400% 400%;
    animation: gradient-shift 3s ease infinite;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.energy-shield:hover::before {
    opacity: 1;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Cyber grid background */
.cyber-grid-bg {
    position: relative;
}

.cyber-grid-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 107, 53, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 107, 53, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

/* Neural network background */
.neural-network-bg {
    position: relative;
}

.neural-network-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(247, 147, 30, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 20%, rgba(193, 39, 45, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Morphing background */
@keyframes morph {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

.morphing-bg::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 150%;
    background: linear-gradient(45deg, #f7931e, #ff6b35);
    opacity: 0.05;
    animation: morph 8s ease-in-out infinite;
    pointer-events: none;
}

/* Holographic card effect */
.holographic-card {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    /* backdrop-filter убран для четкости */
}

.holographic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: translateX(-100%);
    transition: transform 0.6s;
    pointer-events: none;
}

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

/* Floating elements animation */
.floating-element {
    animation: floating 6s ease-in-out infinite;
}

.floating-element:nth-child(2) {
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    animation-delay: 4s;
}

@keyframes floating {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-10px) rotate(5deg);
    }
    66% {
        transform: translateY(10px) rotate(-5deg);
    }
}

/* Pulse button effect */
.pulse-btn {
    position: relative;
    overflow: hidden;
}

.pulse-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.pulse-btn:active::after {
    width: 300px;
    height: 300px;
}

/* Matrix rain effect for preloader */
.matrix-rain::before {
    content: '10101010101010101010101010101010101010101010101010';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 200%;
    background: linear-gradient(0deg, transparent, #ff6b35, transparent);
    background-size: 100% 50px;
    animation: matrix-fall 5s linear infinite;
    opacity: 0.1;
    font-family: monospace;
    font-size: 20px;
    line-height: 1;
    color: #ff6b35;
    word-break: break-all;
}

@keyframes matrix-fall {
    to {
        top: 100%;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Loading animation improvements */
.loading-progress {
    position: relative;
    overflow: hidden;
}

.loading-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading-shine 2s infinite;
}

@keyframes loading-shine {
    to {
        left: 100%;
    }
}

/* Cyber text animation - упрощенная версия */
.cyber-text {
    position: relative;
    color: #ffffff;
    /* Убрана анимация мерцания для лучшей читаемости */
}

/* Fade in up animation */
.animate-fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

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

/* Убедимся, что элементы hero-content видны после загрузки */
.loaded .hero-content h1,
.loaded .hero-content p,
.loaded .hero-content .btn {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Форсированная видимость hero-content для исправления проблемы */
.hero-content h1,
.hero-content p,
.hero-content .btn {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Убедимся что анимации работают правильно */
.hero-content .animate-fade-in-up {
    animation-fill-mode: forwards;
    animation-duration: 0.8s;
    animation-timing-function: ease-out;
}

/* Pulse glow animation */
.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { 
        opacity: 1; 
        filter: drop-shadow(0 0 10px #ff6b35);
    }
    50% { 
        opacity: 0.8; 
        filter: drop-shadow(0 0 20px #ff6b35) drop-shadow(0 0 30px #ff6b35);
    }
}

/* Holographic text animation */
.holographic-text {
    background: linear-gradient(45deg, #ff6b35, #f7931e, #ff6b35);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: holographic 3s linear infinite;
}

@keyframes holographic {
    to {
        background-position: 200% center;
    }
}

/* Nav shrink effect */
.main-nav.nav-shrink {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    background: rgba(26, 20, 20, 0.98);
}

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

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

/* Responsive improvements */
@media (max-width: 768px) {
    .game-showcase > div:nth-child(n+4) {
        display: none;
    }
    
    .parallax-bg {
        background-attachment: scroll;
    }
}

/* Исправление hero section layout на десктопе */
@media (min-width: 1024px) {
    #home .max-w-7xl {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        align-items: center;
    }
    
    .hero-content {
        order: 1;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .hero-visual {
        order: 2;
    }
}

/* Game showcase animations */
.game-showcase {
    position: relative;
}

.game-showcase .game-card {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Floating animation for game cards */
.game-card:nth-child(1) {
    animation: float-rotate 8s ease-in-out infinite;
}

.game-card:nth-child(2) {
    animation: float-rotate 10s ease-in-out infinite reverse;
    animation-delay: -2s;
}

.game-card:nth-child(3) {
    animation: float-rotate 12s ease-in-out infinite;
    animation-delay: -4s;
}

.game-card:nth-child(4) {
    animation: float-scale 9s ease-in-out infinite;
    animation-delay: -1s;
}

.game-card:nth-child(5) {
    animation: float-scale 11s ease-in-out infinite reverse;
    animation-delay: -3s;
}

@keyframes float-rotate {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }
    25% {
        transform: translateY(-10px) rotate(2deg) scale(1.02);
    }
    50% {
        transform: translateY(5px) rotate(-1deg) scale(0.98);
    }
    75% {
        transform: translateY(-5px) rotate(-2deg) scale(1.01);
    }
}

@keyframes float-scale {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    33% {
        transform: translateY(-8px) scale(1.05);
    }
    66% {
        transform: translateY(8px) scale(0.95);
    }
}

/* Enhanced hover effect for game cards */
.game-showcase .game-card:hover {
    z-index: 50;
    transform: scale(1.15) !important;
    box-shadow: 0 20px 40px rgba(255, 107, 53, 0.4);
}

/* Remove animations from logo */
.pulse-glow {
    /* Removed animation */
    border: 2px solid #ff6b35;
}

/* About section stat box animations */
.stat-box {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(20px);
    opacity: 0;
}

.stat-box.animate-in {
    transform: translateY(0);
    opacity: 1;
}

.stat-box:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 35px rgba(255, 107, 53, 0.3);
}

.stat-box:nth-child(1) {
    animation: stat-bounce 2s ease-in-out infinite;
    animation-delay: 0s;
}

.stat-box:nth-child(2) {
    animation: stat-bounce 2s ease-in-out infinite;
    animation-delay: 0.3s;
}

.stat-box:nth-child(3) {
    animation: stat-bounce 2s ease-in-out infinite;
    animation-delay: 0.6s;
}

@keyframes stat-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

/* Process card animations */
.process-card {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(30px) rotateX(15deg);
    opacity: 0;
}

.process-card.animate-in {
    transform: translateY(0) rotateX(0deg);
    opacity: 1;
}

.process-card:hover {
    transform: translateY(-15px) rotateX(-5deg) scale(1.05);
    box-shadow: 0 20px 40px rgba(255, 107, 53, 0.25);
}

.process-card .process-icon {
    transition: transform 0.4s ease;
}

.process-card:hover .process-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Game cards enhanced animations */
.games-grid .game-card {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(40px) scale(0.9);
    opacity: 0;
}

.games-grid .game-card.animate-in {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.games-grid .game-card:hover {
    transform: translateY(-20px) scale(1.08);
    box-shadow: 0 25px 50px rgba(255, 107, 53, 0.3);
}

.games-grid .game-card:hover .game-image {
    transform: scale(1.1);
}

.games-grid .game-card .game-image {
    transition: transform 0.4s ease;
    overflow: hidden;
}

/* Contact form animations */
.contact-form {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(50px) rotateY(15deg);
    opacity: 0;
}

.contact-form.animate-in {
    transform: translateX(0) rotateY(0deg);
    opacity: 1;
}

.contact-info {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50px) rotateY(-15deg);
    opacity: 0;
}

.contact-info.animate-in {
    transform: translateX(0) rotateY(0deg);
    opacity: 1;
}

/* Form input animations */
.neon-input {
    transition: all 0.3s ease;
    position: relative;
}

.neon-input:focus {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.4);
}

/* Footer animations */
.footer-brand, .link-group {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(30px);
    opacity: 0;
}

.footer-brand.animate-in, .link-group.animate-in {
    transform: translateY(0);
    opacity: 1;
}

/* Parallax section enhanced animations - убираем mouse move */
.parallax-stat {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(50px) scale(0.8);
    opacity: 0;
}

.parallax-stat.animate-in {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.parallax-stat:hover {
    transform: translateY(-10px) scale(1.1);
}

/* Убираем mouse movement эффект для parallax */
.parallax-section .parallax-bg {
    transition: transform 0.1s ease-out;
}

/* Улучшенная стрелочка на первом экране */
.scroll-indicator {
    transition: all 0.3s ease;
}

.scroll-indicator:hover {
    transform: translateY(-5px);
}

.scroll-indicator:hover .fas {
    animation: bounce-enhanced 1s infinite;
}

@keyframes bounce-enhanced {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

/* Простая анимированная стрелочка мыши */
.scroll-mouse {
    animation: mouse-scroll 2s ease-in-out infinite;
}

@keyframes mouse-scroll {
    0%, 100% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0.5;
        transform: translateY(5px);
    }
}

/* Tool cards animations */
.tool-card {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(20px);
    opacity: 0;
}

.tool-card.animate-in {
    transform: translateY(0);
    opacity: 1;
}

.tool-card:hover {
    box-shadow: 0 20px 40px rgba(255, 107, 53, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.tool-card:hover .fas {
    transform: scale(1.1) rotate(5deg);
    transition: transform 0.3s ease;
}

/* Tool card icons gradient animation */
.tool-card .bg-gradient-to-br {
    position: relative;
    overflow: hidden;
}

.tool-card .bg-gradient-to-br::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.tool-card:hover .bg-gradient-to-br::before {
    opacity: 1;
    animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Section title animations */
.section-title {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(30px);
    opacity: 0;
}

.section-title.animate-in {
    transform: translateY(0);
    opacity: 1;
}

/* Staggered animation delays for multiple elements */
.animate-on-scroll:nth-child(1) { animation-delay: 0.1s; }
.animate-on-scroll:nth-child(2) { animation-delay: 0.2s; }
.animate-on-scroll:nth-child(3) { animation-delay: 0.3s; }
.animate-on-scroll:nth-child(4) { animation-delay: 0.4s; }
.animate-on-scroll:nth-child(5) { animation-delay: 0.5s; }

/* Design gallery animations - новые эффекты */
.design-gallery-main {
    animation: gallery-pulse-main 6s ease-in-out infinite;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(30px) scale(0.9);
    opacity: 0;
    filter: brightness(0.8);
}

.design-gallery-main.animate-in {
    transform: translateY(0) scale(1);
    opacity: 1;
    filter: brightness(1);
}

.design-gallery-main:hover {
    transform: translateY(-15px) scale(1.1);
    box-shadow: 0 25px 50px rgba(255, 107, 53, 0.4);
    filter: brightness(1.2) contrast(1.1);
    z-index: 40;
}

.design-gallery-secondary {
    animation: gallery-slide-secondary 8s ease-in-out infinite;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(50px) rotate(5deg);
    opacity: 0;
    filter: brightness(0.8);
}

.design-gallery-secondary.animate-in {
    transform: translateX(0) rotate(0deg);
    opacity: 1;
    filter: brightness(1);
}

.design-gallery-secondary:hover {
    transform: translateX(-10px) rotate(-3deg) scale(1.15);
    box-shadow: 0 20px 40px rgba(247, 147, 30, 0.35);
    filter: brightness(1.2) saturate(1.2);
    z-index: 40;
}

.design-gallery-tertiary {
    animation: gallery-morph-tertiary 10s ease-in-out infinite;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50px) rotate(-5deg);
    opacity: 0;
    filter: brightness(0.8);
}

.design-gallery-tertiary.animate-in {
    transform: translateX(0) rotate(0deg);
    opacity: 1;
    filter: brightness(1);
}

.design-gallery-tertiary:hover {
    transform: translateX(10px) rotate(3deg) scale(1.15);
    box-shadow: 0 20px 40px rgba(193, 39, 45, 0.35);
    filter: brightness(1.2) hue-rotate(10deg);
    z-index: 40;
}

@keyframes gallery-pulse-main {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.02) rotate(1deg);
        filter: brightness(1.1);
    }
}

@keyframes gallery-slide-secondary {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(1deg);
    }
    75% {
        transform: translateY(5px) rotate(-1deg);
    }
}

@keyframes gallery-morph-tertiary {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
        border-radius: 0.5rem;
    }
    33% {
        transform: translateY(-8px) rotate(2deg) scale(1.01);
        border-radius: 1rem;
    }
    66% {
        transform: translateY(4px) rotate(-1deg) scale(0.99);
        border-radius: 0.75rem;
    }
}

/* ===== МАГИЧЕСКИЕ АНИМАЦИИ ===== */

/* Анимированный фон для всех секций */
.magic-section {
    position: relative;
    overflow: hidden;
}

.magic-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 107, 53, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(247, 147, 30, 0.03) 0%, transparent 50%),
        linear-gradient(45deg, transparent 30%, rgba(193, 39, 45, 0.02) 50%, transparent 70%);
    animation: magic-float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes magic-float {
    0%, 100% {
        transform: translate(0%, 0%) rotate(0deg);
    }
    25% {
        transform: translate(-5%, -3%) rotate(1deg);
    }
    50% {
        transform: translate(3%, -5%) rotate(-1deg);
    }
    75% {
        transform: translate(-3%, 3%) rotate(0.5deg);
    }
}

/* Магические частицы при hover */
.magic-hover {
    position: relative;
    overflow: hidden;
}

.magic-hover::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.4) 0%, rgba(247, 147, 30, 0.2) 50%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
    opacity: 0;
}

.magic-hover:hover::after {
    width: 300px;
    height: 300px;
    opacity: 1;
    animation: magic-ripple 1s ease-out;
}

@keyframes magic-ripple {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2) rotate(180deg);
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(360deg);
    }
}

/* Голографический текст эффект - упрощенный без размытия */
.hologram-enhanced {
    background: linear-gradient(45deg, #ff6b35, #f7931e, #c1272d, #ff6b35);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: hologram-flow 6s ease-in-out infinite;
    /* Убираем text-shadow для четкости */
}

@keyframes hologram-flow {
    0%, 100% {
        background-position: 0% 50%;
        filter: hue-rotate(0deg);
    }
    25% {
        background-position: 100% 25%;
        filter: hue-rotate(90deg);
    }
    50% {
        background-position: 100% 100%;
        filter: hue-rotate(180deg);
    }
    75% {
        background-position: 0% 75%;
        filter: hue-rotate(270deg);
    }
}

/* Кибер-глитч эффект */
.cyber-glitch {
    position: relative;
    animation: cyber-glitch-main 4s infinite linear alternate-reverse;
}

.cyber-glitch::before,
.cyber-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.cyber-glitch::before {
    animation: cyber-glitch-1 0.5s infinite linear alternate-reverse;
    color: #f7931e;
    z-index: -1;
}

.cyber-glitch::after {
    animation: cyber-glitch-2 0.5s infinite linear alternate-reverse;
    color: #ff6b35;
    z-index: -2;
}

@keyframes cyber-glitch-main {
    0% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
    100% {
        transform: translate(0);
    }
}

@keyframes cyber-glitch-1 {
    0% {
        clip-path: inset(40% 0 61% 0);
    }
    20% {
        clip-path: inset(92% 0 1% 0);
    }
    40% {
        clip-path: inset(43% 0 1% 0);
    }
    60% {
        clip-path: inset(25% 0 58% 0);
    }
    80% {
        clip-path: inset(54% 0 7% 0);
    }
    100% {
        clip-path: inset(58% 0 43% 0);
    }
}

@keyframes cyber-glitch-2 {
    0% {
        clip-path: inset(25% 0 58% 0);
    }
    20% {
        clip-path: inset(6% 0 16% 0);
    }
    40% {
        clip-path: inset(68% 0 15% 0);
    }
    60% {
        clip-path: inset(50% 0 2% 0);
    }
    80% {
        clip-path: inset(76% 0 15% 0);
    }
    100% {
        clip-path: inset(70% 0 13% 0);
    }
}

/* Морфинг фон */
.morph-background {
    position: relative;
    overflow: hidden;
}

.morph-background::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg at 50% 50%,
        rgba(255, 107, 53, 0.1) 0deg,
        rgba(247, 147, 30, 0.1) 120deg,
        rgba(193, 39, 45, 0.1) 240deg,
        rgba(255, 107, 53, 0.1) 360deg
    );
    animation: morph-rotate 15s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes morph-rotate {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* Энергетические волны */
.energy-waves {
    position: relative;
    overflow: hidden;
}

.energy-waves::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 107, 53, 0.3),
        rgba(247, 147, 30, 0.3),
        transparent
    );
    animation: energy-sweep 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
}

@keyframes energy-sweep {
    0% {
        left: -100%;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

/* Пульсирующие элементы */
.pulse-magic {
    animation: pulse-magic-effect 2s ease-in-out infinite;
}

@keyframes pulse-magic-effect {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 107, 53, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 
            0 0 30px rgba(255, 107, 53, 0.5),
            0 0 50px rgba(247, 147, 30, 0.3),
            inset 0 0 20px rgba(193, 39, 45, 0.2);
    }
}

/* 3D карточки */
.card-3d {
    transform-style: preserve-3d;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

.card-3d:hover {
    transform: rotateY(15deg) rotateX(10deg) scale(1.05);
    box-shadow: 
        -20px 20px 40px rgba(0, 0, 0, 0.3),
        0 0 50px rgba(255, 107, 53, 0.2),
        inset 0 0 30px rgba(255, 255, 255, 0.05);
}

/* Магнетический эффект */
.magnetic-hover {
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
    cursor: pointer;
}

.magnetic-hover:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(255, 107, 53, 0.2);
}

/* Анимация появления текста */
.text-reveal {
    opacity: 0;
    transform: translateY(30px);
    animation: text-reveal-animation 1s ease-out forwards;
}

@keyframes text-reveal-animation {
    0% {
        opacity: 0;
        transform: translateY(30px) rotateX(90deg);
    }
    50% {
        opacity: 0.5;
        transform: translateY(15px) rotateX(45deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
    }
}

/* Исправляем проблемы с переносом текста */
p, .hero-content p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.6;
}

/* Улучшенные стили для hero подзаголовка */
.hero-content p {
    color: #d1d5db;
    /* Убираем анимацию свечения */
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 0.5px;
    /* Минимальная тень для читаемости */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Обновленные шрифты для футуристичного вида */
body, p, span, div, a, button, input, textarea {
    font-family: 'Rajdhani', sans-serif !important;
}

h1, h2, h3, h4, h5, h6, .font-orbitron, .text-4xl, .text-3xl, .text-2xl, .text-xl, .text-lg {
    font-family: 'Orbitron', monospace !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
}

/* Принудительное применение шрифтов */
* {
    font-family: 'Rajdhani', sans-serif;
}

.font-orbitron, [class*="font-orbitron"] {
    font-family: 'Orbitron', monospace !important;
}

/* Исправление видимости hero-content на десктопе */
.hero-content {
    position: relative;
    z-index: 20;
}

@media (min-width: 1024px) {
    .hero-content {
        max-width: 600px;
    }
}

/* Убрана анимация subtle-glow для четкости текста */

/* Подсветка ключевых слов */
.hero-content p .text-primary {
    background: linear-gradient(135deg, #00d4ff 0%, #ff0080 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: primary-pulse 2s ease-in-out infinite;
    font-weight: 600;
}

@keyframes primary-pulse {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

/* Улучшенные карточки игр */
.game-card-enhanced {
    position: relative;
    background: linear-gradient(145deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    /* backdrop-filter убран для четкости */
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
    overflow: hidden;
}

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

.game-card-enhanced:hover::before {
    left: 100%;
}

.game-card-enhanced:hover {
    transform: translateY(-15px) rotateX(5deg);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.2),
        0 0 50px rgba(255, 107, 53, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

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

/* ДОПОЛНИТЕЛЬНАЯ ПРИНУДИТЕЛЬНАЯ ЗАГРУЗКА ШРИФТОВ */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Rajdhani:wght@300;400;500;600;700&display=swap');

/* МАКСИМАЛЬНО ПРИНУДИТЕЛЬНЫЕ СТИЛИ ШРИФТОВ (ИСКЛЮЧАЯ ИКОНКИ) */
html, body, div:not([class*="fa"]):not([class*="icon"]), 
span:not([class*="fa"]):not([class*="icon"]), 
applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a:not([class*="fa"]):not([class*="icon"]), 
abbr, acronym, address, big, cite, code,
del, dfn, em:not([class*="fa"]):not([class*="icon"]), 
img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i:not([class*="fa"]):not([class*="icon"]), center,
dl, dt, dd, ol, ul, li:not([class*="fa"]):not([class*="icon"]),
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    font-family: 'Rajdhani', sans-serif !important;
}

/* ИСКЛЮЧЕНИЯ ДЛЯ ИКОНОК - НЕ ТРОГАЕМ ИХ ШРИФТЫ */
i[class*="fa"], 
i[class^="fa-"],
i[class*=" fa-"],
span[class*="fa"],
span[class^="fa-"],
span[class*=" fa-"],
[class*="icon"],
.fa, .fas, .far, .fal, .fab,
[class^="fa-"], [class*=" fa-"],
i.fa, i.fas, i.far, i.fal, i.fab,
span.fa, span.fas, span.far, span.fal, span.fab {
    font-family: "Font Awesome 5 Free", "Font Awesome 5 Pro", "Font Awesome 5 Brands", "FontAwesome", FontAwesome !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    line-height: 1 !important;
}

h1, h2, h3, h4, h5, h6,
.font-orbitron,
.text-6xl, .text-5xl, .text-4xl, .text-3xl, .text-2xl, .text-xl, .text-lg,
[class*="text-"] h1, [class*="text-"] h2, [class*="text-"] h3,
[class*="text-"] h4, [class*="text-"] h5, [class*="text-"] h6 {
    font-family: 'Orbitron', monospace !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
}