/* ================================================
   TAROT NUMEROS - APP STYLES
   Numerology Theme: Purple / Gold / Mystical
   ================================================ */

.tnu-app {
    --tnu-purpura: #6b21a8;
    --tnu-purpura-claro: #a855f7;
    --tnu-gold: #d4a84b;
    --tnu-oro-claro: #f0d68a;
    --tnu-fondo: #1a1025;
    --tnu-fondo-claro: #2d1b4e;
    --tnu-texto: #f3e8ff;
    --tnu-gradiente: linear-gradient(135deg, #1a1025 0%, #2d1b4e 50%, #4a2d6b 100%);
    --tnu-gradiente-oro: linear-gradient(135deg, #b8863a 0%, #d4a84b 50%, #e8c46a 100%);
    --tnu-sombra: 0 10px 30px rgba(107, 33, 168, 0.3);
    --tnu-radio: 16px;
    --tnu-transicion: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

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

.tnu-fase {
    animation: tnuFadeIn 0.6s ease;
}

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

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

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

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

@keyframes tnuPulso {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.3) drop-shadow(0 0 20px rgba(168, 85, 247, 0.5)); }
}

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

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

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

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

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

.tnu-subtitulo-form {
    color: rgba(243, 232, 255, 0.7);
    margin-bottom: 2rem;
    font-size: 1rem;
}

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

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

.tnu-seccion-label {
    color: rgba(243, 232, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.tnu-input,
.tnu-textarea {
    width: 100%;
    background: rgba(243, 232, 255, 0.05);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    padding: 0.9rem 1.2rem;
    color: var(--tnu-texto);
    font-family: inherit;
    font-size: 1.05rem;
    transition: var(--tnu-transicion);
    box-sizing: border-box;
}

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

.tnu-input:focus,
.tnu-textarea:focus {
    outline: none;
    border-color: var(--tnu-gold);
    box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.15);
    background-color: rgba(243, 232, 255, 0.08);
}

.tnu-input::placeholder,
.tnu-textarea::placeholder {
    color: rgba(243, 232, 255, 0.35);
}

.tnu-select {
    width: 100%;
    background: rgba(243, 232, 255, 0.05);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: var(--tnu-texto);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--tnu-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='%23d4a84b' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.tnu-select:focus {
    outline: none;
    border-color: var(--tnu-gold);
    box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.15);
    background-color: rgba(243, 232, 255, 0.08);
}

.tnu-select option {
    background: var(--tnu-fondo);
    color: var(--tnu-texto);
}

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

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

.tnu-instruccion {
    color: rgba(243, 232, 255, 0.5);
    font-size: 0.85rem;
    margin-top: 1.5rem;
}

/* ================================================
   LOADING - NUMBERS CASCADE
   ================================================ */

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

.tnu-loading-numeros {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.tnu-num-animado {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    border-radius: 50%;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(212, 168, 75, 0.3);
    color: var(--tnu-gold);
    animation: tnuNumFloat 2s ease-in-out infinite;
}

.tnu-n1 { animation-delay: 0s; }
.tnu-n2 { animation-delay: 0.12s; }
.tnu-n3 { animation-delay: 0.24s; }
.tnu-n4 { animation-delay: 0.36s; }
.tnu-n5 { animation-delay: 0.48s; }
.tnu-n6 { animation-delay: 0.6s; }
.tnu-n7 { animation-delay: 0.72s; }
.tnu-n8 { animation-delay: 0.84s; }
.tnu-n9 { animation-delay: 0.96s; }

@keyframes tnuNumFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.4; border-color: rgba(212, 168, 75, 0.2); }
    50% { transform: translateY(-15px) scale(1.15); opacity: 1; border-color: var(--tnu-gold); box-shadow: 0 8px 25px rgba(168, 85, 247, 0.3); }
}

.tnu-loading-texto {
    color: rgba(243, 232, 255, 0.7);
    font-size: 1rem;
    animation: tnuPulsoTexto 1.5s ease-in-out infinite;
}

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

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

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

.tnu-seccion {
    background: rgba(243, 232, 255, 0.05);
    border: 1px solid rgba(168, 85, 247, 0.12);
    border-radius: var(--tnu-radio);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    animation: tnuSlideIn 0.6s ease both;
}

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

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

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

/* ================================================
   NUMERO REVELADO CARD
   ================================================ */

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

.tnu-numero-circulo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--tnu-gradiente-oro);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--tnu-fondo);
    border: 3px solid rgba(212, 168, 75, 0.5);
    box-shadow: 0 0 20px rgba(212, 168, 75, 0.2);
}

.tnu-numero-info {
    flex: 1;
}

.tnu-numero-valor {
    color: var(--tnu-gold);
    font-size: 1.3rem;
    font-weight: 700;
}

.tnu-numero-nombre {
    color: var(--tnu-purpura-claro);
    font-size: 1rem;
    margin-top: 0.2rem;
}

.tnu-numero-desc {
    color: rgba(243, 232, 255, 0.75);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-top: 0.3rem;
}

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

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

.tnu-interpretacion-icon {
    flex-shrink: 0;
    font-size: 1rem;
    color: var(--tnu-purpura-claro);
}

.tnu-interpretacion-text {
    color: rgba(243, 232, 255, 0.85);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ================================================
   MENSAJE DEL TAROT
   ================================================ */

.tnu-mensaje-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;
}

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

.tnu-mensaje-text {
    color: rgba(243, 232, 255, 0.85);
    font-size: 0.9rem;
    line-height: 1.6;
    font-style: italic;
}

/* ================================================
   CONSEJO
   ================================================ */

.tnu-consejo-box {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: rgba(243, 232, 255, 0.03);
    border: 1px solid rgba(243, 232, 255, 0.08);
    border-radius: 12px;
    padding: 1rem;
}

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

.tnu-consejo-text {
    color: rgba(243, 232, 255, 0.85);
    font-size: 0.9rem;
    line-height: 1.6;
}

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

.tnu-btn-nueva {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(243, 232, 255, 0.08);
    color: var(--tnu-texto);
    border: 2px solid rgba(212, 168, 75, 0.3);
    border-radius: 50px;
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--tnu-transicion);
    font-family: inherit;
}

.tnu-btn-nueva:hover {
    background: rgba(212, 168, 75, 0.15);
    border-color: var(--tnu-gold);
    transform: translateY(-2px);
}

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

.tnu-app::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(26, 16, 37, 0.8) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(168, 85, 247, 0.04) 0%, transparent 50%),
                radial-gradient(circle at 50% 80%, rgba(212, 168, 75, 0.03) 0%, transparent 50%);
    animation: tnuFondo 25s linear infinite;
    pointer-events: none;
    z-index: 0;
}

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

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

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

@media (max-width: 768px) {
    .tnu-titulo-form { font-size: 1.6rem; }
    .tnu-icono-oraculo { font-size: 3rem; }
    .tnu-numero-header { flex-direction: column; text-align: center; }
    .tnu-loading-numeros { gap: 0.3rem; }
    .tnu-num-animado { width: 32px; height: 32px; font-size: 1rem; }
}

@media (max-width: 480px) {
    .tnu-form-contenido { padding: 1.5rem 0.5rem; }
    .tnu-titulo-form { font-size: 1.4rem; }
    .tnu-subtitulo-form { font-size: 0.85rem; }
    .tnu-resultado-contenido { padding: 1.5rem 0.5rem; }
    .tnu-seccion { padding: 1.2rem; }
    .tnu-btn-nueva { padding: 0.8rem 1.5rem; font-size: 0.9rem; }
    .tnu-btn-consultar { padding: 0.8rem 1.8rem; font-size: 0.9rem; }
    .tnu-num-animado { width: 28px; height: 28px; font-size: 0.85rem; }
}

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

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

@media (prefers-contrast: high) {
    .tnu-seccion { border: 2px solid rgba(243, 232, 255, 0.4); }
    .tnu-input { border: 2px solid rgba(243, 232, 255, 0.4); }
    .tnu-select { border: 2px solid rgba(243, 232, 255, 0.4); }
}

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