:root {
    --bg-color: #050505;
    --card-bg: #0a0a0a;
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --accent-gradient: linear-gradient(135deg, #ffffff 0%, #e4e4e7 100%);
    --accent-glow: 0 0 25px rgba(255, 255, 255, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }



body {
    background: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
    overflow-x: hidden;
}

/* --- HEADER --- */
.doc-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    padding: 18px 5%;
    display: flex; justify-content: space-between; align-items: center;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: white; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand h1 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.5px; }
.back-btn { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; transition: 0.3s; }
.back-btn:hover { color: #fff; }

/* --- MENU STICKY --- */
.nav-sticky-wrapper {
    position: sticky; top: 69px; z-index: 90;
    background: rgba(5, 5, 5, 0.95);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 0; margin-bottom: 40px;
}
.cat-nav {
    display: flex; justify-content: center; gap: 12px; 
    overflow-x: auto; padding: 0 5%; white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}
.cat-nav::-webkit-scrollbar { display: none; }

.cat-btn {
    background: transparent; border: 1px solid var(--glass-border); color: var(--text-muted);
    padding: 8px 22px; border-radius: 50px; cursor: pointer; font-size: 0.9rem; font-weight: 600;
    transition: all 0.3s; display: flex; align-items: center; gap: 8px;
}
.cat-btn:hover { border-color: #fff; color: #fff; }
.cat-btn.active {
    background: var(--accent-gradient); border-color: transparent; color: #000;
    box-shadow: var(--accent-glow); transform: scale(1.05);
}

/* --- CONFIGURAÇÃO GERAL DO CONTAINER --- */
.container { 
    max-width: 1200px; 
    width: 100%;
    margin: 0 auto; 
    padding: 0 20px; 
    /* REMOVI O FLEX: 1 DAQUI - Isso impedia o bug da busca crescendo */
}

/* Adicione isso logo abaixo para garantir que só o conteúdo cresça */
#contentContainer {
    flex: 1; /* Agora só a parte dos cards empurra o rodapé */
    width: 100%;
}
/* --- BUSCA (Centralizada e Grande) --- */
.search-section { text-align: center; margin: 40px 0; }

.glass-input-wrapper { 
    position: relative; 
    /* AUMENTADO E CENTRALIZADO */
    width: 100%;
    max-width: 800px; /* Define o tamanho máximo da barra */
    margin: 0 auto;   /* Centraliza */
}

.glass-input-wrapper input {
    width: 100%; background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border);
    padding: 18px 24px 18px 55px; /* Mais padding para ficar "gordo" */
    border-radius: 14px; color: white; font-size: 1.1rem; outline: none; transition: 0.3s;
}
.glass-input-wrapper input:focus { background: #000; border-color: #fff; }
.search-icon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 1.1rem; }

/* --- CARDS (Largura Total e Animação Slide Down) --- */
.section-group { scroll-margin-top: 160px; margin-bottom: 50px; }
.section-title { font-size: 1.4rem; margin-bottom: 20px; color: #fff; font-weight: 700; display: flex; align-items: center; gap: 12px; }
.section-title i { background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.cmd-card {
    background: var(--card-bg); border: 1px solid var(--glass-border); border-radius: 12px;
    margin-bottom: 15px; overflow: hidden; transition: border-color 0.3s, transform 0.2s; cursor: pointer;
    
    /* GARANTE LARGURA TOTAL E REMOVE ANIMAÇÃO ESTRANHA DE LARGURA */
    width: 100%; 
}

.cmd-card:hover { border-color: rgba(255,255,255,0.3); }

.cmd-header { padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; }
.cmd-info { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.cmd-name { 
    font-family: 'Courier New', monospace; font-weight: 700; font-size: 1.1rem; color: #fff;
    background: rgba(255, 255, 255, 0.1); padding: 6px 10px; border-radius: 6px;
}
.cmd-desc-short { color: var(--text-muted); font-size: 0.95rem; }
.icon-arrow { color: var(--text-muted); transition: transform 0.4s ease; }

/* Rotação da seta ao abrir */
.cmd-card.open .icon-arrow { transform: rotate(180deg); color: #fff; }

/* --- A MÁGICA DO SLIDE DOWN --- */
.cmd-body { 
    /* Estado Fechado */
    max-height: 0;
    opacity: 0;
    padding: 0 24px; /* Padding lateral fixo */
    overflow: hidden;
    border-top: 1px solid transparent; /* Esconde a borda quando fechado */
    background: rgba(255, 255, 255, 0.01);
    
    /* Animação suave de altura e opacidade */
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.4s ease, border-color 0.3s;
}

/* Estado Aberto */
.cmd-card.open .cmd-body { 
    max-height: 500px; /* Um valor alto o suficiente para caber o texto */
    opacity: 1;
    padding-bottom: 24px; /* O padding de baixo só aparece quando abre */
    border-top: 1px solid var(--glass-border);
}

.detail-text { margin-top: 20px; color: #e4e4e7; line-height: 1.6; font-size: 0.95rem; padding-left: 15px; border-left: 2px solid #fff; }
.meta-grid { margin-top: 20px; }
.code-box { background: #000; padding: 12px 15px; border-radius: 8px; font-family: monospace; color: #fff; font-size: 0.9rem; border: 1px solid var(--glass-border); display: flex; align-items: center; gap: 10px; }

    /* --- FOOTER GLASS (Restaurado como pedido) --- */
    footer {
        margin-top: 40px;
        display: flex; 
        justify-content: center;
        width: 100%;
        z-index: 20;
        margin-bottom: 15px;
    }

    .footer-glass {
        background: rgba(255, 255, 255, 0.03);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 8px 20px;
        border-radius: 50px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .footer-glass img { width: 24px; border-radius: 6px; }
    .footer-glass a { 
        color: var(--text-gray); 
        text-decoration: none; 
        font-size: 0.85rem; 
        font-weight: 500; 
        transition: color 0.3s; 
    }
    .footer-glass a:hover { color: var(--text-white); }
    .footer-glass .sep { color: #333; }

    /* Responsivo */
    @media (max-width: 600px) {
        .card { padding: 25px; }
        .button-group { flex-direction: column; }
        .btn { width: 100%; }
        h1 { font-size: 1.5rem; }
    }


    /* --- BOTÃO DISCORD FLUTUANTE (Atualizado) --- */
.discord-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #5865F2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    font-size: 30px;
    z-index: 99999 !important; /* Sempre no topo */
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
    transition: transform 0.3s;
}

.discord-float:hover {
    transform: translateY(-5px);
}

/* Bolinha de notificação (MENOR) */
.pulse-dot {
    position: absolute;
    top: 13px;   /* Ajustado para centralizar com o novo tamanho */
    right: 13px; /* Ajustado para centralizar com o novo tamanho */
    width: 10px; /* Diminuído */
    height: 10px; /* Diminuído */
    background: #00bcd4;
    border: 2px solid #5865F2;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 188, 212, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(0, 188, 212, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 188, 212, 0); }
}

/* AJUSTE MOBILE (Botão mais para cima) */
@media (max-width: 900px) {
    .discord-float {
        bottom: 80px; /* Subiu bastante para não bater no footer */
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .pulse-dot {
        top: 10px;
        right: 10px;
        width: 9px;
        height: 9px;
    }
}

/* --- FOOTER GLASS (Estilo Ativação) --- */
footer {
    margin-top: 60px;
    display: flex;
    justify-content: center;
    width: 100%;
    z-index: 20;
    margin-bottom: 30px; /* Espaço para não colar no fundo da tela */
    padding-bottom: 0;   /* Reset do padding antigo */
    flex-shrink: 0;
}

.footer-glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

/* Efeito extra: Leve brilho ao passar o mouse no footer todo */
.footer-glass:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.footer-glass img { width: 24px; border-radius: 6px; }

.footer-glass a { 
    color: var(--text-muted); /* Adaptado para a variável da DOC */
    text-decoration: none; 
    font-size: 0.85rem; 
    font-weight: 500; 
    transition: color 0.3s; 
}

.footer-glass a:hover { 
    color: #fff; 
    text-shadow: 0 0 10px rgba(255,255,255,0.5); /* Brilho no texto */
}

.footer-glass .sep { color: #333; }
/* --- CORREÇÃO MOBILE (Barra Colada e Sem Buracos) --- */
@media (max-width: 768px) {
    
    /* 1. Header Fixo */
    .doc-header {
        height: 70px;
        padding: 0 20px;
        position: sticky; /* Garante que o header fique lá */
    }

    /* 2. Área de Busca (Compacta) */
    .search-section {
        margin: 15px 0 15px 0; /* Margens pequenas para não gerar buraco */
        padding: 0 20px;
    }
    
    .glass-input-wrapper input {
        padding: 12px 20px 12px 50px; /* Input um pouco menor no mobile */
        font-size: 1rem;
    }

    /* 3. Barra de Categorias (A "Cola") */
    .nav-sticky-wrapper {
        position: sticky;
        top: 70px; /* Cola EXATAMENTE embaixo do Header */
        z-index: 90;
        margin-bottom: 20px; /* Espaço apenas DEPOIS dela, para os cards */
        background: var(--bg-color); /* Fundo sólido para não ver coisas passando atrás */
        border-bottom: 1px solid var(--glass-border);
        padding: 10px 0;
    }

    /* 4. Ajuste dos Containers Mobile */
    .container {
        padding: 0 15px;
    }
}

/* --- ANIMAÇÃO DE ENTRADA DOS CARDS --- */
.cmd-card {
    opacity: 0;
    transform: translateY(15px);
    animation: revealCard 0.4s ease-out forwards;
    
    /* Garante que o card ocupe a largura total sem bugar */
    width: 100%; 
    will-change: transform, opacity;
}

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

/* Animação para as seções (Categorias) */
.section-group {
    opacity: 0;
    animation: fadeIn 0.5s ease-in forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* --- MANTÉM O SLIDE DOWN DO CONTEÚDO (Quando clica) --- */
.cmd-body {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.cmd-card.open .cmd-body {
    max-height: 1000px; /* Aumentado para não cortar textos grandes */
    opacity: 1;
    padding-bottom: 24px;
}