/* Zodiac-specific animations and styles */

/* Shake Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-10px) rotate(-1deg); }
    20% { transform: translateX(10px) rotate(1deg); }
    30% { transform: translateX(-10px) rotate(-1deg); }
    40% { transform: translateX(10px) rotate(1deg); }
    50% { transform: translateX(-10px) rotate(-1deg); }
    60% { transform: translateX(10px) rotate(1deg); }
    70% { transform: translateX(-10px) rotate(-1deg); }
    80% { transform: translateX(10px) rotate(1deg); }
    90% { transform: translateX(-5px) rotate(-0.5deg); }
}

.shake-animation {
    animation: shake 0.5s ease;
}

/* AMOLED Screen Effect */
.amoled-screen {
    background: #000000;
    position: relative;
    overflow: hidden;
}

.amoled-screen::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
    animation: screenGlow 4s ease-in-out infinite;
}

@keyframes screenGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Zodiac Sign Rotations */
.zodiac-wheel {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
}

.zodiac-signs-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: rotateWheel 60s linear infinite;
}

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

.zodiac-sign-item {
    position: absolute;
    font-size: 2rem;
    transform-origin: center;
}

/* Position each zodiac sign */
.zodiac-sign-item:nth-child(1) { transform: rotate(0deg) translateY(-140px); }
.zodiac-sign-item:nth-child(2) { transform: rotate(30deg) translateY(-140px); }
.zodiac-sign-item:nth-child(3) { transform: rotate(60deg) translateY(-140px); }
.zodiac-sign-item:nth-child(4) { transform: rotate(90deg) translateY(-140px); }
.zodiac-sign-item:nth-child(5) { transform: rotate(120deg) translateY(-140px); }
.zodiac-sign-item:nth-child(6) { transform: rotate(150deg) translateY(-140px); }
.zodiac-sign-item:nth-child(7) { transform: rotate(180deg) translateY(-140px); }
.zodiac-sign-item:nth-child(8) { transform: rotate(210deg) translateY(-140px); }
.zodiac-sign-item:nth-child(9) { transform: rotate(240deg) translateY(-140px); }
.zodiac-sign-item:nth-child(10) { transform: rotate(270deg) translateY(-140px); }
.zodiac-sign-item:nth-child(11) { transform: rotate(300deg) translateY(-140px); }
.zodiac-sign-item:nth-child(12) { transform: rotate(330deg) translateY(-140px); }

/* Lucky Number Animation */
.lucky-number-reveal {
    opacity: 0;
    transform: scale(0) rotate(720deg);
    animation: numberReveal 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes numberReveal {
    0% {
        opacity: 0;
        transform: scale(0) rotate(720deg);
        text-shadow: none;
    }
    30% {
        opacity: 0.7;
        transform: scale(0.8) rotate(540deg);
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    }
    70% {
        opacity: 1;
        transform: scale(1.3) rotate(180deg);
        text-shadow: 0 0 25px rgba(255, 215, 0, 1), 0 2px 4px rgba(0, 0, 0, 0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.3);
    }
}

/* Cosmic Particles */
.cosmic-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: var(--secondary-color);
    border-radius: 50%;
    opacity: 0;
    animation: floatParticle 4s ease-in-out infinite;
}

@keyframes floatParticle {
    0% {
        opacity: 0;
        transform: translateY(100px) scale(0);
    }
    20% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    80% {
        opacity: 1;
        transform: translateY(-50px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0);
    }
}

/* Mystical Text Effects */
.mystical-text {
    position: relative;
    display: inline-block;
}

.mystical-text::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: mysticalGlow 2s ease-in-out infinite;
    filter: blur(3px);
    opacity: 0.7;
}

@keyframes mysticalGlow {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Card Flip Animation */
.card-flip {
    perspective: 1000px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-flip:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.card-back {
    transform: rotateY(180deg);
}

/* Constellation Lines */
.constellation {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.constellation-line {
    stroke: var(--primary-color);
    stroke-width: 1;
    opacity: 0.3;
    animation: constellationPulse 3s ease-in-out infinite;
}

@keyframes constellationPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Zodiac Hover Effects */
.zodiac-hover {
    transition: all 0.3s ease;
}

.zodiac-hover:hover {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 20px var(--secondary-color));
}

/* Daily Tip Typewriter Effect */
.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--secondary-color);
    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(--secondary-color); }
}

/* Sparkle Effect */
.sparkle {
    position: relative;
}

.sparkle::before,
.sparkle::after {
    content: '✨';
    position: absolute;
    font-size: 0.8em;
    animation: sparkleAnimation 1.5s ease-in-out infinite;
}

.sparkle::before {
    top: -10px;
    left: -10px;
    animation-delay: 0s;
}

.sparkle::after {
    bottom: -10px;
    right: -10px;
    animation-delay: 0.75s;
}

@keyframes sparkleAnimation {
    0%, 100% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }
}

/* Floating Zodiac Signs Background */
.floating-signs {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.floating-sign {
    position: absolute;
    font-size: 2rem;
    opacity: 0.1;
    animation: floatSign 20s infinite linear;
}

@keyframes floatSign {
    0% {
        transform: translateY(100vh) rotate(0deg);
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
    }
}

/* Pulse Animation for CTAs */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(107, 70, 193, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(107, 70, 193, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(107, 70, 193, 0);
    }
}

/* Magical Border Animation */
.magical-border {
    position: relative;
    overflow: hidden;
}

.magical-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    z-index: -1;
    animation: borderRotate 3s linear infinite;
    border-radius: inherit;
}

@keyframes borderRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Aurora Effect */
.aurora {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        transparent 0%, 
        rgba(107, 70, 193, 0.1) 20%, 
        rgba(255, 215, 0, 0.1) 40%, 
        rgba(233, 30, 99, 0.1) 60%, 
        transparent 100%);
    animation: auroraWave 10s ease-in-out infinite;
    pointer-events: none;
}

@keyframes auroraWave {
    0%, 100% {
        transform: translateY(0) skewY(0deg);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-20px) skewY(2deg);
        opacity: 0.8;
    }
}

/* Loading Spinner - Zodiac Style */
.zodiac-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--secondary-color);
    border-radius: 50%;
    animation: zodiacSpin 1s linear infinite;
    position: relative;
}

.zodiac-spinner::before {
    content: '⭐';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
}

@keyframes zodiacSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Interactive Device Shake */
.device-preview.shaking .device-frame {
    animation: deviceShake 0.5s ease;
}

@keyframes deviceShake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}