:root {
    --deep-purple: #1b0f2b;
    --midnight-blue: #0c0f24;
    --gold: #d4af37;
    --soft-white: #f0f0f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--midnight-blue);
    color: var(--soft-white);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

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

.mystical-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background:
        radial-gradient(circle at 20% 30%, rgba(27, 15, 43, 0.7) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(12, 15, 36, 0.7) 0%, transparent 40%),
        linear-gradient(to bottom, var(--midnight-blue), var(--deep-purple));
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.5;
}

.star {
    position: absolute;
    background-color: white;
    border-radius: 50%;
    animation: twinkle 3s infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.2; }
    100% { opacity: 1; }
}

.glow-effect {
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.glow-effect:hover {
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.5);
}

.gold-border {
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.mystical-card {
    background: rgba(27, 15, 43, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mystical-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(212, 175, 55, 0.1) 50%, transparent 70%);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.mystical-card:hover::before {
    opacity: 1;
}

/* ───────── Tarot Card ───────── */
.tarot-card {
    width: 140px;
    height: 220px;
    perspective: 1000px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.tarot-card:hover {
    transform: translateY(-10px);
}

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

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

.tarot-card-front,
.tarot-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

.tarot-card-front {
    background: linear-gradient(135deg, var(--deep-purple), #2a1b4a);
    border: 2px solid rgba(212, 175, 55, 0.5);
}

.tarot-card-back {
    background: linear-gradient(135deg, #2a1b4a, #3d2963);
    border: 2px solid rgba(212, 175, 55, 0.8);
    transform: rotateY(180deg);
    overflow: hidden;
}

.tarot-card-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* ───────── Floating Particle ───────── */
.floating-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: rgba(212, 175, 55, 0.6);
    border-radius: 50%;
    animation: float 8s infinite linear;
    z-index: -1;
}

@keyframes float {
    0%   { transform: translateY(0) translateX(0); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateY(-100vh) translateX(20px); opacity: 0; }
}

/* ───────── Text styles ───────── */
.gold-glow-text {
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.7);
}

.gold-gradient {
    background: linear-gradient(to right, var(--gold), #f7ef8a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.reading-result-card {
    background: rgba(12, 15, 36, 0.8);
    border-left: 4px solid var(--gold);
}

/* ───────── Section Divider ───────── */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
    margin: 2rem auto;
    width: 80%;
}

/* ───────── Animations ───────── */
.pulse-glow {
    animation: pulse-glow 2s infinite alternate;
}

@keyframes pulse-glow {
    0%   { box-shadow: 0 0 10px rgba(212, 175, 55, 0.3); }
    100% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.7); }
}

.fade-in {
    animation: fadeIn 0.7s ease forwards;
}

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

/* ───────── Section System ───────── */
.section-page {
    display: none;
}

.section-page.active {
    display: block;
    animation: fadeIn 0.7s ease forwards;
}

/* ───────── Navigation Buttons ───────── */
.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 24px;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.03em;
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-next {
    background: linear-gradient(to right, #6b21a8, #1e3a8a);
    color: #fff;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.btn-next:hover:not(:disabled) {
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.6);
    transform: translateY(-2px);
}

.btn-back {
    background: transparent;
    color: var(--gold);
    border: 1px solid rgba(212, 175, 55, 0.4);
}

.btn-back:hover:not(:disabled) {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.8);
    transform: translateY(-2px);
}

/* ───────── Progress Bar ───────── */
.progress-bar-wrapper {
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
}

.progress-track {
    background: rgba(255,255,255,0.1);
    border-radius: 9999px;
    height: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--gold), #f7ef8a);
    border-radius: 9999px;
    transition: width 0.5s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

.progress-step-label {
    font-size: 0.65rem;
    color: rgba(212, 175, 55, 0.5);
    font-family: 'Cinzel', serif;
    text-align: center;
    transition: color 0.3s;
}

.progress-step-label.active {
    color: var(--gold);
}

/* ───────── Topic card selected ───────── */
.topic-card-item {
    cursor: pointer;
    transition: all 0.3s ease;
}

.topic-card-item.selected {
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.7) !important;
    border-color: rgba(212, 175, 55, 0.8) !important;
}

/* ───────── Responsive ───────── */
@media (max-width: 768px) {
    .tarot-card {
        width: 90px;
        height: 145px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .nav-btn {
        padding: 9px 18px;
        font-size: 0.85rem;
    }

    #tarot-deck {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .tarot-card {
        width: 78px;
        height: 125px;
    }

    h1 {
        font-size: 1.5rem;
    }
}
