/* ================================================
   AEROMANCIA - APP STYLES
   ================================================ */

.ae-app {
    --ae-cielo: #90caf9;
    --ae-aire: #80cbc4;
    --ae-gradiente: linear-gradient(135deg, #90caf9 0%, #80cbc4 100%);
    --ae-sombra: 0 10px 30px rgba(144, 202, 249, 0.15);
    --ae-radio: 16px;
    --ae-transicion: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    position: relative;
    overflow: hidden;
}

.ae-fase {
    animation: aeFadeIn 0.6s ease;
}

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

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

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

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

@keyframes aePulso {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.3) drop-shadow(0 0 20px rgba(144, 202, 249, 0.5)); }
}

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

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

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

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

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

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

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

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

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

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

.ae-input:focus {
    outline: none;
    border-color: var(--ae-cielo);
    box-shadow: 0 0 0 3px rgba(144, 202, 249, 0.15);
    background-color: rgba(255, 255, 255, 0.08);
}

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

.ae-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(144, 202, 249, 0.3);
    border-radius: 12px;
    padding: 0.9rem 1.2rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--ae-transicion);
    box-sizing: border-box;
    resize: vertical;
    min-height: 80px;
}

.ae-textarea:focus {
    outline: none;
    border-color: var(--ae-cielo);
    box-shadow: 0 0 0 3px rgba(144, 202, 249, 0.15);
    background-color: rgba(255, 255, 255, 0.08);
}

.ae-textarea::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

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

.ae-btn-consultar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(144, 202, 249, 0.3);
}

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

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

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

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

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

@keyframes aeGiroPulso {
    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(144, 202, 249, 0.6)); }
}

.ae-orbe-arc {
    position: absolute;
    top: 5px; left: 5px;
    width: 80px; height: 80px;
    border: 2px dashed rgba(144, 202, 249, 0.25);
    border-radius: 50%;
    animation: aeArcGiro 8s linear infinite;
}

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

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

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

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

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

.ae-seccion {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(144, 202, 249, 0.1);
    border-radius: var(--ae-radio);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    animation: aeSlideIn 0.6s ease both;
}

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

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

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

/* ================================================
   VIENTO
   ================================================ */

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

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

.ae-viento-info {
    flex: 1;
    min-width: 0;
}

.ae-viento-nombre {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.ae-viento-direccion {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
    line-height: 1.4;
}

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

.ae-energia-box {
    background: rgba(144, 202, 249, 0.06);
    border: 1px solid rgba(144, 202, 249, 0.2);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
}

.ae-energia-label {
    color: var(--ae-cielo);
    font-weight: 600;
}

.ae-puntuacion-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.ae-puntuacion-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    white-space: nowrap;
}

.ae-puntuacion-bar {
    flex: 1;
    height: 22px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 11px;
    overflow: hidden;
}

.ae-puntuacion-fill {
    height: 100%;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #333;
    transition: width 1s ease;
}

/* ================================================
   MENSAJE
   ================================================ */

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

.ae-mensaje-icono {
    font-size: 1.5rem;
}

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

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

.ae-consejo-box {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: rgba(255, 204, 128, 0.06);
    border: 1px solid rgba(255, 204, 128, 0.2);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
}

.ae-consejo-icon {
    flex-shrink: 0;
    font-size: 1rem;
}

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

.ae-momento-box {
    background: rgba(128, 203, 196, 0.06);
    border: 1px solid rgba(128, 203, 196, 0.2);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
}

.ae-momento-label {
    color: var(--ae-aire);
    font-weight: 600;
}

/* ================================================
   ELEMENTO
   ================================================ */

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

.ae-elemento-icono {
    font-size: 1.8rem;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ae-elemento-nombre {
    font-size: 1.05rem;
    font-weight: 700;
}

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

.ae-practica-box {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.ae-practica-label {
    color: var(--ae-cielo);
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

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

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

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

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

.ae-afirmacion-icon {
    flex-shrink: 0;
    font-size: 1rem;
}

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

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

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

.ae-btn-nueva:hover {
    background: rgba(144, 202, 249, 0.15);
    border-color: var(--ae-cielo);
    transform: translateY(-2px);
}

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

.ae-app::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(144, 202, 249, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(128, 203, 196, 0.04) 0%, transparent 50%),
                radial-gradient(circle at 50% 80%, rgba(165, 214, 167, 0.03) 0%, transparent 50%);
    animation: aeFondo 25s linear infinite;
    pointer-events: none;
    z-index: 0;
}

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

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

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

@media (max-width: 768px) {
    .ae-titulo-form { font-size: 1.6rem; }
    .ae-icono-oraculo { font-size: 3rem; }
    .ae-viento-header { flex-direction: column; text-align: center; }
    .ae-viento-icono { width: 50px; height: 50px; font-size: 1.8rem; }
    .ae-puntuacion-row { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
}

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

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

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

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

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