/* ================================================
   NUMEROLOGIA DEL NACIMIENTO - APP STYLES
   ================================================ */

.ncn-app {
    --ncn-indigo: #6366f1;
    --ncn-indigo-oscuro: #4f46e5;
    --ncn-gradiente: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    --ncn-sombra: 0 10px 30px rgba(99, 102, 241, 0.15);
    --ncn-radio: 16px;
    --ncn-transicion: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    position: relative;
    overflow: hidden;
}

.ncn-fase {
    animation: ncnFadeIn 0.6s ease;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@keyframes ncnGiroPulso {
    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(99, 102, 241, 0.6)); }
}

.ncn-mandala-arc {
    position: absolute;
    top: 5px; left: 5px;
    width: 80px; height: 80px;
    border: 2px dashed rgba(99, 102, 241, 0.25);
    border-radius: 50%;
    animation: ncnArcGiro 8s linear infinite;
}

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

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

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

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

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

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

.ncn-fecha-badge {
    display: inline-block;
    font-size: 1.1rem;
    color: #fff;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.1);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

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

.ncn-seccion:nth-child(2) { animation-delay: 0s; }
.ncn-seccion:nth-child(3) { animation-delay: 0.1s; }
.ncn-seccion:nth-child(4) { animation-delay: 0.15s; }

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

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

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

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

.ncn-resumen-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
}

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

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

.ncn-resumen-icono {
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
}

.ncn-resumen-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    margin-bottom: 0.3rem;
}

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

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

.ncn-camino-titulo {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

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

.ncn-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;
}

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

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

/* ================================================
   DETALLE DE FECHA
   ================================================ */

.ncn-detalle-grid {
    display: grid;
    gap: 1rem;
}

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

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

.ncn-detalle-icono {
    font-size: 1.3rem;
}

.ncn-detalle-num {
    font-size: 1.6rem;
    font-weight: 800;
}

.ncn-detalle-titulo {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
}

.ncn-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: ncnBrilloMaestro 2s ease-in-out infinite;
}

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

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

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

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

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

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

.ncn-app::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(79, 70, 229, 0.04) 0%, transparent 50%),
                radial-gradient(circle at 50% 80%, rgba(99, 102, 241, 0.03) 0%, transparent 50%);
    animation: ncnFondo 25s linear infinite;
    pointer-events: none;
    z-index: 0;
}

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

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

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

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

@media (max-width: 480px) {
    .ncn-form-contenido { padding: 1.5rem 0.5rem; }
    .ncn-titulo-form { font-size: 1.4rem; }
    .ncn-subtitulo-form { font-size: 0.85rem; }
    .ncn-resultado-contenido { padding: 1.5rem 0.5rem; }
    .ncn-seccion { padding: 1.2rem; }
    .ncn-btn-nueva { padding: 0.8rem 1.5rem; font-size: 0.9rem; }
    .ncn-btn-calcular { padding: 0.8rem 1.8rem; font-size: 0.9rem; }
    .ncn-resumen-grid { grid-template-columns: repeat(2, 1fr); gap: 0.4rem; }
    .ncn-resumen-num { font-size: 1.6rem; width: 36px; height: 36px; }
    .ncn-resumen-icono { font-size: 1.1rem; }
    .ncn-resumen-nombre { font-size: 0.65rem; }
}

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

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

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

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