/* 🔮 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 */
.tarot-result-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 30px;
    padding: 50px;
    margin-top: 60px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.report-header h4 {
    font-size: 2rem;
    color: #fff;
    margin: 15px 0;
}

.tarot-result-subtitle {
    color: var(--tarot-gold);
    font-weight: 600;
    letter-spacing: 2px;
}

.summary-box {
    background: rgba(139, 92, 246, 0.1);
    border-left: 4px solid var(--tarot-purple);
    padding: 30px;
    border-radius: 0 20px 20px 0;
    position: relative;
    margin: 40px 0;
}

.summary-text {
    font-size: 1.25rem;
    line-height: 1.8;
    color: #e2e8f0;
    font-style: italic;
}

.result-cards-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin: 50px 0;
}

.result-card-item {
    text-align: center;
}

.card-pos-label {
    display: block;
    font-size: 0.8rem;
    color: var(--tarot-gold);
    margin-top: 15px;
    font-weight: 700;
}

.card-name-text {
    font-size: 1rem;
    color: #fff;
    font-weight: 600;
}

.analysis-item-v2 {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.analysis-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: var(--tarot-purple);
}

.analysis-header h5 {
    font-size: 1.1rem;
    margin: 0;
    color: #fff;
}

.analysis-content {
    line-height: 1.7;
    color: #cbd5e1;
}

.advice-card {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(251, 191, 36, 0.05));
    border: 1px solid rgba(251, 191, 36, 0.2);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
}

.advice-label {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: var(--tarot-gold);
    font-weight: 800;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.advice-text {
    font-size: 1.1rem;
    color: #fef3c7;
    line-height: 1.6;
}

/* 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;
}
