/* Tarjeta Contenedor Principal */
.tarot-gratis-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #f0f0f0;
    background: linear-gradient(135deg, #1a1c29 0%, #2a1b38 100%);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.tarot-header h2 {
    color: #e0b0ff !important;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.tarot-header p {
    font-size: 1.1rem;
    color: #ccc !important;
    margin-bottom: 2rem;
}

/* Grilla del Mazo */
.tarot-deck {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 2rem;
    transition: filter 0.5s ease;
}

.tarot-deck.deck-blur {
    filter: blur(4px) brightness(0.7);
    pointer-events: none;
}

/* Efecto 3D de Carta */
.tarot-card {
    background-color: transparent;
    width: 108px;
    height: 172px;
    perspective: 1000px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.tarot-card:hover {
    transform: translateY(-10px);
}

.tarot-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform-style: preserve-3d;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.tarot-card.flipped .tarot-card-inner {
    transform: rotateY(180deg);
    box-shadow: 0 0 15px #e0b0ff, 0 0 30px #e0b0ff;
    /* Resplandor al seleccionar */
}

.tarot-card-front,
.tarot-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    overflow: hidden;
}

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

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

/* Botones */
.tarot-controls {
    margin: 2rem 0;
}

.tarot-btn {
    background: linear-gradient(90deg, #9b59b6, #8e44ad);
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(142, 68, 173, 0.4);
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
}

.tarot-btn:hover {
    background: linear-gradient(90deg, #8e44ad, #9b59b6);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(142, 68, 173, 0.6);
}

.tarot-btn:disabled {
    background: #555;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Área de Resultados (Glassmorphism) */
.tarot-result-area {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    text-align: left;
    color: #fff;
    line-height: 1.6;
}

/* Estilos de las Posiciones */
.tarot-position,
.tarot-group,
.siono-veredicto,
.siono-card-detail {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tarot-position:last-child,
.tarot-group:last-child {
    border-bottom: none;
}

.position-title,
.group-title,
.veredicto-title {
    color: #e0b0ff !important;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 4px solid #e0b0ff;
    padding-left: 10px;
}

.position-content p,
.group-content p,
.veredicto-content p,
.siono-card-detail p {
    font-size: 1.1rem;
    color: #e0e0e0 !important;
    margin-bottom: 1rem;
}

/* Ajustes Responsive */
@media (max-width: 768px) {
    .tarot-card {
        width: 80px;
        height: 127px;
    }

    .tarot-gratis-container {
        padding: 1rem;
    }
}

/* Loader Styles */
.loader-spinner {
    border: 6px solid rgba(255, 255, 255, 0.1);
    border-top: 6px solid #e0b0ff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Selected Cards Header */
.tarot-selected-cards-display {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.tarot-selected-card {
    text-align: center;
    width: 140px;
}

.tarot-selected-card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.6);
    margin-bottom: 15px;
    border: 2px solid #e0b0ff;
}

.tarot-selected-card h4 {

    font-size: 15px;
    color: #fff;
    margin: 0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

@media (max-width: 600px) {
    .tarot-selected-card {
        width: 100px;
    }
}

/* Forzar colores de textos inyectados desde los JSON para contraste con el fondo oscuro */
.tarot-gratis-container #tarot-result-area h1,
.tarot-gratis-container #tarot-result-area h2,
.tarot-gratis-container #tarot-result-area h3,
.tarot-gratis-container #tarot-result-area h4,
.tarot-gratis-container #tarot-result-area h5,
.tarot-gratis-container #tarot-result-area h6,
.tarot-gratis-container .tarot-selected-card h1,
.tarot-gratis-container .tarot-selected-card h2,
.tarot-gratis-container .tarot-selected-card h3,
.tarot-gratis-container .tarot-selected-card h4,
.tarot-gratis-container .tarot-selected-card h5,
.tarot-gratis-container .tarot-selected-card h6 {
    color: #e0b0ff !important;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.tarot-gratis-container #tarot-result-area ul,
.tarot-gratis-container #tarot-result-area li {
    color: #e0e0e0 !important;
}

.tarot-gratis-container #tarot-result-area strong,
.tarot-gratis-container #tarot-result-area .strong,
.tarot-gratis-container #tarot-result-area b {
    color: #ffffff !important;
    font-weight: bold !important;
}

/* Forzar estilos para Blockquote y evitar conflictos con el theme */
.tarot-gratis-container #tarot-result-area blockquote {
    background: linear-gradient(135deg, #1a1c29 0%, #2a1b38 100%) !important;
    border-left: 4px solid #e0b0ff !important;
    padding: 15px 20px !important;
    margin: 1.5rem 0 !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

.tarot-gratis-container #tarot-result-area blockquote,
.tarot-gratis-container #tarot-result-area blockquote p,
.tarot-gratis-container #tarot-result-area blockquote span {
    color: #e0e0e0 !important;
    font-style: italic !important;
}

/* Calculator UI Styles */
.tarot-calculator-ui {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.calculator-selectors {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.calculator-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 250px;
}

.calculator-slot label {
    color: #e0b0ff;
    font-weight: bold;
    margin-bottom: 10px;
}

.calculator-card-select {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 8px;
    background: #2a1b38;
    color: #fff;
    border: 1px solid #e0b0ff;
    font-size: 16px;
    cursor: pointer;
}

.calculator-card-display {
    width: 150px;
    height: auto;
    text-align: center;
    cursor: pointer;
}

.calculator-card-image {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.4s ease;
}

.calculator-card-image.is-reversed {
    transform: rotate(180deg);
}

.calculator-hint {
    color: #aaa;
    font-size: 12px;
    margin-top: 10px;
    display: none;
}