/* ================================================
   PREDICTIVA DIARIA - APP STYLES
   ================================================ */

.pd-app {
    --pd-rosa: #ff6b9d;
    --pd-rosa-oscuro: #e91e7a;
    --pd-gradiente: linear-gradient(135deg, #ff6b9d 0%, #c44dff 100%);
    --pd-dorado: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
    --pd-sombra: 0 10px 30px rgba(255, 107, 157, 0.15);
    --pd-radio: 16px;
    --pd-transicion: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    position: relative;
    overflow: hidden;
}

.pd-fase {
    animation: pdFadeIn 0.6s ease;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

.pd-label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.pd-form-campos {
    display: flex;
    gap: 1rem;
    max-width: 450px;
    margin: 0 auto;
    align-items: flex-start;
}

.pd-campo {
    text-align: left;
    flex: 1;
}

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

.pd-select:focus {
    outline: none;
    border-color: var(--pd-rosa);
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.15);
    background-color: rgba(255, 255, 255, 0.08);
}

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

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

.pd-btn-calcular:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.3);
}

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

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

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

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

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

@keyframes pdGiroPulso {
    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, 107, 157, 0.6)); }
}

.pd-orbita-arc {
    position: absolute;
    top: 5px; left: 5px;
    width: 80px; height: 80px;
    border: 2px dashed rgba(255, 107, 157, 0.25);
    border-radius: 50%;
    animation: pdArcGiro 8s linear infinite;
}

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

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

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

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

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

.pd-resultado-header {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 107, 157, 0.2);
}

.pd-natal-badge, .pd-consulta-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 107, 157, 0.15);
    border-radius: 14px;
    padding: 1rem 1.2rem;
    flex: 1;
    min-width: 180px;
}

.pd-badge-label {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.pd-badge-num {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--pd-rosa);
    margin-bottom: 0.3rem;
}

.pd-badge-fecha {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.pd-maestro-tag {
    display: inline-block;
    color: #c084fc;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(192, 132, 252, 0.15);
    border: 1px solid rgba(192, 132, 252, 0.3);
    animation: pdBrilloMaestro 2s ease-in-out infinite;
}

@keyframes pdBrilloMaestro {
    0%, 100% { opacity: 0.8; text-shadow: none; }
    50% { opacity: 1; text-shadow: 0 0 10px rgba(192, 132, 252, 0.5); }
}

.pd-num-principal {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1 1 100%;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.pd-num-grande {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 800;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pd-num-info {
    flex: 1;
    min-width: 200px;
}

.pd-num-nombre {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.pd-maestro-badge {
    display: inline-block;
    color: #c084fc;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(192, 132, 252, 0.15);
    border: 1px solid rgba(192, 132, 252, 0.3);
    animation: pdBrilloMaestro 2s ease-in-out infinite;
}

/* ================================================
   SECCIONES
   ================================================ */

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

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

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

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

/* ================================================
   PREDICCION
   ================================================ */

.pd-prediccion-texto {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    font-size: 1rem;
    margin-bottom: 1.2rem;
    font-style: italic;
}

.pd-puntuacion-bar {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

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

.pd-puntuacion-track {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.pd-puntuacion-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease;
}

.pd-puntuacion-num {
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
}

.pd-favorables {
    margin-bottom: 1.2rem;
}

.pd-favorables-label {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
    font-weight: 500;
}

.pd-favorables-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pd-tag-favorable {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border: 1px solid;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.03);
    transition: var(--pd-transicion);
}

.pd-tag-favorable:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.pd-cuidado-box {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 12px;
    padding: 0.8rem 1rem;
}

.pd-cuidado-icon {
    flex-shrink: 0;
    font-size: 1rem;
}

.pd-cuidado-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.88rem;
    line-height: 1.5;
}

/* ================================================
   AREAS DE VIDA
   ================================================ */

.pd-areas-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.pd-area-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1.2rem;
    transition: var(--pd-transicion);
}

.pd-area-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}

.pd-area-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.pd-area-nombre {
    color: var(--pd-rosa);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.pd-area-text {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* ================================================
   SEMANA
   ================================================ */

.pd-semana-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.pd-dia-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.8rem 0.3rem;
    transition: var(--pd-transicion);
}

.pd-dia-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}

.pd-dia-hoy {
    background: rgba(255, 107, 157, 0.12);
    border: 2px solid rgba(255, 107, 157, 0.4);
}

.pd-dia-fecha {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.72rem;
    margin-bottom: 0.2rem;
}

.pd-dia-semana {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.68rem;
    margin-bottom: 0.4rem;
}

.pd-dia-numero {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--pd-rosa);
}

.pd-dia-hoy .pd-dia-numero {
    text-shadow: 0 0 10px rgba(255, 107, 157, 0.4);
}

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

.pd-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, 107, 157, 0.3);
    border-radius: 50px;
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--pd-transicion);
    font-family: inherit;
}

.pd-btn-nueva:hover {
    background: rgba(255, 107, 157, 0.15);
    border-color: var(--pd-rosa);
    transform: translateY(-2px);
}

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

.pd-app::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(255, 107, 157, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(196, 77, 255, 0.04) 0%, transparent 50%),
                radial-gradient(circle at 50% 80%, rgba(247, 151, 30, 0.03) 0%, transparent 50%);
    animation: pdFondo 25s linear infinite;
    pointer-events: none;
    z-index: 0;
}

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

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

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

@media (max-width: 768px) {
    .pd-titulo-form { font-size: 1.6rem; }
    .pd-icono-oraculo { font-size: 3rem; }
    .pd-form-campos { flex-direction: column; max-width: 280px; margin: 0 auto; }
    .pd-resultado-header { flex-direction: column; }
    .pd-num-principal { flex-direction: column; text-align: center; }
    .pd-num-grande { width: 70px; height: 70px; font-size: 3rem; }
    .pd-areas-grid { grid-template-columns: 1fr; }
    .pd-semana-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 480px) {
    .pd-form-contenido { padding: 1.5rem 0.5rem; }
    .pd-titulo-form { font-size: 1.4rem; }
    .pd-subtitulo-form { font-size: 0.85rem; }
    .pd-resultado-contenido { padding: 1.5rem 0.5rem; }
    .pd-seccion { padding: 1.2rem; }
    .pd-btn-nueva { padding: 0.8rem 1.5rem; font-size: 0.9rem; }
    .pd-btn-calcular { padding: 0.8rem 1.8rem; font-size: 0.9rem; }
    .pd-num-grande { width: 60px; height: 60px; font-size: 2.5rem; }
    .pd-num-nombre { font-size: 1.2rem; }
    .pd-semana-grid { grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
    .pd-dia-numero { font-size: 1.2rem; }
}

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

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

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

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