/* --- Configurações Gerais --- */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    background-color: #f4f4f9;
    color: #333;
}

/* --- Cabeçalho e Menu do Usuário --- */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1.5rem 1rem;
    text-align: center;
}
.header-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 1.5rem;
}
.header-logo img {
    height: 60px;
    width: auto;
}
.header-title h1 {
    margin: 0;
    font-size: clamp(1.8rem, 5vw, 2.2rem);
    text-align: left;
}
.menu-usuario {
    background: rgba(255,255,255,0.1);
    padding: 0.8rem 1rem;
    text-align: right;
    border-top: 1px solid rgba(255,255,255,0.2);
}
.menu-usuario span {
    color: #ecf0f1;
    margin-right: 1rem;
    font-weight: bold;
}
.menu-usuario a {
    color: #F1C40F;
    text-decoration: none;
    font-weight: bold;
    margin-left: 1rem;
    padding: 0.5rem 0.8rem;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}
.menu-usuario a:hover {
    background-color: #F1C40F;
    color: #2c3e50;
}

/* --- Layout Principal e Títulos de Página --- */
main, .page-container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1rem;
}
.page-container h2, main > h2, .rodada > h2 {
    text-align: center;
    font-size: 2rem;
    color: #34495e;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 1rem;
}

/* --- Formulários (Login, Cadastro, Trocar Senha) --- */
.form-card {
    max-width: 500px;
    margin: 2rem auto;
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.form-card h2 {
    text-align: center;
    font-size: 1.8rem;
    color: #34495e;
    margin-top: 0;
    margin-bottom: 2rem;
    border: none;
}
.form-card .form-group {
    margin-bottom: 1.2rem;
}
.form-card label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #555;
}
.form-card input[type="text"],
.form-card input[type="email"],
.form-card input[type="password"] {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box;
}
.form-card button {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 5px;
    background-color: #27ae60;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}
.form-card p {
    text-align: center;
    margin-top: 1.5rem;
}
.erros, .sucesso {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 5px;
    text-align: center;
    color: white;
}
.erros { background-color: #e74c3c; }
.sucesso { background-color: #2ecc71; }

/* --- Card de Palpites (Página Inicial) --- */
main > .rodada {
    max-width: 800px;
    margin: 2rem auto;
}
.card-jogo { background-color: white; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); margin-bottom: 2rem; padding: 1.5rem; overflow: hidden; }
.info-jogo { display: flex; justify-content: space-around; align-items: center; font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; }
.info-jogo img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.info-jogo .vs { color: #e74c3c; font-size: 1rem; }
.data-jogo { text-align: center; font-size: 0.9rem; color: #6c757d; margin-bottom: 1.5rem; }
.form-palpites { border-top: 1px solid #eee; margin-top: 1.5rem; padding-top: 1.5rem; }
.palpite-section { margin-bottom: 1.5rem; }
.section-title { display: block; font-weight: bold; color: #34495e; margin-bottom: 1rem; font-size: 1.1rem; }
.radio-btn-group-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.radio-btn-group-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio-btn-input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-btn-label { padding: 0.8rem; border: 1px solid #ddd; border-radius: 5px; cursor: pointer; transition: all 0.2s ease-in-out; background-color: #f8f9fa; color: #333; text-align: center; font-weight: 500; }
.radio-btn-input:checked + .radio-btn-label { background-color: #3498db; color: white; border-color: #2980b9; font-weight: bold; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.palpite-placar-exato { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed #ddd; display: flex; justify-content: center; align-items: center; gap: 1rem; }
.palpite-placar-exato input { width: 60px; height: 40px; font-size: 1.5rem; text-align: center; border: 1px solid #ccc; border-radius: 5px; }
.palpite-placar-exato span { font-size: 1.5rem; font-weight: 700; }
.sub-section-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.sub-section-title { font-weight: 500; color: #555; margin-bottom: 0.5rem; font-size: 0.9rem; }
.palpite-item { margin-top: 1.5rem; }
.palpite-item:first-child { margin-top: 0; }
.palpite-item label { display: block; margin-bottom: 0.5rem; font-weight: bold; color: #555; }
.palpite-item select { width: 100%; padding: 0.8rem; border: 1px solid #ccc; border-radius: 5px; font-size: 1rem; background-color: #fff; }
.card-jogo.bloqueado { background-color: #f8f9fa; opacity: 0.7; }
.aviso-bloqueado { text-align: center; padding: 2rem; font-size: 1.2rem; font-weight: bold; color: #c0392b; background-color: #fdf2f2; border-radius: 5px; }
.enviar-palpites { text-align: center; margin-top: 2rem; }
.enviar-palpites button { background-color: #27ae60; color: white; border: none; padding: 1rem 2rem; font-size: 1.2rem; font-weight: 700; border-radius: 5px; cursor: pointer; transition: background-color 0.3s; }
.enviar-palpites button.enviado { background-color: #28a745; cursor: not-allowed; }
.aviso-login { text-align: center; padding: 2rem; background: #fff3cd; border: 1px solid #ffeeba; border-radius: 8px; margin-top: 2rem; }

/* --- Página de Perfil e Tabelas --- */
.perfil-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
.perfil-grid .card { background: white; padding: 1.5rem; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); margin-bottom: 0; }
.perfil-grid .card h3 { margin-top: 0; border-bottom: 2px solid #ecf0f1; padding-bottom: 1rem; margin-bottom: 1rem; }
table { width: 100%; border-collapse: collapse; }
.table-responsive { display: block; width: 100%; overflow-x: auto; }
th, td { padding: 0.8rem; text-align: left; border-bottom: 1px solid #ddd; vertical-align: middle; white-space: nowrap; }
thead { background-color: #f8f9fa; }
.minha-posicao { background-color: #f1c40f !important; font-weight: bold; }
.minha-posicao td { color: #2c3e50 !important; }
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.6); }
.modal-content { background-color: #fefefe; margin: 10% auto; padding: 20px; border: 1px solid #888; width: 90%; max-width: 500px; border-radius: 8px; position: relative; }
.modal-content h3 { margin-top: 0; }
.modal-content p { font-size: 1.1rem; border-bottom: 1px solid #eee; padding-bottom: 1rem; margin-bottom: 1rem; }
.modal-content ul { list-style-type: none; padding: 0; }
.modal-content li { margin-bottom: 0.8rem; font-size: 1rem; }
.btn-detalhes { background-color: #3498db; color: white; border: none; padding: 0.5rem 1rem; font-size: 0.9rem; border-radius: 5px; cursor: pointer; }
.tabs-ranking { overflow: hidden; border-bottom: 2px solid #ccc; margin-bottom: 1rem; }
.tab-link { background-color: inherit; float: left; border: none; outline: none; cursor: pointer; padding: 14px 16px; transition: 0.3s; font-size: 1rem; font-weight: bold; color: #555; }
.tab-link.active { background-color: #fff; color: #2c3e50; border-bottom: 2px solid #2c3e50; margin-bottom: -2px; }
.tab-content { display: none; padding: 6px 0; }
.select-partida { width: 100%; padding: 0.8rem; border: 1px solid #ccc; border-radius: 5px; font-size: 1rem; margin-bottom: 1rem; }
.acerto { color: #27ae60; font-weight: bold; margin-right: 8px; font-size: 1.2rem; }
.erro { color: #e74c3c; font-weight: bold; margin-right: 8px; font-size: 1.2rem; }
/* --- MUDANÇA: Estilo para o texto "Aguardando" --- */
.aguardando { font-style: italic; color: #777; font-size: 0.9rem; }

/* --- Página de Jogos, Classificação e Estatísticas --- */
.secao-partidas { margin-top: 3rem; }
.tabela-jogos-container { background-color: #fff; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); overflow: hidden; margin-bottom: 1.5rem; }
.tabela-rodada-header { background-color: #f8f9fa; color: #34495e; font-weight: bold; padding: 0.8rem 1rem; border-bottom: 1px solid #dee2e6; }
.tabela-jogo-item { display: flex; flex-wrap: wrap; align-items: center; padding: 1rem; border-bottom: 1px solid #f0f0f0; }
.tabela-jogos-container .tabela-jogo-item:last-child { border-bottom: none; }
.confronto-principal { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.jogo-time-casa, .jogo-time-visitante { display: flex; align-items: center; gap: 10px; font-weight: 500; flex-basis: 42%; }
.jogo-time-casa { justify-content: flex-end; }
.jogo-time-visitante { justify-content: flex-start; }
.escudo-tabela { width: 24px; height: 24px; object-fit: contain; }
.jogo-placar-info { flex-basis: 16%; text-align: center; }
.placar-final { font-weight: bold; font-size: 1.2rem; background-color: #f8f9fa; padding: 5px 15px; border-radius: 5px; white-space: nowrap; }
.jogo-data { font-size: 0.8rem; color: #6c757d; text-align: center; width: 100%; margin-top: 0.5rem; }
.eventos-detalhes { font-size: 0.8rem; color: #555; margin-top: 10px; padding-top: 10px; border-top: 1px solid #f0f0f0; text-align: center; width: 100%; }
.eventos-detalhes .evento-item { display: inline-block; margin: 0 10px; }
.icone-gol { color: #27ae60; margin-right: 5px; }
.cartao-amarelo, .cartao-vermelho { display: inline-block; width: 8px; height: 12px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.cartao-amarelo { background-color: #f1c40f; }
.cartao-vermelho { background-color: #e74c3c; }

.campeonato-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
.tabela-classificacao-container { overflow-x: auto; background-color: #fff; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
.tabela-classificacao-container .clube { display: flex; align-items: center; gap: 10px; font-weight: bold; text-align: left; }
.tabela-classificacao-container .clube .escudo-tabela { flex-shrink: 0; }
.card-estatisticas { background: #fff; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
.tabs-estatisticas { display: flex; border-bottom: 1px solid #dee2e6; }
.tab-link-estatisticas { background: none; border: none; cursor: pointer; padding: 1rem; font-size: 0.9rem; font-weight: bold; color: #6c757d; border-bottom: 3px solid transparent; flex-grow: 1; }
.tab-link-estatisticas.active { color: #2c3e50; border-bottom-color: #2980b9; }
.stat-content { display: none; padding: 1rem; max-height: 250px; overflow-y: auto; }
.stat-content.active { display: block; }
.stat-jogador { display: flex; align-items: center; gap: 10px; padding: 0.5rem 0; border-bottom: 1px solid #f0f0f0; }
.stat-jogador:last-child { border-bottom: none; }
.stat-jogador img { width: 30px; height: 30px; border-radius: 50%; }

/* --- Galeria --- */
.galeria-container { display: flex; flex-direction: column; gap: 2.5rem; }
.post-card { background-color: #fff; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); overflow: hidden; max-width: 60%; margin: 0 auto; }
@media (max-width: 768px) { .post-card { max-width: 100%; } }
.post-media img, .post-media video { width: 100%; height: auto; display: block; }
.post-info { padding: 1.5rem; }

/* --- RESPONSIVIDADE --- */
@media (max-width: 900px) {
    .perfil-grid, .campeonato-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 600px) {
    .header-title h1 { text-align: center; }
    .sub-section-grid { grid-template-columns: 1fr; }
    
    .tabela-jogo-item { padding: 1rem 0.5rem; }
    .confronto-principal { font-size: 0.9rem; }
    .jogo-time-casa, .jogo-time-visitante { flex-basis: 0; flex-grow: 1; gap: 8px; }
    .jogo-placar-info { flex-grow: 0; padding: 0 5px; }
    .placar-final { font-size: 1.1rem; }
    .jogo-time-casa { justify-content: flex-start; }
    .jogo-time-visitante { justify-content: flex-end; }
}

/* --- Rodapé --- */
footer {
    max-width: 800px;
    margin: 2rem auto 0;
    text-align: center;
    padding: 1.5rem;
    color: #777;
    border-top: 1px solid #e0e0e0;
}