/* ═══════════════════════════════════════════════════════════════
   QUIROMANCIA SUPREMA — ULTRA v11
   Estilos: Numerología Pitagórica + Lector de Aura + Nebula tweaks
   ═══════════════════════════════════════════════════════════════ */

/* ─────────── NEBULA (fondo WebGL) ─────────── */
#nebulaCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 2s ease;
}
#nebulaCanvas.nebula-on { opacity: 1; }

/* ═══════════════════════════════════════════
   NUMEROLOGÍA — informe pitagórico
   ═══════════════════════════════════════════ */
.numer-report {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.numer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.numer-card {
    position: relative;
    background: linear-gradient(160deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 20px;
    padding: 1.4rem 1rem 1.2rem;
    text-align: center;
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.10),
        0 8px 22px rgba(0,0,0,0.30);
    animation: numerPop 0.6s var(--ease-spring, cubic-bezier(0.34,1.56,0.64,1)) both;
    animation-delay: var(--numer-delay, 0s);
    transition: transform 0.3s var(--ease-spring, cubic-bezier(0.34,1.56,0.64,1)), box-shadow 0.3s ease;
}
.numer-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.14),
        0 16px 34px rgba(0,0,0,0.40);
}
/* brillo especular estilo Pixar */
.numer-card::before {
    content: '';
    position: absolute;
    top: 0; left: 10%;
    width: 80%; height: 42%;
    background: linear-gradient(180deg, rgba(255,255,255,0.10), transparent);
    border-radius: 0 0 50% 50%;
    pointer-events: none;
}

@keyframes numerPop {
    from { opacity: 0; transform: translateY(24px) scale(0.9); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.numer-icon {
    display: block;
    font-size: 1.6rem;
    margin-bottom: 0.35rem;
}

.numer-num {
    display: inline-grid;
    place-items: center;
    width: 64px; height: 64px;
    margin: 0.2rem auto 0.5rem;
    border-radius: 50%;
    font-family: 'Cinzel', serif;
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--gold, #d4af37);
    background: radial-gradient(circle at 32% 28%, rgba(255,255,255,0.16), rgba(212,175,55,0.10) 55%, rgba(0,0,0,0.25));
    border: 2px solid rgba(212,175,55,0.45);
    box-shadow:
        inset 0 2px 4px rgba(255,255,255,0.15),
        inset 0 -4px 8px rgba(0,0,0,0.30),
        0 6px 14px rgba(0,0,0,0.35);
}

.numer-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gold, #d4af37);
    margin-bottom: 0.5rem;
}

.numer-desc {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-muted, rgba(245,240,230,0.75));
    margin: 0;
}

/* Camino de Vida — carta principal destacada */
.numer-main {
    grid-column: 1 / -1;
    background: linear-gradient(160deg, rgba(212,175,55,0.14), rgba(120,80,200,0.10));
    border-color: rgba(212,175,55,0.40);
}
.numer-main .numer-num {
    width: 84px; height: 84px;
    font-size: 2.6rem;
}

/* Números maestros 11/22/33 — halo pulsante */
.numer-master .numer-num {
    border-color: rgba(186, 130, 255, 0.75);
    color: #d9b8ff;
    animation: masterPulse 2.4s ease-in-out infinite;
}
@keyframes masterPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(186,130,255,0.45), inset 0 2px 4px rgba(255,255,255,0.15); }
    50%      { box-shadow: 0 0 22px 6px rgba(186,130,255,0.35), inset 0 2px 4px rgba(255,255,255,0.15); }
}
.numer-master::after {
    content: '★ MASTER';
    position: absolute;
    top: 10px; right: 12px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #d9b8ff;
    background: rgba(186,130,255,0.15);
    border: 1px solid rgba(186,130,255,0.4);
    border-radius: 20px;
    padding: 2px 8px;
}

/* Año personal */
.numer-year-box {
    background: linear-gradient(135deg, rgba(80,140,255,0.12), rgba(212,175,55,0.08));
    border: 1px solid rgba(80,140,255,0.25);
    border-radius: 18px;
    padding: 1.2rem 1.4rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.numer-year-badge {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text, #f5f0e6);
    margin-bottom: 0.45rem;
}
.numer-year-badge strong {
    color: var(--gold, #d4af37);
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
}
.numer-year-box p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted, rgba(245,240,230,0.75));
}

/* Gráfico de intensidad del nombre */
.numer-intensity {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 1.2rem 1.4rem 1.4rem;
}
.numer-intensity h4 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    color: var(--gold, #d4af37);
}

.numer-int-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 6px;
    margin-top: 1rem;
    height: 130px;
}
.numer-int-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 100%;
}
.numer-int-bar-wrap {
    flex: 1;
    width: 100%;
    max-width: 34px;
    display: flex;
    align-items: flex-end;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    overflow: hidden;
}
.numer-int-bar {
    width: 100%;
    min-height: 3px;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(180deg, var(--gold, #d4af37), rgba(212,175,55,0.35));
    box-shadow: inset 0 2px 3px rgba(255,255,255,0.25);
    animation: intBarGrow 0.9s var(--ease-spring, cubic-bezier(0.34,1.56,0.64,1)) both;
    transform-origin: bottom;
}
@keyframes intBarGrow {
    from { transform: scaleY(0); }
    to   { transform: scaleY(1); }
}
.numer-int-num {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--gold, #d4af37);
}
.numer-int-freq {
    font-size: 0.7rem;
    color: var(--text-muted, rgba(245,240,230,0.6));
}

/* ═══════════════════════════════════════════
   AURA — lector cromático de fotos
   ═══════════════════════════════════════════ */
.aura-upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    padding: 2rem 1.5rem;
    border: 2px dashed rgba(212,175,55,0.35);
    border-radius: 20px;
    background: rgba(255,255,255,0.03);
    text-align: center;
    transition: border-color 0.3s ease, background 0.3s ease;
    cursor: pointer;
}
.aura-upload-zone:hover {
    border-color: rgba(212,175,55,0.7);
    background: rgba(212,175,55,0.06);
}
.aura-upload-zone i {
    font-size: 2rem;
    color: var(--gold, #d4af37);
}
.aura-upload-zone span {
    font-size: 0.92rem;
    color: var(--text-muted, rgba(245,240,230,0.75));
}
.aura-upload-zone input[type="file"] {
    position: absolute;
    width: 1px; height: 1px;
    opacity: 0;
    overflow: hidden;
}

.aura-result {
    margin-top: 1.8rem;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    align-items: center;
}
@media (max-width: 640px) {
    .aura-result { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

.aura-halo-wrap {
    display: grid;
    place-items: center;
    padding: 1.2rem;
}

.aura-halo {
    position: relative;
    width: 200px; height: 200px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    /* halo multicapa animado con el color del aura */
    box-shadow:
        0 0 24px 4px var(--aura-color),
        0 0 60px 18px color-mix(in srgb, var(--aura-color) 55%, transparent),
        0 0 120px 40px color-mix(in srgb, var(--aura-color) 25%, transparent);
    animation: auraBreath 4s ease-in-out infinite;
}
@keyframes auraBreath {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50%      { transform: scale(1.035); filter: brightness(1.18); }
}
/* anillo giratorio de energía */
.aura-halo::before {
    content: '';
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    background: conic-gradient(from 0deg,
        transparent 0deg,
        var(--aura-color) 60deg,
        transparent 130deg,
        color-mix(in srgb, var(--aura-color) 60%, white) 220deg,
        transparent 300deg);
    opacity: 0.55;
    animation: auraSpin 7s linear infinite;
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
}
@keyframes auraSpin {
    to { transform: rotate(360deg); }
}

.aura-photo {
    width: 200px; height: 200px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid color-mix(in srgb, var(--aura-color) 70%, white);
    box-shadow: inset 0 0 30px rgba(0,0,0,0.35);
    position: relative;
    z-index: 1;
}

.aura-info { min-width: 0; }

.aura-name {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    margin: 0 0 0.8rem;
    text-shadow: 0 0 18px currentColor;
}

.aura-meter {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted, rgba(245,240,230,0.75));
}
.aura-meter-bar {
    flex: 1;
    height: 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
}
.aura-meter-fill {
    height: 100%;
    border-radius: 10px;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.35), 0 0 10px currentColor;
    animation: auraFillGrow 1.2s var(--ease-spring, cubic-bezier(0.34,1.56,0.64,1)) both;
    transform-origin: left;
}
@keyframes auraFillGrow {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}
.aura-meter strong { color: var(--gold, #d4af37); }

.aura-desc {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text, #f5f0e6);
    margin: 0 0 0.8rem;
}

.aura-tech {
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
    color: var(--text-muted, rgba(245,240,230,0.55));
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    padding: 0.5rem 0.8rem;
    margin: 0 0 0.8rem;
}

/* Fallback para navegadores sin color-mix */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
    .aura-halo {
        box-shadow: 0 0 30px 8px var(--aura-color), 0 0 90px 30px var(--aura-color);
    }
    .aura-photo { border-color: var(--aura-color); }
}

/* ─────────── Movimiento reducido ─────────── */
@media (prefers-reduced-motion: reduce) {
    .numer-card,
    .numer-int-bar,
    .aura-meter-fill { animation: none !important; }
    .numer-master .numer-num { animation: none !important; }
    .aura-halo { animation: none !important; }
    .aura-halo::before { animation: none !important; opacity: 0.35; }
}
