:root {
    /* Color Palette */
    --bg-dark: #09090b;
    --bg-panel: rgba(20, 20, 24, 0.7);
    --text-primary: #ededed;
    --text-secondary: #a1a1aa;
    
    /* Pastels (Anti-Graffiti vibes) */
    --neon-pink: #ff7eb3;
    --neon-blue: #7ee8fa;
    --neon-purple: #c47efa;
    
    /* Gold Foil Effect */
    --gold-gradient: linear-gradient(135deg, #BF953F, #FCF6BA, #B38728, #FBF5B7, #AA771C);
    --gold-solid: #D4AF37;
    
    /* Typography */
    --font-main: 'Outfit', sans-serif;
    --font-serif: 'Playfair Display', serif;
    --font-script: 'Rock Salt', cursive;

    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow: hidden; /* Stop scroll for app-like feel */
    position: relative;
    height: 100vh;
    width: 100vw;
}

/* Background Ambient Orbs */
.bg-gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.3;
    animation: floating 10s infinite alternate ease-in-out;
}
.orb-1 { width: 500px; height: 500px; background: var(--neon-pink); top: -200px; left: -100px; }
.orb-2 { width: 600px; height: 600px; background: var(--neon-purple); bottom: -300px; right: -200px; animation-delay: -5s; }
.orb-3 { width: 400px; height: 400px; background: var(--neon-blue); top: 30%; left: 40%; opacity: 0.15; animation-duration: 15s; }

@keyframes floating {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(50px) scale(1.1); }
}

#app {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
    padding: 2rem;
    overflow-y: auto;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 10;
}

.screen.hidden {
    display: none;
}

/* Typography Utility */
.gold-text {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    text-shadow: 0px 2px 10px rgba(191, 149, 63, 0.2);
}

/* --- Intro Screen --- */
.intro-content {
    margin: auto;
    text-align: center;
    max-width: 600px;
    padding: 2rem;
    background: rgba(10, 10, 10, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.sub-brand {
    font-size: 0.9rem;
    letter-spacing: 4px;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.main-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.tarot-script {
    font-family: var(--font-script);
    font-size: 2rem;
    text-transform: lowercase;
    display: block;
    margin-top: 5px;
    background: -webkit-linear-gradient(0deg, var(--neon-pink), var(--neon-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transform: rotate(-3deg);
}

.slogan {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 3rem;
}

.keyword-selector p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

/* Sound Toggle Button */
.sound-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1000;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.sound-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.saju-input-group {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.saju-input {
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 0.8rem 1.2rem;
    border-radius: 50px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-smooth);
    color-scheme: dark; /* To make the date picker icon match dark theme */
}

.saju-input:focus {
    border-color: var(--gold-solid);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.date-input {
    width: 170px;
}

.time-input {
    width: 180px;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23D4AF37%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem top 50%;
    background-size: 0.65rem auto;
    padding-right: 2.5rem;
}

.keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 2rem;
}

.btn-keyword {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-main);
    transition: var(--transition-smooth);
}

.btn-keyword.selected, .btn-keyword:hover {
    border-color: var(--gold-solid);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, #8a2be2 0%, #ff69b4 50%, #d4af37 100%);
    background-size: 200% auto;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    border: none;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: 1.15rem;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.4s ease;
    width: 100%;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.btn-primary:disabled {
    background: #333;
    color: #888;
    box-shadow: none;
    text-shadow: none;
    animation: none;
    cursor: not-allowed;
}

.btn-primary:not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 105, 180, 0.5);
}

/* --- Headers --- */
.header-minimal {
    text-align: center;
    padding-top: 2rem;
    padding-bottom: 1rem;
}
.step-indicator {
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--gold-solid);
    text-transform: uppercase;
}
.header-minimal h2 {
    font-family: var(--font-serif);
    font-size: 2rem;
    margin-top: 0.5rem;
}

/* --- Shuffle Screen --- */
.deck-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.deck-card {
    position: absolute;
    width: 180px;
    height: 300px;
    background: #111;
    border: 2px solid var(--gold-solid);
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(212, 175, 55, 0.1) 10px, rgba(212, 175, 55, 0.1) 20px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.deck-card::after {
    content: '';
    width: 80%;
    height: 90%;
    border: 1px solid var(--gold-solid);
    border-radius: 8px;
    opacity: 0.5;
}

.shuffle-instructions {
    position: absolute;
    bottom: 0;
    text-align: center;
    width: 100%;
    padding-bottom: 2rem;
    color: var(--text-secondary);
    animation: pulseText 2s infinite;
}

@keyframes pulseText {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* --- Selection Screen --- */
.card-spread {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    gap: -30px; /* Overlap effect */
    padding: 2rem;
    perspective: 1000px;
}

.spread-card {
    width: 120px;
    height: 200px;
    background: #111;
    border: 1px solid var(--gold-solid);
    border-radius: 8px;
    margin-left: -60px; /* Fan out */
    transition: var(--transition-smooth);
    cursor: pointer;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(212, 175, 55, 0.1) 5px, rgba(212, 175, 55, 0.1) 10px);
    box-shadow: -5px 0 15px rgba(0,0,0,0.5);
}

.spread-card:first-child {
    margin-left: 0;
}

.spread-card:hover {
    transform: translateY(-30px) rotate(0deg) !important;
    z-index: 100;
    box-shadow: 0 20px 30px rgba(0,0,0,0.8), 0 0 20px rgba(212, 175, 55, 0.4);
}

/* --- Payment Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background: var(--bg-panel);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 2.5rem;
    border-radius: 24px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-header h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-serif);
}

.modal-header p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.pricing-tiers {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tier {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    cursor: pointer;
    transition: var(--transition-smooth);
    background: rgba(0,0,0,0.3);
}

.tier:hover {
    background: rgba(255,255,255,0.05);
}

.tier.selected {
    border-color: var(--gold-solid);
    background: rgba(212, 175, 55, 0.05);
}

.tier-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
}

.tier-info {
    flex: 1;
}

.tier-info h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.tier-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.tier-price {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--gold-solid);
}

.gold-bg {
    background: var(--gold-gradient);
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-secondary);
    width: 100%;
    padding: 1rem;
    margin-top: 0.5rem;
    cursor: pointer;
    font-family: var(--font-main);
    transition: var(--transition-smooth);
}
.btn-text:hover { color: white; }

/* --- Reveal Screen --- */
.reveal-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    min-height: auto;
}

@media (min-width: 768px) {
    .reveal-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        padding-top: 2rem;
        gap: 4rem;
    }
}

.card-showcase {
    perspective: 1000px;
    margin-bottom: 2rem;
    margin-top: 2rem;
}

.card-wrapper {
    width: 250px;
    height: 420px;
    position: relative;
    transition: transform 1s;
    transform-style: preserve-3d;
}

.card-wrapper.flipped .card-flipper {
    transform: rotateY(180deg);
}

.card-flipper {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.card-back, .card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.card-back {
    background: #111;
    border: 2px solid var(--gold-solid);
    background-image: repeating-linear-gradient(45deg, transparent, transparent 15px, rgba(212, 175, 55, 0.1) 15px, rgba(212, 175, 55, 0.1) 30px);
}

.card-front {
    transform: rotateY(180deg);
    background: white;
    overflow: hidden;
}

.card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.interpretation-panel {
    flex: 1;
    background: var(--bg-panel);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 24px;
    padding: 2.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s 0.5s ease;
}

.reveal-container.revealed .interpretation-panel {
    opacity: 1;
    transform: translateY(0);
}

.card-title {
    font-size: 2.5rem;
    font-family: var(--font-serif);
    margin-bottom: 1rem;
}

.keywords-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2rem;
}

.keywords-tags span {
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    color: var(--neon-pink);
    border: 1px solid rgba(255, 126, 179, 0.3);
}

.reading-heading {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-family: var(--font-main);
    letter-spacing: 1px;
}

.reading-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    transition: all 0.5s ease;
}

.insight-content-wrapper {
    position: relative;
    margin-bottom: 2rem;
}

.insight-content-wrapper.locked .reading-text {
    filter: blur(6px);
    opacity: 0.4;
    user-select: none;
}

.unlock-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s ease;
    cursor: pointer;
}

.insight-content-wrapper.locked .unlock-overlay {
    opacity: 1;
    pointer-events: auto;
}

.unlock-overlay .btn-primary {
    padding: 0.8rem 2rem;
    font-size: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 20px rgba(212, 175, 55, 0.4);
}

/* --- AI Loading Animations --- */
.ai-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.mystic-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(212, 175, 55, 0.2);
    border-top-color: var(--gold-solid);
    border-radius: 50%;
    animation: spin-aura 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3), inset 0 0 10px rgba(212, 175, 55, 0.1);
}

.ai-loading-text {
    font-size: 1.1rem;
    color: var(--gold-solid);
    opacity: 0.8;
    animation: pulse-breathe 2s ease-in-out infinite;
    letter-spacing: 1px;
}

.loading-dots span {
    animation: bounce-dot 1.4s infinite ease-in-out both;
}
.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes spin-aura {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); border-top-color: #fff; }
    100% { transform: rotate(360deg) scale(1); border-top-color: var(--gold-solid); }
}

@keyframes pulse-breathe {
    0%, 100% { opacity: 0.5; text-shadow: none; }
    50% { opacity: 1; text-shadow: 0 0 10px rgba(212, 175, 55, 0.6); }
}

@keyframes bounce-dot {
    0%, 80%, 100% { transform: scale(0); opacity: 0; }
    40% { transform: scale(1); opacity: 1; }
}

.dynamic-record .interpretation-panel {
    transform: translateY(20px);
    opacity: 0;
    transition: all 1s ease;
}

.dynamic-record .interpretation-panel.revealed-panel {
    transform: translateY(0);
    opacity: 1;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}

/* Premium Action Buttons */
.reveal-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* allow wrapping on small screens */
    gap: 1rem;
    margin-top: 2rem;
}

.btn-share, .btn-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-share .icon {
    transition: transform 0.3s ease;
    opacity: 0.8;
}

.btn-share:hover, .btn-nav:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(212, 175, 55, 0.5); /* Gold tint on hover */
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.15);
}

.btn-share:hover .icon {
    transform: scale(1.1);
    opacity: 1;
}

.btn-share:active, .btn-nav:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gold-solid);
    color: var(--gold-solid);
}

.btn-outline:hover {
    background: rgba(212, 175, 55, 0.1);
    color: #fff;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

/* --- Back Navigation Button --- */
.header-minimal {
    position: relative; /* anchor for btn-back */
}

.btn-back {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    padding: 0.5rem 1.1rem;
    border-radius: 50px;
    font-family: var(--font-main);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    letter-spacing: 0.5px;
    backdrop-filter: blur(5px);
}

.btn-back:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--gold-solid);
    color: var(--gold-solid);
    transform: translateY(-50%) translateX(-2px);
}
