/* Tarot Specific Styles */
/* Removed body and stars-bg to avoid breaking site layout */

.tarot-container {
    max-width: 800px;
    margin: 80px auto 40px;
    padding: 20px;
    text-align: center;
    flex: 1;
}

h1.mystic-title {
    font-size: 2.5em;
    background: linear-gradient(to right, #c084fc, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(192, 132, 252, 0.5);
}

.tarot-subtitle {
    color: #94a3b8;
    margin-bottom: 40px;
    font-size: 1.1em;
}

/* 3D Card Scene */
.card-scene {
    width: 250px;
    height: 380px;
    margin: 0 auto;
    perspective: 1000px;
    cursor: pointer;
}

.tarot-card {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    border-radius: 15px;
}

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

.tarot-card.glow {
    animation: glowPulse 2s infinite alternate;
}

@keyframes glowPulse {
    from { box-shadow: 0 0 20px #c084fc, 0 0 40px #ec4899; }
    to { box-shadow: 0 0 40px #c084fc, 0 0 80px #ec4899; }
}

/* Card Faces */
.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px solid rgba(255,255,255,0.2);
}

/* Mặt Úp (Back) */
.card-back {
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.05) 0, rgba(255,255,255,0.05) 2px, transparent 2px, transparent 10px);
    color: #c084fc;
    font-size: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.card-back::after {
    content: '🔮';
    filter: drop-shadow(0 0 10px rgba(192, 132, 252, 0.8));
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* Mặt Ngửa (Front) */
.card-front {
    background: linear-gradient(135deg, #2e1065, #4c1d95);
    transform: rotateY(180deg);
    padding: 20px;
    box-sizing: border-box;
}

.card-image-wrapper {
    font-size: 80px;
    margin-bottom: 20px;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.5));
}

.card-name-front {
    font-family: 'Plus Jakarta Sans', serif;
    font-size: 1.4em;
    font-weight: bold;
    color: #fbcfe8;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    text-align: center;
}

/* Giải mã bài (Result Box) */
.reading-result {
    margin-top: 40px;
    background: rgba(30, 27, 75, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(192, 132, 252, 0.3);
    border-radius: 20px;
    padding: 30px;
    text-align: left;
    display: none;
    animation: slideUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.reading-title {
    text-align: center;
    font-size: 1.8em;
    color: #fbcfe8;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
}

.reading-section {
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #c084fc;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-content {
    color: #cbd5e1;
    line-height: 1.6;
    font-size: 1.05em;
}

/* Share Button */
.btn-share {
    display: block;
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #8b5cf6, #ec4899);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    margin-top: 30px;
    transition: 0.3s;
    box-shadow: 0 10px 20px rgba(236, 72, 153, 0.3);
}

.btn-share:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(236, 72, 153, 0.5);
}

/* Media Query */
@media (max-width: 600px) {
    .card-scene {
        width: 200px;
        height: 320px;
    }
    .card-image-wrapper { font-size: 70px; }
    .card-name-front { font-size: 1.2em; }
    h1.mystic-title { font-size: 2em; }
}

/* --- Tarot Widget Styles --- */
#tarot-widget-wrapper {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 2147483647;
}

@media (max-width: 768px) {
    #tarot-widget-wrapper {
        display: none !important;
    }
}

#tarot-widget-fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2e1065, #c084fc);
    border: 2px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5), 0 0 15px rgba(192, 132, 252, 0.6);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    transition: all 0.3s ease;
    animation: floatIcon 3s ease-in-out infinite;
}

#tarot-widget-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.6), 0 0 25px rgba(236, 72, 153, 0.8);
}

#tarot-widget-popup {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 320px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(192, 132, 252, 0.4);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    transform-origin: bottom left;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#tarot-widget-popup.hidden {
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
}

.tarot-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.tarot-widget-title {
    font-size: 1.2em;
    font-weight: bold;
    background: linear-gradient(to right, #c084fc, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#tarot-widget-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}

#tarot-widget-close:hover {
    color: #fff;
}

/* Custom size for widget card */
#tarot-widget-popup .card-scene {
    width: 160px;
    height: 250px;
    margin: 10px auto;
}

#tarot-widget-popup .card-back {
    font-size: 40px;
}

#tarot-widget-popup .card-image-wrapper {
    font-size: 50px;
    margin-bottom: 10px;
}

#tarot-widget-popup .card-name-front {
    font-size: 1em;
}

.tarot-widget-result {
    margin-top: 15px;
    font-size: 0.95em;
    color: #cbd5e1;
    line-height: 1.5;
    text-align: center;
    display: none;
    animation: slideUp 0.5s ease-out;
}

.tarot-widget-result.show {
    display: block;
}
