/* ================================================
   DIA PERSONAL - APP STYLES
   ================================================ */

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

    position: relative;
    overflow: hidden;
}

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

.dp-fase {
    animation: dpFadeIn 0.6s ease;
}

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

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

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

@keyframes dpBrillar {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.3) drop-shadow(0 0 20px rgba(139, 92, 246, 0.5)); }
}

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

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

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

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

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

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

.dp-form-secciones {
    max-width: 700px;
    margin: 0 auto 1.5rem;
}

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

.dp-seccion-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.dp-seccion-label .dp-opcional {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
    font-size: 0.85rem;
}

.dp-form-separador {
    text-align: center;
    font-size: 1.5rem;
    color: var(--dp-violeta);
    margin: 1rem 0;
}

.dp-form-campos {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.dp-campo {
    text-align: left;
    flex: 1;
    margin-bottom: 0;
}

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

.dp-select {
    width: 100%;
    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;
    transition: var(--dp-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='%238b5cf6' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

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

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

.dp-hint {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    margin-top: 0.5rem;
    text-align: left;
}

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

.dp-btn-calcular:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

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

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

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

.dp-orbita-num {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 45px;
    height: 45px;
    background: var(--dp-gradiente);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: #fff;
    animation: dpPulsoNum 2s ease-in-out infinite;
}

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

.dp-orbita-arc {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 80px;
    height: 80px;
    border: 2px dashed rgba(139, 92, 246, 0.25);
    border-radius: 50%;
    animation: dpArcGiro 8s linear infinite;
}

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

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

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

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

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

.dp-resultado-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.dp-fecha-badge {
    display: inline-block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.8rem;
    background: rgba(139, 92, 246, 0.1);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.dp-dia-num-grande {
    margin-bottom: 0.3rem;
}

.dp-num-grande-num {
    display: inline-block;
    font-size: 5rem;
    font-weight: 800;
    border-radius: 50%;
    width: 100px;
    height: 100px;
    line-height: 100px;
    text-align: center;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: unset;
}

.dp-dia-nombre {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.3rem;
}

.dp-dia-sub {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

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

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

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

.dp-titulo-dia { color: var(--dp-violeta); }
.dp-titulo-act { color: #10b981; }
.dp-titulo-semana { color: var(--dp-violeta); }

.dp-card-desc {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    font-size: 0.95rem;
}

/* Activities */
.dp-actividades-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.dp-actividades-col {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1rem;
}

.dp-act-favorable {
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.dp-act-evitar {
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.dp-act-label {
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
}

.dp-act-fav-label { color: #10b981; }
.dp-act-ev-label { color: #f87171; }

.dp-act-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dp-act-badge {
    font-size: 0.8rem;
    padding: 5px 12px;
    border-radius: 20px;
}

.dp-act-fav {
    /* inline color from data */
}

.dp-act-ev {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

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

.dp-semana-dia {
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 0.7rem 0.3rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: var(--dp-transicion);
}

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

.dp-semana-dia.dp-semana-hoy {
    border: 2px solid rgba(139, 92, 246, 0.5);
    background: rgba(139, 92, 246, 0.06);
}

.dp-semana-dia-semana {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.65rem;
    text-transform: uppercase;
}

.dp-semana-num {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.dp-semana-dp {
    display: inline-block;
    font-size: 1rem;
    font-weight: 800;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    line-height: 30px;
    margin-bottom: 0.1rem;
}

.dp-semana-nombre {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
}

.dp-semana-hoy-tag {
    font-size: 0.6rem;
    color: var(--dp-violeta);
    font-weight: 700;
    margin-top: 0.1rem;
}

/* Advice */
.dp-consejo-general {
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: var(--dp-radio);
    padding: 1.5rem;
    animation: dpSlideIn 0.6s ease both;
}

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

/* New consultation button */
.dp-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(--dp-transicion);
    font-family: inherit;
}

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

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

.dp-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(124, 58, 237, 0.04) 0%, transparent 50%),
                radial-gradient(circle at 50% 80%, rgba(192, 132, 252, 0.03) 0%, transparent 50%);
    animation: dpFondo 25s linear infinite;
    pointer-events: none;
    z-index: 0;
}

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

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

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

@media (max-width: 768px) {
    .dp-titulo-form { font-size: 1.6rem; }
    .dp-icono-oraculo { font-size: 3rem; }
    .dp-form-campos { flex-direction: column; }
    .dp-actividades-grid { grid-template-columns: 1fr; }
    .dp-semana-grid { grid-template-columns: repeat(7, 1fr); gap: 0.3rem; }
    .dp-semana-dia { padding: 0.5rem 0.2rem; }
    .dp-semana-dp { width: 26px; height: 26px; line-height: 26px; font-size: 0.85rem; }
}

@media (max-width: 480px) {
    .dp-form-contenido { padding: 1.5rem 0.5rem; }
    .dp-titulo-form { font-size: 1.4rem; }
    .dp-subtitulo-form { font-size: 0.85rem; }
    .dp-resultado-contenido { padding: 1.5rem 0.5rem; }
    .dp-seccion { padding: 1.2rem; }
    .dp-btn-nueva { padding: 0.8rem 1.5rem; font-size: 0.9rem; }
    .dp-btn-calcular { padding: 0.8rem 1.8rem; font-size: 0.9rem; }
    .dp-num-grande-num { font-size: 3.5rem; width: 80px; height: 80px; line-height: 80px; }
    .dp-semana-grid { grid-template-columns: repeat(4, 1fr); }
    .dp-semana-grid .dp-semana-dia:nth-child(n+5):nth-child(-n+7) { display: none; }
    .dp-semana-grid::after,
    .dp-semana-grid::before { display: none; }
}

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

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

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

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