@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700&family=Lato:wght@300;400&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

/* Base Styles */
:root {
    --arcana-purple: #4A148C; /* Deep Purple */
    --arcana-dark: #1A0B2E; /* Midnight */
    --arcana-gold: #FFD700; /* Celestial Gold */
    --arcana-light: #E1BEE7; /* Pale Purple */
    --arcana-text: #F3E5F5;
}

body {
    background-color: var(--arcana-dark);
    color: var(--arcana-text);
    font-family: 'Lato', sans-serif;
    background-image: radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 3px),
    radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 2px),
    radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 3px);
    background-size: 550px 550px, 350px 350px, 250px 250px;
    background-position: 0 0, 40px 60px, 130px 270px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cinzel Decorative', cursive;
    color: var(--arcana-gold);
}

.font-serif {
    font-family: 'Playfair Display', serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--arcana-dark); 
}
::-webkit-scrollbar-thumb {
    background: var(--arcana-purple); 
    border-radius: 4px;
    border: 1px solid var(--arcana-gold);
}

/* Layout Utilities */
.shrine-sidebar {
    background-color: #2D0F4B; /* Darker Sidebar */
    color: var(--arcana-text);
    box-shadow: 4px 0 15px rgba(0,0,0,0.5);
    border-right: 1px solid rgba(255, 215, 0, 0.2);
}

.shrine-card {
    background-color: rgba(45, 15, 75, 0.7);
    border: 1px solid rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    color: var(--arcana-text);
}

.shrine-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    border-color: var(--arcana-gold);
}

.btn-shrine {
    background-color: transparent;
    color: var(--arcana-gold);
    border: 1px solid var(--arcana-gold);
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.1);
}

.btn-shrine:hover {
    background-color: var(--arcana-gold);
    color: var(--arcana-dark);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.btn-shrine-outline {
    background-color: transparent;
    color: var(--arcana-light);
    border: 1px solid var(--arcana-light);
    transition: all 0.3s ease;
}

.btn-shrine-outline:hover {
    background-color: var(--arcana-light);
    color: var(--arcana-dark);
}

/* Animation Classes */
.shake-element {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.fade-in {
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Tarot Card Flip */
.tarot-card {
    perspective: 1000px;
    width: 200px;
    height: 340px;
    margin: 0 auto;
    cursor: pointer;
}
.tarot-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}
.tarot-card.flipped .tarot-inner {
    transform: rotateY(180deg);
}
.tarot-front, .tarot-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 10px;
    border: 2px solid var(--arcana-gold);
}
.tarot-front {
    background: linear-gradient(135deg, #1a0b2e 0%, #4a148c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--arcana-gold);
    font-size: 3rem;
}
.tarot-back {
    background: white;
    color: black;
    transform: rotateY(180deg);
    display: flex;
    flex-col;
    align-items: center;
    justify-content: center;
    padding: 10px;
}
