/* ================================================
   ASTROLOGIA HORARIA - APP STYLES
   ================================================ */

.hor-app {
    --hor-cyan: #06b6d4;
    --hor-cyan-oscuro: #0891b2;
    --hor-gradiente: linear-gradient(135deg, #06b6d4 0%, #0891b2 50%, #0e7490 100%);
    --hor-sombra: 0 10px 30px rgba(6, 182, 212, 0.15);
    --hor-sombra-hover: 0 15px 40px rgba(6, 182, 212, 0.25);
    --hor-radio: 16px;
    --hor-transicion: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    position: relative;
    overflow: hidden;
}

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

.hor-fase {
    animation: horFadeIn 0.6s ease;
}

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

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

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

@keyframes horOndular {
    0%, 100% { transform: scale(1) translateY(0); filter: brightness(1); }
    50% { transform: scale(1.1) translateY(-5px); filter: brightness(1.3); }
}

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

.hor-destello::before { content: '\2728'; }

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

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

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

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

.hor-form-campos {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    max-width: 450px;
    margin: 0 auto 1rem;
}

.hor-form-tiempo {
    max-width: 300px;
    margin-bottom: 1.5rem;
}

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

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

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

.hor-select:focus {
    outline: none;
    border-color: var(--hor-cyan);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
    background-color: rgba(255, 255, 255, 0.08);
}

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

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

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

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

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

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

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

.hor-loading-planetas {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 1.5rem;
}

.hor-orbita {
    position: absolute;
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 50%;
    animation: horOrbita 4s linear infinite;
}

.hor-orbita-1 {
    width: 100px; height: 100px;
    top: 0; left: 0;
    animation-duration: 3s;
}

.hor-orbita-2 {
    width: 70px; height: 70px;
    top: 15px; left: 15px;
    animation-duration: 4.5s;
    animation-direction: reverse;
}

.hor-orbita-3 {
    width: 40px; height: 40px;
    top: 30px; left: 30px;
    animation-duration: 6s;
}

.hor-punto {
    width: 10px;
    height: 10px;
    background: var(--hor-cyan);
    border-radius: 50%;
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
}

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

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

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

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

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

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

.hor-fecha-consulta {
    color: var(--hor-cyan);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.hor-dia-regente {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

.hor-dia-regente strong {
    color: var(--hor-cyan);
}

.hor-seccion {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.15);
    border-radius: var(--hor-radio);
    padding: 2rem;
    margin-bottom: 1.5rem;
    animation: horSlideIn 0.6s ease both;
}

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

.hor-seccion:nth-child(3) { animation-delay: 0.1s; }
.hor-seccion:nth-child(4) { animation-delay: 0.2s; }
.hor-seccion:nth-child(5) { animation-delay: 0.3s; }
.hor-seccion:nth-child(6) { animation-delay: 0.4s; }

/* Planeta card */
.hor-planeta-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.hor-planeta-icono {
    font-size: 2rem;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.hor-planeta-info h3 {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.hor-planeta-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.hor-meta-item {
    font-size: 0.85rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

.hor-elemento {
    background: rgba(6, 182, 212, 0.12);
    color: var(--hor-cyan);
    border: 1px solid rgba(6, 182, 212, 0.25);
}

.hor-hora-num {
    background: rgba(139, 92, 246, 0.12);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.hor-planeta-desc {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    font-size: 1rem;
}

/* Actividades card */
.hor-actividades-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hor-actividades-icono {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(16, 185, 129, 0.12);
    flex-shrink: 0;
}

.hor-actividades-header h3 {
    color: #fff;
    font-size: 1.3rem;
}

.hor-actividades-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

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

.hor-actividades-col h4 {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hor-favorables h4 {
    color: #4ade80;
    border-bottom-color: rgba(74, 222, 128, 0.2);
}

.hor-desfavorables h4 {
    color: #fca5a5;
    border-bottom-color: rgba(252, 165, 165, 0.2);
}

.hor-actividades-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hor-actividades-col li {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    font-size: 0.9rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.hor-actividades-col li:last-child {
    border-bottom: none;
}

/* Consejo card */
.hor-consejo-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hor-consejo-icono {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(128, 90, 213, 0.12);
    flex-shrink: 0;
}

.hor-consejo-header h3 {
    color: #fff;
    font-size: 1.3rem;
}

.hor-consejo-contenido {
    background: rgba(128, 90, 213, 0.08);
    border-left: 3px solid #8b5cf6;
    padding: 1.2rem 1.5rem;
    border-radius: 0 12px 12px 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    line-height: 1.8;
    font-style: italic;
}

/* Horas siguientes */
.hor-proximas-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hor-proximas-icono {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(6, 182, 212, 0.12);
    flex-shrink: 0;
}

.hor-proximas-header h3 {
    color: #fff;
    font-size: 1.3rem;
}

.hor-horas-lista {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
}

.hor-hora-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 0.8rem 1.2rem;
    transition: var(--hor-transicion);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.hor-hora-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(4px);
}

.hor-hora-tiempo {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 60px;
}

.hor-hora-planeta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    border: 1px solid;
    background: rgba(255, 255, 255, 0.05);
}

.hor-hora-emoji {
    font-size: 1.1rem;
}

.hor-hora-nombre {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
}

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

.hor-btn-nueva:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: var(--hor-cyan);
    transform: translateY(-2px);
}

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

.hor-app::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(8, 145, 178, 0.04) 0%, transparent 50%),
                radial-gradient(circle at 50% 80%, rgba(6, 182, 212, 0.05) 0%, transparent 50%);
    animation: horFondo 25s linear infinite;
    pointer-events: none;
    z-index: 0;
}

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

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

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

@media (max-width: 768px) {
    .hor-titulo { font-size: 1.6rem; }
    .hor-icono-oraculo { font-size: 3rem; }
    .hor-seccion { padding: 1.5rem; }
    .hor-planeta-icono { width: 60px; height: 60px; font-size: 1.8rem; }
    .hor-actividades-grid { grid-template-columns: 1fr; }
    .hor-planeta-header { flex-direction: column; text-align: center; }
    .hor-planeta-meta { justify-content: center; }
}

@media (max-width: 480px) {
    .hor-form-contenido { padding: 1.5rem 0.5rem; }
    .hor-titulo { font-size: 1.4rem; }
    .hor-subtitulo { font-size: 0.85rem; }
    .hor-form-campos { grid-template-columns: 1fr; gap: 0.8rem; max-width: none; }
    .hor-form-tiempo { grid-template-columns: 1fr 1fr; max-width: none; }
    .hor-seccion { padding: 1.2rem; }
    .hor-planeta-header { flex-direction: column; text-align: center; }
    .hor-planeta-icono { width: 55px; height: 55px; font-size: 1.5rem; }
    .hor-actividades-grid { grid-template-columns: 1fr; }
    .hor-actividades-col { padding: 1rem; }
    .hor-consejo-contenido { border-left: none; border-top: 3px solid #8b5cf6; border-radius: 10px 10px 0 0; }
    .hor-btn-nueva { padding: 0.8rem 1.5rem; font-size: 0.9rem; }
    .hor-btn-calcular { padding: 0.9rem 2rem; font-size: 1rem; }
    .hor-hora-item { padding: 0.6rem 0.8rem; }
    .hor-actividades-header,
    .hor-consejo-header,
    .hor-proximas-header { flex-direction: column; text-align: center; }
    .hor-actividades-icono,
    .hor-consejo-icono,
    .hor-proximas-icono { width: 50px; height: 50px; font-size: 1.5rem; }
}

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

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

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

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