@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Lato:wght@300;400;700&display=swap');

/* Custom Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.card-hover {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 28px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.05);
}

.spin-hover:hover {
    animation: spin 1s ease-in-out;
}

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

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a2f23; 
}
 
::-webkit-scrollbar-thumb {
    background: #8fa89b; 
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c5a059; 
}

/* Tool Specific Styles */
.tarot-card {
    perspective: 1000px;
    cursor: pointer;
}

.tarot-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.tarot-card.flipped .tarot-card-inner {
    transform: rotateY(180deg);
}

.tarot-front, .tarot-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.tarot-front {
    background-color: #1a2f23; /* Forest Dark */
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23c5a059' fill-opacity='0.2' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
    display: flex;
    align-items: center;
    justify-content: center;
}

.tarot-back {
    background-color: #f4f1ea;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border: 2px solid #c5a059;
}

/* Rune Stone Style */
.rune-stone {
    width: 80px;
    height: 100px;
    background: #e6e2d6; /* Parchment Dark - imitating stone/bone color */
    border-radius: 40% 40% 40% 40% / 60% 60% 40% 40%;
    box-shadow: inset -2px -2px 6px rgba(0,0,0,0.2), 2px 2px 5px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #1a2f23;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #999;
}

.rune-stone:hover {
    transform: scale(1.05);
    background: #f4f1ea;
}

/* Compass Spin Animation */
@keyframes compassSpin {
    0% { transform: rotate(0deg); }
    80% { transform: rotate(720deg); } /* Fast spin */
    100% { transform: rotate(var(--final-rotation)); } /* Slow down to stop */
}

.animate-spin-compass {
    animation: compassSpin 3s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}