/* ============================================
   MAGIC EFFECTS - КРУТІ ФІЧІ ДЛЯ ВСЬОГО САЙТУ
   Підключи цей файл до всіх HTML сторінок
   ============================================ */

/* ---------- 1. ПЛАВАЮЧІ ІКОНКИ НА ФОНІ ---------- */
.floating-icons {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.floating-icons i {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.1;
    color: #FF2D6D;
    animation: floatIcon 20s linear infinite;
}

@keyframes floatIcon {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.1;
    }
    90% {
        opacity: 0.1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* ---------- 2. АНІМОВАНИЙ ГРАДІЄНТНИЙ ТЕКСТ ---------- */
.gradient-text {
    background: linear-gradient(135deg, #FF2D6D, #6C63FF, #00E5FF);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ---------- 3. ЕФЕКТ СКЛА (GLASSMORPHISM) ---------- */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: rgba(255, 45, 109, 0.08);
    border-color: rgba(255, 45, 109, 0.3);
    transform: translateY(-5px);
}

/* ---------- 4. PARALLAX ПРИ СКРОЛІ ---------- */
.parallax {
    transition: transform 0.2s ease-out;
    will-change: transform;
}

/* ---------- 5. RIPPLE ЕФЕКТ ПРИ КЛІКУ ---------- */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 45, 109, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.ripple:active:after {
    width: 300px;
    height: 300px;
    opacity: 0;
}

/* ---------- 6. АНІМАЦІЯ ДРУКУ ТЕКСТУ ---------- */
.typewriter {
    overflow: hidden;
    border-right: 2px solid #FF2D6D;
    white-space: nowrap;
    animation: blink 0.75s step-end infinite;
}

@keyframes blink {
    from, to { border-color: transparent; }
    50% { border-color: #FF2D6D; }
}

/* ---------- 7. ПЛАВНА ПОЯВА ЕЛЕМЕНТІВ ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- 8. НЕОНОВЕ ПІДСВІЧУВАННЯ ---------- */
.neon-hover {
    transition: all 0.3s;
}

.neon-hover:hover {
    text-shadow: 0 0 10px #FF2D6D, 0 0 20px #FF2D6D, 0 0 30px #FF2D6D;
    color: white !important;
}

/* ---------- 9. АНІМАЦІЯ ЗАВАНТАЖЕННЯ СТОРІНКИ ---------- */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0A0A0F;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s, visibility 0.5s;
}

.page-loader.hide {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 45, 109, 0.3);
    border-top-color: #FF2D6D;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------- 10. МАГНІТНИЙ ЕФЕКТ ДЛЯ КНОПОК ---------- */
.magnetic {
    transition: transform 0.2s ease-out;
    will-change: transform;
}

/* ---------- 11. ШИММЕР ЕФЕКТ ДЛЯ ТЕКСТУ ---------- */
.shimmer {
    background: linear-gradient(90deg, #fff, #FF2D6D, #6C63FF, #fff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    to { background-position: 200% center; }
}

/* ---------- 12. ПОВІЛЬНЕ ПОЯВЛЕННЯ ---------- */
.fade-scale {
    animation: fadeScale 0.5s ease forwards;
}

@keyframes fadeScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ---------- 13. ЕФЕКТ ПЕРЕХОДУ МІЖ СТОРІНКАМИ ---------- */
.transition-fade {
    transition: 0.4s;
    opacity: 1;
}

.transition-fade.fade-out {
    opacity: 0;
}

/* ---------- 14. АНІМОВАНИЙ БОРДЕР ---------- */
.animated-border {
    position: relative;
}

.animated-border::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #FF2D6D, #6C63FF);
    transition: width 0.3s;
}

.animated-border:hover::after {
    width: 100%;
}

/* ---------- 15. ПАРТИКЛИ (СНІГ/ЗІРКИ) ---------- */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    background: rgba(255, 45, 109, 0.3);
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 8s linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-20vh) scale(1);
        opacity: 0;
    }
}

/* ---------- 16. ЕФЕКТ ПРИ НАВЕДЕННІ НА ЗОБРАЖЕННЯ ---------- */
.img-zoom {
    overflow: hidden;
    border-radius: 20px;
}

.img-zoom img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.img-zoom:hover img {
    transform: scale(1.08);
}

/* ---------- 17. АНІМАЦІЯ ДЛЯ СПИСКІВ ---------- */
.stagger-list li {
    opacity: 0;
    transform: translateX(-20px);
    animation: staggerIn 0.4s ease forwards;
}

@keyframes staggerIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.stagger-list li:nth-child(1) { animation-delay: 0.05s; }
.stagger-list li:nth-child(2) { animation-delay: 0.1s; }
.stagger-list li:nth-child(3) { animation-delay: 0.15s; }
.stagger-list li:nth-child(4) { animation-delay: 0.2s; }
.stagger-list li:nth-child(5) { animation-delay: 0.25s; }

/* ---------- 18. КАСТОМНИЙ СКРОЛЛ ---------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #FF2D6D, #6C63FF);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #FF2D6D;
}

/* ---------- 19. ВИДІЛЕННЯ ТЕКСТУ ---------- */
::selection {
    background: #FF2D6D;
    color: white;
}

/* ---------- 20. АДАПТИВНІ АНІМАЦІЇ ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}