/* =============================================
   FINCAN - Animations & Effects
   ============================================= */

/* =============================================
   Steam Effect (Kahve Buharı)
   ============================================= */

.steam-container {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 120px;
    pointer-events: none;
    overflow: visible;
}

.steam {
    position: absolute;
    bottom: 0;
    width: 8px;
    height: 80px;
    background: linear-gradient(to top,
            rgba(255, 255, 255, 0.4),
            rgba(255, 255, 255, 0));
    border-radius: 50%;
    filter: blur(8px);
    animation: steam-rise 3s ease-out infinite;
}

.steam:nth-child(1) {
    left: 20%;
    animation-delay: 0s;
}

.steam:nth-child(2) {
    left: 50%;
    animation-delay: 0.5s;
}

.steam:nth-child(3) {
    left: 80%;
    animation-delay: 1s;
}

@keyframes steam-rise {
    0% {
        transform: translateY(0) scaleX(1);
        opacity: 0;
    }

    15% {
        opacity: 0.5;
    }

    50% {
        transform: translateY(-50px) scaleX(1.5);
        opacity: 0.3;
    }

    100% {
        transform: translateY(-100px) scaleX(2);
        opacity: 0;
    }
}

/* =============================================
   Floating Symbols (Yüzen Semboller)
   ============================================= */

.floating-symbols {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.floating-symbol {
    position: absolute;
    font-size: 1.5rem;
    color: var(--gold-accent);
    opacity: 0.15;
    animation: float-symbol 20s ease-in-out infinite;
}

.floating-symbol:nth-child(1) {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.floating-symbol:nth-child(2) {
    top: 20%;
    right: 10%;
    animation-delay: 2s;
    animation-duration: 22s;
}

.floating-symbol:nth-child(3) {
    top: 60%;
    left: 15%;
    animation-delay: 4s;
    animation-duration: 28s;
}

.floating-symbol:nth-child(4) {
    top: 80%;
    right: 20%;
    animation-delay: 1s;
    animation-duration: 24s;
}

.floating-symbol:nth-child(5) {
    top: 40%;
    left: 80%;
    animation-delay: 3s;
    animation-duration: 26s;
}

.floating-symbol:nth-child(6) {
    top: 70%;
    left: 60%;
    animation-delay: 5s;
    animation-duration: 23s;
}

@keyframes float-symbol {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(20px, -30px) rotate(10deg);
    }

    50% {
        transform: translate(-10px, -50px) rotate(-5deg);
    }

    75% {
        transform: translate(15px, -20px) rotate(5deg);
    }
}

/* =============================================
   Glow Effect (Parıltı)
   ============================================= */

.glow {
    animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {

    0%,
    100% {
        filter: drop-shadow(0 0 20px rgba(var(--gold-accent-rgb), 0.4));
    }

    50% {
        filter: drop-shadow(0 0 40px rgba(var(--gold-accent-rgb), 0.7));
    }
}

.glow-text {
    text-shadow: 0 0 20px rgba(var(--gold-accent-rgb), 0.5);
    animation: text-glow 3s ease-in-out infinite;
}

@keyframes text-glow {

    0%,
    100% {
        text-shadow: 0 0 20px rgba(var(--gold-accent-rgb), 0.3);
    }

    50% {
        text-shadow: 0 0 40px rgba(var(--gold-accent-rgb), 0.6);
    }
}

/* =============================================
   Shimmer Effect (Parıldama)
   ============================================= */

.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    animation: shimmer-slide 3s ease-in-out infinite;
}

@keyframes shimmer-slide {
    0% {
        left: -100%;
    }

    50%,
    100% {
        left: 200%;
    }
}

/* =============================================
   Fade In Animations
   ============================================= */

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

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.fade-in-down {
    opacity: 0;
    transform: translateY(-30px);
    animation: fadeInDown 0.6s ease-out forwards;
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    animation: fadeInLeft 0.6s ease-out forwards;
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    animation: fadeInRight 0.6s ease-out forwards;
}

/* Staggered delays */
.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}

.delay-6 {
    animation-delay: 0.6s;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

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

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

@keyframes fadeInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =============================================
   Scroll-Triggered Animations
   ============================================= */

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* =============================================
   Parallax Effects
   ============================================= */

.parallax-container {
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: -20%;
    left: 0;
    width: 100%;
    height: 140%;
    will-change: transform;
}

/* =============================================
   Hover Effects
   ============================================= */

.hover-lift {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.hover-glow {
    transition: box-shadow var(--transition-normal);
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(var(--gold-accent-rgb), 0.4);
}

.hover-scale {
    transition: transform var(--transition-fast);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform var(--transition-normal);
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* =============================================
   Button Press Effect
   ============================================= */

.btn-press {
    transition: transform 0.1s ease-out;
}

.btn-press:active {
    transform: scale(0.95);
}

/* =============================================
   Ripple Effect
   ============================================= */

.ripple {
    position: relative;
    overflow: hidden;
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* =============================================
   Loading Animations
   ============================================= */

.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--gold-accent);
    border-radius: 50%;
    animation: loading-bounce 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(1) {
    animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loading-bounce {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Coffee cup rotation for loading */
.loading-cup {
    animation: cup-wobble 1.5s ease-in-out infinite;
}

@keyframes cup-wobble {

    0%,
    100% {
        transform: rotate(-5deg);
    }

    50% {
        transform: rotate(5deg);
    }
}

/* =============================================
   Mystical Background Orbs
   ============================================= */

.orb-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: -1;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    animation: orb-float 15s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--gold-accent) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--love-color) 0%, transparent 70%);
    bottom: 20%;
    left: -100px;
    animation-delay: 5s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, var(--career-color) 0%, transparent 70%);
    bottom: -50px;
    right: 20%;
    animation-delay: 10s;
}

@keyframes orb-float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

/* =============================================
   Page Transition
   ============================================= */

.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--espresso);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.76, 0, 0.24, 1);
}

.page-transition.active {
    transform: translateY(0);
}

.page-transition.exit {
    transform: translateY(-100%);
}

/* =============================================
   Symbol Pulse (Badge unlock effect)
   ============================================= */

.symbol-pulse {
    animation: symbol-pulse-anim 2s ease-in-out infinite;
}

@keyframes symbol-pulse-anim {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Golden sparkle effect */
.sparkle {
    position: relative;
}

.sparkle::before,
.sparkle::after {
    content: '✦';
    position: absolute;
    font-size: 0.8rem;
    color: var(--gold-accent);
    animation: sparkle-twinkle 2s ease-in-out infinite;
}

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

.sparkle::after {
    bottom: -5px;
    left: -10px;
    animation-delay: 1s;
}

@keyframes sparkle-twinkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* =============================================
   Typing Animation
   ============================================= */

.typing {
    overflow: hidden;
    border-right: 3px solid var(--gold-accent);
    white-space: nowrap;
    animation:
        typing 3s steps(30, end) forwards,
        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(--gold-accent);
    }
}

/* =============================================
   Fortune Card Reveal
   ============================================= */

.fortune-reveal {
    perspective: 1000px;
}

.fortune-reveal-inner {
    position: relative;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    transform-style: preserve-3d;
}

.fortune-reveal:hover .fortune-reveal-inner {
    transform: rotateY(180deg);
}

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

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

/* =============================================
   Accessibility: Reduced Motion
   ============================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .floating-symbol,
    .steam,
    .orb,
    .parallax-bg {
        animation: none;
    }
}