/* 🔮 Tarot Module Premium Styles */

:root {
    --tarot-gold: #fbbf24;
    --tarot-purple: #8b5cf6;
    --tarot-deep-bg: #0f172a;
    --tarot-card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

/* Tarot Hub Layout */
.tarot-hub-grid {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.tarot-hub-card {
    background: rgba(30, 41, 59, 0.7) !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 24px !important;
    padding: 40px !important;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Form Styles */
.tarot-form-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
    display: none; /* Hidden by default */
}

.tarot-form-group {
    margin-bottom: 25px;
}

.tarot-form-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 10px;
}

.tarot-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 12px;
    padding: 14px 18px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s;
}

.tarot-input:focus {
    outline: none;
    border-color: var(--tarot-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.tarot-textarea {
    min-height: 120px;
    resize: none;
}

/* Toggle Styles */
.tarot-toggle {
    display: flex;
    gap: 10px;
    background: rgba(15, 23, 42, 0.8);
    padding: 5px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tarot-toggle button {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.tarot-toggle button.active {
    background: var(--tarot-purple);
    color: #fff;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Mode Selection Tabs */
.tarot-modes {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.tarot-tab {
    padding: 12px 24px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.tarot-tab.active {
    background: linear-gradient(135deg, var(--tarot-purple), #7c3aed);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

/* Deck & Selection */
#tarotDeck {
    position: relative;
    height: 450px;
    margin: 40px auto;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#tarotDeck.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
    height: auto;
    max-width: 800px;
}

.tarot-card-item {
    position: absolute;
    width: 100px;
    height: 170px;
    background: url('assets/img/tarot/card_back.jpeg') no-repeat center center;
    background-size: cover;
    border-radius: 8px;
    box-shadow: var(--tarot-card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tarot-card-select {
    aspect-ratio: 10 / 17;
    background: url('assets/img/tarot/card_back.jpeg') no-repeat center center;
    background-size: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.tarot-card-select:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--tarot-gold);
}

.tarot-card-select.selected {
    filter: grayscale(0.8) brightness(0.5);
    transform: translateY(10px);
    pointer-events: none;
}

/* Spread Layout */
#tarotSpread {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    min-height: 400px;
    margin-top: 40px;
}

.tarot-card-reveal {
    perspective: 1000px;
    width: 160px;
    text-align: center;
}

.card-label {
    font-size: 0.9rem;
    color: var(--tarot-gold);
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-frame {
    width: 160px;
    height: 280px;
    position: relative;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

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

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    box-shadow: var(--tarot-card-shadow);
    overflow: hidden;
}

.card-back {
    background: url('assets/img/tarot/card_back.jpeg') no-repeat center center;
    background-size: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.card-front {
    transform: rotateY(180deg);
    background: #000;
    border: 2px solid var(--tarot-gold);
}

.card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}



/* Result Area Redesign v2.0 (SkyCheonWon White Theme) */
.tarot-result-card {
    background: #ffffff;
    border-radius: 30px;
    padding: 40px;
    margin-top: 60px;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.tarot-report-header {
    text-align: center;
    margin-bottom: 50px;
}

.tarot-direct-answer {
    font-size: 1.6rem;
    line-height: 1.5;
    font-weight: 700;
    color: #1e293b;
    word-break: keep-all;
    max-width: 800px;
    margin: 0 auto;
}

.tarot-split-row {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
    align-items: flex-start;
}

.tarot-left-col {
    flex: 0 0 480px;
    text-align: center;
}

.tarot-right-col {
    flex: 1;
}

.tarot-col-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
}

.tarot-result-image {
    width: 100%;
    max-width: 240px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.tarot-deep-content {
    line-height: 1.8;
    color: #475569;
    font-size: 1.05rem;
    white-space: pre-wrap;
}

/* Lucky Elements Grid */
.lucky-elements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.lucky-item-v2 {
    background: #f8faff;
    padding: 15px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #eef2ff;
}

.lucky-icon-v2 {
    width: 36px;
    height: 36px;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tarot-purple);
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.lucky-label-v2 {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 2px;
}

.lucky-value-v2 {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}

/* Energy Stats - Compacted */
.energy-stats-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 90%; /* Reduced width */
}

.stat-row-v2 {
    width: 100%;
}

.stat-info-v2 {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 700;
}

.stat-label-v2 { color: #64748b; }
.stat-value-v2 { color: #1e293b; }

.p-bar-track {
    height: 10px;
    background: #f1f5f9;
    border-radius: 100px;
    overflow: hidden;
}

.p-bar-inner {
    height: 100%;
    border-radius: 100px;
    width: 0;
}

/* Action Checklist - Grey Border */
.action-checklist-container {
    margin-top: 50px;
    background: #fcfcfc;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 30px;
}

.checklist-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.checklist-items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #ffffff;
    padding: 15px 20px;
    border-radius: 12px;
    color: #475569;
    line-height: 1.6;
    border: 1px solid #f1f5f9;
}

.checklist-item i {
    color: #10b981; /* Green check for checklist */
    margin-top: 4px;
}


/* Three Card Layout v3.0 */
.tarot-three-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 50px;
}

.tarot-3-column-item {
    display: grid;
    grid-template-columns: 2.5fr 4.5fr 3fr;
    gap: 30px;
    background: #f8faff;
    padding: 30px;
    border-radius: 24px;
    border: 1px solid #eef2ff;
    align-items: center;
}

.tarot-3-col-left { text-align: center; }
.tarot-3-col-center { padding: 0 10px; line-height: 1.8; color: #334155; font-size: 0.98rem; text-align: justify; }
.tarot-3-col-right { width: 100%; }

.pos-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--tarot-purple);
    color: #fff;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-transform: uppercase;
}

/* 5:5 Row for Radar Chart & Lucky Elements */
.tarot-50-50-row {
    display: flex;
    gap: 30px;
    margin-bottom: 50px;
    align-items: stretch;
}

.tarot-50-col {
    flex: 1;
    background: #ffffff;
    padding: 30px;
    border-radius: 24px;
    border: 1px solid #f1f5f9;
}

.tarot-radar-container {
    width: 100%;
    height: 300px;
    position: relative;
}

/* Responsive for Three Card */
@media (max-width: 992px) {
    .tarot-3-column-item {
        grid-template-columns: 1fr;
        align-items: center;
        text-align: center;
        gap: 20px;
    }
    .tarot-3-col-left, .tarot-3-col-center, .tarot-3-col-right {
        flex: none;
        width: 100%;
    }
    .tarot-3-col-center { padding: 20px 0; }
    .tarot-50-50-row { flex-direction: column; }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Tarot Question Chips Styling */
.tarot-question-chips-wrapper {
    width: 100%;
    overflow: hidden;
}

.tarot-question-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    width: 100%;
}

.chip-btn {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #4c1d95; /* Darker violet for visibility on light background */
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.chip-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--tarot-purple);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.chip-btn:active {
    transform: translateY(0);
}

/* Mobile Adjustments for Chips */
@media (max-width: 768px) {
    .tarot-question-chips {
        gap: 8px;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        width: 100%;
    }
    
    .chip-btn {
        padding: 8px 6px;
        font-size: 0.85rem;
        text-align: center;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* ── Result Area: Remove nested panel padding ── */
    /* Outer card: reduce side padding so text fills the screen */
    .tarot-result-card {
        padding: 20px 14px;
        border-radius: 20px;
        margin-top: 30px;
    }

    /* Direct answer: full width, no inner box feel */
    .tarot-report-header {
        margin-bottom: 24px;
    }
    .tarot-direct-answer {
        font-size: 1.15rem;
        text-align: center;
        max-width: 100%;
        padding: 0;
    }

    /* One-card split rows → single column, no side gaps */
    .tarot-split-row {
        flex-direction: column;
        gap: 16px;
        margin-bottom: 24px;
        align-items: center;
    }
    .tarot-left-col {
        flex: none;
        width: 100%;
        max-width: none;
    }
    .tarot-right-col {
        width: 100%;
        text-align: left;
    }
    .tarot-result-image {
        max-width: 180px;
        margin: 0 auto;
    }
    .tarot-col-title {
        font-size: 1rem;
        justify-content: center;
    }

    /* Action checklist: remove background panel, show as plain list */
    .action-checklist-container {
        background: transparent;
        border: none;
        border-radius: 0;
        padding: 0;
        margin-top: 28px;
    }
    .checklist-item {
        background: #f8fafc;
        padding: 12px 14px;
        border-radius: 10px;
    }

    /* Three-card / Celtic: remove heavy panel padding */
    .tarot-3-column-item {
        grid-template-columns: 1fr;
        padding: 16px 12px;
        gap: 14px;
        text-align: center;
    }
    .tarot-3-col-left, .tarot-3-col-center, .tarot-3-col-right {
        flex: none;
        width: 100%;
    }
    .tarot-3-col-center {
        padding: 10px 0;
        font-size: 0.95rem;
    }

    /* 5:5 radar/lucky row → vertical */
    .tarot-50-50-row {
        flex-direction: column;
        gap: 16px;
    }
    .tarot-50-col {
        padding: 18px 14px;
        border-radius: 16px;
    }
}
