/* --- 1. BOTÃO DO MENU (HAMBÚRGUER) --- */
.menu-btn {
    position: static;
    display: flex;
    flex-direction: column;
    margin-right: 6px;
    cursor: pointer;
    z-index: 1001;
}

.menu-btn div { 
    width: 25px; 
    height: 2px; 
    background-color: var(--text-header); 
    margin-bottom: 5px; 
}

.menu-btn div:last-child { 
    margin-bottom: 0; 
}

/* --- 2. ESTRUTURA DO MENU LATERAL --- */
.side-menu {
    position: fixed;
    top: 0;
    left: -270px;
    width: 270px;
    height: 100%;
    background: var(--bg-menu);
    display: flex;
    flex-direction: column;
    box-shadow: 5px 0 15px rgba(0,0,0,0.5);
    transition: var(--transition-mid, 0.4s cubic-bezier(0.4, 0, 0.2, 1));
    z-index: 1003;
    overflow-y: auto; 
    overflow-x: hidden;
}

.side-menu.active { 
    left: 0; 
}

.side-menu::-webkit-scrollbar { width: 6px; }
.side-menu::-webkit-scrollbar-track { background: var(--bg-menu); }
.side-menu::-webkit-scrollbar-thumb { background: var(--accent-red); border-radius: 10px; }

/* --- 3. CABEÇALHO DO MENU --- */
.menu-header {
    padding: 18px 22px;
    background: #101010; 
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo-container img { 
    width: 50px; 
    height: auto; 
    display: block;
}

.home-link-header {
    display: flex;
    flex-direction: row;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-header);
    line-height: 1.2;
    text-decoration: none;
}

.home-link-header span {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
    transition: var(--transition-fast, 0.2s ease);
}

.close-btn:hover {
    color: var(--text-header);
    transform: scale(1.1);
}

/* --- 4. LISTA DE LINKS (CORRIGIDO) --- */
.menu-lista-links { 
    list-style: none; 
    padding: 20px 0 10px 0; 
    margin: 0; 
    flex-grow: 1; 
}

/* Aplicamos o marcador lateral para TODOS os LIs do menu e submenu */
.menu-lista-links li {
    position: relative;
    display: flex;
    flex-direction: column; /* Garante que o submenu abra abaixo do link pai */
    transition: background 0.25s ease;
}

/* Estilo padrão do marcador (inativo) */
.menu-lista-links li::before {
    content: "";
    position: absolute;
    left: 6px;
    width: 6px;
    height: 28px; /* Altura fixa para manter a elegância */
    top: 14px;    /* Centraliza verticalmente no item de 1ª linha */
    background: var(--menu-marcador);
    border-radius: 0 6px 6px 0;
    transition: all 0.2s ease;
    z-index: 2;
}

/* Marcador fica vermelho no hover do item específico */
.menu-lista-links li:hover::before {
    background: var(--accent-red);
}

/* Quando o grupo está aberto, o marcador do PAI fica vermelho */
.menu-group.active > a::before {
    background: var(--accent-red);
}

.menu-lista-links a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 28px;
    position: relative;
    transition: 0.25s ease;
}

/* Highlight de fundo apenas no hover do item atual */
.menu-lista-links a:hover,
.menu-group.active > a {
    background: rgba(255,255,255,0.04);
    color: var(--text-white);
}

/* --- 5. SUBMENU EXPANSÍVEL (COM MARCADORES) --- */
.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.15);
}

.menu-group.active .submenu {
    max-height: 300px;
}

/* Ajuste específico para o marcador do submenu */
.submenu li::before {
    height: 22px; /* Marcador um pouco menor para o submenu */
    top: 10px;    /* Centraliza no item menor */
    left: 35px;   /* Recuado para a direita para mostrar hierarquia */
}

.submenu a {
    padding: 10px 28px 10px 60px; /* Padding ajustado para o marcador interno */
    font-size: 0.95rem;
    text-transform: none;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.submenu a:hover {
    color: var(--text-white);
    background: rgba(255,255,255,0.02);
}

/* --- 5.5. LINK PIRATE TV (FONT AWESOME) --- */
.menu-piratetv {
    padding: 5px 0 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.menu-piratetv a {
    color: var(--text-gray); /* Mesma cor base dos outros links */
    font-size: 0.8rem;       /* Tamanho ideal para o ícone */
    text-decoration: none;
    line-height: 1;
    opacity: 0.8;
    transition: transform 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.menu-piratetv a:hover {
    color: var(--accent-red); /* Fica vermelho no hover seguindo seu padrão */
    opacity: 1;
    transform: scale(1.1);
}

/* --- 6. REDES SOCIAIS --- */
.menu-social {
    padding: 20px 0;         
    display: flex;
    justify-content: center;
    align-items: center;     
    border-top: 1px solid var(--border-main);
    margin-top: 8px;
    flex-shrink: 0;
}

.menu-social a {
    display: flex;
    color: var(--text-gray);
    width: 22px;
    height: 22px;
    margin: 0 8px;
    opacity: 0.7;
    transition: 0.3s;
}

.menu-social a svg { 
    width: 100%; 
    height: 100%; 
}

.menu-social a:hover { 
    color: var(--accent-red-light); 
    opacity: 1; 
}

/* --- 7. CRÉDITOS --- */
.developer-credits {
    padding: 20px;
    text-align: center;
    border-top: 1px solid var(--border-main);
    flex-shrink: 0;
}

.developer-credits p {
    display: block;
    font-size: 0.85rem;
    color: var(--developer-top);
    text-transform: uppercase;
    letter-spacing: normal;
}

.developer-credits span {
    display: block;
    margin-top: 5px;
    font-size: 0.95rem;
    color: var(--accent-red);
    font-weight: bold;
}

/* --- 8. COMPONENTES AUXILIARES --- */
.overlay-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    z-index: 1002;
}

.overlay-bg.active { 
    display: block; 
}
