/* ================================================
   TAROT PERSA - APP STYLES
   Persian Theme: Turquoise / Blue / Gold / Arabesque
   ================================================ */

.tpr-app {
    --tpr-turquesa: #0fc2c2;
    --tpr-azul-profundo: #0d1b2a;
    --tpr-azul-persa: #1b3a5c;
    --tpr-gold: #d4a84b;
    --tpr-oro-claro: #f0d68a;
    --tpr-texto: #e0f7fa;
    --tpr-gradiente: linear-gradient(135deg, #0d1b2a 0%, #1b3a5c 50%, #0fc2c2 80%);
    --tpr-gradiente-oro: linear-gradient(135deg, #b8863a 0%, #d4a84b 50%, #e8c46a 100%);
    --tpr-sombra: 0 10px 30px rgba(15, 194, 194, 0.15);
    --tpr-radio: 16px;
    --tpr-transicion: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

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

.tpr-fase {
    animation: tprFadeIn 0.6s ease;
}

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

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

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

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

@keyframes tprPulso {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.3) drop-shadow(0 0 20px rgba(15, 194, 194, 0.5)); }
}

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

.tpr-destello::before { content: '\2734'; color: var(--tpr-turquesa); }
.tpr-d2::before { content: '\2756'; color: var(--tpr-gold); }
.tpr-d3::before { content: '\2727'; color: var(--tpr-turquesa); }

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

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

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

.tpr-subtitulo-form {
    color: rgba(224, 247, 250, 0.7);
    margin-bottom: 2rem;
    font-size: 1rem;
}

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

.tpr-form-seccion {
    margin-bottom: 1.5rem;
}

.tpr-seccion-label {
    color: rgba(224, 247, 250, 0.7);
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.tpr-input,
.tpr-textarea {
    width: 100%;
    background: rgba(224, 247, 250, 0.05);
    border: 1px solid rgba(15, 194, 194, 0.3);
    border-radius: 12px;
    padding: 0.9rem 1.2rem;
    color: var(--tpr-texto);
    font-family: inherit;
    font-size: 1.05rem;
    transition: var(--tpr-transicion);
    box-sizing: border-box;
}

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

.tpr-input:focus,
.tpr-textarea:focus {
    outline: none;
    border-color: var(--tpr-gold);
    box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.15);
    background-color: rgba(224, 247, 250, 0.08);
}

.tpr-input::placeholder,
.tpr-textarea::placeholder {
    color: rgba(224, 247, 250, 0.35);
}

.tpr-select {
    width: 100%;
    background: rgba(224, 247, 250, 0.05);
    border: 1px solid rgba(15, 194, 194, 0.3);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: var(--tpr-texto);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--tpr-transicion);
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230fc2c2' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.tpr-select:focus {
    outline: none;
    border-color: var(--tpr-gold);
    box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.15);
    background-color: rgba(224, 247, 250, 0.08);
}

.tpr-select option {
    background: var(--tpr-azul-profundo);
    color: var(--tpr-texto);
}

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

.tpr-btn-consultar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 168, 75, 0.3);
}

.tpr-instruccion {
    color: rgba(224, 247, 250, 0.5);
    font-size: 0.85rem;
    margin-top: 1.5rem;
}

/* ================================================
   LOADING - PERSIAN MANDALA
   ================================================ */

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

.tpr-loading-mandala {
    width: 120px;
    height: 120px;
    position: relative;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tpr-mandala-anillo {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    animation: tprGirar 3s linear infinite;
}

.tpr-anillo1 {
    width: 120px;
    height: 120px;
    border-top-color: var(--tpr-turquesa);
    border-right-color: var(--tpr-gold);
    animation-duration: 3s;
}

.tpr-anillo2 {
    width: 90px;
    height: 90px;
    border-bottom-color: var(--tpr-gold);
    border-left-color: var(--tpr-turquesa);
    animation-duration: 2.5s;
    animation-direction: reverse;
}

.tpr-anillo3 {
    width: 60px;
    height: 60px;
    border-top-color: var(--tpr-oro-claro);
    border-left-color: var(--tpr-turquesa);
    animation-duration: 2s;
}

@keyframes tprGirar {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.tpr-mandala-centro {
    font-size: 1.5rem;
    color: var(--tpr-gold);
    animation: tprLatido 1.5s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes tprLatido {
    0%, 100% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
}

.tpr-loading-texto {
    color: rgba(224, 247, 250, 0.7);
    font-size: 1rem;
    animation: tprPulsoTexto 1.5s ease-in-out infinite;
}

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

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

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

.tpr-seccion {
    background: rgba(224, 247, 250, 0.05);
    border: 1px solid rgba(15, 194, 194, 0.12);
    border-radius: var(--tpr-radio);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    animation: tprSlideIn 0.6s ease both;
}

.tpr-seccion:nth-child(1) { animation-delay: 0s; }
.tpr-seccion:nth-child(2) { animation-delay: 0.1s; }
.tpr-seccion:nth-child(3) { animation-delay: 0.2s; }
.tpr-seccion:nth-child(4) { animation-delay: 0.3s; }

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

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

/* ================================================
   CARTA PERSA CARD
   ================================================ */

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

.tpr-carta-icono {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(15, 194, 194, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 2.2rem;
    border: 2px solid rgba(15, 194, 194, 0.3);
    box-shadow: 0 0 15px rgba(15, 194, 194, 0.15);
}

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

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

.tpr-carta-desc {
    color: rgba(224, 247, 250, 0.75);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-top: 0.3rem;
}

/* ================================================
   INTERPRETACION
   ================================================ */

.tpr-interpretacion-box {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: rgba(15, 194, 194, 0.06);
    border: 1px solid rgba(15, 194, 194, 0.2);
    border-radius: 12px;
    padding: 1rem;
}

.tpr-interpretacion-icon {
    flex-shrink: 0;
    font-size: 1rem;
    color: var(--tpr-turquesa);
}

.tpr-interpretacion-text {
    color: rgba(224, 247, 250, 0.85);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ================================================
   SABIDURIA ANCESTRAL
   ================================================ */

.tpr-sabiduria-box {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: rgba(212, 168, 75, 0.06);
    border: 1px solid rgba(212, 168, 75, 0.2);
    border-radius: 12px;
    padding: 1rem;
}

.tpr-sabiduria-icon {
    flex-shrink: 0;
    font-size: 1rem;
    color: var(--tpr-gold);
}

.tpr-sabiduria-text {
    color: rgba(224, 247, 250, 0.85);
    font-size: 0.9rem;
    line-height: 1.6;
    font-style: italic;
}

/* ================================================
   RITUAL
   ================================================ */

.tpr-ritual-box {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: rgba(224, 247, 250, 0.03);
    border: 1px solid rgba(224, 247, 250, 0.08);
    border-radius: 12px;
    padding: 1rem;
}

.tpr-ritual-icon {
    flex-shrink: 0;
    font-size: 1rem;
    color: var(--tpr-oro-claro);
}

.tpr-ritual-text {
    color: rgba(224, 247, 250, 0.85);
    font-size: 0.9rem;
    line-height: 1.6;
}

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

.tpr-btn-nueva {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(224, 247, 250, 0.08);
    color: var(--tpr-texto);
    border: 2px solid rgba(15, 194, 194, 0.3);
    border-radius: 50px;
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--tpr-transicion);
    font-family: inherit;
}

.tpr-btn-nueva:hover {
    background: rgba(15, 194, 194, 0.15);
    border-color: var(--tpr-turquesa);
    transform: translateY(-2px);
}

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

.tpr-app::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background:
        radial-gradient(circle at 25% 35%, rgba(13, 27, 42, 0.9) 0%, transparent 50%),
        radial-gradient(circle at 75% 25%, rgba(15, 194, 194, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 50% 75%, rgba(212, 168, 75, 0.03) 0%, transparent 50%),
        repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(15, 194, 194, 0.015) 40px, rgba(15, 194, 194, 0.015) 41px),
        repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(212, 168, 75, 0.015) 40px, rgba(212, 168, 75, 0.015) 41px);
    animation: tprFondo 30s linear infinite;
    pointer-events: none;
    z-index: 0;
}

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

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

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

@media (max-width: 768px) {
    .tpr-titulo-form { font-size: 1.6rem; }
    .tpr-icono-oraculo { font-size: 3rem; }
    .tpr-carta-header { flex-direction: column; text-align: center; }
    .tpr-loading-mandala { width: 100px; height: 100px; }
    .tpr-anillo1 { width: 100px; height: 100px; }
    .tpr-anillo2 { width: 76px; height: 76px; }
    .tpr-anillo3 { width: 52px; height: 52px; }
}

@media (max-width: 480px) {
    .tpr-form-contenido { padding: 1.5rem 0.5rem; }
    .tpr-titulo-form { font-size: 1.4rem; }
    .tpr-subtitulo-form { font-size: 0.85rem; }
    .tpr-resultado-contenido { padding: 1.5rem 0.5rem; }
    .tpr-seccion { padding: 1.2rem; }
    .tpr-btn-nueva { padding: 0.8rem 1.5rem; font-size: 0.9rem; }
    .tpr-btn-consultar { padding: 0.8rem 1.8rem; font-size: 0.9rem; }
    .tpr-loading-mandala { width: 80px; height: 80px; }
    .tpr-anillo1 { width: 80px; height: 80px; }
    .tpr-anillo2 { width: 60px; height: 60px; }
    .tpr-anillo3 { width: 40px; height: 40px; }
    .tpr-mandala-centro { font-size: 1.2rem; }
}

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

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

@media (prefers-contrast: high) {
    .tpr-seccion { border: 2px solid rgba(224, 247, 250, 0.4); }
    .tpr-input { border: 2px solid rgba(224, 247, 250, 0.4); }
    .tpr-select { border: 2px solid rgba(224, 247, 250, 0.4); }
}

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