/* ================================================
   NUMEROS DE LA VIDA - APP STYLES
   ================================================ */

.nv-app {
    --nv-coral: #ff6b6b;
    --nv-teal: #4ecdc4;
    --nv-azul: #45b7d1;
    --nv-gradiente: linear-gradient(135deg, #ff6b6b 0%, #4ecdc4 50%, #45b7d1 100%);
    --nv-sombra: 0 10px 30px rgba(255, 107, 107, 0.15);
    --nv-radio: 16px;
    --nv-transicion: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    position: relative;
    overflow: hidden;
}

.nv-fase {
    animation: nvFadeIn 0.6s ease;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.nv-input:focus {
    outline: none;
    border-color: var(--nv-coral);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15);
    background-color: rgba(255, 255, 255, 0.08);
}

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

.nv-form-campos {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto 1.5rem;
    align-items: flex-start;
}

.nv-campo {
    text-align: left;
    flex: 1;
}

.nv-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(78, 205, 196, 0.3);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--nv-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='%234ecdc4' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.nv-select:focus {
    outline: none;
    border-color: var(--nv-teal);
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.15);
    background-color: rgba(255, 255, 255, 0.08);
}

.nv-select option {
    background: #1a1a2e;
    color: #fff;
}

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

.nv-btn-calcular:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

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

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

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

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

.nv-mandala-centro {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    animation: nvGiroPulso 2s ease-in-out infinite;
}

@keyframes nvGiroPulso {
    0%, 100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
    50% { transform: translate(-50%, -50%) scale(1.2) rotate(180deg); filter: drop-shadow(0 0 15px rgba(255, 107, 107, 0.6)); }
}

.nv-mandala-arc {
    position: absolute;
    top: 5px; left: 5px;
    width: 80px; height: 80px;
    border: 2px dashed rgba(255, 107, 107, 0.25);
    border-radius: 50%;
    animation: nvArcGiro 8s linear infinite;
}

.nv-arc2 {
    width: 60px; height: 60px;
    top: 15px; left: 15px;
    border-color: rgba(78, 205, 196, 0.25);
    animation-direction: reverse;
    animation-duration: 6s;
}

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

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

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

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

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

.nv-resultado-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 107, 107, 0.2);
}

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

.nv-fecha-badge {
    display: block;
    font-size: 1.1rem;
    color: #fff;
    font-weight: 600;
    background: rgba(78, 205, 196, 0.1);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(78, 205, 196, 0.2);
    margin: 0.5rem auto 0;
    max-width: fit-content;
}

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

.nv-seccion:nth-child(2) { animation-delay: 0s; }
.nv-seccion:nth-child(3) { animation-delay: 0.1s; }
.nv-seccion:nth-child(4) { animation-delay: 0.15s; }
.nv-seccion:nth-child(5) { animation-delay: 0.2s; }
.nv-seccion:nth-child(6) { animation-delay: 0.25s; }

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

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

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

/* ================================================
   RESUMEN GRID - 6 NUMEROS
   ================================================ */

.nv-resumen-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
}

.nv-resumen-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid;
    border-radius: 12px;
    padding: 1rem 0.2rem;
    text-align: center;
    transition: var(--nv-transicion);
}

.nv-resumen-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-3px);
}

.nv-resumen-icono {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.nv-resumen-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-bottom: 0.2rem;
}

.nv-resumen-nombre {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.2;
}

/* ================================================
   CAMINO DE VIDA
   ================================================ */

.nv-camino-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.nv-camino-num {
    font-size: 2.5rem;
    font-weight: 800;
}

.nv-camino-nombre {
    font-size: 1.3rem;
    font-weight: 700;
}

.nv-maestro-badge {
    display: inline-block;
    color: #a78bfa;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(167, 139, 250, 0.15);
    border: 1px solid rgba(167, 139, 250, 0.3);
    animation: nvBrilloMaestro 2s ease-in-out infinite;
}

@keyframes nvBrilloMaestro {
    0%, 100% { opacity: 0.8; text-shadow: none; }
    50% { opacity: 1; text-shadow: 0 0 10px rgba(167, 139, 250, 0.5); }
}

.nv-info-dual {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.nv-info-item {
    flex: 1;
    min-width: 180px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.nv-info-label {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
}

.nv-info-valor {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
}

/* ================================================
   NUMEROS DEL NOMBRE
   ================================================ */

.nv-nombre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.nv-nombre-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid;
    border-radius: 14px;
    overflow: hidden;
}

.nv-nombre-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1rem;
    flex-wrap: wrap;
}

.nv-nombre-icono {
    font-size: 1.3rem;
}

.nv-nombre-num {
    font-size: 1.6rem;
    font-weight: 800;
}

.nv-nombre-titulo {
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}

.nv-nombre-desc {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    padding: 0.8rem 1rem;
    line-height: 1.7;
}

.nv-talentos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0 1rem 0.8rem;
}

.nv-talento-badge {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 20px;
}

.nv-consejo-mini {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    line-height: 1.5;
}

.nv-deseo-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    margin: 0.5rem 1rem 0.8rem;
    text-align: center;
}

.nv-deseo-label {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}

.nv-deseo-text {
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ================================================
   DESAFIO Y MADUREZ
   ================================================ */

.nv-desafio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.nv-desafio-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
}

.nv-desafio-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1rem;
    flex-wrap: wrap;
}

.nv-desafio-icono {
    font-size: 1.3rem;
}

.nv-desafio-num {
    font-size: 1.6rem;
    font-weight: 800;
}

.nv-desafio-titulo {
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}

.nv-dual-mini {
    display: flex;
    gap: 0.5rem;
    padding: 0 1rem 0.8rem;
}

.nv-mini-item {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 0.6rem;
    text-align: center;
}

.nv-mini-obstaculo {
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.nv-mini-super {
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.nv-mini-label {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    margin-bottom: 0.2rem;
}

.nv-mini-obstaculo .nv-mini-valor {
    color: #f87171;
    font-size: 0.85rem;
    font-weight: 600;
}

.nv-mini-super .nv-mini-valor {
    color: #10b981;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ================================================
   DESGLOSE LETRAS
   ================================================ */

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

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

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

.nv-letra-vocal {
    background: rgba(255, 107, 107, 0.12);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.nv-letra-consonante {
    background: rgba(78, 205, 196, 0.08);
    border: 1px solid rgba(78, 205, 196, 0.2);
}

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

.nv-letra-vocal .nv-letra-char {
    color: var(--nv-coral);
}

.nv-letra-consonante .nv-letra-char {
    color: var(--nv-teal);
}

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

.nv-letra-vocal .nv-letra-valor {
    color: rgba(255, 107, 107, 0.8);
}

.nv-letra-consonante .nv-letra-valor {
    color: rgba(78, 205, 196, 0.7);
}

.nv-sumas-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.nv-suma-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    gap: 0.3rem;
}

.nv-suma-vocal {
    background: rgba(255, 107, 107, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.nv-suma-consonante {
    background: rgba(78, 205, 196, 0.08);
    border: 1px solid rgba(78, 205, 196, 0.2);
}

.nv-suma-total {
    background: rgba(69, 183, 209, 0.08);
    border: 1px solid rgba(69, 183, 209, 0.2);
}

.nv-suma-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

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

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

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

.nv-btn-nueva:hover {
    background: rgba(255, 107, 107, 0.15);
    border-color: var(--nv-coral);
    transform: translateY(-2px);
}

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

.nv-app::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(255, 107, 107, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(78, 205, 196, 0.04) 0%, transparent 50%),
                radial-gradient(circle at 50% 80%, rgba(69, 183, 209, 0.03) 0%, transparent 50%);
    animation: nvFondo 25s linear infinite;
    pointer-events: none;
    z-index: 0;
}

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

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

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

@media (max-width: 768px) {
    .nv-titulo-form { font-size: 1.6rem; }
    .nv-icono-oraculo { font-size: 3rem; }
    .nv-form-campos { flex-direction: column; max-width: 280px; margin: 0 auto 1.5rem; }
    .nv-resumen-grid { grid-template-columns: repeat(3, 1fr); }
    .nv-nombre-grid { grid-template-columns: 1fr; }
    .nv-desafio-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .nv-form-contenido { padding: 1.5rem 0.5rem; }
    .nv-titulo-form { font-size: 1.4rem; }
    .nv-subtitulo-form { font-size: 0.85rem; }
    .nv-resultado-contenido { padding: 1.5rem 0.5rem; }
    .nv-seccion { padding: 1.2rem; }
    .nv-btn-nueva { padding: 0.8rem 1.5rem; font-size: 0.9rem; }
    .nv-btn-calcular { padding: 0.8rem 1.8rem; font-size: 0.9rem; }
    .nv-resumen-grid { grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
    .nv-resumen-num { font-size: 1.5rem; width: 34px; height: 34px; }
    .nv-resumen-icono { font-size: 1rem; }
    .nv-resumen-nombre { font-size: 0.6rem; }
    .nv-camino-num { font-size: 2rem; }
    .nv-letra-item { min-width: 34px; padding: 0.4rem 0.2rem; }
    .nv-sumas-row { gap: 0.5rem; }
    .nv-suma-chip { padding: 0.6rem 0.8rem; }
}

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

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

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

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