/**
 * Tarot Card Game Styles
 *
 * @since 1.0.0
 */

/* Main container */
.tarot-card-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    box-sizing: border-box;
}

/* Card container with perspective for 3D effect */
.tarot-card-container {
    position: relative;
    width: 280px;
    height: 480px;
    perspective: 1000px;
    margin: 0 auto;
}

/* Inner card container with flip transition */
.tarot-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

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

/* Shared styles for card front and back */
.tarot-card-front, .tarot-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Safari */
    backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
}

/* Card back styling */
.tarot-card-back {
    background-color: #F8F4E3;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border: 1px solid #D3D0C2;
}

/* Card front styling */
.tarot-card-front {
    background-color: white;
    color: #333;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
}

/* Card image container */
.tarot-card-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    overflow: hidden;
}

/* Card image */
.tarot-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Card meaning container */
.tarot-card-meaning {
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.9);
    border-top: 1px solid #eee;
    text-align: left;
    font-size: 14px;
    line-height: 1.4;
    max-height: 35%;
    overflow-y: auto;
}

/* Card meaning title */
.tarot-card-meaning h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #3E2A5A;
}

/* Card meaning text */
.tarot-card-meaning p {
    margin: 0;
}

/* Controls container */
.tarot-card-controls {
    margin-top: 20px;
    text-align: center;
}

/* Flip button */
.tarot-flip-button {
    background-color: #6A4C93;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

.tarot-flip-button:hover {
    background-color: #8B66BF;
}

.tarot-flip-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(106, 76, 147, 0.5);
}

/* Responsive styles */
@media (max-width: 767px) {
    .tarot-card-container {
        width: 240px;
        height: 410px;
    }
    
    .tarot-card-meaning {
        font-size: 13px;
    }
    
    .tarot-card-meaning h3 {
        font-size: 16px;
    }
    
    .tarot-flip-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 479px) {
    .tarot-card-container {
        width: 200px;
        height: 340px;
    }
    
    .tarot-card-meaning {
        font-size: 12px;
        padding: 10px;
    }
    
    .tarot-card-meaning h3 {
        font-size: 15px;
        margin-bottom: 5px;
    }
}
