:root {
    --bg-dark: #07050d;
    --bg-card: #120e24;
    --gold-primary: #d4af37;
    --gold-light: #fbe8a6;
    --purple-accent: #7c3aed;
    --text-light: #f3f4f6;
    --text-muted: #9ca3af;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, .brand-logo {
    font-family: 'Cinzel', serif;
}

/* ===================================================
   EFEK FLIP KARTU TAROT HARIAN & 3D TRANSFORM
   =================================================== */
.perspective-1000 {
    perspective: 1000px;
}

.transform-style-3d {
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.backface-hidden {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.rotate-y-180 {
    transform: rotateY(180deg);
}

/* Class ini dipicu oleh JavaScript saat diklik */
.tarot-card-inner.flipped {
    transform: rotateY(180deg);
}

@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin-slow {
    animation: spinSlow 12s linear infinite;
}

/* ===================================================
   OVERRIDE INPUT FORM MEWAH & GELAP (FIX BACKGROUND PUTIH)
   =================================================== */
input[type="text"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
    background-color: #07050d !important;
    color: #fbe8a6 !important;
    border: 1px solid rgba(212, 175, 55, 0.4) !important;
    border-radius: 8px !important;
    padding: 0.8rem 1rem !important;
    font-size: 0.95rem !important;
    outline: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

input[type="text"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
select:focus,
textarea:focus {
    border-color: #d4af37 !important;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4) !important;
    background-color: #07050d !important;
}

select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    background-size: 1rem !important;
    padding-right: 2.5rem !important;
}

select option {
    background-color: #120e24 !important;
    color: #fbe8a6 !important;
    padding: 12px !important;
}

::placeholder {
    color: #9ca3af !important;
    opacity: 0.7;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(0.8) sepia(1) saturate(5) hue-rotate(5deg);
    cursor: pointer;
}

/* ===================================================
   PAKET ANIMASI LENGKAP & SUPERCANGGIH
   =================================================== */
.text-gold-gradient {
    background: linear-gradient(135deg, #fbe8a6 0%, #d4af37 25%, #fff 50%, #d4af37 75%, #b8860b 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: goldShimmer 4s linear infinite;
}

@keyframes goldShimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.gold-glow {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    animation: pulseGlow 3s infinite alternate;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 15px rgba(212, 175, 55, 0.3), 0 0 30px rgba(124, 58, 237, 0.2); }
    100% { box-shadow: 0 0 30px rgba(212, 175, 55, 0.6), 0 0 50px rgba(124, 58, 237, 0.4); }
}

.stars-bg {
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 40px 70px, #d4af37, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 90px 40px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 160px 120px, #7c3aed, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.4;
    animation: moveStars 60s linear infinite;
}

@keyframes moveStars {
    0% { background-position: 0 0; }
    100% { background-position: 1000px 1000px; }
}

.floating-element {
    animation: floating 4s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.ai-reading-box {
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 2rem;
    text-align: left;
    animation: fadeInSlide 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    box-shadow: inset 0 0 20px rgba(124, 58, 237, 0.15);
}

@keyframes fadeInSlide {
    from { 
        opacity: 0; 
        transform: translateY(25px) scale(0.98); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

@keyframes auraPulse {
    0% {
        box-shadow: 0 0 15px rgba(20, 184, 166, 0.2), inset 0 0 15px rgba(20, 184, 166, 0.1);
        border-color: rgba(20, 184, 166, 0.4);
    }
    50% {
        box-shadow: 0 0 35px rgba(20, 184, 166, 0.6), inset 0 0 25px rgba(20, 184, 166, 0.3);
        border-color: rgba(20, 184, 166, 0.9);
    }
    100% {
        box-shadow: 0 0 15px rgba(20, 184, 166, 0.2), inset 0 0 15px rgba(20, 184, 166, 0.1);
        border-color: rgba(20, 184, 166, 0.4);
    }
}

.aura-animated-box {
    animation: auraPulse 4s ease-in-out infinite;
}

/* ===================================================
   CARD, BUTTON & CONTAINER STYLING
   =================================================== */
.card-glass {
    background: rgba(18, 14, 36, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-glass:hover {
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 15px 35px rgba(124, 58, 237, 0.35), 0 0 20px rgba(212, 175, 55, 0.2);
    transform: translateY(-5px);
}

.btn-action {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--gold-primary), #b8860b);
    border: none;
    color: #000;
    font-weight: 700;
    font-size: 1.05rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-action:hover {
    opacity: 0.95;
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.5), 0 0 15px rgba(124, 58, 237, 0.3);
}

.reader-section {
    max-width: 1000px;
    margin: 2rem auto 5rem;
    padding: 2.5rem;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 0 40px rgba(124, 58, 237, 0.15);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.reader-section:hover {
    box-shadow: 0 0 50px rgba(124, 58, 237, 0.25);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--gold-primary);
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
    margin-bottom: 1rem;
}

.form-group label {
    color: var(--gold-light);
    font-size: 0.9rem;
}

/* ===================================================
   FIX TOTAL KARTU TAROT HARIAN (MOBILE & DESKTOP PERFECT FLIP)
   =================================================== */
.tarot-card-box {
    perspective: 1000px;
    min-height: 420px;
    width: 100%;
    position: relative;
    overflow: hidden;
    animation: mysticFloat 6s ease-in-out infinite;
}

/* Jeda animasi melayang antar kartu agar terkesan alami */
.tarot-card-box:nth-child(2) {
    animation-delay: 2s;
}

.tarot-card-box:nth-child(3) {
    animation-delay: 4s;
}

@keyframes mysticFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

.tarot-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    border-radius: 1rem;
}

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

.tarot-card-face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 1rem;
    overflow: hidden;
    box-sizing: border-box;
}

/* Sisi Belakang Kartu (Belum Diklik) */
.tarot-card-back {
    background: #120e24;
    background: linear-gradient(135deg, #120e24 0%, #07050d 100%);
    border: 1px solid rgba(212, 175, 55, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    z-index: 2;
    transform: rotateY(0deg);
    animation: cardAuraGlow 4s ease-in-out infinite alternate;
}

.tarot-card-box:hover .tarot-card-back {
    border-color: #d4af37;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.5), inset 0 0 15px rgba(124, 58, 237, 0.3);
}

/* Sisi Depan Kartu (Setelah Diklik & Terbuka Tegak Lurus) */
.tarot-card-front {
    background: #120e24;
    border: 1px solid rgba(212, 175, 55, 0.7);
    transform: rotateY(180deg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.35);
    z-index: 1;
    animation: cardAuraGlow 4s ease-in-out infinite alternate;
}

@keyframes cardAuraGlow {
    0% {
        box-shadow: 0 0 12px rgba(212, 175, 55, 0.2), inset 0 0 10px rgba(124, 58, 237, 0.1);
        border-color: rgba(212, 175, 55, 0.4);
    }
    100% {
        box-shadow: 0 0 25px rgba(212, 175, 55, 0.5), inset 0 0 20px rgba(124, 58, 237, 0.3);
        border-color: rgba(212, 175, 55, 0.8);
    }
}

.card-front-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Efek Sorotan Kilauan Emas (Shimmer Effect) */
.tarot-card-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 232, 166, 0.25),
        transparent
    );
    transition: 0.6s ease;
    z-index: 5;
    pointer-events: none;
    border-radius: 1rem;
}

.tarot-card-box:hover::before {
    left: 100%;
}
