/* ===================================================
   DAILY CARD PAGE — daily-card.css
   Card flip animation, branded card back, mirror marquee
   =================================================== */

/* ---- Page section ---- */
.daily-card-section {
    background: #0f0a1a;
    min-height: calc(100vh - 280px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1rem 5rem;
    text-align: center;
}

/* ---- Mirror marquee strip ---- */
.mirror-marquee {
    width: 100%;
    background: #1a0d2e;
    padding: 0.8rem 0;
    overflow: hidden;
    border-top: 1px solid rgba(123, 45, 158, 0.6);
    border-bottom: 1px solid rgba(123, 45, 158, 0.6);
    margin-bottom: 3rem;
}

.mirror-marquee-track {
    /* Horizontally mirror the entire strip so text reads correctly in a reflection */
    transform: scaleX(-1);
    overflow: hidden;
    white-space: nowrap;
}

.mirror-marquee-inner {
    display: inline-block;
    /* Content is duplicated in JS so the loop is seamless at -50% */
    animation: marquee-scroll 12s linear infinite;
    color: #e8d5f0;
    font-family: 'Cinzel Decorative', cursive;
    font-size: 1.4rem;
    letter-spacing: 0.06em;
    padding: 0 2rem;
}

@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ---- 3D flip container ---- */
.card-flip-wrapper {
    perspective: 1000px;
    width: 340px;
    height: 560px;
    cursor: pointer;
    margin: 0 auto;
    flex-shrink: 0;
    position: relative;
}

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

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

/* Both faces share positioning */
.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
}

/* ---- Card back: branded gradient ---- */
.card-back {
    background: linear-gradient(155deg, #501470 0%, #7b2d9e 48%, #bf3fa0 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 50px rgba(123, 45, 158, 0.55);
    transform: rotateY(0deg); /* explicit 3D transform needed for backface-visibility to work in Safari */
}

/* Decorative inset border (CSS only, no image) */
.card-back-border {
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(232, 213, 240, 0.3);
    border-radius: 8px;
    pointer-events: none;
}

/* Second inner border for depth */
.card-back-border::after {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(232, 213, 240, 0.12);
    border-radius: 4px;
}

/* ---- Card front: tarot image ---- */
.card-back-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.card-back-subtitle {
    color: rgba(232, 213, 240, 0.65);
    font-family: 'Cinzel Decorative', cursive;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.card-back-date {
    color: #e8d5f0;
    font-family: 'Cinzel Decorative', cursive;
    font-size: 1.25rem;
    line-height: 1.5;
    text-align: center;
    padding: 0 1.5rem;
}

.card-back-star {
    color: rgba(232, 213, 240, 0.4);
    font-size: 2.2rem;
    margin-top: 0.75rem;
    display: block;
}

/* ---- Card front: tarot image ---- */
.card-front {
    transform: rotateY(180deg);
}

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

/* ---- Tap hint below card ---- */
.card-tap-hint {
    color: rgba(232, 213, 240, 0.4);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-family: 'Cinzel Decorative', cursive;
    margin-top: 1.25rem;
}

/* ---- Reveal panel (overlaid on card after flip) ---- */
.card-reveal-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: linear-gradient(to top, rgba(15,10,26,0.93) 0%, rgba(15,10,26,0.6) 65%, transparent 100%);
    padding: 3rem 1rem 1.25rem;
    border-radius: 0 0 8px 8px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
    text-align: center;
}

.card-reveal-panel.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.card-reveal-name {
    color: #e8d5f0;
    font-family: 'Cinzel Decorative', cursive;
    font-size: 1.55rem;
    margin: 0 0 0.5rem;
}

.card-reveal-link {
    display: inline-block;
    background: #7b2d9e;
    color: #fff;
    border: none;
    padding: 0.85rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: background 0.2s ease, transform 0.15s ease;
    box-shadow: 0 4px 15px rgba(123, 45, 158, 0.3);
    margin-top: 0.75rem;
}

.card-reveal-link:hover {
    background: #501470;
    color: #fff;
    transform: translateY(-2px);
}

/* ---- SEO content section ---- */
.daily-card-about {
    background: #fafaf9;
    padding: 4rem 1.5rem 5rem;
}

.daily-watch-cta {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(123, 45, 158, 0.15);
}

.daily-watch-btn {
    display: inline-block;
    background: #7b2d9e;
    color: #fff;
    padding: 0.85rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-family: 'Cinzel Decorative', cursive;
    font-weight: 600;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 15px rgba(123, 45, 158, 0.3);
    transition: background 0.2s ease, transform 0.15s ease;
}

.daily-watch-btn:hover {
    background: #501470;
    color: #fff;
    transform: translateY(-2px);
}

.daily-card-about-inner {
    max-width: 720px;
    margin: 0 auto;
}

.daily-card-about h2 {
    font-family: 'Cinzel Decorative', cursive;
    font-size: 1.15rem;
    color: #501470;
    margin: 2.5rem 0 0.75rem;
    letter-spacing: 0.03em;
}

.daily-card-about h2:first-child {
    margin-top: 0;
}

.daily-card-about p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #2a1a3a;
    margin: 0 0 1rem;
}

.daily-card-cta {
    display: inline-block;
    margin-top: 1.5rem;
}

/* ---- Responsive ---- */
@media (max-width: 400px) {
    .card-flip-wrapper {
        width: 288px;
        height: 473px;
    }

    .card-back-date {
        font-size: 1.05rem;
    }

    .mirror-marquee-inner {
        font-size: 1.15rem;
    }
}
