/* ================================================
   TAROT SI O NO 1 - APP STYLES
   Clean Tarot Theme: Dark Purple / Gold
   ================================================ */

.ts1-app {
    --ts1-purpura-oscuro: #1a0a2e;
    --ts1-purpura-medio: #2d1b4e;
    --ts1-purpura-claro: #4a2c7a;
    --ts1-oro: #c5a55a;
    --ts1-oro-claro: #e8d48b;
    --ts1-dorado: #d4a843;
    --ts1-blanco: #f0edf5;
    --ts1-gradiente: linear-gradient(135deg, #1a0a2e 0%, #2d1b4e 50%, #4a2c7a 100%);
    --ts1-gradiente-oro: linear-gradient(135deg, #b8943a 0%, #c5a55a 50%, #d4b86a 100%);
    --ts1-sombra: 0 10px 30px rgba(197, 165, 90, 0.12);
    --ts1-sombra-fuerte: 0 15px 40px rgba(26, 10, 46, 0.4);
    --ts1-radio: 16px;
    --ts1-transicion: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    position: relative;
    overflow: hidden;
    width: 100%;
}

.ts1-fase {
    animation: ts1FadeIn 0.6s ease;
}

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

/* ================================================
   FASE FORMULARIO
   ================================================ */

.ts1-form-contenido {
    text-align: center;
    padding: 2.5rem 1rem;
}

.ts1-icono-oraculo {
    font-size: 4rem;
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
    animation: ts1Brillo 3s ease-in-out infinite;
}

@keyframes ts1Brillo {
    0%, 100% { transform: scale(1); filter: brightness(1) drop-shadow(0 0 0 transparent); }
    50% { transform: scale(1.1); filter: brightness(1.3) drop-shadow(0 0 20px rgba(197, 165, 90, 0.5)); }
}

.ts1-destello {
    position: absolute;
    font-size: 1rem;
    opacity: 0;
    animation: ts1Destello 3s ease-in-out infinite;
    pointer-events: none;
}

.ts1-destello::before { content: '\2726'; color: var(--ts1-oro); }
.ts1-d2::before { content: '\2756'; color: var(--ts1-oro-claro); }
.ts1-d3::before { content: '\2727'; color: var(--ts1-dorado); }

.ts1-d1 { animation-delay: -0.5s; top: -10px; left: 10px; }
.ts1-d2 { animation-delay: -1.5s; top: -5px; right: 15px; }
.ts1-d3 { animation-delay: -2.5s; bottom: 5px; left: 25px; }

@keyframes ts1Destello {
    0%, 100% { opacity: 0; transform: translateY(0) scale(0.5); }
    50% { opacity: 0.8; transform: translateY(-20px) scale(1); }
}

.ts1-titulo-form {
    color: var(--ts1-blanco);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: var(--ts1-gradiente-oro);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ts1-subtitulo-form {
    color: rgba(240, 237, 245, 0.7);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.ts1-form-campo {
    max-width: 500px;
    margin: 0 auto 1rem;
    text-align: left;
}

.ts1-input,
.ts1-textarea {
    width: 100%;
    background: rgba(240, 237, 245, 0.05);
    border: 1px solid rgba(197, 165, 90, 0.3);
    border-radius: 12px;
    padding: 0.9rem 1.2rem;
    color: var(--ts1-blanco);
    font-family: inherit;
    font-size: 1.05rem;
    transition: var(--ts1-transicion);
    box-sizing: border-box;
}

.ts1-textarea {
    min-height: 100px;
    resize: vertical;
}

.ts1-input:focus,
.ts1-textarea:focus {
    outline: none;
    border-color: var(--ts1-oro);
    box-shadow: 0 0 0 3px rgba(197, 165, 90, 0.15);
    background-color: rgba(240, 237, 245, 0.08);
}

.ts1-input::placeholder,
.ts1-textarea::placeholder {
    color: rgba(240, 237, 245, 0.35);
}

.ts1-btn-consultar {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--ts1-gradiente-oro);
    color: var(--ts1-purpura-oscuro);
    border: none;
    border-radius: 50px;
    padding: 0.9rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--ts1-transicion);
    margin-top: 1.5rem;
    font-family: inherit;
    box-shadow: var(--ts1-sombra);
}

.ts1-btn-consultar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(197, 165, 90, 0.3);
}

.ts1-btn-consultar:active {
    transform: translateY(-1px);
}

.ts1-instruccion {
    color: rgba(240, 237, 245, 0.5);
    font-size: 0.85rem;
    margin-top: 1.5rem;
}

/* ================================================
   LOADING - CARD ANIMATION
   ================================================ */

.ts1-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.ts1-loading-carta {
    width: 70px;
    height: 100px;
    background: var(--ts1-gradiente);
    border: 2px solid var(--ts1-oro);
    border-radius: 10px;
    position: relative;
    margin-bottom: 1.5rem;
    animation: ts1Revelar 1.6s ease-in-out infinite;
    box-shadow: 0 6px 20px rgba(197, 165, 90, 0.2);
}

.ts1-carta-back {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
}

.ts1-carta-back::before {
    content: '\2726';
    color: var(--ts1-oro-claro);
}

@keyframes ts1Revelar {
    0% { transform: perspective(400px) rotateX(0deg) translateY(0); opacity: 0.6; }
    25% { transform: perspective(400px) rotateX(90deg) translateY(-20px); opacity: 1; box-shadow: 0 15px 30px rgba(197, 165, 90, 0.4); }
    50% { transform: perspective(400px) rotateX(180deg) translateY(0); opacity: 0.6; }
    75% { transform: perspective(400px) rotateX(270deg) translateY(-20px); opacity: 1; box-shadow: 0 15px 30px rgba(197, 165, 90, 0.4); }
    100% { transform: perspective(400px) rotateX(360deg) translateY(0); opacity: 0.6; }
}

.ts1-loading-texto {
    color: rgba(240, 237, 245, 0.7);
    font-size: 1rem;
    animation: ts1PulsoTexto 1.5s ease-in-out infinite;
}

@keyframes ts1PulsoTexto {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ================================================
   FASE RESULTADO
   ================================================ */

.ts1-resultado-contenido {
    padding: 2rem 1rem;
}

.ts1-seccion {
    background: rgba(240, 237, 245, 0.05);
    border: 1px solid rgba(197, 165, 90, 0.12);
    border-radius: var(--ts1-radio);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    animation: ts1SlideIn 0.6s ease both;
}

.ts1-seccion:nth-child(1) { animation-delay: 0s; }
.ts1-seccion:nth-child(2) { animation-delay: 0.1s; }
.ts1-seccion:nth-child(3) { animation-delay: 0.18s; }

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

.ts1-seccion-titulo {
    color: var(--ts1-oro);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* ================================================
   RESPUESTA DIRECTA
   ================================================ */

.ts1-respuesta-box {
    text-align: center;
    padding: 1.5rem 1rem;
    border-radius: 14px;
    animation: ts1PulsoRespuesta 2s ease-in-out infinite;
}

.ts1-respuesta-si {
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid rgba(16, 185, 129, 0.3);
}

.ts1-respuesta-no {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.3);
}

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

.ts1-respuesta-emoji {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

.ts1-respuesta-texto {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.ts1-respuesta-si .ts1-respuesta-texto { color: #10b981; }
.ts1-respuesta-no .ts1-respuesta-texto { color: #ef4444; }

.ts1-respuesta-pregunta {
    color: rgba(240, 237, 245, 0.6);
    font-size: 0.9rem;
    font-style: italic;
    margin-top: 0.8rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ================================================
   CARTA DEL TAROT
   ================================================ */

.ts1-carta-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ts1-carta-icono {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: var(--ts1-gradiente);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid rgba(197, 165, 90, 0.3);
}

.ts1-carta-info {
    flex: 1;
}

.ts1-carta-nombre {
    color: var(--ts1-blanco);
    font-size: 1.2rem;
    font-weight: 700;
}

.ts1-carta-mensaje {
    color: rgba(240, 237, 245, 0.85);
    line-height: 1.8;
    font-size: 0.95rem;
    font-style: italic;
    padding: 1rem;
    background: rgba(197, 165, 90, 0.04);
    border-left: 3px solid var(--ts1-oro);
    border-radius: 0 8px 8px 0;
    margin-top: 0.5rem;
}

/* ================================================
   MENSAJE DE GUIA
   ================================================ */

.ts1-guia-box {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: rgba(74, 44, 122, 0.08);
    border: 1px solid rgba(197, 165, 90, 0.2);
    border-radius: 12px;
    padding: 1rem;
}

.ts1-guia-icon {
    flex-shrink: 0;
    font-size: 1.2rem;
    color: var(--ts1-oro);
}

.ts1-guia-text {
    color: rgba(240, 237, 245, 0.85);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ================================================
   NUEVA CONSULTA
   ================================================ */

.ts1-btn-nueva {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(240, 237, 245, 0.08);
    color: var(--ts1-blanco);
    border: 2px solid rgba(197, 165, 90, 0.3);
    border-radius: 50px;
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--ts1-transicion);
    font-family: inherit;
}

.ts1-btn-nueva:hover {
    background: rgba(197, 165, 90, 0.15);
    border-color: var(--ts1-oro);
    transform: translateY(-2px);
}

/* ================================================
   FONDO
   ================================================ */

.ts1-app::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(26, 10, 46, 0.8) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(197, 165, 90, 0.04) 0%, transparent 50%),
                radial-gradient(circle at 50% 80%, rgba(74, 44, 122, 0.08) 0%, transparent 50%);
    animation: ts1Fondo 25s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes ts1Fondo {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ts1-fase { position: relative; z-index: 1; }
.ts1-loading { position: relative; z-index: 1; }

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 768px) {
    .ts1-titulo-form { font-size: 1.6rem; }
    .ts1-icono-oraculo { font-size: 3rem; }
    .ts1-respuesta-texto { font-size: 2rem; }
    .ts1-carta-header { flex-direction: column; text-align: center; }
    .ts1-seccion { padding: 1.3rem; }
}

@media (max-width: 480px) {
    .ts1-form-contenido { padding: 1.5rem 0.5rem; }
    .ts1-titulo-form { font-size: 1.4rem; }
    .ts1-subtitulo-form { font-size: 0.85rem; }
    .ts1-resultado-contenido { padding: 1.5rem 0.5rem; }
    .ts1-seccion { padding: 1rem; }
    .ts1-respuesta-texto { font-size: 1.8rem; }
    .ts1-respuesta-emoji { font-size: 2.5rem; }
    .ts1-btn-nueva { padding: 0.8rem 1.5rem; font-size: 0.9rem; }
    .ts1-btn-consultar { padding: 0.8rem 1.8rem; font-size: 0.9rem; }
    .ts1-carta-icono { width: 50px; height: 50px; font-size: 2rem; }
    .ts1-carta-nombre { font-size: 1rem; }
}

/* ================================================
   ACCESIBILIDAD
   ================================================ */

@media (prefers-reduced-motion: reduce) {
    .ts1-app::before { animation: none; }
    .ts1-icono-oraculo { animation: none; }
    .ts1-destello { animation: none; display: none; }
    .ts1-loading-carta { animation: none; }
    .ts1-loading-texto { animation: none; opacity: 1; }
    .ts1-seccion { animation: none; opacity: 1; transform: none; }
    .ts1-respuesta-box { animation: none; }
    * { transition-duration: 0.05ms !important; animation-duration: 0.05ms !important; }
}

@media (prefers-contrast: high) {
    .ts1-seccion { border: 2px solid rgba(240, 237, 245, 0.4); }
    .ts1-input { border: 2px solid rgba(240, 237, 245, 0.4); }
    .ts1-textarea { border: 2px solid rgba(240, 237, 245, 0.4); }
}

@media print {
    .ts1-app::before { display: none; }
    .ts1-btn-nueva { display: none; }
    .ts1-seccion { break-inside: avoid; }
}