@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

:root {
    --bg-dark: #0a0e1a; /* Deeper Solid Night */
    --bg-deep: #050711;
    --primary-gold: #f59e0b;
    --gold-glow: rgba(245, 158, 11, 0.2);
    --mystic-violet: #8b5cf6;
    --violet-glow: rgba(139, 92, 246, 0.3);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --card-width: 140px;
    --card-height: 220px;
    --glass-bg: rgba(15, 23, 42, 0.85); /* More solid glass */
    --glass-border: rgba(245, 158, 11, 0.25);
    --header-height: 120px;
    --nebula-color-1: rgba(139, 92, 246, 0.08); 
    --nebula-color-2: rgba(30, 58, 138, 0.12);
    --nebula-color-3: rgba(245, 158, 11, 0.04);

    /* --- ZENITH ELEMENTAL TOKENS --- */
    --fire-glow: rgba(239, 68, 68, 0.45);   /* Red/Gold */
    --water-glow: rgba(59, 130, 246, 0.4);  /* Blue/Silver */
    --air-glow: rgba(167, 139, 250, 0.4);   /* Violet/White */
    --earth-glow: rgba(34, 197, 94, 0.35);  /* Green/Bronze */
    --void-glow: rgba(245, 158, 11, 0.4);   /* Default Universal */

    --current-aura: var(--void-glow);
}

/* --- DYNAMIC AURA STATES --- */
body.aura-fire { --current-aura: var(--fire-glow); }
body.aura-water { --current-aura: var(--water-glow); }
body.aura-air { --current-aura: var(--air-glow); }
body.aura-earth { --current-aura: var(--earth-glow); }
body.aura-void { --current-aura: var(--void-glow); }

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.shimmer-gold {
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.2), transparent);
    background-size: 200% 100%;
    animation: shimmer 4s infinite linear;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    background-color: #050711; /* SOLID DEEP DARK */
    color: var(--text-main);
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 16px;
    letter-spacing: 0.1px;
    line-height: 1.6;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    /* NOISE TEXTURE OVERLAY */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    opacity: 1;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: #020617; /* Solid base */
    z-index: -3;
}

@media screen and (min-width: 1024px) {
    body {
        background-size: 200% 200%;
        animation: nebulaFlow 30s ease-in-out infinite alternate;
    }
}

/* --- MYSTIC SCROLLBAR GLASS SYSTEM --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(2, 6, 23, 0.8);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gold); /* Solid Gold for Blueprint feel */
    border-radius: 10px;
    box-shadow: 0 0 5px var(--gold-glow);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-gold);
    box-shadow: 0 0 10px var(--gold-glow);
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-gold) rgba(2, 6, 23, 0.8);
}

h1, h2, h3, .mystic-title, .ai-chat-header, .portal-title {
    font-family: 'Be Vietnam Pro', sans-serif !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-gold);
    text-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.ai-status-pulse + div > div:first-child {
    font-family: 'Spectral', serif !important;
}

.chat-bubble, .reading-text, .card-desc, #ai-question, #setup-question, .ai-msg, .ai-chat-history, .instruction-text {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
}

/* Ă¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢Â
   Ä‘Å¸Å’Å’ AURA SYNC Ă¢â‚¬â€ Elemental Environment Engine
   Directly injected via body class by updateAura()
   Ă¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢ÂĂ¢â€¢Â */
:root {
    --aura-glow: rgba(139, 92, 246, 0.4);
    --aura-nebula: rgba(67, 56, 202, 0.2);
}

body.aura-fire {
    --primary-gold: #ff9800;
    --mystic-violet: #f43f5e;
    --aura-glow: rgba(244, 63, 94, 0.45);
    --aura-nebula: rgba(251, 146, 60, 0.22);
}

body.aura-water {
    --primary-gold: #38bdf8;
    --mystic-violet: #0ea5e9;
    --aura-glow: rgba(56, 189, 248, 0.4);
    --aura-nebula: rgba(14, 165, 233, 0.18);
}

body.aura-air {
    --primary-gold: #f5f5f5;
    --mystic-violet: #a855f7;
    --aura-glow: rgba(168, 85, 247, 0.45);
    --aura-nebula: rgba(226, 232, 240, 0.18);
}

body.aura-earth {
    --primary-gold: #facc15;
    --mystic-violet: #10b981;
    --aura-glow: rgba(16, 185, 129, 0.4);
    --aura-nebula: rgba(16, 185, 129, 0.12);
}

.bg-nebula {
    background: radial-gradient(circle at 50% 50%, var(--aura-nebula) 0%, transparent 80%);
    filter: blur(60px);
    transition: all 4s cubic-bezier(0.16, 1, 0.3, 1);
    mix-blend-mode: screen;
}

.ai-chat-panel {
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9); /* Normal shadow only */
    border: none; /* NO BORDER */
    background: rgba(2, 6, 23, 0.95); /* Simple Dark */
}

.ai-chat-panel::before {
    display: none; /* Remove flashy gradient line */
}


@keyframes nebulaFlow {
    from { background-position: 0% 0%; }
    to { background-position: 10% 10%; }
}

#celestial-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1 !important;
    /* Force to bottom */
    pointer-events: none;
}

/* Layered depth for background */
/* --- THE LIVING NEBULA & FOG --- */
/* --- THE VOID PLANES (Replacing Nebula) --- */
.bg-nebula {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -2;
    background: rgba(139, 92, 246, 0.03); /* Subtle solid violet tint */
    opacity: 0.6;
    border: 1px solid rgba(245, 158, 11, 0.03); /* Subtle grid feel */
}

.bg-nebula::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(245, 158, 11, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(245, 158, 11, 0.03) 1px, transparent 1px);
    background-size: 100px 100px;
}

/* WILL-CHANGE FOR HARDWARE ACCELERATION */
.tarot-card, .ai-chat-panel, .mandala-overlay, .reading-mat {
    will-change: transform, opacity;
    transform: translateZ(0); /* Force GPU */
}

.bg-nebula {
    will-change: transform, opacity;
}

.bg-fog {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 300px;
    pointer-events: none;
    z-index: -1;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.8) 0%, transparent 100%);
    opacity: 0.4;
    mask-image: linear-gradient(to top, black 20%, transparent 100%);
    -webkit-mask-image: linear-gradient(to top, black 20%, transparent 100%);
    animation: fogDrift 60s linear infinite;
}

@keyframes fogDrift {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- SACRED MANDALA LOADING (17/10 DIVINE FLOW) --- */
.mandala-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, rgba(2, 6, 23, 0.95) 0%, #000 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999 !important; /* SUPREME PRIORITY */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1.2s cubic-bezier(0.23, 1, 0.32, 1), transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
    perspective: 1200px;
    overflow: hidden;
    pointer-events: auto;
}

/* Cosmic Background Dust */
.mandala-overlay::after {
    content: '';
    position: absolute;
    inset: -50%;
    background-image: 
        radial-gradient(1px 1px at 10% 20%, #fff, transparent),
        radial-gradient(1px 1px at 30% 50%, #fff, transparent),
        radial-gradient(1px 1px at 70% 80%, #fff, transparent),
        radial-gradient(2px 2px at 40% 10%, var(--primary-gold), transparent),
        radial-gradient(2px 2px at 90% 40%, var(--mystic-violet), transparent);
    background-size: 200px 200px;
    opacity: 0.3;
    animation: cosmicShift 60s linear infinite;
}

@keyframes cosmicShift {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.mandala-overlay.hidden {
    opacity: 0 !important;
    visibility: hidden;
    pointer-events: none;
    transform: scale(1.05); /* Subtle scale out */
    transition: opacity 0.8s ease, transform 0.8s ease, visibility 0s 0.8s;
}

.mandala-container {
    position: relative;
    text-align: center;
    width: 100%;
    transform-style: preserve-3d;
    animation: containerFloat 6s ease-in-out infinite;
}

@keyframes containerFloat {
    0%, 100% { transform: translateY(0) rotateX(10deg); }
    50% { transform: translateY(-20px) rotateX(15deg); }
}

.mandala-visual {
    position: relative;
    width: clamp(240px, 60vw, 420px);
    height: clamp(240px, 60vw, 420px);
    margin: 0 auto 60px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- THE EYE OF DESTINY RITUAL (17/10 REBORN) --- */
.mandala-center-logo {
    position: absolute;
    z-index: 100;
    width: 110px;
    height: 110px;
}

.logo-circle-ritual {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #000;
    border: 3px solid var(--primary-gold);
    box-shadow: 
        0 0 40px var(--gold-glow), 
        inset 0 0 25px var(--gold-glow),
        0 0 100px rgba(139, 92, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    animation: ritualPulseMaster 4s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

@keyframes ritualPulseMaster {
    0% { transform: scale(1) translateZ(20px); filter: brightness(1) drop-shadow(0 0 10px var(--primary-gold)); }
    100% { transform: scale(1.1) translateZ(50px); filter: brightness(1.3) drop-shadow(0 0 30px var(--primary-gold)); }
}

.logo-circle-ritual img {
    width: 65%;
    height: 65%;
    object-fit: contain;
    z-index: 2;
    /* ZENITH MASK: Perfect circle clip for inconsistent logo assets */
    -webkit-mask-image: radial-gradient(circle, black 65%, transparent 68%);
    mask-image: radial-gradient(circle, black 65%, transparent 68%);
}

/* Sacred Geometric Rings */
.ritual-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: screen;
}

.ring-1 { 
    width: 180px; height: 180px; 
    border: 1px solid var(--primary-gold); 
    border-top-color: transparent;
    animation: ringSpin 8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.ring-2 { 
    width: 260px; height: 260px; 
    border: 2px dashed rgba(245, 158, 11, 0.4); 
    border-bottom-color: transparent;
    animation: ringSpinReverse 15s linear infinite;
}

.ring-3 { 
    width: 360px; height: 360px; 
    border: 1px solid rgba(139, 92, 246, 0.2); 
    background: radial-gradient(circle, transparent 70%, rgba(139, 92, 246, 0.05) 100%);
    animation: ringSpin 40s linear infinite;
}

/* Ritual Elements */
.ritual-vortex {
    position: absolute;
    inset: -150px;
    background: conic-gradient(from 0deg, 
        transparent, 
        var(--primary-gold) 10%, 
        transparent 20%, 
        var(--mystic-violet) 50%, 
        transparent 60%, 
        var(--primary-gold) 90%, 
        transparent);
    opacity: 0.15;
    filter: blur(60px);
    animation: spin 8s linear infinite;
    z-index: 1;
}

.ritual-inner-glow {
    position: absolute;
    inset: -50px;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
    opacity: 0.4;
    animation: glowPulse 3s ease-in-out infinite alternate;
}

.ritual-rays {
    position: absolute;
    inset: -200px;
    z-index: 5;
    pointer-events: none;
}

.ray {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.5px;
    height: 400px;
    background: linear-gradient(to top, var(--primary-gold), transparent);
    transform-origin: bottom center;
    opacity: 0;
    animation: rayBlaze 5s infinite ease-in-out;
}

@keyframes rayBlaze {
    0%, 100% { opacity: 0; transform: translate(-50%, -100%) scaleY(0.4); }
    50% { opacity: 0.6; transform: translate(-50%, -100%) scaleY(1.3); }
}

.ray:nth-child(1) { transform: translate(-50%, -100%) rotate(0deg); }
.ray:nth-child(2) { transform: translate(-50%, -100%) rotate(45deg); animation-delay: 0.6s; }
.ray:nth-child(3) { transform: translate(-50%, -100%) rotate(90deg); animation-delay: 1.2s; }
.ray:nth-child(4) { transform: translate(-50%, -100%) rotate(135deg); animation-delay: 1.8s; }
.ray:nth-child(5) { transform: translate(-50%, -100%) rotate(180deg); animation-delay: 2.4s; }
.ray:nth-child(6) { transform: translate(-50%, -100%) rotate(225deg); animation-delay: 3s; }
.ray:nth-child(7) { transform: translate(-50%, -100%) rotate(270deg); animation-delay: 3.6s; }
.ray:nth-child(8) { transform: translate(-50%, -100%) rotate(315deg); animation-delay: 4.2s; }

/* Mystical Symbols Layer */
.mandala-symbols {
    position: absolute;
    inset: -100px;
    z-index: 20;
    animation: rotateSlow 25s linear infinite;
}

.m-sym {
    position: absolute;
    font-size: 24px;
    filter: drop-shadow(0 0 10px var(--primary-gold));
    opacity: 0.6;
}

.s-1 { top: 0; left: 50%; transform: translateX(-50%); }
.s-2 { right: 0; top: 50%; transform: translateY(-50%); }
.s-3 { bottom: 0; left: 50%; transform: translateX(-50%); }
.s-4 { left: 0; top: 50%; transform: translateY(-50%); }

/* --- MANDALA TEXT TYPOGRAPHY --- */
/* --- MANDALA TEXT TYPOGRAPHY (NO-GEMINI EDITION) --- */
.mandala-text {
    font-family: 'Be Vietnam Pro', sans-serif !important;
    font-size: clamp(1.4rem, 4vw, 2.2rem);
    font-weight: 900;
    background: linear-gradient(to right, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--primary-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 10px var(--gold-glow));
    text-shadow: none; 
    position: relative;
    z-index: 100;
}

.mandala-subtext {
    font-family: 'Be Vietnam Pro', sans-serif !important;
    font-size: 1rem;
    color: #94a3b8;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.9;
    font-weight: 600;
}

@keyframes shineGold {
    to { background-position: 200% center; }
}

@keyframes glowPulse {
    from { opacity: 0.2; transform: scale(0.95); }
    to { opacity: 0.5; transform: scale(1.05); }
}

@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Hide old stuff */
.mandala-aura, .universe-orbit, .planet { display: none; }
.pupil-line {
    stroke: var(--primary-gold);
    stroke-width: 1px;
    opacity: 0.5;
}

@keyframes pupilBlink {
    0%, 45%, 55%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.1); }
}
/* CELESTIAL PARTICLES - CLEANED */
.mandala-rays { display: none; }
.ray { display: none; }

@keyframes rayFlicker {
    0% { opacity: 0.1; stroke-width: 0.3px; transform: scale(0.95); }
    100% { opacity: 0.4; stroke-width: 1px; transform: scale(1.05); }
}

/* CELESTIAL PARTICLES */
.mandala-particles circle {
    fill: #fff;
    opacity: 0.6;
}

.part-c {
    animation: driftParticle 3s ease-in-out infinite alternate;
    transform-origin: center;
}

.part-c:nth-child(2) { animation-delay: -0.5s; animation-duration: 4s; }
.part-c:nth-child(3) { animation-delay: -1.2s; animation-duration: 2.5s; }
.part-c:nth-child(4) { animation-delay: -1.8s; animation-duration: 5s; }
.part-c:nth-child(5) { animation-delay: -2.2s; animation-duration: 3.5s; }

@keyframes driftParticle {
    0% { transform: scale(0.5) translate(0, 0); opacity: 0.2; }
    100% { transform: scale(1.2) translate(15px, -15px); opacity: 0.8; }
}

/* MANDALA AURA PERSPECTIVE */
.mandala-aura {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
    z-index: -1;
    opacity: 0.2;
    animation: auraBreathRitual 4s ease-in-out infinite;
    border-radius: 50%;
}

/* Duplicated Styles Removed for Clarity */


/* ANIMATION SUITE */
@keyframes flowOuter {
    from { stroke-dashoffset: 600; transform: rotate(0deg); }
    to { stroke-dashoffset: 0; transform: rotate(360deg); }
}

@keyframes flowSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes drawSeal {
    0% { stroke-dashoffset: 600; transform: scale(0.9) rotate(0deg); }
    100% { stroke-dashoffset: 0; transform: scale(1.1) rotate(60deg); }
}

@keyframes pulseCoreRitual {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(1.3); opacity: 1; }
}

@keyframes auraBreathRitual {
    0%, 100% { transform: scale(1); opacity: 0.1; }
    50% { transform: scale(1.5); opacity: 0.3; }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.8; }
}

@keyframes ritualPulse {
    0%, 100% { opacity: 0.05; transform: scale(1); }
    50% { opacity: 0.15; transform: scale(1.1); }
}

.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj48ZmlsdGVyIGlkPSJuIj48ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iMC42NSIgbnVtT2N0YXZlcz0iMyIgc3RpdGNoVGlsZXM9InN0aXRjaCIvPjwvZmlsdGVyPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbHRlcj0idXJsKCNuKSIgb3BhY2l0eT0iMC4wNSIvPjwvc3ZnPg==');
    opacity: 0.2;
    pointer-events: none;
    z-index: -1;
}

/* Glassmorphism Utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
}

/* MOBILE OPTIMIZATION: DISABLE BACKDROP-FILTER IF LAGGY */
@media screen and (max-width: 768px) {
    .glass {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(10, 15, 30, 0.96); /* Solid dark for contrast */
    }
    .bg-nebula {
        filter: blur(40px); 
        animation: nebulaPulse 15s ease-in-out infinite alternate !important;
        will-change: transform, opacity;
        transform: translate3d(0,0,0);
    }
    .mandala-overlay {
        backdrop-filter: none !important; 
        -webkit-backdrop-filter: none !important;
        background: #020617; 
    }
    .ritual-vortex {
        display: none; /* Hide heavy gradients */
    }
    .ritual-rays {
        opacity: 0.1; /* Very subtle, no animation */
    }
    .ritual-ring.ring-3 {
        display: none; /* Only two rings on mobile */
    }
    .ray {
        height: 150px;
        animation: none !important;
        opacity: 0.1 !important;
    }
    .logo-circle-ritual::after {
        animation-duration: 6s; /* Slow down sweep */
    }
}

/* --- Majestic Position Labels (Final OCD Polish) --- */
.position-label-container {
    position: absolute;
    pointer-events: none;
    z-index: 1500; /* Above cards which are at 100+ */
    width: auto;
    white-space: nowrap;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease, transform 0.6s ease;
    transform: translate(-50%, -50%);
    text-align: center;
}

.position-label {
    /* PREMIUM GLASSMORPISM 2.0 */
    background: radial-gradient(circle at top left, rgba(30, 41, 59, 0.7) 0%, rgba(13, 17, 33, 0.8) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 0.5px solid rgba(245, 158, 11, 0.4);
    color: rgba(255, 255, 255, 0.98);
    
    /* RESPONSIVE TYPOGRAPHY (Laptop to Mobile) */
    padding: clamp(2px, 0.8vw, 6px) clamp(5px, 1.5vw, 18px);
    border-radius: 100px; /* Perfect pill */
    font-size: clamp(0.55rem, 1.2vw, 0.8rem);
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 700;
    padding-left: 15px !important;

    letter-spacing: clamp(0.5px, 0.5vw, 2px);
    text-transform: uppercase;
    
    @media (max-width: 600px) {
        padding: 4px 10px !important;
        font-size: 10px !important;
        font-weight: 800;
        letter-spacing: 0.5px !important;
    }
    
    /* MYSTIC DEPTH */
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
    box-shadow: 
        0 8px 32px 0 rgba(0, 0, 0, 0.8),
        0 0 15px rgba(245, 158, 11, 0.1),
        inset 0 0 10px rgba(255, 255, 255, 0.05);
        
    white-space: nowrap;
    text-align: center;
    max-width: fit-content;
    animation: labelEntry 1s cubic-bezier(0.16, 1, 0.3, 1) forwards, goldPulseRitual 6s infinite ease-in-out;
    opacity: 0;
    will-change: transform, opacity;
}

@keyframes goldPulseRitual {
    0%, 100% { border-color: rgba(245, 158, 11, 0.4); box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8), 0 0 15px rgba(245, 158, 11, 0.1); }
    50% { border-color: rgba(245, 158, 11, 0.7); box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8), 0 0 25px rgba(245, 158, 11, 0.2); }
}

.position-label-container.side-right {
    justify-content: flex-start;
}

.position-label-container.side-left {
    justify-content: flex-end;
}

h1,
h2,
h3,
.spread-card h3 {
    font-family: 'Spectral', serif !important;
    color: var(--primary-gold);
    letter-spacing: 2px;
    font-weight: 600;
    margin: 0;
}

p,
.spread-card p {
    font-family: 'Be Vietnam Pro', sans-serif;
    letter-spacing: 0.5px;
    font-weight: 300;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    position: relative;
    z-index: 10;
    /* Above stars */
}

/* Header */
.header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 40px;
    background: transparent;
    width: 100%;
    z-index: 1000;
    position: relative;
    /* Removed max-width for full-screen feel */
    margin: 0;
}

/* Premium Back Button */
#btn-back {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(13, 17, 33, 0.6);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary-gold);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

#btn-back:hover {
    background: rgba(245, 158, 11, 0.15);
    box-shadow: 0 0 20px var(--gold-glow);
    transform: translateY(-50%) scale(1.05);
}

#btn-back svg {
    width: 24px;
    height: 24px;
}

.logo {
    display: flex;
    flex-direction: column;
    /* Stack logo and text */
    align-items: center;
    gap: 10px;
}



.logo-wrap-header {
    position: relative;
    width: 48px;
    height: 48px;
}

.logo-circle-header {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--primary-gold);
    box-shadow: 0 0 15px var(--gold-glow);
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.logo-circle-header img {
    height: 85%;
    width: 85%;
    object-fit: contain;
}

.celestial-ring-header {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 1.5px dashed rgba(245, 158, 11, 0.6);
    border-radius: 50%;
    animation: spin 20s linear infinite;
    z-index: 1;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.logo-wrap-header {
    width: 60px;
    height: 60px;
}

.logo h1 {
    font-family: 'Spectral', serif !important;
    font-size: 1.8rem;
    font-weight: 500;
    letter-spacing: 5px;
    text-transform: uppercase;
    background: linear-gradient(to right, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    margin: 0;
}

body,
#app {
    min-height: 100vh;
    width: 100%;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto; /* Single primary scroll */
}

.main-content {
    flex: 1;
    position: relative;
    padding: 0 20px 20px 20px;
    display: flex;
    flex-direction: column;
    transition: filter 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
}

/* VoidTarot Style: Dim other elements when a card is revealed */
/* We no longer apply blur here as it makes the inner cards blurry even with high z-index. */
/* The blur is now handled by the .reveal-active::before overlay with backdrop-filter. */
.reveal-active .main-content > *:not(.modal) {
    filter: brightness(0.3);
    pointer-events: none;
    opacity: 0.3;
}

.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 10px 0;
    flex: 1;
    justify-content: flex-start; /* MODIFIED: Start from top to avoid huge gaps */
    animation: celestialFade 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.screen.active {
    display: flex;
}

/* On desktop, keep centering if needed, but flex-start is safer for long content */
@media screen and (min-width: 1024px) {
    .screen.active {
        justify-content: center;
    }
}

/* Cleanup duplicate or conflicting styles if any */

/* Reduced Margins for single-page feel */
.welcome-text {
    text-align: center;
    margin: 5px auto 15px auto;
    width: 100%;
    max-width: 100%; /* Immersive width */
    padding: 0 15px; /* ZENITH: Reduced for mobile accessibility */
}

.action-bar {
    text-align: center;
    margin: 15px 0;
    z-index: 1000;
    position: relative;
    order: 2;
    max-height: 200px; /* needed for smooth collapse transition */
    overflow: visible;
}

.reading-mat {
    position: relative;
    width: 100%;
    height: 550px; /* INCREASED for Celtic Cross */
    min-height: 480px;
    margin: 10px auto;
    overflow: visible;
    order: 3;
    perspective: 2000px;
}

@media screen and (max-width: 600px) {
    .reading-mat {
        height: 600px;
        min-height: 550px;
    }
}

@keyframes celestialFade {
    from {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* Setup Screen */

.brand-subtitle {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--primary-gold);
    opacity: 0.8;
    margin-bottom: 10px;
    display: block;
}

@keyframes letterSpacing {
    from {
        letter-spacing: 4px;
        opacity: 0.5;
    }

    to {
        letter-spacing: 7px;
        opacity: 0.9;
    }
}

.welcome-text h2 {
    font-family: 'Spectral', serif !important;
    font-size: clamp(1.6rem, 8vw, 2.3rem);
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: 1.2px;
    
    /* IMPERIAL METALLIC GOLD GRADIENT - 10/10 Premium */
    background: linear-gradient(135deg, #f59e0b 0%, #ffdfa9 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--primary-gold); /* Fallback */
    
    filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.4));
    -webkit-filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.4));
}

.welcome-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 300;
    max-width: 550px;
    margin: 0 auto;
    line-height: 1.6;
}

/* FIX: Question Box Layout */
.initial-question-box {
    width: 95%;
    max-width: 900px; /* Wider for more focus on input */
    margin: 0 auto 20px auto;
    animation: celestialFade 1.5s ease;
}

#setup-question {
    width: 100%;
    min-height: 110px;
    padding: 20px 25px;
    font-size: 1.1rem;
    color: #fff;
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(10px);
    border: 1px solid var(--primary-gold);
    border-radius: 18px;
    resize: none;
    outline: none;
    transition: all 0.4s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    display: block;
    margin: 0 auto;
    font-family: 'Be Vietnam Pro', sans-serif;
}

#setup-question::-webkit-scrollbar {
    width: 5px;
}

#setup-question::-webkit-scrollbar-thumb {
    background: var(--primary-gold);
    border-radius: 10px;
}

/* Ä‘Å¸â€”â€œĂ¯Â¸Â  BIRTH DATE INPUT STYLES */
.birth-date-input {
    display: flex;
    flex-direction: column;
    padding: 15px 20px;
    border: 1px solid rgba(255, 215, 137, 0.1);
    background: rgba(10, 15, 28, 0.4);
    border-radius: 16px;
    transition: all 0.3s ease;
    margin: 15px auto 0 auto;
    width: 100%;
}

.birth-date-input:focus-within {
    border-color: var(--primary-gold);
    box-shadow: 0 0 20px rgba(255, 215, 137, 0.15);
}

.birth-date-input label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Be Vietnam Pro', sans-serif;
}

.birth-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 12px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    cursor: pointer;
}

.birth-input::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(1.5);
    cursor: pointer;
}

#setup-question:focus {
    border-color: var(--primary-gold);
    box-shadow: 0 0 20px var(--gold-glow);
    background: rgba(15, 23, 42, 0.85);
}

/* Spread Choice Redesign */
.spread-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px 30px; 
    width: 100%;
    max-width: 1600px; /* Massive width for wide displays */
    margin: 30px auto; 
    perspective: 1000px;
    padding: 15px 40px; 
}

.spread-card {
    position: relative;
    padding: 30px 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    border-radius: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    background: rgba(13, 17, 33, 0.4);
    border: 1px solid rgba(245, 158, 11, 0.15);
    overflow: visible; /* CRITICAL: Ensure badges like "TH\1EA6Y G\1EE2I Ä‚Â " aren't clipped */
}

.spread-card h3 {
    font-family: 'Spectral', serif !important;
    font-size: 1.6rem;
    color: var(--primary-gold);
    margin: 0;
    text-shadow: 0 0 10px var(--gold-glow);
    transition: color 0.3s;
}

.spread-card p {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
    font-weight: 300;
}

.spread-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 28px;
    padding: 2px;
    background: linear-gradient(135deg, transparent, rgba(245, 158, 11, 0.4), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    transition: opacity 0.4s;
}

.spread-card:hover {
    transform: translateY(-15px) rotateX(5deg);
    border-color: var(--primary-gold);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7), 0 0 30px var(--gold-glow);
}

.spread-card:hover::before {
    opacity: 1;
}

.spread-icon {
    position: relative;
    height: 100px;
    width: 100%;
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mock-card {
    position: absolute;
    width: 45px;
    height: 75px;
    background-color: #020617;
    background-image: url('tarot-images/tarot_card_back.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid var(--primary-gold);
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.6);
    transition: all 0.4s ease;
    opacity: 0.95;
}

/* Fan Effects for icons */
.single .mock-card {
    transform: rotate(0deg);
}

.three .mock-card:nth-child(1) {
    transform: translateX(-25px) rotate(-15deg);
    opacity: 0.7;
}

.three .mock-card:nth-child(2) {
    transform: translateY(-5px);
    z-index: 2;
}

.three .mock-card:nth-child(3) {
    transform: translateX(25px) rotate(15deg);
    opacity: 0.7;
}

.five .mock-card:nth-child(1) {
    transform: translate(-40px, 10px) rotate(-25deg);
    opacity: 0.5;
}

.five .mock-card:nth-child(2) {
    transform: translate(-20px, -5px) rotate(-10deg);
    opacity: 0.8;
}

.five .mock-card:nth-child(3) {
    transform: translateY(-12px);
    z-index: 3;
    box-shadow: 0 0 20px var(--gold-glow);
}

.five .mock-card:nth-child(4) {
    transform: translate(20px, -5px) rotate(10deg);
    opacity: 0.8;
}

.five .mock-card:nth-child(5) {
    transform: translate(40px, 10px) rotate(25deg);
    opacity: 0.5;
}

.ten .mock-card {
    width: 25px;
    height: 42px;
    opacity: 0.85;
    background-size: cover;
    border-width: 1px;
    border-radius: 3px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.ten .mock-card:nth-child(1) {
    transform: translate(-45px, 8px) rotate(-22deg);
    z-index: 1;
}

.ten .mock-card:nth-child(2) {
    transform: translate(-35px, 4px) rotate(-18deg);
    z-index: 2;
}

.ten .mock-card:nth-child(3) {
    transform: translate(-25px, 1px) rotate(-12deg);
    z-index: 3;
}

.ten .mock-card:nth-child(4) {
    transform: translate(-15px, -1px) rotate(-6deg);
    z-index: 4;
}

.ten .mock-card:nth-child(5) {
    transform: translate(-5px, -2px) rotate(-2deg);
    z-index: 5;
}

.ten .mock-card:nth-child(6) {
    transform: translate(5px, -2px) rotate(2deg);
    z-index: 6;
}

.ten .mock-card:nth-child(7) {
    transform: translate(15px, -1px) rotate(6deg);
    z-index: 7;
}

.ten .mock-card:nth-child(8) {
    transform: translate(25px, 1px) rotate(12deg);
    z-index: 8;
}

.ten .mock-card:nth-child(9) {
    transform: translate(35px, 4px) rotate(18deg);
    z-index: 9;
}

.ten .mock-card:nth-child(10) {
    transform: translate(45px, 8px) rotate(22deg);
    z-index: 10;
    opacity: 1;
    box-shadow: 0 0 10px var(--gold-glow);
    border-color: #fff;
}

.spread-card h3 {
    font-size: 1.4rem;
    font-family: 'Spectral', serif !important;
    font-weight: 700;
    color: var(--primary-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.spread-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.5;
    max-width: 200px;
}

.spread-card:hover .mock-card {
    border-color: #fff;
    box-shadow: 0 0 15px var(--gold-glow);
}


.reading-mat {
    position: relative;
    width: 100%;
    min-height: 620px; /* Space for cross spread + labels */
    margin: 40px auto;
    padding-bottom: 180px; /* VASTLY increased breathe room for bottom label */
    overflow: visible;
    display: flex;
    justify-content: center;
    align-items: center;
}

.deck-pile {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--card-width);
    height: var(--card-height);
    transition: all 0.5s ease;
}


.btn-group {
    display: flex;
    gap: 25px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.welcome-text h2 {
    font-family: 'Spectral', serif !important;
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--primary-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}
#instruction-text {
    font-size: 1.1rem;
    color: var(--primary-gold);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 25px;
    text-shadow: 0 0 15px var(--gold-glow);
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-gold) 0%, #d97706 100%);
    color: #000;
    border: 1px solid rgba(0, 0, 0, 0.2);
    padding: 16px 45px;
    font-family: 'Spectral', serif !important;
    font-weight: 800;
    font-size: 1.4rem;
    border-radius: 40px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5), 0 0 25px var(--gold-glow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 5px;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 35px var(--gold-glow);
}

.btn-primary:active {
    transform: translateY(1px) scale(0.97);
}

.tarot-card {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 140px;
    height: 220px;
    cursor: pointer;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease;
    transform-style: preserve-3d;
    z-index: 10;
    user-select: none;
    -webkit-user-drag: none;
    border-radius: 13px;
    background: transparent;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    /* Clipping removed from parent to allow children (.card-wrap) to float outside bounds on hover */
}

.tarot-card.shuffling {
    transition: all 0.15s cubic-bezier(0.19, 1, 0.22, 1);
    animation: none !important;
}

.tarot-card.dealing-animation {
    animation: cardFlyIn 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes cardFlyIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3) rotate(0deg);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, 0) scale(1) rotate(0deg);
    }
}

/* MOBILE CARD SIZE OPTIMIZATION (12/10 RESPONSE) */
@media screen and (max-width: 600px) {
    .tarot-card {
        width: 85px;
        height: 135px;
        border-radius: 8px;
    }
    .tarot-card.stacked {
        width: 100px;
        height: 160px;
    }
    .spread-card {
        padding: 20px 15px;
    }
    .spread-card h3 {
        font-size: 1.3rem;
    }
    .spread-card p {
        font-size: 0.85rem;
    }
    .initial-question-box #setup-question {
        font-size: 1rem;
        padding: 15px;
    }
}

.tarot-card.stacked {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

/* Fan Card Hover Effect - REBORN (12/10 Smoothness) */
.card-wrap {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    border-radius: inherit;
    pointer-events: none; /* Let parent handle hover */
}

/* Stable Hit Area: The Container itself never moves visually */
.fan-card {
    transition: opacity 0.4s ease;
    will-change: transform, opacity;
}

.fan-card.selectable {
    cursor: pointer;
    pointer-events: auto !important;
    z-index: auto;
}

.fan-card.selectable:hover,
.fan-card.selectable:active,
.fan-card.selectable.touch-active {
    /* Stationary hit-area only changes its z-index for visibility */
    z-index: 15000 !important;
}

.fan-card.selectable:hover .card-wrap,
.fan-card.selectable:active .card-wrap,
.fan-card.selectable.touch-active .card-wrap {
    /* Only the internal visual representation floats up */
    transform: translateY(-25px) scale(1.15) translateZ(0); 
    box-shadow: 
        0 30px 70px rgba(0, 0, 0, 0.9),
        0 0 50px rgba(245, 158, 11, 0.9), 
        0 0 100px rgba(139, 92, 246, 0.7);
    filter: brightness(1.2) contrast(1.15) saturate(1.1);
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, filter 0.2s ease;
}

/* --- THE SHOCKWAVE REVEAL --- */
.card-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: transparent;
    border: 3px solid var(--primary-gold);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10001;
    opacity: 0;
    animation: celestialRipple 1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes celestialRipple {
    0% {
        width: 100px;
        height: 100px;
        opacity: 0.8;
        border-width: 8px;
        filter: blur(2px);
    }
    100% {
        width: 800px;
        height: 800px;
        opacity: 0;
        border-width: 1px;
        filter: blur(15px);
    }
}

/* --- THE STARDUST TRAIL --- */
.stardust-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #fff 0%, var(--primary-gold) 60%, transparent 100%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 5000;
    box-shadow: 0 0 10px var(--primary-gold);
}

.fan-card.selected {
    z-index: 200 !important;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important; /* Fast springy fly-in */
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 30px var(--gold-glow);
    filter: brightness(1.1);
}


.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    border-radius: 12px;
    border: 2px solid var(--primary-gold);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    background-color: #020617;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
    transform: translateZ(0); 
    clip-path: inset(0 round 12px);
    -webkit-clip-path: inset(0 round 12px);
    /* SHARPENING FIX: Ensuring premium visual fidelity */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    transform: translateZ(0); 
    -webkit-transform: translateZ(0);
}

.card-glow {
    position: absolute;
    inset: -10px;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.tarot-card:hover .card-glow {
    opacity: 0.6;
}

.card-back {
    background: linear-gradient(135deg, #1e293b, #020617);
    background-image: url('tarot-images/tarot_card_back.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}





.card-front {
    transform: rotateY(180deg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #000;
}

.tarot-card.reversed .card-front {
    /* When card is reversed, rotate it 180deg alongside the Y-flip */
    transform: rotateY(180deg) rotate(180deg);
}

/* Consolidated into the main .fan-card block above for maintenance and performance */

@media screen and (max-width: 600px) {
    .fan-card {
        box-shadow: 0 4px 10px rgba(0,0,0,0.4); /* Simpler shadow for mobile performance */
    }
    .fan-card.selected {
        box-shadow: 0 0 20px var(--gold-glow);
    }
    .card-glow {
        opacity: 0.3 !important; /* Keep a very subtle glow on mobile, better than none */
    }
}

.tarot-card.flipped {
    transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.8s ease;
}

.tarot-card.focus-active {
    box-shadow: 0 0 80px var(--gold-glow), 
                0 0 120px rgba(245, 158, 11, 0.4), 
                0 30px 100px rgba(0, 0, 0, 0.9) !important;
    z-index: 10000 !important;
}

/* Logic handled by .fan-card.selectable:hover for specific fan geometry preservation */

.reading-mat.selection-complete .fan-card:not(.selected) {
    opacity: 0 !important;
    pointer-events: none;
}

.reveal-active .position-label-container {
    opacity: 0 !important;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- AI Oracle: Majestic Interface --- */
.ai-chat-panel.hidden {
    display: none !important;
}

.ai-chat-panel {
    background: rgba(13, 17, 33, 0.92); /* Darker for better contrast */
    backdrop-filter: blur(40px) saturate(220%);
    -webkit-backdrop-filter: blur(40px) saturate(220%);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 35px;
    padding: 50px 40px 30px 40px; /* Increased top padding to 50px */
    max-width: 1000px;
    margin: 30px auto 70px auto;
    position: relative;
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.9),
        0 0 80px rgba(139, 92, 246, 0.15);
    order: 4;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
    animation: panelReveal 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    z-index: 1000;
    will-change: transform, opacity;
}

@keyframes panelReveal {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.tarot-reveal {
    transition: all 0.75s cubic-bezier(0.19, 1, 0.22, 1);
    animation: mysticEntrance 0.75s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.ai-chat-panel::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.5), transparent 40%, transparent 60%, rgba(245, 158, 11, 0.4));
    border-radius: 37px;
    z-index: -1;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    padding: 2px;
    animation: borderGlow 6s infinite alternate ease-in-out;
}

@keyframes borderGlow {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

@keyframes panelReveal {
    from {
        opacity: 0;
        transform: translateY(50px);
        filter: blur(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â  CHAT HEADER Ă¢â‚¬â€  Majestic Master Title Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â  */
.ai-chat-header {
    text-align: center;
    margin-bottom: 35px;
}

.master-crown-icon {
    font-size: 3rem;
    margin-bottom: 14px;
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.7));
    animation: floatingMystic 4s ease-in-out infinite;
    display: inline-block;
}

.ai-chat-header h3 {
    font-family: 'Spectral', serif !important;
    font-size: 2rem;
    letter-spacing: 4px;
    background: linear-gradient(180deg, #ffffff 20%, #f59e0b 80%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    font-weight: 700;
    text-shadow: none;
    line-height: 1.3;
}

.ai-chat-header p {
    font-family: 'Be Vietnam Pro', sans-serif;
    color: rgba(255, 255, 255, 0.55);
    font-style: italic;
    letter-spacing: 2px;
    margin-top: 10px;
    font-size: 0.95rem;
}

/* NEW: Mystic Divider */
.mystic-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
    opacity: 0.7;
}

.divider-line {
    height: 1px;
    width: 60px;
    background: linear-gradient(to var(--direction, right), transparent, #f59e0b);
}

.divider-line:last-child {
    --direction: left;
}

.divider-diamond {
    color: #f59e0b;
    font-size: 1.2rem;
    text-shadow: 0 0 10px #f59e0b;
}

@keyframes floatingMystic {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â  CHAT HISTORY Ă¢â‚¬â€  Expandable Response Area Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â  */
.ai-chat-history-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.ai-chat-history {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-height: 65vh; /* Use viewport height for better reading */
    overflow-y: auto;
    padding: 20px 25px;
    scroll-behavior: smooth;
    /* Softer gradient mask at edges */
    mask-image: linear-gradient(to bottom, transparent 0%, #000 3%, #000 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 3%, #000 95%, transparent 100%);
}

.ai-chat-history::-webkit-scrollbar {
    width: 5px;
}

.ai-chat-history::-webkit-scrollbar-track {
    background: transparent;
}

.ai-chat-history::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, rgba(139, 92, 246, 0.5), rgba(245, 158, 11, 0.5));
    border-radius: 20px;
}

/* Scroll-to-bottom floating button */
.btn-scroll-bottom {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 1;
    animation: bounceDown 2s infinite;
}

.btn-scroll-bottom svg {
    width: 20px;
    height: 20px;
}

.btn-scroll-bottom.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(10px);
}

.btn-scroll-bottom:hover {
    background: #fbbf24;
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 6px 25px rgba(245, 158, 11, 0.6);
}

@keyframes bounceDown {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(5px); }
}

/* Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â  INPUT AREA Ă¢â‚¬â€  Premium Send Experience Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â  */
/* --- MASTER ORACLE: Structured Response Sections --- */
/* 1. THE ORACLE VOICE (LỜI SẤM TRUYỀN) */
.tarot-oracle-text {
    margin: 40px 0;
    text-align: center;
}

.section-oracle {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-gold);
    margin-bottom: 25px;
    letter-spacing: 2px;
}

.tarot-oracle-text p {
    font-family: 'Spectral', serif !important;
    font-size: 1.3rem;
    line-height: 1.8;
    color: #f8fafc;
    font-style: italic;
    opacity: 0.95;
    padding: 0 10%;
}

/* 2. THE SYMBOLIC FLOW (DÒNG CHẢY BIỂU TƯỢNG) */
.tarot-flow-text {
    margin: 50px 0;
}

.section-flow {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--mystic-violet);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.tarot-flow-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #f1f5f9;
}

/* 3. THE COSMIC COMMAND (MỆNH LỆNH VŨ TRỤ) */
.tarot-advice-text {
    margin: 60px 0;
    padding: 20px 0;
}

.section-advice {
    display: block;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--primary-gold);
    text-transform: uppercase;
    letter-spacing: 6px;
    margin-bottom: 30px;
}

.tarot-advice-text p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #f8fafc;
    text-align: center;
    padding: 0 5%;
}

.tarot-card-tag {
    display: inline;
    color: var(--primary-gold);
    font-weight: 800;
    font-size: 1.05em;
    text-decoration: underline;
    text-decoration-color: rgba(245, 158, 11, 0.4);
    text-underline-offset: 3px;
    margin: 0 1px;
}

.tarot-h1, .tarot-h2, .tarot-h3 {
    font-family: 'Spectral', serif;
    color: #fff;
    margin: 35px 0 15px 0;
    letter-spacing: 1px;
}

.tarot-h1 { font-size: 2rem; border-bottom: 2px solid var(--primary-gold); padding-bottom: 10px; }
.tarot-h2 { font-size: 1.6rem; color: var(--primary-gold); }
.tarot-h3 { font-size: 1.3rem; opacity: 0.9; }



.tarot-hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(245, 158, 11, 0.3), transparent);
    margin: 40px 0;
}

/* 4. AUSPICIOUS HOUR (GIỜ HOÀNG ĐẠO) - PURE TEXT */
.horoscope-container {
    margin: 40px auto;
    text-align: center;
}

.horoscope-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary-gold);
    opacity: 0.6;
    margin-bottom: 10px;
}

.horoscope-badge {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
}

.horoscope-hint {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.ai-chat-input-area {
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ai-chat-input-box {
    position: relative;
    background: rgba(10, 14, 28, 0.95);
    border: 1.5px solid rgba(245, 158, 11, 0.25);
    border-radius: 28px;
    padding: 8px 8px 8px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    max-width: 800px;
    margin: 0 auto;
}

.input-icon-portal {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, 0.06);
    border-radius: 50%;
    font-size: 1.2rem;
    border: 1px solid rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    flex-shrink: 0;
}

.ai-chat-input-box:focus-within {
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: 
        0 0 25px rgba(245, 158, 11, 0.12),
        0 12px 35px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(245, 158, 11, 0.1);
    background: rgba(10, 14, 28, 0.85);
}

.input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

#ai-question {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 1.05rem;
    padding: 10px 0;
    resize: none;
    font-family: 'Be Vietnam Pro', sans-serif;
    line-height: 1.5;
    max-height: 120px;
    min-height: 42px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#ai-question::placeholder {
    color: rgba(255, 255, 255, 0.35);
    font-style: italic;
}

#ai-question::-webkit-scrollbar {
    display: none;
}

.input-glow {
    position: absolute;
    inset: -15px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.ai-chat-input-box:focus-within .input-glow {
    opacity: 1;
}

/* Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â  "HĂ¡Â»ÂŽI TH\1EA6Y" Ă¢â‚¬â€  THE PREMIUM SEND BUTTON Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â  */
.btn-ask-master {
    position: relative;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    color: #000;
    padding: 12px 28px;
    border-radius: 22px;
    font-size: 0.9rem;
    font-weight: 800;
    font-family: 'Be Vietnam Pro', sans-serif;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-transform: uppercase;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 
        0 4px 15px rgba(245, 158, 11, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    overflow: hidden;
    min-width: fit-content;
}

.btn-ask-master .ask-icon {
    width: 20px;
    height: 20px;
    stroke: #000;
    fill: none;
    transition: all 0.3s ease;
}

.btn-ask-master .ask-text {
    position: relative;
    z-index: 2;
    font-weight: 900;
    white-space: nowrap;
}

/* Golden Shimmer Sweep */
.btn-ask-master::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%;
    width: 80%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.5) 50%,
        transparent
    );
    transform: rotate(25deg);
    animation: shimmerGlimmer 5s infinite ease-in-out;
    z-index: 1;
}

@keyframes shimmerGlimmer {
    0% { left: -150%; }
    25% { left: 150%; }
    100% { left: 150%; }
}

.btn-ask-master:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 
        0 8px 25px rgba(245, 158, 11, 0.5),
        0 0 40px rgba(245, 158, 11, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.btn-ask-master:hover .ask-icon {
    transform: rotate(-15deg) scale(1.15);
    filter: drop-shadow(0 0 4px rgba(0,0,0,0.3));
}

.btn-ask-master:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.5);
}

.btn-ask-master:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.btn-ask-master:disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â  SECONDARY CONTROLS Ă¢â‚¬â€  Redraw + Hint Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â  */
.chat-secondary-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 800px;
    margin: 12px auto 0 auto;
    padding: 0 5px;
}

.btn-redraw-ritual {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.55);
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 500;
    font-family: 'Be Vietnam Pro', sans-serif;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-redraw-ritual .redraw-icon {
    width: 16px;
    height: 16px;
    stroke: rgba(255, 255, 255, 0.45);
    transition: all 0.3s ease;
}

.btn-redraw-ritual:hover {
    border-color: rgba(245, 158, 11, 0.4);
    color: var(--primary-gold);
    background: rgba(245, 158, 11, 0.06);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.1);
}

.btn-redraw-ritual:hover .redraw-icon {
    stroke: var(--primary-gold);
    transform: rotate(90deg);
}

.chat-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.5px;
}

.chat-hint .hint-icon {
    color: rgba(245, 158, 11, 0.4);
    font-size: 0.7rem;
}

.btn-text {
    position: relative;
    z-index: 2;
}

/* --- AI Message Bubbles (Premium Readability) --- */
.ai-msg {
    padding: 24px 28px;
    font-size: 1.05rem;
    line-height: 1.85;
    border-radius: 22px;
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    animation: messageReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    word-break: break-word;
    overflow-wrap: break-word;
}

@keyframes messageReveal {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
        filter: blur(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.ai-msg.user {
    background: rgba(245, 158, 11, 0.05); /* Very subtle user tint */
    border: none;
    color: #fff;
    align-self: flex-end;
    margin-left: 15%;
    max-width: 85%;
}

.ai-msg.system {
    background: transparent; /* NO BOX BACKGROUND */
    border: none; /* NO BORDER */
    color: #f1f5f9;
    align-self: flex-start;
    margin-right: 0;
    box-shadow: none;
    max-width: 100%;
    padding: 20px 0; /* Natural paragraph spacing */
}

@media screen and (max-width: 768px) {
    .ai-msg {
        padding: 16px 18px; /* High-density mobile layout */
        font-size: 0.95rem;
    }
}

.ai-msg.system.system-warning {
    border-color: rgba(239, 68, 68, 0.5); /* Deep red mystery */
    background: linear-gradient(145deg, rgba(30, 10, 10, 0.9) 0%, rgba(13, 17, 33, 0.9) 100%);
    animation: warningShake 0.4s ease-in-out;
}

@keyframes warningShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.ai-msg.system::before {
    display: none; /* Remove the floating icon */
}

.ai-status-pulse-small {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--primary-gold);
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 10px var(--gold-glow);
    animation: statusPulse 1.5s infinite ease-in-out;
}

@keyframes statusPulse {
    0%, 100% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 1; }
}

.ai-msg b {
    color: var(--primary-gold);
    font-weight: 700;
}

/* Master Voice Playback Button */
.btn-voice-master {
    margin-top: 10px;
    display: inline-flex;
    position: relative;
    z-index: 10;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(10, 14, 28, 0.95);
    border: 1.5px solid var(--primary-gold);
    border-radius: 100px; /* Pill shape for premium feel */
    color: var(--primary-gold);
    font-size: 0.9rem;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-voice-master:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: var(--primary-gold);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
    transform: translateY(-2px);
}

.btn-voice-master svg {
    width: 16px;
    height: 16px;
}


/* Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â 
   ATMOSPHERIC UX Ă¢â‚¬â€  Elemental Energy Effects
   Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â  */

#ai-chat-panel {
    transition: box-shadow 1.5s ease, border-color 1.5s ease, background 1.5s ease;
}

/* Ä‘Å¸â€ Â¥ FIRE Ă¢â‚¬â€  Warm amber glow + rising energy */
#ai-chat-panel.atmosphere-fire {
    box-shadow: 
        0 0 40px rgba(245, 158, 11, 0.15),
        0 0 80px rgba(239, 68, 68, 0.08),
        inset 0 0 30px rgba(245, 158, 11, 0.05);
    border-color: rgba(245, 158, 11, 0.4) !important;
    animation: fireBreath 4s ease-in-out infinite alternate;
}

@keyframes fireBreath {
    0% { box-shadow: 0 0 40px rgba(245, 158, 11, 0.15), 0 0 80px rgba(239, 68, 68, 0.08); }
    100% { box-shadow: 0 0 60px rgba(245, 158, 11, 0.25), 0 0 100px rgba(239, 68, 68, 0.12); }
}

/* Ä‘Å¸â€™Â§ WATER Ă¢â‚¬â€  Cool blue shimmer + wave ripple */
#ai-chat-panel.atmosphere-water {
    box-shadow: 
        0 0 40px rgba(59, 130, 246, 0.15),
        0 0 80px rgba(99, 102, 241, 0.08),
        inset 0 0 30px rgba(59, 130, 246, 0.05);
    border-color: rgba(59, 130, 246, 0.4) !important;
    animation: waterWave 5s ease-in-out infinite alternate;
}

@keyframes waterWave {
    0% { box-shadow: 0 0 40px rgba(59, 130, 246, 0.15), 0 0 80px rgba(99, 102, 241, 0.08); }
    100% { box-shadow: 0 0 55px rgba(59, 130, 246, 0.22), 0 0 95px rgba(99, 102, 241, 0.12); }
}

/* Ä‘Å¸Å’Â  EARTH Ă¢â‚¬â€  Golden green + crystal dust */
#ai-chat-panel.atmosphere-earth {
    box-shadow: 
        0 0 40px rgba(34, 197, 94, 0.12),
        0 0 80px rgba(202, 138, 4, 0.08),
        inset 0 0 30px rgba(34, 197, 94, 0.04);
    border-color: rgba(34, 197, 94, 0.35) !important;
    animation: earthPulse 6s ease-in-out infinite alternate;
}

@keyframes earthPulse {
    0% { box-shadow: 0 0 40px rgba(34, 197, 94, 0.12), 0 0 80px rgba(202, 138, 4, 0.08); }
    100% { box-shadow: 0 0 50px rgba(34, 197, 94, 0.18), 0 0 90px rgba(202, 138, 4, 0.12); }
}

/* Ä‘Å¸Å’Â¬Ă¯Â¸Â  AIR Ă¢â‚¬â€  Silver white + wind streaks */
#ai-chat-panel.atmosphere-air {
    box-shadow: 
        0 0 40px rgba(226, 232, 240, 0.12),
        0 0 80px rgba(148, 163, 184, 0.08),
        inset 0 0 30px rgba(226, 232, 240, 0.04);
    border-color: rgba(226, 232, 240, 0.35) !important;
    animation: airWhisper 4.5s ease-in-out infinite alternate;
}

@keyframes airWhisper {
    0% { box-shadow: 0 0 40px rgba(226, 232, 240, 0.12), 0 0 80px rgba(148, 163, 184, 0.08); }
    100% { box-shadow: 0 0 55px rgba(226, 232, 240, 0.2), 0 0 95px rgba(148, 163, 184, 0.14); }
}

/* Ä‘Å¸Å’â‚¬ TRANSFORMATION Ă¢â‚¬â€  Deep purple + vortex energy */
#ai-chat-panel.atmosphere-transformation {
    box-shadow: 
        0 0 40px rgba(139, 92, 246, 0.2),
        0 0 80px rgba(168, 85, 247, 0.1),
        inset 0 0 30px rgba(139, 92, 246, 0.06);
    border-color: rgba(168, 85, 247, 0.5) !important;
    animation: transformVortex 3.5s ease-in-out infinite alternate;
}

@keyframes transformVortex {
    0% { box-shadow: 0 0 40px rgba(139, 92, 246, 0.2), 0 0 80px rgba(168, 85, 247, 0.1); }
    50% { box-shadow: 0 0 70px rgba(139, 92, 246, 0.35), 0 0 110px rgba(168, 85, 247, 0.18); }
    100% { box-shadow: 0 0 50px rgba(139, 92, 246, 0.25), 0 0 90px rgba(168, 85, 247, 0.12); }
}

/* --- Details Modal (Premium Enhancements) --- */

.modal-card-img {
    width: 200px;
    height: 340px;
    border-radius: 14px;
    border: 3px solid var(--primary-gold);
    box-shadow: 0 0 50px var(--gold-glow);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card-img.is-reversed {
    transform: rotate(180deg);
}

.modal-card-details h2 {
    font-size: 2.22rem;
    margin-top: 10px;
}

.keywords {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--primary-gold);
}

.detail-section h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--primary-gold);
    border-bottom: 2px solid rgba(245, 158, 11, 0.3);
    padding-bottom: 4px;
}

.detail-section p {
    font-size: 1.05rem;
    line-height: 1.8;
}

.card-meaning-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #e2e8f0;
    margin-bottom: 25px;
    letter-spacing: 0.3px;
    font-weight: 300;
}

/* Thinking Spinner */
.spinner {
    border: 3px solid rgba(139, 92, 246, 0.2);
    border-left-color: var(--mystic-violet);
    width: 24px;
    height: 24px;
}

.thinking-loading {
    color: var(--mystic-violet);
    font-size: 1.1rem;
}

/* --- Modals & Overlays --- */
/* VOID OVERLAY: Now applied to #app so we can put cards/modals ABOVE it within the same stacking context */
#app::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.4) 0%, rgba(0, 0, 0, 0.95) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 9000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.reveal-active #app::before {
    opacity: 1;
    pointer-events: auto;
}
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.9);
    backdrop-filter: blur(10px);
    z-index: 20000; /* Above everything including focused card and overlay */
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
    animation: celestialFade 0.4s ease forwards;
}

.modal-content {
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    padding: 40px;
    position: relative;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
    border: 1px solid var(--glass-border);
}

.modal-content::-webkit-scrollbar {
    width: 5px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--primary-gold);
    border-radius: 10px;
}

@media (min-width: 800px) {
    .modal-content {
        flex-direction: row;
        align-items: flex-start;
    }
}

.modal-card-view {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.modal-card-details {
    flex: 1;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    transition: transform 0.3s;
    /* Expanded hit box for better UX */
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    color: var(--primary-gold);
    transform: rotate(90deg);
    background: rgba(255, 255, 255, 0.05);
}

/* --- GRANDMASTER MOBILE REDESIGN (10/10) --- */
@media (max-width: 600px) {
    header {
        height: 60px;
        padding: 0 15px;
    }
    
    .brand-logo {
        font-size: 1.1rem;
    }
    :root {
        --header-height: 80px;
    }

    .header {
        padding: max(35px, env(safe-area-inset-top)) 15px 15px 15px;
        min-height: var(--header-height);
    }

    .logo h1 {
        font-size: 1.2rem;
        letter-spacing: 2px;
    }

    .logo-wrap-header {
        width: 40px;
        height: 40px;
    }

    .welcome-text {
        margin: 5px auto 15px auto;
        padding: 0 10px;
    }

    .welcome-text h2 {
        font-size: 1.6rem;
        line-height: 1.3;
        margin-bottom: 8px;
    }

    .brand-subtitle {
        font-size: 0.7rem;
        letter-spacing: 1px;
    }

    .initial-question-box {
        margin-bottom: 25px;
        padding: 0 15px;
    }

    #setup-question {
        min-height: 85px;
        padding: 12px;
        font-size: 0.95rem;
        border-radius: 12px;
    }

    .spread-options {
        gap: 15px;
        grid-template-columns: 1fr; /* Single column on mobile for better legibility */
        padding: 0 15px 40px 15px;
    }

    .spread-card {
        padding: 20px 15px;
        border-radius: 20px;
        min-height: 120px; /* Reduced since it's now full width */
        display: flex;
        flex-direction: row; /* Horizontal layout for better space usage on mobile */
        align-items: center;
        text-align: left;
        gap: 15px;
    }

    .spread-card h3 {
        font-family: 'Spectral', serif !important;
        font-size: 1.15rem;
        margin-top: 0;
        margin-bottom: 4px;
        font-weight: 600;
        color: var(--primary-gold);
        text-shadow: 0 0 8px var(--gold-glow);
    }

    .spread-card p {
        font-family: 'Be Vietnam Pro', sans-serif;
        font-size: 0.85rem;
        line-height: 1.4;
        color: var(--text-muted);
        font-weight: 300;
    }

    .spread-info {
        flex: 1;
    }

    .spread-icon {
        transform: scale(0.65);
        margin-bottom: 0;
        flex-shrink: 0;
        width: 60px;
    }

    /* Reading Mat Mobile Optimizations */
    .reading-mat {
        height: 500px; /* Taller on mobile to avoid row overlap with chat panel */
        margin: 10px auto;
        overflow: visible;
        position: relative;
        z-index: 100;
    }

    .tarot-card {
        width: 80px;
        height: 130px;
        border-radius: 8px;
    }

    .card-face {
        border-radius: 8px;
    }

    /* Modal Mobile */
    .modal-content {
        padding: 50px 20px 30px 20px;
        max-height: 95vh;
        margin: 10px;
    }

    .modal-card-img {
        width: 130px;
        height: 220px;
        border-radius: 10px;
    }

    .modal-card-details h2 {
        font-size: 1.8rem;
        text-align: center;
    }

    .modal-card-keywords {
        text-align: center;
        font-size: 0.9rem;
    }

    /* Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â 
       MOBILE AI CHAT Ă¢â‚¬â€  PREMIUM RESPONSIVE (Ă¢â€°Â¤600px)
       Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â  */
    .ai-chat-panel {
        padding: 24px 16px 20px 16px;
        margin: 20px 8px 60px 8px;
        border-radius: 24px;
    }

    .ai-chat-panel::before {
        border-radius: 26px;
    }

    .ai-chat-header {
        margin-bottom: 12px;
    }

    .master-crown-icon {
        font-size: 1.5rem;
        margin-bottom: 4px;
    }

    .ai-chat-header h3 {
        font-size: 1.1rem;
        letter-spacing: 1.5px;
        line-height: 1.2;
        margin: 0;
    }

    .ai-chat-header p {
        font-size: 0.7rem;
        letter-spacing: 1px;
        margin-top: 4px;
        color: rgba(255, 255, 255, 0.45);
    }

    .mystic-divider {
        gap: 8px;
        margin: 8px 0;
    }

    .divider-line {
        width: 40px;
    }

    .divider-diamond {
        font-size: 0.9rem;
    }

    /* Chat History Ă¢â‚¬â€  Mobile */
    .ai-chat-history-wrapper {
        margin-bottom: 14px;
    }

    .ai-chat-history {
        padding: 12px 6px;
        max-height: 50vh;
        gap: 16px;
    }

    .ai-msg {
        padding: 16px 18px;
        font-size: 0.95rem;
        border-radius: 18px;
        line-height: 1.7;
        font-family: 'Be Vietnam Pro', sans-serif !important;
    }

    .ai-msg.user {
        margin-left: 8%;
        max-width: 92%;
    }

    .ai-msg.system {
        margin-right: 0;
        max-width: 100%;
        padding-left: 18px;
    }

    /* Hide the floating star on narrow mobile to prevent overflow */
    .ai-msg.system::before {
        display: none;
    }

    /* Input Area Ă¢â‚¬â€  Mobile */
    .ai-chat-input-area {
        padding-top: 8px;
    }

    .ai-chat-input-box {
        border-radius: 22px;
        padding: 5px 5px 5px 14px;
        gap: 8px;
    }

    .input-icon-portal {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    #ai-question {
        font-size: 0.9rem;
        min-height: 36px;
        padding: 6px 0;
    }

    /* "HĂ¡Â»ÂŽI TH\1EA6Y" Button Ă¢â‚¬â€  Mobile: Compact but still prominent */
    .btn-ask-master {
        padding: 10px 18px;
        font-size: 0.8rem;
        border-radius: 18px;
        gap: 6px;
        letter-spacing: 1px;
    }

    .btn-ask-master .ask-icon {
        width: 16px;
        height: 16px;
    }

    .btn-ask-master .ask-text {
        font-size: 0.75rem;
        letter-spacing: 0.8px;
    }

    /* Secondary Controls Ă¢â‚¬â€  Mobile */
    .chat-secondary-controls {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        margin-top: 10px;
        padding: 0 4px;
    }

    .btn-redraw-ritual {
        padding: 7px 14px;
        font-size: 0.72rem;
        border-radius: 100px;
    }

    .btn-redraw-ritual .redraw-icon {
        width: 14px;
        height: 14px;
    }

    .chat-hint {
        font-size: 0.65rem;
    }

    /* Scroll Button Ă¢â‚¬â€  Mobile */
    .btn-scroll-bottom {
        width: 34px;
        height: 34px;
    }

    .btn-scroll-bottom svg {
        width: 16px;
        height: 16px;
    }

    /* MOBILE LABEL DENSITY OPTIMIZATION */
    .position-label {
        font-weight: 600;
        letter-spacing: 1px;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        background: rgba(13, 17, 33, 0.8);
        white-space: normal;
        max-width: 100px;
        line-height: 1.2;
        padding: 4px 8px;
    }
}

/* Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â 
   EXTRA-SMALL PHONES (Ă¢â€°Â¤380px) Ă¢â‚¬â€  iPhone SE, etc.
   Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â  */
@media (max-width: 380px) {
    .ai-chat-panel {
        padding: 18px 10px 16px 10px;
        margin: 12px 4px 50px 4px;
        border-radius: 18px;
    }

    .ai-chat-panel::before {
        border-radius: 20px;
    }

    .ai-chat-header h3 {
        font-size: 0.95rem;
        letter-spacing: 1.2px;
    }

    .ai-chat-header p {
        font-size: 0.65rem;
    }

    .master-crown-icon {
        font-size: 1.2rem;
        margin-bottom: 2px;
    }

    .ai-chat-history {
        max-height: 45vh;
        padding: 8px 4px;
        gap: 12px;
    }

    .ai-msg {
        padding: 12px 14px;
        font-size: 0.88rem;
        border-radius: 14px;
        line-height: 1.6;
    }

    .ai-chat-input-box {
        border-radius: 18px;
        padding: 4px 4px 4px 10px;
        gap: 6px;
    }

    .input-icon-portal {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    #ai-question {
        font-size: 0.85rem;
        min-height: 32px;
    }

    .btn-ask-master {
        padding: 8px 14px;
        border-radius: 14px;
        gap: 4px;
    }

    .btn-ask-master .ask-icon {
        width: 14px;
        height: 14px;
    }

    .btn-ask-master .ask-text {
        font-size: 0.7rem;
        letter-spacing: 0.5px;
    }

    .chat-secondary-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .btn-redraw-ritual {
        font-size: 0.68rem;
        padding: 6px 10px;
    }

    .chat-hint {
        font-size: 0.6rem;
    }
}

/* Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â 
   TABLET DEVICES (601px-1024px) Ă¢â‚¬â€  iPad, Surface, etc.
   Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â Ă¢â€¢Â  */
@media (min-width: 601px) and (max-width: 1024px) {
    .ai-chat-panel {
        padding: 32px 28px 24px 28px;
        margin: 25px 16px 60px 16px;
        border-radius: 28px;
        max-width: 720px;
    }

    .ai-chat-panel::before {
        border-radius: 30px;
    }

    .master-crown-icon {
        font-size: 2.4rem;
    }

    .ai-chat-header {
        margin-bottom: 28px;
    }

    .ai-chat-header h3 {
        font-size: 1.4rem;
        letter-spacing: 2px;
    }

    .ai-chat-header p {
        font-size: 0.85rem;
    }

    .ai-chat-history {
        padding: 16px 18px;
        max-height: 55vh;
        gap: 20px;
    }

    .ai-msg {
        padding: 20px 24px;
        font-size: 1rem;
        line-height: 1.75;
        border-radius: 20px;
    }

    .ai-msg.system {
        margin-right: 3%;
        max-width: 97%;
    }

    .ai-msg.system::before {
        left: -26px;
        font-size: 1.1rem;
    }

    .ai-chat-input-box {
        border-radius: 24px;
        padding: 7px 7px 7px 18px;
        gap: 10px;
        max-width: 680px;
    }

    .input-icon-portal {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }

    #ai-question {
        font-size: 1rem;
        min-height: 40px;
    }

    .btn-ask-master {
        padding: 11px 24px;
        font-size: 0.85rem;
        border-radius: 20px;
    }

    .chat-secondary-controls {
        max-width: 680px;
    }

    /* General Tablet Adjustments */
    .spread-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        max-width: 680px;
    }

    .reading-mat {
        height: 500px;
    }

    .welcome-text h2 {
        font-size: 2rem;
    }

    .welcome-text p {
        font-size: 1rem;
    }

    .modal-content {
        max-width: 680px;
        padding: 35px 28px;
    }

    .btn-celestial {
        padding: 16px 40px;
        font-size: 1.05rem !important;
    }

    .btn-group {
        gap: 16px;
    }
}

/* --- THE EYE OF DESTINY THINKING RITUAL (Premium AI Phase) --- */
.thinking-loading {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(245, 158, 11, 0.05);
    border: 1px dashed rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    color: var(--primary-gold);
    font-family: 'Spectral', serif !important;
    font-style: italic;
    font-size: 1.1rem;
    margin: 20px 0;
    box-shadow: inset 0 0 20px rgba(245, 158, 11, 0.1);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(245, 158, 11, 0.1);
    border-top: 3px solid var(--primary-gold);
    border-radius: 50%;
    animation: ritualPulseLogo 1.5s infinite linear;
    position: relative;
    box-shadow: 0 0 10px var(--gold-glow);
}

.spinner::before {
    content: '';
    position: absolute;
    inset: -6px;
    border: 1px dotted var(--primary-gold);
    border-radius: 50%;
    animation: spin 4s infinite linear reverse;
    opacity: 0.5;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- BIRTH CARD CALCULATOR (Ă„Â Ă¡Â»â€¹nh mĂ¡Â»â€¡nh Ng\00DDy sinh) --- */
.birth-card-calculator {
    margin: 30px auto;
    max-width: 600px;
    padding: 25px;
    text-align: center;
    background: rgba(13, 17, 33, 0.5);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.birth-card-calculator h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--primary-gold);
}

.birth-card-calculator p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.birth-input-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}

#birth-date {
    padding: 12px 16px;
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    flex: 1;
    max-width: 250px;
    border: 1px solid rgba(251, 191, 36, 0.4);
    background: rgba(15, 23, 42, 0.8);
    position: relative;
}

/* Mobile responsive fix for Birth Card Calculator */
@media (max-width: 480px) {
    .birth-input-row {
        flex-direction: column;
        align-items: center;
    }
    #birth-date {
        max-width: 100%;
        width: 100%;
    }
    #btn-calc-birth {
        width: 100%;
    }
    .birth-card-calculator {
        padding: 20px 15px;
    }
    .birth-card-calculator h3 {
        font-size: 1.25rem;
        line-height: 1.4;
    }
}

.birth-result {
    margin-top: 20px;
    padding: 20px;
    border-radius: 15px;
    background: rgba(245, 158, 11, 0.05);
    border: 1px dashed rgba(245, 158, 11, 0.3);
    animation: fadeInUp 0.6s ease;
}

.birth-result.hidden { display: none; }

.birth-pair-name {
    font-family: 'Spectral', serif !important;
    font-size: 1.4rem;
    color: var(--primary-gold);
    font-weight: 700;
    margin-bottom: 10px !important;
}

.birth-pair-desc {
    font-size: 0.95rem !important;
    line-height: 1.6;
    color: #f1f5f9;
}

/* --- ENRICHED MODAL LAYOUT --- */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.meta-grid { margin-top: 20px; }

.glass-inner {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.section-badge {
    display: inline-block;
    padding: 2px 10px;
    background: var(--primary-gold);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    border-radius: 4px;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.esoteric-block {
    margin: 25px 0;
    border-left: 3px solid var(--primary-gold);
}

.esoteric-block h4 {
    color: var(--primary-gold);
    font-family: 'Spectral', serif !important;
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.meta-detail {
    font-size: 0.85rem !important;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 8px;
}

.meta-block h4 {
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--mystic-violet);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.medical-block {
    background: rgba(139, 92, 246, 0.05);
    padding: 20px;
    border-radius: 15px;
    margin: 25px 0;
}

.ritual-instruction-text {
    margin-top: 10px;
    font-style: italic;
    color: var(--mystic-violet);
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    padding-top: 10px;
}

.master-block {
    background: linear-gradient(to right, rgba(245, 158, 11, 0.1), transparent);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(245, 158, 11, 0.1);
}

:root {
    --mystic-violet: #8b5cf6;
    --violet-glow: rgba(139, 92, 246, 0.4);
}

@media (max-width: 600px) {
    .two-col {
        grid-template-columns: 1fr;
    }
}

/* --- THE EYE OF DESTINY THINKING RITUAL (Premium AI Phase) --- */
/* ... existing styles ... */
/* Add specific style for the new synthesis badge and border if not already set */
#modal-celtic-synthesis {
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
}


/* --- KNOWLEDGE LIBRARY SCREEN (13/10 Premium) --- */
.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    width: 95%;
    max-width: 1200px;
    margin: 40px auto;
}

.knowledge-item {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 20px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

.knowledge-item:hover {
    transform: translateY(-10px);
    background: rgba(15, 23, 42, 0.7);
    border-color: var(--primary-gold);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 20px var(--gold-glow);
}

.knowledge-item .icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px var(--gold-glow));
}

.knowledge-item h3 {
    font-family: 'Spectral', serif !important;
    font-size: 1.5rem;
    color: var(--primary-gold);
    margin: 0;
}

.knowledge-item p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.knowledge-detail {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    z-index: 2000;
    padding: 50px 40px;
    border-radius: 30px;
    background: rgba(10, 15, 30, 0.95);
    border: 1px solid var(--primary-gold);
    box-shadow: 0 0 100px rgba(0, 0, 0, 1), 0 0 40px var(--gold-glow);
    overflow: hidden;
    animation: knowledgeEntry 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes knowledgeEntry {
    from { opacity: 0; transform: translate(-50%, -45%) scale(0.9); filter: blur(10px); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: blur(0); }
}

.btn-close-knowledge {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    color: var(--primary-gold);
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
}

.knowledge-content-scroll {
    overflow-y: auto;
    max-height: 70vh;
    padding-right: 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-gold) transparent;
}

.knowledge-content-scroll::-webkit-scrollbar {
    width: 5px;
}

.knowledge-content-scroll::-webkit-scrollbar-thumb {
    background: var(--primary-gold);
    border-radius: 10px;
}

.knowledge-body-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #cbd5e1;
    font-weight: 300;
}

.knowledge-body-text h3 {
    color: var(--primary-gold);
    margin: 30px 0 15px 0;
    font-family: 'Spectral', serif !important;
    font-size: 1.4rem;
}

.knowledge-body-text ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.knowledge-body-text li {
    margin-bottom: 12px;
}

.loading-wisdom {
    grid-column: 1 / -1;
    padding: 100px;
    text-align: center;
    color: var(--primary-gold);
}

@media screen and (max-width: 600px) {
    .knowledge-detail {
        padding: 40px 20px;
        width: 95%;
    }
}

/* --- CELESTIAL PORTAL 3.0 (ATech Thiên Cơ Premium) --- */
.action-bar {
    margin: 60px 0;
    text-align: center;
}

.brand-subtitle {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-gold);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 12px;
    opacity: 0.8;
}

#instruction-text {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--primary-gold);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 30px;
    opacity: 0.9;
    animation: textFlicker 3s infinite alternate;
}

@keyframes textFlicker {
    0%, 100% { opacity: 0.7; filter: blur(0px); }
    50% { opacity: 1; filter: blur(0.5px); text-shadow: 0 0 25px rgba(245, 158, 11, 0.9); }
}

.user-question-display {
    font-family: 'Spectral', serif !important;
    font-style: italic;
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 30px;
    padding: 15px 30px;
    border-radius: 50px;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.15), transparent);
    border: 1px solid rgba(245, 158, 11, 0.1);
    backdrop-filter: blur(10px);
    display: inline-block;
}

.btn-group {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
}

/* --- THE CELESTIAL BUTTON (ACTION BUTTONS V5 - ARCANE TAROT) --- */
.btn-celestial {
    position: relative;
    padding: 18px 50px;
    font-family: 'Be Vietnam Pro', sans-serif !important;
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 2.5px !important;
    cursor: pointer;
    background: radial-gradient(circle at center, #1e1b4b 0%, #030712 100%) !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
    color: #ffffff !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    border-radius: 50px; /* Elegant Pill Shape */
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(245, 158, 11, 0.2);
    overflow: hidden;
}

.btn-celestial .btn-text {
    z-index: 2;
    position: relative;
    color: #ffffff !important; /* Pure Solid White - ABSOLUTELY NO GRADIENT */
    font-weight: 800 !important;
    text-shadow: 0 2px 4px rgba(0,0,0,1); /* Sharp shadow for separation */
    transition: all 0.3s ease;
    -webkit-text-fill-color: initial !important; 
    background: none !important;
}

.btn-celestial:hover:not(:disabled) {
    box-shadow: 
        0 12px 24px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(245, 158, 11, 0.3),
        0 0 0 1px #fbbf24;
    transform: translateY(-3px) scale(1.02);
}

.btn-celestial:hover:not(:disabled) .btn-text {
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6));
}

.btn-celestial:active:not(:disabled) {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.8);
}

.btn-celestial:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: rgba(15, 23, 42, 0.8) !important;
    box-shadow: 
        inset 0 0 0 3px rgba(3, 7, 18, 0.8),
        inset 0 0 0 4px rgba(255, 255, 255, 0.2); /* Grey out inner frame */
    transform: none;
}

.btn-celestial:disabled .btn-text {
    background: none;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.4);
    filter: none;
}

.btn-celestial .btn-icon {
    width: 26px;
    height: 26px;
    stroke: var(--primary-gold);
    fill: none;
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.5));
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-celestial:hover:not(:disabled) .btn-icon {
    stroke: #fbbf24;
    transform: rotate(30deg) scale(1.15); /* Mystical rotation */
    filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.8));
}

@media (max-width: 600px) {
    .btn-group {
        flex-direction: column;
        gap: 16px;
        align-items: center;
        width: 100%;
    }
    
    .btn-celestial {
        width: 100%;
        max-width: 320px;
        padding: 16px 22px;
        font-size: 1rem !important;
    }

    .action-bar {
        padding: 0 16px;
    }

    .ask-ai-section {
        flex-direction: column;
        gap: 20px;
    }

    .ask-ai-section .btn-celestial {
        width: 100%;
        max-width: 320px;
    }
}

/* --- PHASE 6: INTELLIGENT RE-DRAW & MASTER ADVICE --- */
.master-suggestion-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px auto 30px auto;
    padding: 15px 25px;
    max-width: 600px;
    border-radius: 100px; /* Pill shape */
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.15);
    animation: pulseGlow 4s infinite alternate;
    transition: all 0.5s ease;
}

.master-suggestion-container.hidden {
    display: none;
    opacity: 0;
    transform: translateY(-10px);
}

.suggestion-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px var(--primary-gold));
}

.suggestion-content {
    text-align: left;
}

.suggestion-rank {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--primary-gold);
    margin-bottom: 2px;
    text-transform: uppercase;
}

#master-suggestion-text {
    font-size: 0.95rem;
    color: var(--text-main);
    font-style: italic;
    margin: 0;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 15px rgba(139, 92, 246, 0.1); border-color: rgba(245, 158, 11, 0.2); }
    100% { box-shadow: 0 0 25px rgba(139, 92, 246, 0.3); border-color: rgba(245, 158, 11, 0.5); }
}

/* Recommended Spread Badge */
.spread-card.recommended {
    border-color: var(--primary-gold);
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.4);
    transform: translateY(-5px) scale(1.02);
    background: rgba(245, 158, 11, 0.2); /* Slightly stronger contrast */
    overflow: visible !important;
}

.spread-card.recommended::after {
    content: 'TH\1EA6Y G\1EE2I \00DD';
    position: absolute;
    top: -14px; /* Move it slightly further up */
    left: 50%;
    transform: translateX(-50%);
    background: #f59e0b;
    color: #000;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 12px;
    border-radius: 6px;
    white-space: nowrap;
    letter-spacing: 0.5px;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.6);
    z-index: 50;
}

@media (max-width: 600px) {
    .master-suggestion-container {
        margin: 15px 15px 25px 15px;
        padding: 12px 20px;
        border-radius: 20px;
    }
}

/* --- DEEP DIVE MODAL (Enhanced) --- */
.modal-body {
    display: flex;
    gap: 40px;
    padding: 30px;
}

.modal-card-view {
    flex: 0 0 300px;
}

.modal-card-details {
    flex: 1;
    text-align: left;
}

.detail-section h3 {
    font-family: 'Cinzel', serif;
    color: var(--primary-gold);
    border-bottom: 1px solid rgba(245, 158, 11, 0.2);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.keywords {
    font-family: 'Spectral', serif !important;
    color: var(--primary-gold);
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: -10px;
}

.shadow-box {
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.2);
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.shadow-box h4 {
    color: var(--mystic-violet);
    margin: 0 0 10px 0;
}

/* --- PARTICLE RESONANCE --- */
.particle {
    position: fixed;
    pointer-events: none;
    border-radius: 50%;
    z-index: 10001;
    filter: blur(1px);
}

@media (max-width: 768px) {
    .modal-body {
        flex-direction: column;
        align-items: center;
        padding: 20px;
    }
    .modal-card-view {
        flex: 0 0 auto;
        width: 180px;
    }
    .modal-card-img {
        height: 280px !important;
    }
}

/* --- MOBILE MANDALA SCALE (DIVINE RESPONSE) --- */
@media (max-width: 480px) {
    .mandala-center-logo { 
        width: 90px; height: 90px; 
    }
    .ring-1 { width: 150px; height: 150px; }
    .ring-2 { width: 220px; height: 220px; }
    .ring-3 { 
        width: 280px; height: 280px; 
    }
    .mandala-text { 
        font-family: 'Be Vietnam Pro', sans-serif !important;
        font-size: 1.3rem; 
        letter-spacing: 2px; 
        margin-bottom: 8px;
        font-weight: 800;
    }
    .mandala-subtext { 
        font-family: 'Be Vietnam Pro', sans-serif !important;
        font-size: 0.75rem; 
        letter-spacing: 1px;
    }
    .ritual-vortex {
        inset: -100px;
    }
}

/* --- END OF CUSTOM STYLES --- */
.stardust-particle {
    position: fixed;
    pointer-events: none;
    border-radius: 50%;
    z-index: 10000;
    will-change: transform, opacity, left, top;
}
