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

body {
    font-family: 'Lato', sans-serif;
    background-color: #0f172a;
    color: #e2e8f0;
    overflow-x: hidden;
}

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

/* Crystal Ball Container */
.crystal-ball-container {
    position: relative;
    width: 260px;
    height: 260px;
    margin: 0 auto;
    perspective: 1000px;
    cursor: pointer;
    transition: transform 0.5s ease;
}

@media (min-width: 768px) {
    .crystal-ball-container {
        width: 300px;
        height: 300px;
    }
}

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

/* The Ball */
.crystal-ball {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05) 20%, rgba(139, 92, 246, 0.4) 60%, rgba(15, 23, 42, 0.9) 100%);
    box-shadow: 
        0 0 20px rgba(139, 92, 246, 0.3),
        inset 0 0 20px rgba(139, 92, 246, 0.3),
        0 0 60px rgba(139, 92, 246, 0.1);
    position: relative;
    z-index: 10;
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

/* Inner Mist/Glow */
.inner-mist {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.2), transparent 70%);
    filter: blur(20px);
    opacity: 0;
    transition: opacity 2s ease;
}

.crystal-ball.active .inner-mist {
    opacity: 1;
    animation: pulse-glow 3s infinite alternate;
}

/* Pedestal (Shadow) */
.pedestal-shadow {
    width: 200px;
    height: 20px;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 70%);
    margin: -40px auto 0;
    border-radius: 50%;
    transform: scaleY(0.4);
    animation: shadow-scale 6s ease-in-out infinite;
}

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

@keyframes shadow-scale {
    0% { transform: scaleY(0.4) scaleX(1); opacity: 0.8; }
    50% { transform: scaleY(0.4) scaleX(0.8); opacity: 0.5; }
    100% { transform: scaleY(0.4) scaleX(1); opacity: 0.8; }
}

@keyframes pulse-glow {
    0% { transform: translate(-50%, -50%) scale(0.8); background: radial-gradient(circle, rgba(168, 85, 247, 0.4), transparent 70%); }
    100% { transform: translate(-50%, -50%) scale(1.2); background: radial-gradient(circle, rgba(236, 72, 153, 0.5), transparent 70%); }
}

/* Answer Text Fade In */
.fade-in-text {
    animation: fadeIn 1.5s ease-in-out forwards;
}

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

/* Starry Background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 40px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 50px 160px, #ddd, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 130px 80px, #fff, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.3;
}

/* Custom Navigation */
.nav-link {
    position: relative;
    padding-bottom: 2px;
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: #fbbf24;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* --- Yes/No Oracle Card Flip Styles --- */
.flip-card {
    background-color: transparent;
    width: 280px;
    height: 420px;
    perspective: 1000px;
    cursor: pointer;
    margin: 0 auto;
}

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

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

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px -5px rgba(0,0,0,0.5);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.flip-card-front {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Pattern on the front of the card */
.card-pattern {
    width: 90%;
    height: 90%;
    border: 1px solid rgba(255,255,255,0.1);
    background-image: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.flip-card-back {
    background-color: #0f172a;
    color: white;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.result-yes {
    background: linear-gradient(135deg, #064e3b 0%, #10b981 100%);
}

.result-no {
    background: linear-gradient(135deg, #7f1d1d 0%, #ef4444 100%);
}

.result-maybe {
    background: linear-gradient(135deg, #713f12 0%, #fbbf24 100%);
}
