/* 1. Configurações Iniciais Gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: #f5f5f5;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background-image: url('Peladeiros.jpeg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.03;
    z-index: -1;
    pointer-events: none;
}

/* 2. Menu parte superior */
header {
    background-color: #000000;
    border-bottom: 4px solid #ffca28;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.menu-nav {
    display: flex;
    justify-content: center;
    list-style: none;
}

.menu-nav a {
    display: block;
    text-decoration: none;
    color: #ffca28;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 16px;
    padding: 20px 25px;
    transition: all 0.3s ease;
}

.menu-nav a:hover {
    background-color: #ffca28;
    color: #000000;
}

/* 3. Container principal da pagina */
.container {
    position: relative;
    max-width: 1100px;
    margin: 100px auto 60px auto;
    padding: 90px 20px 20px 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.logo-flutuante {
    position: absolute;
    top: -95px;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: auto;
    background-color: transparent;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.4));
    object-fit: contain;
    z-index: 10;
}

.titulo-principal {
    text-align: center;
    font-weight: 900;
    font-size: 32px;
    text-transform: uppercase;
    color: #000;
    margin-bottom: 15px;
}

.intro {
    text-align: center;
    font-size: 18px;
    color: #666;
    margin-bottom: 50px;
}

h2, .data-titulo {
    font-weight: 900;
    text-transform: uppercase;
    color: #000;
    border-left: 8px solid #ffca28;
    padding-left: 15px;
    margin: 40px 0 20px 0;
    text-align: left;
}

/* --- 4. A PARTE DE PLACARES --- */
.grid-placares {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.card-jogo {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    font-size: 13px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    transition: transform 0.2s;
}

.card-jogo:hover {
    transform: translateY(-2px);
    border-color: #ffca28;
}

.placar-box {
    margin: 0 10px;
    background: #000;
    color: #ffca28;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 900;
    min-width: 65px;
    text-align: center;
}

.time {
    flex: 1;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
}

.time-dir { text-align: right; }
.time-esq { text-align: left; }

summary {
    cursor: pointer;
    background: #000;
    color: #ffca28;
    padding: 15px;
    border-radius: 8px;
    font-weight: 900;
    text-align: center;
    list-style: none;
    margin-top: 30px;
    text-transform: uppercase;
    transition: 0.3s;
}

summary:hover { background: #222; }

/* --- 5. Atletas --- */
.atletas-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.atleta-card {
    flex: 0 1 150px;
    text-align: center;
    margin-bottom: 20px;
}

.atleta-card img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 4px solid #ffca28;
    object-fit: cover;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.atleta-card img:hover {
    transform: scale(1.1);
    border-color: #000;
}

.atleta-card p {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
}

/* --- 6. Ranking (Ajustado) --- */
.tabela-ranking {
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    display: table;
}

.tabela-ranking th {
    padding: 12px 15px;
    text-align: center;
    font-size: 13px;
    background-color: #000;
    color: #ffca28;
    text-transform: uppercase;
}

.tabela-ranking td {
    padding: 10px 15px;
    text-align: center;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.primeiro-lugar { 
    background-color: #fff9e6 !important; 
    border-left: 5px solid #ffca28;
}

.primeiro-lugar td {
    font-weight: 900 !important;
    color: #000;
}

.primeiro-lugar td:first-child { 
    color: #ffca28; 
    font-size: 18px; 
}

/* --- 7. NOVOS CONTROLES DE FILTRO (BOTÕES) --- */
.ranking-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.btn-filtro {
    background-color: #ffffff;
    color: #000000;
    border: 2px solid #000000;
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.btn-filtro:hover {
    background-color: #ffca28;
    border-color: #ffca28;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 202, 40, 0.2);
}

.btn-filtro.ativo {
    background-color: #000000;
    color: #ffca28;
    border-color: #000000;
    transform: scale(0.95);
    box-shadow: none;
}

/* --- 8. Rodapé e Botões --- */
.btn-local {
    display: inline-block;
    background-color: #000;
    color: #ffca28;
    padding: 12px 25px;
    text-decoration: none;
    font-weight: 900;
    text-transform: uppercase;
    border-radius: 5px;
    transition: 0.3s;
}

.rodape-preto {
    background-color: #000000;
    border-top: 4px solid #ffca28;
    padding: 25px 20px;
    text-align: center;
}

.icon {
    width: 45px;
    height: 45px;
    background-color: #fff;
    border-radius: 10px;
    padding: 6px;
    transition: 0.3s;
}

/* --- 9. Responsividade (Ajustes Cirúrgicos) --- */
@media (max-width: 768px) {
    /* 1. Faz o menu quebrar linha para não sumir da tela */
    .menu-nav { 
        flex-wrap: wrap; 
        padding: 5px 0;
    }

    .menu-nav a {
        font-size: 11px; /* Diminui a letra no celular */
        padding: 10px 12px;
    }

    /* 2. Ajusta o container para a logo não cobrir o título */
    .container { 
        width: 95%; 
        margin-top: 70px; /* Desce um pouco o quadro branco */
        padding: 60px 15px 20px 15px; 
    }

    /* 3. Diminui a logo no celular */
    .logo-flutuante {
        width: 110px;
        top: -60px; /* Posiciona ela melhor */
    }

    .titulo-principal {
        font-size: 22px; /* Diminui o título para não quebrar feio */
    }

    /* 4. Ajusta os placares para não ficarem apertados */
    .grid-placares { 
        grid-template-columns: 1fr; 
    }

    .time {
        font-size: 11px;
    }

    .placar-box {
        min-width: 50px;
        font-size: 13px;
        margin: 0 5px;
    }

    /* 5. Ajustes de títulos */
    h2, .data-titulo {
        text-align: center;
        border-left: none;
        border-bottom: 4px solid #ffca28;
        padding-left: 0;
    }

    .ranking-controls {
        flex-direction: column;
        padding: 0 20px;
    }

    .btn-filtro {
        width: 100%;
    }
}