/* ================================================
   ANGELES - APP STYLES
   ================================================ */

.an-app {
    --an-angel: #ffeaa7;
    --an-rosa: #fab1a0;
    --an-celestial: #0984e3;
    --an-gradiente: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 50%, #fd79a8 100%);
    --an-sombra: 0 10px 30px rgba(255, 234, 167, 0.15);
    --an-radio: 16px;
    --an-transicion: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    position: relative;
    overflow: hidden;
}

.an-fase {
    animation: anFadeIn 0.6s ease;
}

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

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

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

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

@keyframes anPulso {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.3) drop-shadow(0 0 20px rgba(255, 234, 167, 0.5)); }
}

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

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

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

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

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

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

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

.an-form-seccion {
    margin-bottom: 1.5rem;
}

.an-seccion-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

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

.an-input:focus {
    outline: none;
    border-color: var(--an-angel);
    box-shadow: 0 0 0 3px rgba(255, 234, 167, 0.15);
    background-color: rgba(255, 255, 255, 0.08);
}

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

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

.an-select:focus {
    outline: none;
    border-color: var(--an-angel);
    box-shadow: 0 0 0 3px rgba(255, 234, 167, 0.15);
    background-color: rgba(255, 255, 255, 0.08);
}

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

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

.an-btn-consultar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 234, 167, 0.3);
}

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

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

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

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

.an-orbe-centro {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    animation: anGiroPulso 2s ease-in-out infinite;
}

@keyframes anGiroPulso {
    0%, 100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
    50% { transform: translate(-50%, -50%) scale(1.2) rotate(180deg); filter: drop-shadow(0 0 15px rgba(255, 234, 167, 0.6)); }
}

.an-orbe-arc {
    position: absolute;
    top: 5px; left: 5px;
    width: 80px; height: 80px;
    border: 2px dashed rgba(255, 234, 167, 0.25);
    border-radius: 50%;
    animation: anArcGiro 8s linear infinite;
}

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

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

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

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

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

.an-seccion {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 234, 167, 0.1);
    border-radius: var(--an-radio);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    animation: anSlideIn 0.6s ease both;
}

.an-seccion:nth-child(2) { animation-delay: 0s; }
.an-seccion:nth-child(3) { animation-delay: 0.1s; }
.an-seccion:nth-child(4) { animation-delay: 0.15s; }
.an-seccion:nth-child(5) { animation-delay: 0.2s; }

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

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

/* ================================================
   ANGEL
   ================================================ */

.an-angel-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.an-angel-icono {
    font-size: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.an-angel-info {
    flex: 1;
    min-width: 120px;
}

.an-angel-nombre {
    font-size: 1.15rem;
    font-weight: 700;
}

.an-angel-titulo {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.2rem;
}

.an-puntuacion {
    text-align: center;
    flex-shrink: 0;
}

.an-score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.4rem;
    background: rgba(255, 234, 167, 0.03);
}

.an-score-num {
    font-size: 1.8rem;
    font-weight: 800;
}

.an-score-label {
    font-size: 0.85rem;
    font-weight: 600;
}

.an-angel-desc {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
}

.an-poder-box {
    background: rgba(255, 234, 167, 0.06);
    border: 1px solid rgba(255, 234, 167, 0.2);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
}

.an-poder-label {
    color: var(--an-angel);
    font-weight: 600;
}

.an-oracion-box {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: rgba(9, 132, 227, 0.06);
    border: 1px solid rgba(9, 132, 227, 0.2);
    border-radius: 12px;
    padding: 0.8rem 1rem;
}

.an-oracion-icon {
    flex-shrink: 0;
    font-size: 1rem;
}

.an-oracion-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.88rem;
    line-height: 1.5;
    font-style: italic;
}

/* ================================================
   INTENCION
   ================================================ */

.an-intencion-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.an-intencion-icono {
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.an-intencion-nombre {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
}

.an-afirmacion-intencion {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    font-size: 0.93rem;
}

/* ================================================
   LECTURA
   ================================================ */

.an-lectura-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.an-lectura-icono {
    font-size: 1.5rem;
}

.an-lectura-titulo {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
}

.an-lectura-texto {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    font-style: italic;
}

.an-accion-box {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 0.8rem 1rem;
}

.an-accion-icon {
    flex-shrink: 0;
    font-size: 1rem;
}

.an-accion-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.88rem;
    line-height: 1.5;
}

/* ================================================
   AFIRMACIONES
   ================================================ */

.an-afirmaciones-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.an-afirmacion-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.8rem;
}

.an-afirmacion-icon {
    flex-shrink: 0;
    font-size: 1rem;
    color: var(--an-angel);
}

.an-afirmacion-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    line-height: 1.5;
    font-style: italic;
}

/* ================================================
   NUEVA CONSULTA
   ================================================ */

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

.an-btn-nueva:hover {
    background: rgba(255, 234, 167, 0.15);
    border-color: var(--an-angel);
    transform: translateY(-2px);
}

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

.an-app::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(255, 234, 167, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(250, 177, 160, 0.04) 0%, transparent 50%),
                radial-gradient(circle at 50% 80%, rgba(253, 121, 168, 0.03) 0%, transparent 50%);
    animation: anFondo 25s linear infinite;
    pointer-events: none;
    z-index: 0;
}

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

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

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

@media (max-width: 768px) {
    .an-titulo-form { font-size: 1.6rem; }
    .an-icono-oraculo { font-size: 3rem; }
    .an-angel-header { flex-direction: column; text-align: center; }
    .an-puntuacion { margin-top: 0.5rem; }
}

@media (max-width: 480px) {
    .an-form-contenido { padding: 1.5rem 0.5rem; }
    .an-titulo-form { font-size: 1.4rem; }
    .an-subtitulo-form { font-size: 0.85rem; }
    .an-resultado-contenido { padding: 1.5rem 0.5rem; }
    .an-seccion { padding: 1.2rem; }
    .an-btn-nueva { padding: 0.8rem 1.5rem; font-size: 0.9rem; }
    .an-btn-consultar { padding: 0.8rem 1.8rem; font-size: 0.9rem; }
    .an-score-circle { width: 65px; height: 65px; }
    .an-score-num { font-size: 1.4rem; }
}

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

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

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

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