/* components/direita/xsat-loading.css */

.xsat-sync-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 60px 20px;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
}

.xsat-visual-core {
    position: relative;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

/* O Satélite Central */
.xsat-main-icon {
    font-size: 45px;
    color: var(--primary);
    z-index: 5;
    filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.8));
    animation: satFloat 3s infinite ease-in-out;
}

/* Ondas de Radar Sinuosas */
.xsat-radar-wave {
    position: absolute;
    border: 1px solid var(--primary);
    border-radius: 50%;
    opacity: 0;
    animation: radarRipple 4s infinite cubic-bezier(0.21, 0.53, 0.56, 0.8);
}

.xsat-radar-wave:nth-child(1) { animation-delay: 0s; }
.xsat-radar-wave:nth-child(2) { animation-delay: 1.3s; }
.xsat-radar-wave:nth-child(3) { animation-delay: 2.6s; }

/* Anel de Rotação Tecnológico */
.xsat-tech-ring {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px dashed rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    animation: satRotate 10s linear infinite;
}

/* Feixes de Dados Verticais */
.xsat-data-beam {
    position: absolute;
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, var(--primary), transparent);
    opacity: 0;
    animation: dataFall 2s infinite linear;
}

/* Keyframes */
@keyframes satFloat {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

@keyframes radarRipple {
    0% { width: 40px; height: 40px; opacity: 0.8; border-width: 2px; }
    100% { width: 180px; height: 180px; opacity: 0; border-width: 1px; }
}

@keyframes satRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes dataFall {
    0% { transform: translateY(-100px); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(100px); opacity: 0; }
}

/* Texto com efeito de "Terminal" */
.xsat-sync-text {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--primary);
    margin-bottom: 10px;
}

.xsat-sync-sub {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 1px;
    animation: blinkText 1s infinite;
}

@keyframes blinkText {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ADICIONA ESTE AQUI NO FIM: */
@keyframes xsatProgress { 
    0% { left: -100%; } 
    100% { left: 100%; } 
}

.xsat-sync-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    background: transparent; /* Remove o fundo preto, usa o do sistema */
    overflow: hidden;
}

/* CONTENTOR DA CHUVA DE METEOROS */
.xsat-meteor-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.meteor {
    position: absolute;
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--primary), #fff);
    opacity: 0;
    /* Inclinação diagonal para parecer meteoro */
    transform: rotate(25deg); 
    animation: meteorFall 1.5s infinite linear;
}

/* Variações de posição e atraso para os meteoros */
.meteor:nth-child(1) { top: -10%; left: 20%; animation-delay: 0s; animation-duration: 0.8s; }
.meteor:nth-child(2) { top: -10%; left: 50%; animation-delay: 0.3s; animation-duration: 1.2s; }
.meteor:nth-child(3) { top: -10%; left: 80%; animation-delay: 0.6s; animation-duration: 0.9s; }
.meteor:nth-child(4) { top: -10%; left: 10%; animation-delay: 1s; animation-duration: 1.5s; }
.meteor:nth-child(5) { top: -10%; left: 40%; animation-delay: 0.2s; animation-duration: 0.7s; }
.meteor:nth-child(6) { top: -10%; left: 70%; animation-delay: 0.8s; animation-duration: 1.1s; }
.meteor:nth-child(7) { top: -10%; left: 90%; animation-delay: 0.5s; animation-duration: 1.3s; }

@keyframes meteorFall {
    0% { transform: translateY(-100px) translateX(50px) rotate(25deg); opacity: 0; }
    30% { opacity: 0.8; }
    100% { transform: translateY(500px) translateX(-200px) rotate(25deg); opacity: 0; }
}

/* NÚCLEO DO SATÉLITE */
.xsat-visual-core {
    position: relative;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.xsat-main-icon {
    font-size: 45px;
    color: #fff;
    filter: drop-shadow(0 0 15px var(--primary));
    animation: satFloat 3s infinite ease-in-out;
}

@keyframes satFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ONDAS DE RADAR */
.xsat-radar-wave {
    position: absolute;
    border: 1px solid var(--primary);
    border-radius: 50%;
    opacity: 0;
    animation: radarRipple 3s infinite;
}
.xsat-radar-wave:nth-child(1) { animation-delay: 0s; }
.xsat-radar-wave:nth-child(2) { animation-delay: 1.5s; }

@keyframes radarRipple {
    0% { width: 40px; height: 40px; opacity: 1; }
    100% { width: 200px; height: 200px; opacity: 0; }
}

/* BARRA DE CARREGAMENTO */
.xsat-progress-box {
    width: 180px;
    margin-top: 30px;
    z-index: 10;
}

.xsat-bar-container {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.xsat-bar-fill {
    position: absolute;
    height: 100%;
    width: 40%;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    animation: xsatLoad 2s infinite ease-in-out;
}

@keyframes xsatLoad {
    0% { left: -40%; }
    50% { left: 100%; }
    100% { left: -40%; }
}

.xsat-text {
    font-family: monospace;
    font-size: 10px;
    color: var(--primary);
    text-align: center;
    margin-top: 10px;
    font-weight: 800;
    letter-spacing: 2px;
}

/* SISTEMA ORBITAL (Para modo Global) */
.xsat-orbital-system {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    animation: rotateRing 10s linear infinite;
}

.orbital-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
}

.p1 { top: -3px; left: 50%; }
.p2 { bottom: 10%; right: 5%; }
.p3 { bottom: 10%; left: 5%; }

/* LINHA DE SCAN (Efeito de varredura de radar) */
.xsat-scan-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    margin-top: 5px;
    position: relative;
    opacity: 0.5;
    animation: scanMove 1.5s infinite ease-in-out;
}

@keyframes scanMove {
    0%, 100% { transform: scaleX(0.2); opacity: 0; }
    50% { transform: scaleX(1); opacity: 1; }
}

/* Efeito Especial para Modo Global */
.xsat-sync-wrapper.global-mode .xsat-main-icon {
    color: #34d399; /* Cor verde para diferenciar a pesquisa global */
    filter: drop-shadow(0 0 20px #34d399);
}

.xsat-sync-wrapper.global-mode .meteor {
    background: linear-gradient(to bottom, transparent, #34d399, #fff);
}

.xsat-sync-wrapper.global-mode .xsat-bar-fill {
    background: #34d399;
    box-shadow: 0 0 15px #34d399;
}

/* Rotação dos anéis */
@keyframes rotateRing {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Forçar ícones a serem visíveis dentro do painel X-SAT */
#panel-xsat i, 
#panel-xsat .fa-solid {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1;
}

/* Garantir que o sub-nav (Pubs, Livros, etc) mostre os ícones brancos */
#xsat-sub-nav button i {
    color: var(--text-muted);
}

#xsat-sub-nav button.active i {
    color: #0f172a !important; /* Cor escura para o botão branco ativo */
}
