/* ================================================
   COMPATIBILIDAD DE SIGNOS - APP STYLES
   ================================================ */

.com-app {
    --com-rosa: #ec4899;
    --com-rosa-oscuro: #db2777;
    --com-gradiente: linear-gradient(135deg, #ec4899 0%, #db2777 50%, #ec4899 100%);
    --com-sombra: 0 10px 30px rgba(236, 72, 153, 0.15);
    --com-sombra-hover: 0 15px 40px rgba(236, 72, 153, 0.25);
    --com-radio: 16px;
    --com-transicion: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    position: relative;
    overflow: hidden;
}

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

.com-fase {
    animation: comFadeIn 0.6s ease;
}

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

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

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

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

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

.com-destello::before { content: '\2726'; }

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

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

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

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

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

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

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

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

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

.com-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(236, 72, 153, 0.3);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--com-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='%23ec4899' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.com-select:focus {
    outline: none;
    border-color: var(--com-rosa);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.15);
    background-color: rgba(255, 255, 255, 0.08);
}

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

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

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

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

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

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

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

.com-loading-corazon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    animation: comLatir 1.5s ease-in-out infinite;
}

.com-loading-corazon::before { content: '\2764'; }

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

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

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

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

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

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

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

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

.com-signo-entre {
    font-size: 1.8rem;
    animation: comLatir 2s ease-in-out infinite;
}

.com-porcentaje-display {
    margin-bottom: 0.3rem;
}

.com-porcentaje-num {
    font-size: 3.5rem;
    font-weight: 700;
}

.com-nivel-label {
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Sections */
.com-seccion {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(236, 72, 153, 0.15);
    border-radius: var(--com-radio);
    padding: 2rem;
    margin-bottom: 1.5rem;
    animation: comSlideIn 0.6s ease both;
}

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

.com-seccion:nth-child(3) { animation-delay: 0.05s; }
.com-seccion:nth-child(4) { animation-delay: 0.1s; }
.com-seccion:nth-child(5) { animation-delay: 0.15s; }

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

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

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

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

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

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

/* Element compatibility */
.com-elem-compat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

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

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

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

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

/* Progress bar */
.com-barra {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.com-barra-fondo {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.com-barra-relleno {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease;
}

.com-barra-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    min-width: 35px;
}

/* Advice section */
.com-consejo-icono {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.com-consejo-texto {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    font-size: 1rem;
    font-style: italic;
}

.com-seccion h3 {
    color: #fff;
    margin-bottom: 0.5rem;
}

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

.com-btn-nueva:hover {
    background: rgba(236, 72, 153, 0.15);
    border-color: var(--com-rosa);
    transform: translateY(-2px);
}

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

.com-app::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(236, 72, 153, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(219, 39, 119, 0.04) 0%, transparent 50%),
                radial-gradient(circle at 50% 80%, rgba(236, 72, 153, 0.05) 0%, transparent 50%);
    animation: comFondo 25s linear infinite;
    pointer-events: none;
    z-index: 0;
}

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

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

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

@media (max-width: 768px) {
    .com-titulo { font-size: 1.6rem; }
    .com-icono-oraculo { font-size: 3rem; }
    .com-seccion { padding: 1.5rem; }
    .com-seccion-icono { width: 50px; height: 50px; font-size: 1.8rem; }
    .com-porcentaje-num { font-size: 2.8rem; }
}

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

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

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

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

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