/* Reset específico para la aplicación de tarot */
#tarot-app-container,
#tarot-app-container * {
    box-sizing: border-box;
}

/* Contenedor principal */
#tarot-app-container {
    width: 100%;
    min-height: 500px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #ffffff;
    line-height: 1.6;
}

.tarot-app-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #171E36 0%, #1a1f3a 100%);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Header */
.tarot-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

.tarot-titulo {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.tarot-subtitulo {
    font-size: 1.1rem;
    color: #b8b8d1;
    margin: 0;
    font-weight: 300;
}

/* Sección de pregunta */
.tarot-pregunta-section {
    margin-bottom: 40px;
}

.tarot-pregunta-container {
    margin-bottom: 20px;
}

.tarot-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 12px;
    color: #e0e0f0;
}

.tarot-textarea {
    width: 100%;
    padding: 15px;
    font-size: 1rem;
    border: 2px solid #2a3352;
    border-radius: 8px;
    background: #1f2740;
    color: #ffffff;
    resize: vertical;
    transition: all 0.3s ease;
    font-family: inherit;
}

.tarot-textarea:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.tarot-textarea::placeholder {
    color: #6b7394;
}

.tarot-contador-container {
    text-align: right;
    margin-top: 8px;
}

.tarot-contador {
    font-size: 0.9rem;
    color: #7a7fa8;
}

/* Botones */
.tarot-btn-primary,
.tarot-btn-secondary {
    width: 100%;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tarot-btn-primary {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1a1a3e;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.tarot-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

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

.tarot-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.tarot-btn-secondary {
    background: transparent;
    border: 2px solid #FFD700;
    color: #FFD700;
    margin-top: 20px;
}

.tarot-btn-secondary:hover {
    background: rgba(255, 215, 0, 0.1);
    transform: translateY(-2px);
}

/* Sección de cartas */
.tarot-cartas-section {
    margin: 40px 0;
}

.tarot-cartas-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 20px 0;
}

.tarot-carta-wrapper {
    perspective: 1000px;
    width: 180px;
    height: 270px;
}

.tarot-carta {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
    cursor: pointer;
}

.tarot-carta.girada {
    transform: rotateY(180deg);
}

.tarot-carta-contenido {
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.tarot-carta-reverso .tarot-carta-contenido {
    transform: rotateY(0deg);
}

.tarot-carta-dorso {
    width: 100%;
    height: 100%;
    display: block;
}

.tarot-carta-frente {
    transform: rotateY(180deg);
    background: #ffffff;
}

.tarot-carta-frente img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tarot-carta-wrapper:hover .tarot-carta {
    transform: scale(1.05);
}

.tarot-carta-wrapper:hover .tarot-carta.girada {
    transform: rotateY(180deg) scale(1.05);
}

/* Animación de aparición de cartas */
@keyframes cartaEntrada {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.tarot-carta-wrapper {
    animation: cartaEntrada 0.6s ease-out;
}

.tarot-carta-wrapper:nth-child(1) {
    animation-delay: 0.1s;
}

.tarot-carta-wrapper:nth-child(2) {
    animation-delay: 0.2s;
}

.tarot-carta-wrapper:nth-child(3) {
    animation-delay: 0.3s;
}

/* Sección de resultado */
.tarot-resultado-section {
    text-align: center;
    padding: 40px 20px;
}

.tarot-resultado-container {
    max-width: 600px;
    margin: 0 auto;
}

.tarot-resultado-icono {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: iconoPulso 2s ease-in-out infinite;
}

@keyframes iconoPulso {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.tarot-resultado-titulo {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 15px 0;
}

.tarot-resultado-titulo.resultado-si {
    color: #4CAF50;
    text-shadow: 0 2px 10px rgba(76, 175, 80, 0.5);
}

.tarot-resultado-titulo.resultado-no {
    color: #f44336;
    text-shadow: 0 2px 10px rgba(244, 67, 54, 0.5);
}

.tarot-resultado-titulo.resultado-duda {
    color: #FFA500;
    text-shadow: 0 2px 10px rgba(255, 165, 0, 0.5);
}

.tarot-resultado-descripcion {
    font-size: 1.1rem;
    color: #b8b8d1;
    line-height: 1.8;
    margin: 0 0 30px 0;
}

/* Cartas reveladas en resultado */
.tarot-cartas-reveladas {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 30px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.tarot-carta-revelada {
    text-align: center;
}

.tarot-carta-revelada-img {
    width: 120px;
    height: 180px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    object-fit: cover;
}

.tarot-carta-revelada-nombre {
    font-size: 0.9rem;
    color: #e0e0f0;
    font-weight: 500;
}

.tarot-carta-revelada-respuesta {
    font-size: 0.85rem;
    margin-top: 5px;
    padding: 4px 12px;
    border-radius: 12px;
    display: inline-block;
    font-weight: 600;
}

.tarot-carta-revelada-respuesta.respuesta-si {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid #4CAF50;
}

.tarot-carta-revelada-respuesta.respuesta-no {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid #f44336;
}

.tarot-carta-revelada-respuesta.respuesta-duda {
    background: rgba(255, 165, 0, 0.2);
    color: #FFA500;
    border: 1px solid #FFA500;
}

/* Loader */
.tarot-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(23, 30, 54, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.tarot-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 215, 0, 0.2);
    border-top-color: #FFD700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.tarot-loader-texto {
    margin-top: 20px;
    font-size: 1.1rem;
    color: #FFD700;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .tarot-titulo {
        font-size: 2rem;
    }
    
    .tarot-subtitulo {
        font-size: 1rem;
    }
    
    .tarot-carta-wrapper {
        width: 140px;
        height: 210px;
    }
    
    .tarot-cartas-container {
        gap: 15px;
    }
    
    .tarot-resultado-titulo {
        font-size: 2rem;
    }
    
    .tarot-carta-revelada-img {
        width: 100px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .tarot-app-wrapper {
        padding: 15px;
        border-radius: 8px;
    }
    
    .tarot-titulo {
        font-size: 1.75rem;
    }
    
    .tarot-carta-wrapper {
        width: 110px;
        height: 165px;
    }
    
    .tarot-cartas-container {
        gap: 10px;
    }
    
    .tarot-resultado-icono {
        font-size: 3rem;
    }
    
    .tarot-resultado-titulo {
        font-size: 1.5rem;
    }
    
    .tarot-carta-revelada-img {
        width: 80px;
        height: 120px;
    }
    
    .tarot-btn-primary,
    .tarot-btn-secondary {
        font-size: 1rem;
        padding: 14px 24px;
    }
}

/* Animaciones adicionales */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.tarot-pregunta-section,
.tarot-cartas-section,
.tarot-resultado-section {
    animation: fadeIn 0.5s ease-in;
}

/* Asegurar compatibilidad con WordPress */
#tarot-app-container img {
    max-width: 100%;
    height: auto;
}

#tarot-app-container button {
    background-image: none !important;
}
