/* 
File: /tarot-pwa/css/tarot-cards.css
CSS cho hiển thị và hiệu ứng các lá bài tarot
*/

/* Bộ bài và lá bài */
.deck-container {
    text-align: center;
    margin: 2rem 0;
}

.deck {
    width: 140px;
    height: 240px;
    margin: 0 auto 1rem;
    position: relative;
    perspective: 1000px;
    cursor: pointer;
}

.card-back {
    width: 100%;
    height: 100%;
    background-color: #241734;
    background-image: url('../images/cards/card-back.jpg');
    background-size: cover;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.deck:hover .card-back {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(156, 90, 173, 0.5);
}

.deck p {
    margin-top: 1rem;
    color: var(--color-text-muted);
    font-style: italic;
}

/* Khu vực trải bài */
.spread-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 2rem 0;
    min-height: 300px;
}

.card-placeholder {
    width: 120px;
    height: 200px;
    border: 2px dashed rgba(156, 90, 173, 0.5);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-text-muted);
    font-size: 1.5rem;
    position: relative;
}

.card-placeholder::before {
    content: '+';
    font-size: 2rem;
    color: rgba(156, 90, 173, 0.5);
}

.card-placeholder.filled::before {
    display: none;
}

.card-position-label {
    position: absolute;
    bottom: -25px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Lá bài trong trải bài */
.tarot-card {
    width: 120px;
    height: 200px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.tarot-card.flipped {
    transform: rotateY(180deg);
}

.tarot-card.reversed {
    transform: rotateY(180deg) rotateZ(180deg);
}

.tarot-card-front,
.tarot-card-back {
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.tarot-card-back {
    background-color: #241734;
    background-image: url('../images/cards/card-back.jpg');
    background-size: cover;
}

.tarot-card-front {
    background-color: #fff;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tarot-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hiệu ứng khi đặt chuột lên lá bài */
.tarot-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(156, 90, 173, 0.5);
    transform: translateY(-5px) rotateY(180deg);
}

.tarot-card.reversed:hover {
    transform: translateY(-5px) rotateY(180deg) rotateZ(180deg);
}

/* Tác vụ với trải bài */
.reading-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Màn hình kết quả */
.interpretation-header {
    text-align: center;
    margin-bottom: 2rem;
}

.reading-date {
    color: var(--color-text-muted);
    font-style: italic;
}

.user-info-display {
    background-color: rgba(36, 23, 52, 0.8);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cards-overview {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 2rem;
}

.card-mini {
    width: 80px;
    height: 140px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.card-mini:hover {
    transform: scale(1.05);
}

.card-mini-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-mini.reversed .card-mini-image {
    transform: rotate(180deg);
}

.interpretation-content {
    background-color: rgba(36, 23, 52, 0.8);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.card-interpretation {
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(156, 90, 173, 0.3);
    padding-bottom: 1.5rem;
}

.card-interpretation:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.card-interpretation h3 {
    color: var(--color-gold);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.card-interpretation h3 span {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-left: 10px;
}

.card-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.keyword {
    background-color: rgba(156, 90, 173, 0.2);
    color: var(--color-accent-light);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.85rem;
}

.interpretation-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.interpretation-actions button {
    margin: 0 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .spread-container {
        gap: 15px;
    }
    
    .tarot-card {
        width: 100px;
        height: 170px;
    }
    
    .card-mini {
        width: 60px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .spread-container {
        gap: 10px;
    }
    
    .tarot-card {
        width: 80px;
        height: 140px;
    }
    
    .card-mini {
        width: 50px;
        height: 85px;
    }
    
    .interpretation-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .interpretation-actions button {
        width: 100%;
        margin: 0.25rem 0;
    }
}