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

/* Base Styles */
body {
    font-family: 'Lato', sans-serif;
    background-color: #0f172a; /* Slate 900 fallback */
    color: #e2e8f0;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .mystic-font {
    font-family: 'Cinzel', serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: #4338ca;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6366f1;
}

/* Animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 5px rgba(165, 180, 252, 0.2); }
    50% { box-shadow: 0 0 20px rgba(165, 180, 252, 0.6); }
    100% { box-shadow: 0 0 5px rgba(165, 180, 252, 0.2); }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Utility Classes */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 3s infinite;
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

.animate-fade-in {
    animation: fade-in-up 1s ease-out forwards;
}

.card-hover {
    transition: all 0.3s ease;
}
.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.4);
}

/* Background Effects */
.stars-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
    overflow: hidden;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle var(--duration, 3s) infinite ease-in-out;
}

/* Tarot Card Flip */
.tarot-card-container {
    perspective: 1000px;
    width: 200px;
    height: 350px;
    cursor: pointer;
}

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

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

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

.tarot-card-back {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border: 2px solid #a5b4fc;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: repeating-linear-gradient(45deg, rgba(165, 180, 252, 0.1) 0, rgba(165, 180, 252, 0.1) 10px, transparent 10px, transparent 20px);
}

.tarot-card-front {
    background-color: #f1f5f9;
    color: #0f172a;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px;
    border: 4px solid #fbbf24;
}

.glass-panel {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
