/* ==========================================================================
   Tarot Zingara Esmeralda - Single Page SPA Design System
   ========================================================================== */

:root {
    --bg-dark-top: #151d3b;
    --bg-dark-mid: #0b1024;
    --bg-dark-bottom: #060814;
    --pink-primary: #ff499e;
    --pink-bright: #ff2b75;
    --red-alert: #e61c5c;
    --pink-light: #ffa3d0;
    --pink-glow: rgba(255, 43, 117, 0.7);
    --gold-primary: #e8ba5a;
    --gold-light: #fdf0a6;
    --gold-glow: rgba(232, 186, 90, 0.5);
    --text-white: #ffffff;
    --text-subtle: #d3d9e8;
    --card-bg-cream: #fbf4e2;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background: radial-gradient(circle at 50% 20%, var(--bg-dark-top) 0%, var(--bg-dark-mid) 60%, var(--bg-dark-bottom) 100%);
    background-attachment: fixed;
    color: var(--text-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Animated Stars */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle linear infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    50% { opacity: 0.9; transform: scale(1.3); }
}

/* Main Layout Wrapper */
.main-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1100px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Header & Logo */
.header {
    margin-bottom: 25px;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 90px;
    height: 90px;
    filter: drop-shadow(0 0 15px rgba(232, 186, 90, 0.4));
    animation: pulseGlow 4s infinite alternate ease-in-out;
}

@keyframes pulseGlow {
    0% { filter: drop-shadow(0 0 10px rgba(232, 186, 90, 0.3)); }
    100% { filter: drop-shadow(0 0 22px rgba(232, 186, 90, 0.7)); }
}

.logo-text {
    display: flex;
    flex-direction: column;
    letter-spacing: 2px;
}

.brand-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white);
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.brand-subtitle {
    font-size: 0.75rem;
    letter-spacing: 4px;
    color: var(--gold-primary);
    text-transform: uppercase;
    margin-top: 3px;
}

/* SPA Sections Toggle - Zero Flicker Anti-Flicker System */
.page-section {
    display: none;
    opacity: 0;
    width: 100%;
}

html.state-tarot #tarotSection {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 1;
}

html.state-vsl #vslSection {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 1;
}

/* Section 1 Content & Typography */
.main-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.35;
    max-width: 920px;
    margin-bottom: 20px;
    color: #ffeff7;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.highlight-pink {
    color: var(--pink-primary);
    text-shadow: 0 0 15px var(--pink-glow);
    font-weight: 900;
}

.main-subtitle {
    font-size: 1.15rem;
    line-height: 1.6;
    color: #ff9ecb;
    max-width: 780px;
    margin-bottom: 30px;
    font-weight: 500;
}

/* Counter Badge */
.counter-badge {
    background: #ffffff;
    color: #4a0e2e;
    padding: 12px 30px;
    border-radius: 50px;
    border: 2px dashed #ff499e;
    box-shadow: 0 8px 25px rgba(255, 73, 158, 0.35);
    margin-bottom: 40px;
    font-size: 1.05rem;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: badgeBounce 3s infinite ease-in-out;
}

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

.counter-badge strong {
    color: var(--pink-primary);
    font-size: 1.25rem;
}

.highlight-badge {
    color: #d81b70;
    font-weight: 800;
}

/* Cards Grid */
.cards-grid {
    display: flex;
    justify-content: center;
    gap: 16px;
    width: 100%;
    flex-wrap: wrap;
    margin-bottom: 40px;
    perspective: 1000px;
}

/* Single Card Item */
.card-item {
    width: 155px;
    height: 245px;
    cursor: pointer;
    perspective: 1000px;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.card-item:hover:not(.disabled) {
    transform: translateY(-10px) scale(1.04);
}

.card-item:hover:not(.disabled) .card-pattern {
    filter: drop-shadow(0 12px 20px rgba(232, 186, 90, 0.5));
}

.card-item.disabled {
    cursor: not-allowed;
    opacity: 0.6;
    filter: grayscale(40%);
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
}

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

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.card-front {
    background-color: var(--card-bg-cream);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-pattern {
    width: 100%;
    height: 100%;
    transition: filter 0.3s ease;
}

/* Card Back - Rider Waite */
.card-back.rider-waite {
    transform: rotateY(180deg);
    background-color: #fbf4e2;
    border: 3.5px solid var(--pink-primary);
    box-shadow: 0 0 18px var(--pink-glow);
    padding: 4px;
    border-radius: 14px;
}

.rw-card-frame {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
}

.rw-svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Section 2: VSL Specific Layout */
.vsl-headline {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.3rem;
    font-weight: 900;
    color: #ffeff7;
    margin: 25px 0 15px;
    line-height: 1.3;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.vsl-subheadline {
    font-size: 1.12rem;
    color: #ff3b8d;
    font-weight: 700;
    max-width: 640px;
    margin-bottom: 35px;
    line-height: 1.55;
    text-shadow: 0 0 12px rgba(255, 59, 141, 0.4);
}

.vsl-video-box {
    position: relative;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 9 / 16;
    background: #000000;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 25px rgba(255, 59, 141, 0.3);
    overflow: hidden;
    margin-bottom: 40px;
}

.vsl-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.75) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: pointer;
}

.play-btn-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ff2b75, #e61c5c);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(255, 43, 117, 0.85);
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.vsl-video-overlay:hover .play-btn-circle {
    transform: scale(1.1);
}

.play-btn-triangle {
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 24px solid #ffffff;
    margin-left: 5px;
}

.play-btn-text {
    color: #ffffff;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.play-btn-subtext {
    color: #ff9ecb;
    font-size: 0.82rem;
    margin-top: 6px;
}

/* Footer */
.footer {
    margin-top: 30px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1px;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 12, 28, 0.88);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 580px;
    width: 100%;
    transform: scale(0.85);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content-wrapper {
    transform: scale(1);
}

.modal-card {
    background: #f7f7fa;
    border: 3.5px solid var(--pink-bright);
    border-radius: 26px;
    width: 100%;
    padding: 35px 30px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.7);
    text-align: center;
    color: #333333;
}

.modal-warning-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.modal-main-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.45rem;
    font-weight: 900;
    color: var(--red-alert);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 22px;
}

.modal-text-content {
    font-size: 1.02rem;
    line-height: 1.65;
    color: #444444;
    font-weight: 500;
}

.modal-text-content p {
    margin-bottom: 18px;
}

.highlight-red {
    color: var(--red-alert);
    font-weight: 800;
}

.modal-final-callout {
    margin-top: 24px;
    margin-bottom: 0 !important;
    font-size: 1.08rem;
}

/* Big Glowing CTA Pill Button */
.modal-cta-btn {
    background: linear-gradient(90deg, #ff2b75 0%, #e61c5c 100%);
    box-shadow: 0 0 30px var(--pink-glow);
    border-radius: 50px;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 900;
    padding: 20px 42px;
    border: none;
    cursor: pointer;
    margin-top: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 90%;
    max-width: 480px;
}

.modal-cta-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 0 40px rgba(255, 43, 117, 0.9);
}

.star-icon {
    font-size: 1.3rem;
}

/* Responsive Media Queries */
@media (max-width: 900px) {
    .cards-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
        max-width: 500px;
    }
    .card-item {
        width: 100%;
        height: 225px;
    }
}

@media (max-width: 600px) {
    .main-title {
        font-size: 1.5rem;
    }
    .main-subtitle {
        font-size: 0.95rem;
    }
    .counter-badge {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .card-item {
        height: 195px;
    }
    .modal-card {
        padding: 25px 18px;
        border-radius: 20px;
    }
    .modal-main-title {
        font-size: 1.18rem;
    }
    .modal-text-content {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    .modal-cta-btn {
        font-size: 0.98rem;
        padding: 16px 24px;
        width: 100%;
    }
    .vsl-headline {
        font-size: 1.6rem;
    }
    .vsl-subheadline {
        font-size: 0.95rem;
    }
    .vsl-video-box {
        max-width: 100%;
    }
}
