/* ================================================
   NUMERO DE LA SUERTE - APP STYLES
   ================================================ */

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

    position: relative;
    overflow: hidden;
}

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

.na-fase {
    animation: naFadeIn 0.6s ease;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.na-suerte-grande {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.na-num-grande-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    font-size: 2rem;
    font-weight: 800;
}

.na-destino-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.na-destino-info strong {
    color: var(--na-esmeralda);
}

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

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

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

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

.na-titulo-principal { color: var(--na-esmeralda); }

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

/* Activities / Avoid dual grid */
.na-rasgos-dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

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

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

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

.na-label-act { color: #10b981; }
.na-label-ev { color: #f87171; }

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

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

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

/* Luck numbers grid */
.na-suerte-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

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

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

.na-suerte-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.5rem;
}

.na-suerte-nombre {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.na-suerte-detalles {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: center;
}

.na-suerte-piedras {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

.na-suerte-colores-row {
    display: flex;
    gap: 0.3rem;
    justify-content: center;
}

.na-color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Favorable days grid */
.na-dias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 0.5rem;
}

.na-dia-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 0.5rem 0.3rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: var(--na-transicion);
}

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

.na-dia-num {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.na-dia-vib {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Compatibility grid */
.na-compat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

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

.na-compat-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.na-compat-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
}

.na-compat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.na-compat-nums {
    display: flex;
    gap: 0.3rem;
    justify-content: center;
    flex-wrap: wrap;
}

.na-compat-friend {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

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

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

.na-consejo-extra {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.na-extra-item {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

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

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

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

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

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

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

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

@media (max-width: 768px) {
    .na-titulo-form { font-size: 1.6rem; }
    .na-icono-oraculo { font-size: 3rem; }
    .na-form-campos { flex-direction: column; }
    .na-rasgos-dual { grid-template-columns: 1fr; }
    .na-suerte-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
    .na-compat-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

@media (max-width: 480px) {
    .na-form-contenido { padding: 1.5rem 0.5rem; }
    .na-titulo-form { font-size: 1.4rem; }
    .na-subtitulo-form { font-size: 0.85rem; }
    .na-resultado-contenido { padding: 1.5rem 0.5rem; }
    .na-seccion { padding: 1.2rem; }
    .na-btn-nueva { padding: 0.8rem 1.5rem; font-size: 0.9rem; }
    .na-btn-calcular { padding: 0.8rem 1.8rem; font-size: 0.9rem; }
    .na-num-grande-item { width: 55px; height: 55px; font-size: 1.6rem; }
    .na-suerte-grid { grid-template-columns: 1fr 1fr; }
    .na-compat-grid { grid-template-columns: 1fr 1fr; }
    .na-dias-grid { grid-template-columns: repeat(7, 1fr); }
}

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

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

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

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