/* ================================================
   NUMERO DE PERSONALIDAD - APP STYLES
   ================================================ */

.np-app {
    --np-ambar: #f59e0b;
    --np-ambar-oscuro: #d97706;
    --np-gradiente: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --np-sombra: 0 10px 30px rgba(245, 158, 11, 0.15);
    --np-radio: 16px;
    --np-transicion: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    position: relative;
    overflow: hidden;
}

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

.np-fase {
    animation: npFadeIn 0.6s ease;
}

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

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

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

@keyframes npBrillar {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.3) drop-shadow(0 0 20px rgba(245, 158, 11, 0.5)); }
}

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

.np-destello::before { content: '\2726'; }
.np-d2::before { content: '\2756'; }
.np-d3::before { content: '\2727'; }

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

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

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

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

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

.np-label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.np-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 0.9rem 1.2rem;
    color: #fff;
    font-family: inherit;
    font-size: 1.05rem;
    transition: var(--np-transicion);
    box-sizing: border-box;
}

.np-input:focus {
    outline: none;
    border-color: var(--np-ambar);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
    background-color: rgba(255, 255, 255, 0.08);
}

.np-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

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

.np-btn-calcular:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}

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

/* ================================================
   LOADING
   ================================================ */

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

.np-loading-orbita {
    width: 90px;
    height: 90px;
    position: relative;
    margin-bottom: 1.5rem;
}

.np-orbita-mascara {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    animation: npRotarMascara 3s ease-in-out infinite;
}

@keyframes npRotarMascara {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.15) rotateY(15deg); }
}

.np-orbita-arc {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 80px;
    height: 80px;
    border: 2px dashed rgba(245, 158, 11, 0.25);
    border-radius: 50%;
    animation: npArcGiro 8s linear infinite;
}

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

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

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

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

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

.np-resultado-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(245, 158, 11, 0.2);
}

.np-nombre-badge {
    display: inline-block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.8rem;
    background: rgba(245, 158, 11, 0.1);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.np-num-grande {
    margin-bottom: 0.5rem;
}

.np-num-grande-num {
    display: inline-block;
    font-size: 5rem;
    font-weight: 800;
    width: 100px;
    height: 100px;
    line-height: 100px;
    border-radius: 50%;
    text-align: center;
}

.np-personalidad-nombre {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.3rem;
}

.np-primera-impresion {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    font-style: italic;
}

.np-seccion {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.1);
    border-radius: var(--np-radio);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    animation: npSlideIn 0.6s ease both;
}

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

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

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

.np-titulo-imagen { color: var(--np-ambar); }

.np-card-desc {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* Letters grid */
.np-letras-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.2rem;
}

.np-letra-item {
    text-align: center;
    min-width: 42px;
    padding: 0.5rem 0.4rem;
    border-radius: 10px;
    transition: var(--np-transicion);
}

.np-letra-item:hover {
    transform: translateY(-2px);
}

.np-letra-consonante {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.np-letra-vocal {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.np-letra-char {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.15rem;
}

.np-letra-consonante .np-letra-char {
    color: var(--np-ambar);
}

.np-letra-valor {
    font-size: 0.75rem;
    font-weight: 600;
}

.np-letra-consonante .np-letra-valor {
    color: rgba(245, 158, 11, 0.8);
}

.np-letra-vocal .np-letra-valor {
    color: rgba(255, 255, 255, 0.4);
}

/* Sum row */
.np-suma-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: rgba(245, 158, 11, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(245, 158, 11, 0.15);
}

.np-suma-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.np-suma-valor {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}

.np-suma-arrow {
    color: var(--np-ambar);
    font-size: 1.2rem;
}

.np-suma-resultado {
    display: inline-block;
    font-weight: 800;
    font-size: 1.4rem;
    padding: 0.3rem 1rem;
    border-radius: 20px;
}

/* Impresion box */
.np-impresion-box {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.np-impresion-label {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}

.np-impresion-text {
    color: #fff;
    font-weight: 600;
    font-size: 1.05rem;
}

/* Traits */
.np-rasgos-dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.np-rasgos-col {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1rem;
}

.np-rasgos-visibles {
    border: 1px solid rgba(245, 158, 11, 0.15);
}

.np-rasgos-evitar {
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.np-rasgos-label {
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
}

.np-label-vis { color: var(--np-ambar); }
.np-label-ev { color: #f87171; }

.np-rasgos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.np-rasgo-badge {
    font-size: 0.8rem;
    padding: 5px 12px;
    border-radius: 20px;
}

.np-rasgo-ev {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Comparison */
.np-comparar-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.np-comparar-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1.2rem;
    min-width: 140px;
}

.np-comparar-personalidad {
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.np-comparar-corazon {
    border: 1px solid rgba(236, 72, 153, 0.2);
}

.np-comparar-icon {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
}

.np-comparar-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.np-comparar-num {
    display: inline-block;
    font-size: 2rem;
    font-weight: 800;
    width: 55px;
    height: 55px;
    line-height: 55px;
    border-radius: 50%;
    margin-bottom: 0.3rem;
}

.np-comparar-desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

.np-comparar-vs {
    font-size: 1.2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.3);
}

/* Advice */
.np-consejo-general {
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: var(--np-radio);
    padding: 1.5rem;
    animation: npSlideIn 0.6s ease both;
}

.np-consejo-texto {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    font-size: 1rem;
}

/* New consultation button */
.np-btn-nueva {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 2px solid rgba(245, 158, 11, 0.3);
    border-radius: 50px;
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--np-transicion);
    font-family: inherit;
}

.np-btn-nueva:hover {
    background: rgba(245, 158, 11, 0.15);
    border-color: var(--np-ambar);
    transform: translateY(-2px);
}

/* ================================================
   PARTICULAS DE FONDO
   ================================================ */

.np-app::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(245, 158, 11, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(217, 119, 6, 0.04) 0%, transparent 50%),
                radial-gradient(circle at 50% 80%, rgba(252, 211, 77, 0.03) 0%, transparent 50%);
    animation: npFondo 25s linear infinite;
    pointer-events: none;
    z-index: 0;
}

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

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

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

@media (max-width: 768px) {
    .np-titulo-form { font-size: 1.6rem; }
    .np-icono-oraculo { font-size: 3rem; }
    .np-rasgos-dual { grid-template-columns: 1fr; }
    .np-comparar-grid { gap: 1rem; }
}

@media (max-width: 480px) {
    .np-form-contenido { padding: 1.5rem 0.5rem; }
    .np-titulo-form { font-size: 1.4rem; }
    .np-subtitulo-form { font-size: 0.85rem; }
    .np-resultado-contenido { padding: 1.5rem 0.5rem; }
    .np-seccion { padding: 1.2rem; }
    .np-btn-nueva { padding: 0.8rem 1.5rem; font-size: 0.9rem; }
    .np-btn-calcular { padding: 0.8rem 1.8rem; font-size: 0.9rem; }
    .np-num-grande-num { font-size: 3.5rem; width: 80px; height: 80px; line-height: 80px; }
    .np-letra-item { min-width: 36px; padding: 0.4rem 0.25rem; }
}

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

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

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

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