/* ================================================
   NUMEROLOGIA COMPATIBILIDAD - APP STYLES
   ================================================ */

.ncomp-app {
    --ncomp-indigo: #667eea;
    --ncomp-violeta: #764ba2;
    --ncomp-gradiente: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --ncomp-sombra: 0 10px 30px rgba(102, 126, 234, 0.15);
    --ncomp-radio: 16px;
    --ncomp-transicion: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    position: relative;
    overflow: hidden;
}

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

.ncomp-fase {
    animation: ncompFadeIn 0.6s ease;
}

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

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

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

@keyframes ncompPulso {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.3) drop-shadow(0 0 20px rgba(102, 126, 234, 0.5)); }
}

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

.ncomp-destello::before { content: '\2726'; }
.ncomp-d2::before { content: '\2756'; }

.ncomp-d1 { animation-delay: -0.5s; top: -10px; left: 10px; }
.ncomp-d2 { animation-delay: -1.5s; top: -5px; right: 15px; }

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

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

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

.ncomp-form-dual {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.ncomp-persona {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: 14px;
    padding: 1.5rem 1rem;
}

.ncomp-persona-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ncomp-indigo);
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.ncomp-entre {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 2.5rem;
    flex-shrink: 0;
}

.ncomp-entre-icono {
    font-size: 2rem;
    animation: ncompLatido 1.5s ease-in-out infinite;
}

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

.ncomp-form-nombre {
    margin-bottom: 1rem;
    text-align: left;
}

.ncomp-label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.ncomp-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 10px;
    padding: 0.7rem 0.8rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--ncomp-transicion);
    box-sizing: border-box;
}

.ncomp-input:focus {
    outline: none;
    border-color: var(--ncomp-indigo);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    background-color: rgba(255, 255, 255, 0.08);
}

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

.ncomp-form-campos {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
}

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

.ncomp-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 10px;
    padding: 0.7rem 0.8rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.85rem;
    transition: var(--ncomp-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='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23667eea' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    padding-right: 2rem;
}

.ncomp-select:focus {
    outline: none;
    border-color: var(--ncomp-indigo);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    background-color: rgba(255, 255, 255, 0.08);
}

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

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

.ncomp-btn-calcular:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

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

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

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

.ncomp-loading-corazones {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.ncomp-loading-h1, .ncomp-loading-h2 {
    font-size: 2.5rem;
    animation: ncompCorazonPulso 1.5s ease-in-out infinite;
}

.ncomp-loading-h2 {
    animation-delay: 0.75s;
}

@keyframes ncompCorazonPulso {
    0%, 100% { transform: scale(1); }
    30% { transform: scale(1.3); }
    60% { transform: scale(1); }
}

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

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

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

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

.ncomp-resultado-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.ncomp-nombres-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.ncomp-nombre-p1, .ncomp-nombre-p2 {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
}

.ncomp-nombre-entre {
    font-size: 1.5rem;
}

.ncomp-porcentaje-display {
    margin-bottom: 0.5rem;
}

.ncomp-porcentaje-num {
    font-size: 3.5rem;
    font-weight: 800;
}

.ncomp-nivel-label {
    font-size: 1.1rem;
    font-weight: 600;
}

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

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

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

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

/* ================================================
   RESUMEN GRID
   ================================================ */

.ncomp-resumen-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.8rem;
}

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

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

.ncomp-resumen-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.ncomp-resumen-nums {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.ncomp-resumen-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 1.2rem;
}

.ncomp-resumen-vs {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.7rem;
    font-weight: 600;
}

/* ================================================
   DIMENSIONES
   ================================================ */

.ncomp-dimensiones-grid {
    display: grid;
    gap: 1rem;
}

.ncomp-dimension-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1.2rem;
    transition: var(--ncomp-transicion);
}

.ncomp-dimension-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

.ncomp-dimension-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.ncomp-dimension-icono {
    font-size: 1.3rem;
}

.ncomp-dimension-nombre {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
}

.ncomp-dimension-nums {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    margin-bottom: 0.8rem;
}

.ncomp-dimension-num-bloque {
    text-align: center;
}

.ncomp-dimension-num {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.2rem;
}

.ncomp-dimension-tipo {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

.ncomp-dimension-union {
    font-size: 1.2rem;
    font-weight: 700;
}

.ncomp-barra {
    margin-bottom: 0.8rem;
}

.ncomp-barra-fondo {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.ncomp-barra-relleno {
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease;
}

.ncomp-dimension-mensaje {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    font-size: 0.9rem;
    margin: 0;
}

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

.ncomp-consejo-general {
    background: rgba(102, 126, 234, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: var(--ncomp-radio);
    padding: 1.5rem;
    animation: ncompSlideIn 0.6s ease both;
}

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

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

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

.ncomp-btn-nueva:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: var(--ncomp-indigo);
    transform: translateY(-2px);
}

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

.ncomp-app::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(102, 126, 234, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(118, 75, 162, 0.04) 0%, transparent 50%),
                radial-gradient(circle at 50% 80%, rgba(240, 147, 251, 0.03) 0%, transparent 50%);
    animation: ncompFondo 25s linear infinite;
    pointer-events: none;
    z-index: 0;
}

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

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

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

@media (max-width: 768px) {
    .ncomp-titulo-form { font-size: 1.5rem; }
    .ncomp-icono-oraculo { font-size: 2.8rem; }
    .ncomp-form-dual { flex-direction: column; gap: 0; }
    .ncomp-entre { padding-top: 0; padding-bottom: 0.5rem; }
    .ncomp-resumen-grid { grid-template-columns: repeat(3, 1fr); }
    .ncomp-dimension-nums { gap: 0.8rem; }
    .ncomp-dimension-num { font-size: 1.8rem; }
}

@media (max-width: 480px) {
    .ncomp-form-contenido { padding: 1.5rem 0.5rem; }
    .ncomp-titulo-form { font-size: 1.3rem; }
    .ncomp-subtitulo-form { font-size: 0.85rem; }
    .ncomp-resultado-contenido { padding: 1.5rem 0.5rem; }
    .ncomp-seccion { padding: 1.2rem; }
    .ncomp-btn-nueva { padding: 0.8rem 1.5rem; font-size: 0.9rem; }
    .ncomp-btn-calcular { padding: 0.8rem 1.8rem; font-size: 0.9rem; }
    .ncomp-porcentaje-num { font-size: 2.8rem; }
    .ncomp-resumen-grid { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
    .ncomp-resumen-num { width: 30px; height: 30px; font-size: 1rem; }
    .ncomp-form-campos { gap: 0.4rem; }
    .ncomp-persona { padding: 1rem 0.6rem; }
}

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

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

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

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