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

.ne-app {
    --ne-esmeralda: #10b981;
    --ne-esmeralda-oscuro: #059669;
    --ne-gradiente: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --ne-sombra: 0 10px 30px rgba(16, 185, 129, 0.15);
    --ne-radio: 16px;
    --ne-transicion: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    position: relative;
    overflow: hidden;
}

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

.ne-fase {
    animation: neFadeIn 0.6s ease;
}

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

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

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

@keyframes neBrillar {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.3) drop-shadow(0 0 20px rgba(16, 185, 129, 0.5)); }
}

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

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

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

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

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

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

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

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

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

.ne-input:focus {
    outline: none;
    border-color: var(--ne-esmeralda);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
    background-color: rgba(255, 255, 255, 0.08);
}

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

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

.ne-btn-calcular:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

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

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

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

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

.ne-orbita-num {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 45px;
    height: 45px;
    background: var(--ne-gradiente);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: #fff;
    animation: nePulsoNum 2s ease-in-out infinite;
}

@keyframes nePulsoNum {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.15); }
}

.ne-orbita-arc {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 80px;
    height: 80px;
    border: 2px dashed rgba(16, 185, 129, 0.25);
    border-radius: 50%;
    animation: neArcGiro 8s linear infinite;
}

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

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

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

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

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

.ne-resultado-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

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

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

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

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

.ne-suma-resumen {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

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

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

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

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

.ne-titulo-expresion { color: var(--ne-esmeralda); }

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

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

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

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

.ne-letra-vocal {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

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

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

.ne-letra-vocal .ne-letra-char {
    color: var(--ne-esmeralda);
}

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

.ne-letra-vocal .ne-letra-valor {
    color: rgba(16, 185, 129, 0.8);
}

.ne-letra-consonante .ne-letra-valor {
    color: rgba(255, 255, 255, 0.4);
}

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

.ne-suma-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

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

.ne-suma-vocal {
    color: var(--ne-esmeralda);
    font-weight: 700;
    font-size: 1.1rem;
}

.ne-suma-cons {
    color: #f59e0b;
    font-weight: 700;
    font-size: 1.1rem;
}

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

.ne-suma-sep {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Talento box */
.ne-talento-box {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

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

.ne-talento-text {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
}

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

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

.ne-talentos {
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.ne-desafios {
    border: 1px solid rgba(251, 191, 36, 0.15);
}

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

.ne-label-tal { color: #10b981; }
.ne-label-des { color: #fbbf24; }

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

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

.ne-rasgo-des {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

/* Triada */
.ne-triada-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

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

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

.ne-triada-icon {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.ne-triada-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
}

.ne-triada-label {
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

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

/* Advice */
.ne-consejo-general {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: var(--ne-radio);
    padding: 1.5rem;
    animation: neSlideIn 0.6s ease both;
}

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

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

.ne-btn-nueva:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--ne-esmeralda);
    transform: translateY(-2px);
}

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

.ne-app::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(16, 185, 129, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(5, 150, 105, 0.04) 0%, transparent 50%),
                radial-gradient(circle at 50% 80%, rgba(52, 211, 153, 0.03) 0%, transparent 50%);
    animation: neFondo 25s linear infinite;
    pointer-events: none;
    z-index: 0;
}

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

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

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

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

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

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

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

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

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