/* Анимации для Проекта Наталья */

/* Движение звезд */
@keyframes stars-drift {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 100% 100%;
    }
}

/* Дыхание тумана */
@keyframes fog-breathe {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

/* Появление */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Эффект печатной машинки */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-cursor {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--gold);
    }
}

.typing-text {
    overflow: hidden;
    border-right: 2px solid var(--gold);
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-cursor 0.75s step-end infinite;
}

/* Пульсация свечения */
@keyframes pulse-glow {
    0%, 100% {
        text-shadow: 0 0 10px var(--text-glow);
    }
    50% {
        text-shadow: 0 0 20px var(--text-glow), 0 0 30px var(--text-glow);
    }
}

/* Свечение карты */
@keyframes card-glow {
    0%, 100% {
        text-shadow: 0 0 20px var(--text-glow);
        transform: scale(1);
    }
    50% {
        text-shadow: 0 0 30px var(--text-glow), 0 0 40px var(--text-glow);
        transform: scale(1.1);
    }
}

/* Мистическая спираль */
.mystical-spiral {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border: 4px solid var(--gold);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin-spiral 1s linear infinite;
    position: relative;
}

.mystical-spiral::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    margin: -30px 0 0 -30px;
    border: 3px solid var(--mystic-blue);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin-spiral 0.8s linear infinite reverse;
}

.mystical-spiral::after {
    content: "✦";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: var(--gold);
    animation: pulse-glow 1.5s ease-in-out infinite;
}

@keyframes spin-spiral {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Появление карт */
@keyframes card-appear {
    from {
        opacity: 0;
        transform: scale(0.8) rotateY(90deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
    }
}

.tarot-card {
    animation: card-appear 0.6s ease-out;
}

.tarot-card:nth-child(1) {
    animation-delay: 0.1s;
}

.tarot-card:nth-child(2) {
    animation-delay: 0.2s;
}

.tarot-card:nth-child(3) {
    animation-delay: 0.3s;
}

.tarot-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* Переворот карты */
@keyframes card-flip {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(180deg);
    }
}

/* Дрожание при наведении */
.tarot-card:hover .card-back::before {
    animation: card-glow 0.5s ease-in-out infinite, shake 0.3s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-2px) rotate(-2deg);
    }
    75% {
        transform: translateX(2px) rotate(2deg);
    }
}

/* Плавное появление текста */
@keyframes text-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.natalia-message p {
    animation: text-fade-in 0.8s ease-out;
}

/* Эффект свечения при фокусе */
.mystical-input:focus,
.mystical-textarea:focus {
    animation: input-glow 2s ease-in-out infinite;
}

@keyframes input-glow {
    0%, 100% {
        box-shadow: 0 0 15px var(--text-glow);
    }
    50% {
        box-shadow: 0 0 25px var(--text-glow), 0 0 35px var(--text-glow);
    }
}
