/* ================================================
   ASPECTOS ASTROLOGICOS - APP STYLES
   ================================================ */

.asp-app {
    --asp-violeta: #8b5cf6;
    --asp-violeta-oscuro: #7c3aed;
    --asp-gradiente: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 50%, #8b5cf6 100%);
    --asp-sombra: 0 10px 30px rgba(139, 92, 246, 0.15);
    --asp-sombra-hover: 0 15px 40px rgba(139, 92, 246, 0.25);
    --asp-radio: 16px;
    --asp-transicion: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    position: relative;
    overflow: hidden;
}

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

.asp-fase {
    animation: aspFadeIn 0.6s ease;
}

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

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

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

@keyframes aspBrillar {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.3); }
}

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

.asp-destello::before { content: '\2726'; }
.asp-d2::before { content: '\2756'; }

.asp-d1 { animation-delay: -0.5s; top: -10px; left: 10px; }
.asp-d2 { animation-delay: -1.5s; top: -5px; right: 15px; }

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

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

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

.asp-form-campos {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: end;
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

.asp-campo {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.asp-campo-entre {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 0.5rem;
}

.asp-entre-icono {
    font-size: 1.5rem;
    color: var(--asp-violeta);
}

.asp-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-align: left;
}

.asp-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--asp-transicion);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b5cf6' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.asp-select:focus {
    outline: none;
    border-color: var(--asp-violeta);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
    background-color: rgba(255, 255, 255, 0.08);
}

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

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

.asp-btn-calcular:hover {
    transform: translateY(-2px);
    box-shadow: var(--asp-sombra-hover);
}

.asp-btn-calcular:active {
    transform: translateY(0);
}

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

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

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

.asp-loading-orbe {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--asp-gradiente);
    animation: aspPulsoOrbe 2s ease-in-out infinite;
    margin-bottom: 1.5rem;
    position: relative;
}

.asp-loading-orbe::after {
    content: '\25CE';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: #fff;
}

@keyframes aspPulsoOrbe {
    0%, 100% { transform: scale(1); box-shadow: 0 0 30px rgba(139, 92, 246, 0.3); }
    50% { transform: scale(1.1); box-shadow: 0 0 50px rgba(139, 92, 246, 0.5); }
}

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

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

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

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

.asp-resultado-header {
    text-align: center;
    margin-bottom: 2rem;
}

.asp-signos-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.asp-signo-bloque {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.2rem;
    border-radius: 16px;
    min-width: 120px;
}

.asp-elem-bg-fuego { background: rgba(239, 68, 68, 0.15); }
.asp-elem-bg-tierra { background: rgba(34, 197, 94, 0.15); }
.asp-elem-bg-aire { background: rgba(168, 85, 247, 0.15); }
.asp-elem-bg-agua { background: rgba(59, 130, 246, 0.15); }

.asp-signo-simbolo {
    font-size: 2.5rem;
}

.asp-signo-nombre {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
}

.asp-signo-entre {
    font-size: 1.5rem;
    color: var(--asp-violeta);
    animation: aspGirar 3s linear infinite;
}

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

.asp-resultado-titulo {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
}

.asp-resultado-angulo {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
}

.asp-angulo-num {
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.asp-tipo-badge {
    font-size: 0.75rem;
    padding: 2px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-left: 0.5rem;
}

.asp-tipo-armonico { background: rgba(16, 185, 129, 0.2); color: #4ade80; }
.asp-tipo-tenso { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.asp-tipo-neutral { background: rgba(167, 139, 250, 0.2); color: #a78bfa; }

.asp-seccion {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: var(--asp-radio);
    padding: 2rem;
    margin-bottom: 1.5rem;
    animation: aspSlideIn 0.6s ease both;
}

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

.asp-aspecto-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.asp-aspecto-icono {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    flex-shrink: 0;
}

.asp-aspecto-header h3 {
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.asp-aspecto-mensaje {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.asp-aspecto-consejo {
    background: rgba(139, 92, 246, 0.08);
    border-left: 3px solid var(--asp-violeta);
    padding: 1rem 1.2rem;
    border-radius: 0 10px 10px 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    font-style: italic;
}

.asp-seccion-titulo {
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.asp-elem-compat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.asp-elem-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.asp-elem-badge {
    font-size: 0.8rem;
    padding: 3px 12px;
    border-radius: 20px;
    display: inline-block;
}

.asp-badge-fuego { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.asp-badge-tierra { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.asp-badge-aire { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
.asp-badge-agua { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }

.asp-elem-signo {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.asp-elem-union {
    color: var(--asp-violeta);
    font-size: 1.3rem;
    font-weight: 700;
}

.asp-elem-mensaje {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    font-size: 0.95rem;
    text-align: center;
}

/* Boton nueva consulta */
.asp-btn-nueva {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 50px;
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--asp-transicion);
    margin-top: 1rem;
    font-family: inherit;
}

.asp-btn-nueva:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--asp-violeta);
    transform: translateY(-2px);
}

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

.asp-app::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(167, 139, 250, 0.04) 0%, transparent 50%),
                radial-gradient(circle at 50% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    animation: aspFondo 25s linear infinite;
    pointer-events: none;
    z-index: 0;
}

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

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

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

@media (max-width: 768px) {
    .asp-titulo { font-size: 1.6rem; }
    .asp-icono-oraculo { font-size: 3rem; }
    .asp-seccion { padding: 1.5rem; }
    .asp-aspecto-icono { width: 50px; height: 50px; font-size: 1.8rem; }
    .asp-signo-bloque { min-width: 100px; padding: 1rem; }
}

@media (max-width: 480px) {
    .asp-form-contenido { padding: 1.5rem 0.5rem; }
    .asp-titulo { font-size: 1.4rem; }
    .asp-subtitulo { font-size: 0.85rem; }
    .asp-form-campos { grid-template-columns: 1fr; gap: 0.8rem; }
    .asp-campo-entre { padding-bottom: 0; }
    .asp-entre-icono { transform: rotate(90deg); }
    .asp-seccion { padding: 1.2rem; }
    .asp-aspecto-header { flex-direction: column; text-align: center; }
    .asp-aspecto-icono { width: 50px; height: 50px; font-size: 1.5rem; }
    .asp-signos-display { flex-direction: column; gap: 0.8rem; }
    .asp-signo-entre { transform: rotate(90deg); }
    .asp-btn-nueva { padding: 0.8rem 1.5rem; font-size: 0.9rem; }
    .asp-btn-calcular { padding: 0.9rem 2rem; font-size: 1rem; }
}

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

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

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

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