/* ==========================================================================
   VARIÁVEIS DE TEMA (PALETA ANODIZED METAL & SAPPHIRE BLUE)
   ========================================================================== */
:root {
    /* Paleta Metálica / Gunmetal */
    --bg-dark: #090a0f;
    --metal-dark: #12141d;
    --metal-base: #1a1d2b;
    --metal-light: #2c3147;
    --metal-highlight: #464f73;

    /* Tom de Azul Safira / Cobalto Profundo */
    --sapphire-dark: #0f3866;
    --sapphire-base: #1a4b8c;
    --sapphire-light: #2a6fca;
    --sapphire-glow: rgba(26, 75, 140, 0.6);
    --sapphire-bright: #4390f7;

    /* Cores de Texto e Acabamento */
    --text-primary: #f0f2f8;
    --text-secondary: #a0a8c0;
    --text-muted: #626b8a;

    /* Transições e Sombras */
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-plate: 0 10px 30px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 25px var(--sapphire-glow);

    /* REGRA DE OURO PARA UI DO SISTEMA: Força o navegador a usar tema escuro nativo */
    color-scheme: dark;
}

/* ==========================================================================
   RESET E OCULTAÇÃO DA BARRA DE ROLAGEM (SCROLLBAR)
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

/* Mata a barra nativa no Firefox, Chrome, Safari e Edge (Zero roubo de tela!) */
html,
body,
* {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

::-webkit-scrollbar {
    display: none !important;
    width: 0px !important;
    height: 0px !important;
}

/* ==========================================================================
   NOSSA BARRA FLUTUANTE CUSTOMIZADA (ZERO LAYOUT SHIFT & AZUL ESCURO TRAVADO)
   ========================================================================== */
.custom-scroll-track {
    position: fixed;
    top: 0;
    right: 2px;
    width: 6px;
    height: 100vh;
    height: 100svh;
    z-index: 99999;
    pointer-events: none;
    /* Flutua como um fantasma, não rouba cliques nem tela */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-scroll-track.is-visible {
    opacity: 1;
}

.custom-scroll-thumb {
    width: 100%;
    border-radius: 10px;
    /* Cor estritamente escura travada: do Safira Profundo para Gunmetal */
    background: linear-gradient(180deg, var(--sapphire-dark) 0%, var(--metal-dark) 100%);
    border: 1px solid var(--bg-dark);
    box-shadow: 0 0 10px rgba(15, 56, 102, 0.6);
}

/* ==========================================================================
   2. CORREÇÃO DEFINITIVA DO FUNDO PISCANDO (CAMADA GPU ISOLADA)
   ========================================================================== */
body {
    background-color: var(--bg-dark);
    color: var(--text-primary);

    min-height: 100vh;
    min-height: 100svh;

    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;

    /* Removemos o background-image daqui para não forçar repintura! */
    position: relative;
    z-index: 1;

    overscroll-behavior: none;
}

/* Criamos uma camada fixa de fundo processada exclusivamente pela Placa de Vídeo */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;

    /* O gradiente Azul Safira vem para cá */
    background-image:
        linear-gradient(180deg, var(--bg-dark) 0%, #0d0f17 100%);
    background-repeat: no-repeat;
    background-size: cover;

    /* O TRUQUE DE MESTRE: Força aceleração de hardware 3D (mata 100% dos piscas e lag) */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
}

/* ==========================================================================
   CONTAINER PRINCIPAL
   ========================================================================== */
.container {
    width: 100%;
    max-width: 440px;
    background: linear-gradient(135deg, rgba(26, 29, 43, 0.8) 0%, rgba(18, 20, 29, 0.9) 100%);
    border: 1px solid var(--metal-light);
    border-top: 1px solid var(--metal-highlight);
    border-radius: 24px;
    padding: 2.5rem 1.75rem;
    box-shadow: var(--shadow-plate), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
}

/* ==========================================================================
   SEÇÃO DO PERFIL E AVATAR
   ========================================================================== */
.profile-section {
    margin-bottom: 2rem;
}

.avatar-container {
    width: 130px;
    height: 130px;
    margin: 0 auto 1.25rem auto;
    border-radius: 50%;
    padding: 4px;
    /* Anel metálico com gradiente azul safira */
    background: linear-gradient(135deg, var(--sapphire-bright), var(--sapphire-base), var(--metal-dark));
    box-shadow: var(--shadow-glow), 0 8px 20px rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--metal-dark);
}

.user-name {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    /* Texto com aspecto de metal prateado brilhante */
    background: linear-gradient(180deg, #ffffff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.35rem;
}

.user-role {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--sapphire-bright);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ==========================================================================
   BOTÕES E LINKS (TITANIUM & SAPPHIRE UI - ANTI-FLICKER)
   ========================================================================== */
.links-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 14px;
    transition: var(--transition-smooth);
    overflow: hidden;

    /* Evita seleção de texto e menus pop-up no touch */
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}

/* REGRA DE OURO ANTI-TREMEDEIRA: 
   Torna textos, ícones e reflexos "invisíveis" para o cálculo do mouse! */
.btn *,
.btn::after,
.btn::before {
    pointer-events: none !important;
}

/* Efeito de Clique Físico no Touch / Mouse */
.btn:active {
    transform: scale(0.98);
    filter: brightness(1.2);
}

/* Botão Padrão - Aço Escovado / Metal */
.btn-metal {
    background: linear-gradient(180deg, var(--metal-light) 0%, var(--metal-base) 50%, var(--metal-dark) 100%);
    color: var(--text-primary);
    border: 1px solid var(--metal-highlight);
    border-bottom: 2px solid #0d0e14;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

/* Em vez de translateY(-3px), usamos scale(1.02). 
   O botão cresce em direção ao mouse, impedindo a borda de fugir! */
.btn-metal:hover {
    transform: scale(1.02);
    border-color: var(--sapphire-light);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7), 0 0 15px rgba(42, 111, 202, 0.3);
    color: #ffffff;
}

/* Botão Em Destaque - Glow Azul Safira */
.btn-featured {
    background: linear-gradient(135deg, var(--sapphire-light) 0%, var(--sapphire-base) 60%, var(--sapphire-dark) 100%);
    color: #ffffff;
    border: 1px solid var(--sapphire-bright);
    box-shadow: var(--shadow-glow), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.btn-featured:hover {
    transform: scale(1.03);
    background: linear-gradient(135deg, var(--sapphire-bright) 0%, var(--sapphire-light) 50%, var(--sapphire-base) 100%);
    box-shadow: 0 0 35px var(--sapphire-bright), inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* Efeito de Reflexo Metálico na Superfície do Botão */
.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: 0.5s;
}

.btn:hover::after {
    left: 100%;
}

/* ==========================================================================
   ANIMAÇÃO DOS ÍCONES E EFEITOS CAMALEÃO NO HOVER
   ========================================================================== */
.btn .icon {
    max-width: 0;
    opacity: 0;
    margin-right: 0;
    transform: translateX(-10px) scale(0.5);
    transition: var(--transition-smooth);
    font-size: 1.25rem;
}

.btn:hover .icon {
    max-width: 30px;
    opacity: 1;
    margin-right: 10px;
    transform: translateX(0) scale(1);
}

/* Ícone do projeto em destaque permanece visível */
.btn-featured .icon {
    max-width: 30px;
    opacity: 1;
    margin-right: 10px;
    transform: none;
}

/* 1. WHATSAPP: Verde Metalizado (Esmeralda Anodizado) */
.btn-whatsapp:hover {
    background: linear-gradient(135deg, #0f381e 0%, #175e31 50%, #0a2614 100%);
    border-color: #25D366;
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7), 0 0 25px rgba(37, 211, 102, 0.5);
}

/* 2. GITHUB: Preto, Prata e Branco (Aço Carbono) */
.btn-github:hover {
    background: linear-gradient(135deg, #2b2b2b 0%, #0d0d0d 60%, #1a1a1a 100%);
    border-color: #ffffff;
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 255, 255, 0.35);
}

/* 3. LINKEDIN: Azul Corporativo Metalizado */
.btn-linkedin:hover {
    background: linear-gradient(135deg, #0a3c6e 0%, #006097 50%, #052648 100%);
    border-color: #0A66C2;
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7), 0 0 25px rgba(10, 102, 194, 0.5);
}

/* ==========================================================================
   RODAPÉ E LOCALIZAÇÃO
   ========================================================================== */
.footer {
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.footer-location {
    font-weight: 500;
    /*color: var(--text-secondary);*/
    color: var(--text-muted);
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.8rem;
}

.location-icon {
    /*color: var(--sapphire-bright);*/
    color: var(--text-muted);
    font-size: 0.75rem;
}

@media (max-width: 768px) {
    body::before{
        background-image:
        radial-gradient(circle at 50% 0%, var(--sapphire-dark) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-dark) 0%, #0d0f17 100%);
    }
}