/* ================================================
   NUMERO SOLAR - APP STYLES
   ================================================ */

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

    position: relative;
    overflow: hidden;
}

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

.ns-fase {
    animation: nsFadeIn 0.6s ease;
}

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

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

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

@keyframes nsBrillar {
    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)); }
}

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

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

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

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

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

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

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

.ns-campo {
    text-align: left;
    flex: 1;
    margin-bottom: 0;
}

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

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

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

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

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

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

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

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

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

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

.ns-orbita-sol {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    animation: nsPulsoSol 2s ease-in-out infinite;
}

@keyframes nsPulsoSol {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); filter: drop-shadow(0 0 15px rgba(245, 158, 11, 0.6)); }
}

.ns-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: nsArcGiro 8s linear infinite;
}

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

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

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

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

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

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

.ns-fecha-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);
}

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

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

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

.ns-solar-esencia {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

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

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

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

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

.ns-titulo-solar { color: var(--ns-ambar); }

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

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

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

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

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

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

.ns-label-pos { color: #f59e0b; }
.ns-label-ev { color: #f87171; }

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

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

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

/* Power days info */
.ns-poder-info {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.ns-poder-item {
    flex: 1;
    min-width: 120px;
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.ns-poder-label {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
}

.ns-poder-valor {
    display: inline-block;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
}

/* Power days grid */
.ns-dias-poder-grid {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.ns-dia-poder {
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 0.5rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--ns-transicion);
}

.ns-dia-poder:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}

.ns-dia-poder.ns-dia-hoy {
    border: 2px solid rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.08);
}

.ns-dia-poder-num {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}

.ns-dia-hoy-tag {
    font-size: 0.65rem;
    color: #f59e0b;
    font-weight: 700;
}

/* Prox power days */
.ns-prox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.6rem;
}

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

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

.ns-prox-item.ns-dia-hoy {
    border: 2px solid rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.08);
}

.ns-prox-semana {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.ns-prox-fecha {
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
}

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

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

/* New consultation button */
.ns-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(--ns-transicion);
    font-family: inherit;
}

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

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

.ns-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: nsFondo 25s linear infinite;
    pointer-events: none;
    z-index: 0;
}

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

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

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

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

@media (max-width: 480px) {
    .ns-form-contenido { padding: 1.5rem 0.5rem; }
    .ns-titulo-form { font-size: 1.4rem; }
    .ns-subtitulo-form { font-size: 0.85rem; }
    .ns-resultado-contenido { padding: 1.5rem 0.5rem; }
    .ns-seccion { padding: 1.2rem; }
    .ns-btn-nueva { padding: 0.8rem 1.5rem; font-size: 0.9rem; }
    .ns-btn-calcular { padding: 0.8rem 1.8rem; font-size: 0.9rem; }
    .ns-num-grande-num { font-size: 3.5rem; width: 80px; height: 80px; line-height: 80px; }
    .ns-poder-info { flex-direction: column; }
    .ns-prox-grid { grid-template-columns: repeat(3, 1fr); }
}

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

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

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

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