/* Tarot Reading Styles */

.tarot-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Spread grid — 3 cards in a row */
.tarot-spread-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

/* Card slot */
.tarot-card-slot {
    text-align: center;
    width: 180px;
}

.tarot-position-label {
    margin-top: 10px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #c0a060;
}

/* 3D flip container */
.tarot-card {
    width: 180px;
    height: 315px;
    perspective: 800px;
    cursor: pointer;
    position: relative;
}

.tarot-card.waiting {
    cursor: default;
    opacity: 0.6;
}

.tarot-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s ease;
    transform-style: preserve-3d;
}

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

/* Card faces */
.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.card-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

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

.card-back {
    background: #1a1a2e;
}

/* Reversed card: flip the face image upside down */
.card-front.reversed img {
    transform: rotate(180deg);
}

/* Glow pulse on the next clickable card */
.tarot-card.next-card {
    cursor: pointer;
}

.tarot-card.next-card .card-back {
    animation: cardGlow 1.5s ease-in-out infinite;
}

@keyframes cardGlow {
    0%, 100% { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(192, 160, 96, 0.6), 0 0 40px rgba(192, 160, 96, 0.2); }
}

/* Card name overlay on face */
.card-name-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 6px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    border-radius: 0 0 10px 10px;
}

.card-orientation-badge {
    display: inline-block;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-top: 3px;
    font-weight: 400;
}

.card-orientation-badge.upright {
    background: rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}

.card-orientation-badge.reversed-badge {
    background: rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

/* Five-card grid: slightly smaller cards to fit 5 in a row */
.five-card-grid .tarot-card-slot {
    width: 150px;
}

.five-card-grid .tarot-card {
    width: 150px;
    height: 262px;
}

/* Interpretation panels */
.tarot-interpretations {
    margin-top: 20px;
}

.tarot-interpretation-panel {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid #c0a060;
    border-radius: 0 8px 8px 0;
    padding: 20px;
    margin-bottom: 15px;
    animation: fadeInUp 0.5s ease;
}

.tarot-interpretation-panel h4 {
    color: #c0a060;
    margin-bottom: 5px;
    font-size: 16px;
}

.tarot-interpretation-panel .interpretation-card-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.tarot-interpretation-panel .interpretation-text {
    font-size: 15px;
    line-height: 1.7;
    color: #ccc;
}

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

/* New reading button */
.tarot-actions {
    text-align: center;
    margin-top: 25px;
}

/* Start reading section */
.tarot-start-section {
    text-align: center;
    padding: 40px 20px;
}

.tarot-start-section p {
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto 20px;
}

/* Summary section */
.tarot-summary {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile responsive */
@media (max-width: 640px) {
    .tarot-card-slot {
        width: 140px;
    }

    .tarot-card {
        width: 140px;
        height: 245px;
    }

    .five-card-grid .tarot-card-slot {
        width: 120px;
    }

    .five-card-grid .tarot-card {
        width: 120px;
        height: 210px;
    }

    .tarot-spread-grid {
        gap: 12px;
    }

    .card-name-overlay {
        font-size: 11px;
        padding: 6px 4px;
    }
}

@media (max-width: 480px) {
    .tarot-card-slot {
        width: 110px;
    }

    .tarot-card {
        width: 110px;
        height: 192px;
    }

    .five-card-grid .tarot-card-slot {
        width: 95px;
    }

    .five-card-grid .tarot-card {
        width: 95px;
        height: 166px;
    }

    .tarot-spread-grid {
        gap: 8px;
    }
}

/* Educational article styles */
.tarot-suits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
}

.tarot-suit-card {
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.tarot-suit-card h4 {
    margin-bottom: 8px;
}

.tarot-spread-explanation {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.tarot-position {
    flex: 1;
    min-width: 200px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    text-align: center;
}

.tarot-position-number {
    display: inline-block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    border-radius: 50%;
    background: #c0a060;
    color: #1a1a2e;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
}

.tarot-position h4 {
    color: #c0a060;
}

.tarot-position p {
    font-size: 14px;
    text-align: left;
}

.tarot-cta {
    text-align: center;
    padding: 30px 20px;
    margin-top: 30px;
    background: rgba(192, 160, 96, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(192, 160, 96, 0.2);
}

.tarot-cta h3 {
    color: #c0a060;
    margin-bottom: 10px;
}

.tarot-cta p {
    margin-bottom: 15px;
}

@media (max-width: 640px) {
    .tarot-suits-grid {
        grid-template-columns: 1fr;
    }

    .tarot-spread-explanation {
        flex-direction: column;
    }
}
