/* ======== REMOVER ESPAÇO DO FINAL DA PÁGINA ======== */
html {
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
}

body {
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh !important;
    height: auto !important;
    box-sizing: border-box !important;
    position: relative !important;
}

* {
    box-sizing: border-box !important;
}

/* Remover qualquer espaço após o footer */
footer {
    margin-bottom: 0 !important;
    padding-bottom: 1.5rem !important;
}

footer::after {
    display: none !important;
    content: none !important;
}

/* Remover espaços de elementos após o footer */
body > *:last-child:not(footer) {
    margin-bottom: 0 !important;
}

/* Garantir que html e body não tenham espaço extra */
html {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    height: 100% !important;
}

/* Remover espaço de qualquer wrapper do footer */
[class*="flex-col"] {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Garantir que o último elemento seja o footer sem espaço */
body > footer:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 1.5rem !important;
}

/* Remover qualquer espaço visual abaixo do footer */
footer *:last-child {
    margin-bottom: 0 !important;
}

/* Garantir que não haja scroll extra */
html, body {
    overflow-x: hidden !important;
}

/* Remover espaço de containers que envolvem o footer */
footer,
footer > *,
footer > * > * {
    box-sizing: border-box !important;
}

/* FIXAR RODAPÉ - REGRAS FINAIS PARA REMOVER ESPAÇO */
footer:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 1.5rem !important;
}

/* Remover espaço de qualquer elemento após o footer */
footer ~ * {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
}

/* Garantir que o body termine no footer */
body {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Remover espaço de wrappers */
#app,
[class*="app"],
[class*="App"],
main,
.content {
    margin-bottom: 0 !important;
    padding-bottom: 4rem !important;
}

/* Garantir que o último elemento do body seja o footer */
body > *:last-child:not(footer) {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

main, #app, .content {
    flex: 1 0 auto !important;
    padding-bottom: 4rem !important;
    min-height: calc(100vh - 200px) !important;
}

/* Footer descolado do jogo, no fim da página - FIXADO SEM ESPAÇO */
footer {
    flex-shrink: 0 !important;
    margin-top: 6rem !important;
    margin-bottom: 0 !important;
    padding: 3rem 0 1.5rem !important;
    padding-bottom: 1.5rem !important;
    background: #0b0b0b !important;
    border-top: 2px solid rgba(239,68,68,0.4);
    border-bottom: none !important;
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box !important;
    clear: both !important;
    float: none !important;
}

/* Garantir que não haja espaço após o footer - REGRAS FORTES */
footer::after,
footer::before {
    display: none !important;
    content: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body::after {
    display: none !important;
    content: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
}

/* Garantir que o footer fique sempre no final */
body {
    min-height: 100vh !important;
}

/* Espaçamento adicional antes do footer */
main + footer,
#app > footer,
.content + footer,
[class*="flex-col"] > footer {
    margin-top: 6rem !important;
}

/* ======== GRID 4 COLUNAS ======== */
.footer-container,
footer .grid,
footer [class*="grid"] {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 2rem;
    align-items: start;
}

/* ======== BLOCOS ======== */
.footer-bloco {
    text-align: center;
}

.footer-bloco h3, .footer-bloco h2 {
    color: #fff;
    margin-bottom: 0.6rem;
}

.footer-bloco p {
    font-size: .85rem;
    color: rgba(255,255,255,0.75);
}

/* BLOCO 1 */
.footer-bloco .logo {
    width: 55px;
    margin-bottom: .5rem;
}

/* BLOCO 2 */
.footer-pagamentos img {
    height: 45px;
    margin: .5rem 0;
}

/* BLOCO 3 - ACESSO RÁPIDO */
footer .grid > div,
footer [class*="grid"] > div {
    display: flex !important;
    flex-direction: column !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100%;
}

footer ul.flex.flex-col {
    list-style: none;
    padding: 0;
    margin: 0;
}

footer ul.flex.flex-col li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    transition: color 0.3s;
}

footer ul.flex.flex-col li:hover {
    color: #ef4444;
}

/* BLOCO 4 - CONTATO */
.footer-contato a {
    color: #ef4444;
    font-weight: 600;
    display: inline-block;
    margin-bottom: .6rem;
}
.footer-contato a:hover {
    color: #dc2626;
}

/* BLOCO 4 */
.footer-licenca {
    background: #111;
    border: 1px solid rgba(239,68,68,0.35);
    border-radius: 8px;
    padding: 1rem;
}

.footer-licenca p {
    margin: .25rem 0;
}

/* COPYRIGHT */
footer .copyright {
    text-align: center;
    color: rgba(255,255,255,0.6);
    font-size: .78rem;
    margin-top: 2rem;
}

footer .copyright a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
}
footer .copyright a:hover {
    color: #ef4444;
}

/* ======== RESPONSIVIDADE ======== */
@media (max-width: 1024px) {
    .footer-container,
    footer .grid,
    footer [class*="grid"] {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 1.5rem;
    }
    
    footer {
        margin-top: 4rem !important;
    }
    
    main, #app, .content {
        padding-bottom: 3rem !important;
    }
}

@media (max-width: 820px) {
    .footer-container,
    footer .grid,
    footer [class*="grid"] {
        grid-template-columns: repeat(2, 1fr) !important;
        text-align: center;
    }
    
    footer {
        margin-top: 3rem !important;
    }
}

@media (max-width: 600px) {
    .footer-container,
    footer .grid,
    footer [class*="grid"] {
        grid-template-columns: 1fr !important;
    }
    
    footer {
        margin-top: 2rem !important;
        padding: 2rem 0 1rem !important;
    }
    
    main, #app, .content {
        padding-bottom: 2rem !important;
    }
}

/* ======== REGRA FINAL - FIXAR RODAPÉ SEM ESPAÇO ======== */
footer:last-of-type {
    margin-bottom: 0 !important;
    padding-bottom: 1.5rem !important;
    position: relative !important;
    bottom: 0 !important;
}

/* Remover qualquer espaço após o último elemento */
body > footer:last-child,
html > body > footer:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 1.5rem !important;
}

/* Garantir que não haja espaço de scroll */
html {
    scroll-padding-bottom: 0 !important;
}

body {
    scroll-padding-bottom: 0 !important;
}

/* Forçar footer no final absoluto */
footer {
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
}
