/* ── Tarot page ──────────────────────────────────── */

html {
    background-color: #000;
}

body.readings-body {
    background: url('/static/images/nightbg.jpg') center center / cover no-repeat fixed;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.readings-footer-section {
    border-top: none;
    background-color: #000;
    margin-top: 0;
}

.readings-footer-section .footer {
    background-color: #000 !important;
    backdrop-filter: none !important;
    position: relative !important;
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
    box-shadow: none !important;
    border-top: none;
}

.tarot-main {
    flex: 1;
    max-width: 680px;
    width: 95%;
    margin: 0 auto;
    padding: 140px 0 80px;
    box-sizing: border-box;
}

/* ── Choice screen ───────────────────────────────── */
.tarot-choice {
    border: none;
    background: transparent;
}

/* About block */
.tarot-about {
    padding: 22px 33px;
}

.tarot-about p {
    font-family: 'Onest', Arial, sans-serif;
    font-size: 0.8rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.55);
    margin: 11px 0;
}

.tarot-about p:last-of-type {
    margin-bottom: 0;
}

.tarot-about-sig {
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 0.7rem !important;
    color: rgba(255,255,255,0.25) !important;
    letter-spacing: 0.08em;
    margin-top: 22px !important;
}

/* Read more — hidden on desktop */
.tarot-about-extra {
    display: contents;
}

.tarot-read-more {
    display: none;
}

/* Options row */
.tarot-options {
    display: flex;
    width: 100%;
    margin-top: 28px;
}

.tarot-card-option {
    flex: 1;
    padding: 18px 20px;
    cursor: pointer;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    background: #1a1a2e;
    border-right: 1px solid rgba(255,255,255,0.09);
    transition: color 0.15s ease, background 0.15s ease;
}

.tarot-card-option:last-child {
    border-right: none;
}

.tarot-card-option:hover {
    color: #fff;
    background: rgba(255,255,255,0.03);
}

/* ── Board ───────────────────────────────────────── */
.tarot-board {
    display: flex;
    gap: 24px;
    margin-top: 48px;
    justify-content: center;
    flex-wrap: nowrap;
    max-width: 100%;
}

/* ── Card ────────────────────────────────────────── */
.tarot-card {
    width: 300px;
    cursor: pointer;
    flex: 0 0 auto;
    position: relative;
    text-align: center;
}

/* Back */
.card-back {
    width: 100%;
    aspect-ratio: 825 / 1425;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 825 / 1425;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.09);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: rgba(255,255,255,0.2);
    transition: border-color 0.15s ease;
}

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

.tarot-card:hover .card-back {
    border-color: rgba(255,255,255,0.3);
}

/* Front */
.card-front {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-front img {
    width: 100%;
    aspect-ratio: 825 / 1425;
    object-fit: cover;
}

.card-img.reversed {
    transform: rotate(180deg);
}

.card-name {
    font-family: 'Onest', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    margin-top: 14px;
    line-height: 1.3;
}

.card-state {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    margin-top: 6px;
}

.card-meaning {
    font-family: 'Onest', Arial, sans-serif;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.6);
    margin-top: 10px;
    line-height: 1.55;
    text-align: center;
}

.pendulum-placeholder {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.pendulum-placeholder-image {
    width: 50%;
    aspect-ratio: 825 / 1425;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: hidden;
}

.pendulum-placeholder-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pendulum-answer {
    font-family: 'Onest', Arial, sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    margin-top: 0;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* ── Utilities ───────────────────────────────────── */
.hidden {
    display: none !important;
}

/* ── Shuffle button — hidden until a reading is started ── */
.tarot-reset {
    display: block;
    margin: 36px auto 0;
    background: #1a1a2e;
    border: 1px solid rgba(255,255,255,0.18);
    color: rgba(255,255,255,0.55);
    padding: 10px 28px;
    cursor: pointer;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.tarot-reset:hover {
    border-color: rgba(255,255,255,0.5);
    color: #fff;
}

#tarot-inspect-overlay {
    position: fixed;
    inset: 0;
    background: url('/static/images/nightbg.jpg') center center / cover no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    opacity: 0;
    transition: opacity 2s ease;
    padding: 20px;
    box-sizing: border-box;
}

#tarot-inspect-overlay.visible {
    opacity: 1;
}

.tarot-inspect-img {
    max-height: 70vh;
    max-width: 90vw;
    border-radius: 10px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.8);
    transform: scale(0.95);
    transition: transform 2s ease;
}

#tarot-inspect-overlay.visible .tarot-inspect-img {
    transform: scale(1);
}

#tarot-inspect-overlay.visible .tarot-inspect-name {
    opacity: 1;
}

.tarot-inspect-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #f0e6d2;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.tarot-inspect-close:hover {
    opacity: 1;
}

@media (min-width: 1025px) {
    .tarot-inspect-close {
        font-size: 3rem;
        top: 24px;
        right: 32px;
    }
}

#tarot-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

#inspect-hint {
    display: block;
    width: 100%;
    max-width: 680px;
    margin: 0 auto 8px auto;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(100, 100, 180, 0.75);
    animation: hint-blink 1.8s ease-in-out infinite;
}

@keyframes hint-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.tarot-inspect-img {
    position: relative;
    z-index: 1;
}

.tarot-inspect-close {
    position: absolute;
    top: -24px;
    right: -44px;
    background: none;
    border: none;
    color: #f0e6d2;
    font-size: 3.5rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 2;
}

.tarot-inspect-inner {
    position: relative;
    display: inline-flex;
}

@media (min-width: 601px) {
    .tarot-board.single-reading .tarot-card {
        width: 383px;
    }
}

/* ── Mobile ──────────────────────────────────────── */
@media (max-width: 600px) {
    .tarot-main {
        width: calc(100% - 32px);
        padding: 100px 0 80px;
    }

    .tarot-board.single-reading .tarot-card {
        width: min(252px, calc((100vw - 32px) * 0.8));
    }

    .tarot-about {
        padding: 20px 16px;
    }

    .tarot-about p {
        font-size: 0.99rem;
        line-height: 1.65;
        margin-bottom: 10px;
    }

    .tarot-about-extra {
        display: none;
    }

    .tarot-about-extra.visible {
        display: contents;
    }

    .tarot-read-more {
        display: inline-block;
        margin-top: 8px;
        background: none;
        border: none;
        padding: 0;
        font-family: 'Courier New', Courier, monospace;
        font-size: 0.65rem;
        font-weight: 700;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        color: rgba(255,255,255,0.3);
        cursor: pointer;
        transition: color 0.15s ease;
    }

    .tarot-read-more:hover {
        color: black;
    }

    .tarot-options {
        flex-direction: column;
        margin-top: 20px;
    }

    .tarot-card-option {
        border-right: none;
        border-left: none;
        border-bottom: 1px solid rgba(255,255,255,0.09);
        padding: 16px 20px;
    }

    .tarot-card-option:last-child {
        border-bottom: none;
    }

    .tarot-board {
        gap: 12px;
        margin-top: 36px;
        width: 100%;
        box-sizing: border-box;
    }

    .tarot-card {
        width: calc((100vw - 32px - 24px) / 3);
    }

    .card-name {
        font-size: 0.62rem;
        margin-top: 8px;
    }

    .card-state {
        font-size: 0.48rem;
        margin-top: 4px;
    }

    .card-meaning {
        font-size: 0.75rem;
        margin-top: 6px;
    }

    .readings-footer-section {
    margin-top: 60px;
}
}