/* Tarot Soul Path - Celestial Reading Tools CSS */

:root {
    --tarot-gold: #dfb76c;
    --tarot-gold-light: #f5e4b8;
    --tarot-gold-dark: #a1782e;
    --tarot-cosmic-bg: #090a14;
    --tarot-card-bg: #121426;
    --tarot-glass: rgba(18, 20, 38, 0.75);
    --tarot-glass-border: rgba(223, 183, 108, 0.25);
    --tarot-text: #e6e7ee;
    --tarot-text-muted: #9fa3be;
    --tarot-accent-purple: #7045af;
    --tarot-glow: 0 0 25px rgba(223, 183, 108, 0.35);
}

.tarot-reading-tool-container {
    background: radial-gradient(circle at 50% 20%, rgba(35, 27, 68, 0.5) 0%, rgba(9, 10, 20, 0.95) 75%), var(--tarot-cosmic-bg);
    border: 1px solid var(--tarot-glass-border);
    border-radius: 20px;
    padding: 35px 25px;
    margin: 30px auto;
    max-width: 1100px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    color: var(--tarot-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    position: relative;
    overflow: hidden;
}

/* Header */
.tarot-tool-header {
    text-align: center;
    margin-bottom: 25px;
}

.tarot-tool-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(223, 183, 108, 0.12);
    border: 1px solid rgba(223, 183, 108, 0.3);
    border-radius: 30px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--tarot-gold-light);
    margin-bottom: 12px;
}

.tarot-tool-title {
    font-family: "Cinzel", "Cormorant Garamond", Georgia, serif;
    font-size: clamp(24px, 4vw, 36px);
    color: #fff;
    margin: 0 0 10px;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.tarot-tool-instruction {
    font-size: 16px;
    color: var(--tarot-text-muted);
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Status Indicator */
.tarot-tool-status {
    text-align: center;
    margin: 20px 0;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(112, 69, 175, 0.2);
    border: 1px solid rgba(112, 69, 175, 0.4);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 14px;
    color: var(--tarot-gold-light);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--tarot-gold);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--tarot-gold);
    animation: celestialPulse 1.8s infinite ease-in-out;
}

@keyframes celestialPulse {
    0%, 100% { opacity: 0.3; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.3); }
}

/* Active Spread Slot Area */
.tarot-reading-spread-area {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px 0;
    min-height: 250px;
    perspective: 1200px;
}

/* Specific Spread Layouts */
.spread-count-1 .tarot-spread-slot {
    width: 200px;
}

.spread-count-3 .tarot-spread-slot {
    width: 180px;
}

.spread-count-10 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.tarot-spread-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.slot-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--tarot-gold-light);
    margin-bottom: 8px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    min-height: 20px;
}

.slot-card-holder {
    width: 100%;
    aspect-ratio: 2 / 3.4;
    position: relative;
    border-radius: 12px;
}

/* Placeholder Mesh */
.card-placeholder-mesh {
    width: 100%;
    height: 100%;
    border: 2px dashed rgba(223, 183, 108, 0.3);
    border-radius: 12px;
    background: rgba(18, 20, 38, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(223, 183, 108, 0.4);
    transition: border-color 0.3s ease, background 0.3s ease;
}

.card-placeholder-mesh.active-drop-zone {
    border-color: var(--tarot-gold);
    background: rgba(223, 183, 108, 0.08);
    box-shadow: 0 0 15px rgba(223, 183, 108, 0.2);
}

.placeholder-icon {
    font-size: 20px;
}

.placeholder-text {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 3D Flip Card Mechanism */
.tarot-flip-card {
    width: 100%;
    height: 100%;
    perspective: 1200px;
    position: relative;
    border-radius: 12px;
}

.tarot-flip-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 12px;
}

.tarot-flip-card.is-revealed .tarot-flip-card-inner {
    transform: rotateY(180deg);
}

.tarot-flip-card.is-reversed.is-revealed .tarot-flip-card-inner {
    transform: rotateY(180deg) rotateZ(180deg);
}

.tarot-card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(223, 183, 108, 0.3);
}

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

.tarot-card-back {
    background: #0f1020;
    cursor: pointer;
}

.tarot-card-front {
    transform: rotateY(180deg);
    background: #111;
}

/* Deck Fan & Drawer */
.tarot-deck-fan-wrapper {
    margin-top: 35px;
    border-top: 1px solid rgba(223, 183, 108, 0.15);
    padding-top: 25px;
}

.tarot-deck-fan-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}

.deck-hint {
    font-size: 14px;
    color: var(--tarot-gold-light);
    font-style: italic;
}

.tarot-deck-fan {
    display: flex;
    overflow-x: auto;
    padding: 20px 10px 30px;
    gap: -40px;
    scrollbar-width: thin;
    scrollbar-color: var(--tarot-gold) rgba(18, 20, 38, 0.5);
    -webkit-overflow-scrolling: touch;
}

.tarot-deck-fan::-webkit-scrollbar {
    height: 8px;
}

.tarot-deck-fan::-webkit-scrollbar-thumb {
    background: var(--tarot-gold);
    border-radius: 4px;
}

.deck-card-item {
    flex: 0 0 100px;
    height: 155px;
    position: relative;
    border-radius: 8px;
    margin-right: -45px;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(223, 183, 108, 0.3);
    cursor: pointer;
    transition: transform 0.25s ease, margin-right 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
    user-select: none;
}

.deck-card-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.deck-card-item:hover {
    transform: translateY(-20px) scale(1.1);
    margin-right: 0;
    z-index: 50;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.9), 0 0 15px var(--tarot-gold);
}

.deck-card-item.drawn-card {
    opacity: 0.2;
    pointer-events: none;
    transform: scale(0.9);
}

/* Results Area */
.tarot-reading-results-area {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(223, 183, 108, 0.2);
    animation: fadeInResults 0.6s ease forwards;
}

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

.results-header {
    text-align: center;
    margin-bottom: 30px;
}

.results-badge {
    color: var(--tarot-gold);
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.results-title {
    font-family: "Cinzel", "Cormorant Garamond", Georgia, serif;
    font-size: 32px;
    color: #fff;
    margin: 0;
}

/* Individual Card Breakdown Card */
.result-card-card {
    background: rgba(18, 20, 38, 0.7);
    border: 1px solid rgba(223, 183, 108, 0.2);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 24px;
    align-items: start;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

.result-card-preview {
    text-align: center;
}

.result-card-preview img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(223, 183, 108, 0.3);
}

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

.result-position-tag {
    display: inline-block;
    background: rgba(112, 69, 175, 0.25);
    border: 1px solid rgba(112, 69, 175, 0.5);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: var(--tarot-gold-light);
    margin-bottom: 8px;
    font-weight: 600;
}

.result-card-name {
    font-family: "Cinzel", Georgia, serif;
    font-size: 22px;
    color: #fff;
    margin: 0 0 4px;
}

.result-orientation {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    padding: 2px 8px;
    border-radius: 4px;
}

.orientation-upright {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.orientation-reversed {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.result-card-keywords {
    font-size: 14px;
    color: var(--tarot-gold-light);
    margin-bottom: 14px;
}

.result-card-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--tarot-text);
    margin-bottom: 14px;
}

.result-card-links {
    margin-top: 10px;
}

.result-card-links a {
    color: var(--tarot-gold);
    font-size: 14px;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px dotted var(--tarot-gold);
    transition: color 0.2s ease;
}

.result-card-links a:hover {
    color: #fff;
}

/* Synthesis Card */
.results-overall-synthesis {
    background: linear-gradient(135deg, rgba(35, 27, 68, 0.6) 0%, rgba(18, 20, 38, 0.8) 100%);
    border: 1px solid rgba(223, 183, 108, 0.3);
    border-radius: 16px;
    padding: 26px;
    margin-bottom: 30px;
}

.synthesis-title {
    font-family: "Cinzel", Georgia, serif;
    font-size: 20px;
    color: var(--tarot-gold);
    margin-top: 0;
    margin-bottom: 12px;
}

.synthesis-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--tarot-text);
    margin: 0;
}

/* Buttons */
.tarot-tool-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 25px;
}

.btn-celestial-primary, .btn-celestial-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: none;
}

.btn-celestial-primary {
    background: linear-gradient(135deg, #dfb76c 0%, #b88d3f 100%);
    color: #0b0c16;
    box-shadow: 0 6px 20px rgba(223, 183, 108, 0.4);
}

.btn-celestial-primary:hover {
    background: linear-gradient(135deg, #f5d77f 0%, #dfb76c 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(223, 183, 108, 0.6);
}

.btn-celestial-secondary {
    background: rgba(18, 20, 38, 0.8);
    color: var(--tarot-gold-light);
    border: 1px solid rgba(223, 183, 108, 0.35);
}

.btn-celestial-secondary:hover {
    background: rgba(223, 183, 108, 0.15);
    border-color: var(--tarot-gold);
    color: #fff;
    transform: translateY(-2px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .tarot-reading-tool-container {
        padding: 20px 14px;
        margin: 15px 0;
        border-radius: 14px;
    }

    .spread-count-3 .tarot-spread-slot {
        width: 105px;
    }

    .slot-label {
        font-size: 11px;
    }

    .result-card-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .result-card-preview {
        max-width: 140px;
        margin: 0 auto 12px;
    }

    .tarot-deck-fan-controls {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}

/* ==========================================================================
   Buy Me a Coffee Support / Tip Box
   ========================================================================== */

.tarot-support-box {
    margin: 36px auto 30px;
    background: radial-gradient(circle at 50% 0%, rgba(45, 33, 85, 0.6) 0%, rgba(14, 16, 32, 0.96) 85%);
    border: 1px solid var(--tarot-glass-border);
    border-radius: 18px;
    padding: 34px 26px;
    text-align: center;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    max-width: 760px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.tarot-support-box:hover {
    border-color: rgba(223, 183, 108, 0.45);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.65), 0 0 25px rgba(223, 183, 108, 0.15);
}

.tarot-support-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--tarot-gold), transparent);
    opacity: 0.7;
}

.tarot-support-header {
    margin-bottom: 12px;
}

.support-badge {
    display: inline-block;
    color: var(--tarot-gold);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    margin-bottom: 8px;
    background: rgba(223, 183, 108, 0.1);
    border: 1px solid rgba(223, 183, 108, 0.25);
    padding: 4px 14px;
    border-radius: 20px;
}

.tarot-support-heading {
    font-family: "Cinzel", Georgia, serif;
    font-size: clamp(20px, 3.5vw, 25px);
    color: #fff;
    margin: 0 0 10px;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.tarot-support-message {
    color: var(--tarot-text);
    font-size: 15px;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 24px;
    opacity: 0.95;
}

.tarot-support-action {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

.btn-tarot-support-bmac {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #FFDD00 0%, #FBB03B 100%);
    color: #0d0f1c !important;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    padding: 13px 32px;
    border-radius: 30px;
    text-decoration: none !important;
    box-shadow: 0 6px 20px rgba(251, 176, 59, 0.35), 0 0 15px rgba(255, 221, 0, 0.2);
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    min-height: 48px;
    letter-spacing: 0.3px;
    cursor: pointer;
}

.btn-tarot-support-bmac:hover {
    background: linear-gradient(135deg, #FFE84D 0%, #FFDD00 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 28px rgba(251, 176, 59, 0.55), 0 0 25px rgba(255, 221, 0, 0.4);
    color: #000 !important;
}

.btn-tarot-support-bmac:active {
    transform: translateY(0) scale(0.99);
}

.btn-coffee-icon {
    font-size: 18px;
    display: inline-block;
}

.btn-coffee-text {
    display: inline-block;
}

.tarot-support-footer-note {
    font-size: 12.5px;
    color: var(--tarot-text-muted);
    margin: 0;
    font-style: italic;
    opacity: 0.85;
}

@media (max-width: 768px) {
    .tarot-support-box {
        padding: 24px 16px;
        margin: 25px auto 20px;
        border-radius: 14px;
    }

    .tarot-support-message {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 20px;
    }

    .btn-tarot-support-bmac {
        width: 100%;
        max-width: 320px;
        padding: 14px 20px;
        font-size: 15px;
    }
}
