:root {
    --cor-vermelho-escuro: #A62626;
    --cor-vermelho-claro: #D92E2E;
    --cor-azul-escuro: #0D47A1;
    --cor-azul-claro: #1976D2;
    --cor-laranja: #F27405;
    --cor-preto: #1A1A1A;
    --cor-cinza-fundo: #f0f2f5;
    --cor-cinza-texto: #333;
    --cor-branco: #ffffff;
    --sombra-card: 0 4px 12px rgba(0,0,0,0.1);
    --sombra-card-hover: 0 8px 20px rgba(0,0,0,0.15);
    --fonte-titulo: 'Roboto', sans-serif;
    --cor-sucesso: #28a745;
    --cor-aviso: #ffc107;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background-color: var(--cor-cinza-fundo);
    color: var(--cor-cinza-texto);
    line-height: 1.6;
    background-image: url('../bg.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body.modal-open { overflow: hidden; }

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* --- ESTILOS DO CABEÇALHO --- */
.site-header {
    background-color: rgba(6, 37, 83, 0.8);
    backdrop-filter: blur(10px);
    color: var(--cor-branco);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.logo { height: 50px; width: auto; border-radius: 8px; }
.site-header h1 { font-family: var(--fonte-titulo); font-size: 1.8rem; letter-spacing: 0.5px; margin: 0; font-weight: 700; }
.header-right { display: flex; align-items: center; gap: 12px; }
#welcome-message { font-weight: 500; font-size: 0.95rem; opacity: 0.9; }

/* --- BOTÕES DO CABEÇALHO --- */
#btn-manage-users, #btn-logout, #btn-show-login, #btn-show-register {
    background-color: transparent;
    border: 0px solid rgba(255, 255, 255, 0.5);
    color: var(--cor-branco);
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
}
#btn-manage-users:hover, #btn-logout:hover, #btn-show-login:hover, #btn-show-register:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* --- ESTILOS DAS PÁGINAS INTERNAS --- */
.page-content {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border-radius: 12px;
    position: relative; /* ADICIONE: Torna este o contêiner de referência */
    padding-top: 70px; /* ADICIONE: Cria espaço no topo para os botões */
}

.btn-back-home {
    display: inline-block;
    margin-bottom: 20px;
    background-color: var(--cor-cinza-fundo);
    color: var(--cor-cinza-texto);
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    position: absolute;
    top: 20px;
    left: 25px;
}
.btn-back-home:hover {
    background-color: #e2e8f0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border-bottom: 0px solid var(--cor-laranja);
    padding-bottom: 0px;
    margin-bottom: 0px;
}

.section-header h2 {
    font-family: var(--fonte-titulo);
    font-size: 1.5rem;
    color: var(--cor-preto);
    margin: 0;
    width: 100%; 
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translate(-50%, -50%); /* ALTERADO DE -50% PARA -60% */
    text-align: center;
    pointer-events: none; 
}

.event-section h2 {
    color: var(--cor-preto) !important;
    font-weight: 700;
    font-size: 1.5rem; /* Alterado para 1.5rem */
    border-bottom: 3px solid var(--cor-laranja);
    margin-bottom: 25px;
    padding-bottom: 8px;
    text-align: center; /* Adicionado */
}

/* --- GRELHA DE CARDS E CARDS --- */
.card-grid, .card-grid-home {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    position: relative;
    min-height: 150px;
    margin-bottom: 25px; /* ADICIONE ESTA LINHA */
}

.player-card, .championship-card, .ongoing-event-card {
    background-color: var(--cor-branco);
    border-radius: 12px;
    box-shadow: var(--sombra-card);
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

/* --- ADICIONADO: EMOJI DE FUNDO PARA OS CARDS DE EVENTOS E JOGADORES --- */
.championship-card::after, .player-card::after, .ongoing-event-card::after {
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 80px;
    color: var(--cor-laranja);
    opacity: 0.08;
    transform: rotate(-15deg);
    z-index: 0;
    pointer-events: none;
}

/* Define qual emoji usar para cada tipo de card */
.championship-card::after, .ongoing-event-card::after {
    content: '🏆';
}
.player-card::after {
    content: '🏀';
}

.player-card:hover, .championship-card:hover, .ongoing-event-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--sombra-card-hover);
}

.player-card { text-align: center; }
.championship-card, .ongoing-event-card { text-align: left; }
.championship-name { font-size: 1.5rem; font-weight: bold; color: var(--cor-azul-escuro); margin-bottom: 10px; }
.championship-info p { margin: 4px 0; color: #555; }

.card-actions {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
}
.card-actions button {
    font-size: 1.1rem;
    padding: 8px;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    color: var(--cor-cinza-texto);
    background-color: var(--cor-cinza-fundo);
    cursor: pointer;
    transition: all 0.2s;
}
.card-actions button:hover {
    background-color: var(--cor-azul-claro);
    color: var(--cor-branco);
    transform: translateY(-2px);
}
.btn-status-change {
    order: -1;
    margin-right: auto;
    border-radius: 6px;
    padding: 6px 14px;
    width: auto;
    height: auto;
    color: white;
}
.btn-status-change.start { background-color: var(--cor-sucesso); }
.btn-status-change.finish { background-color: #dc3545; }

.auth-container { display: none; align-items: center; justify-content: center; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.7); z-index: 2000; }
.auth-container.active { display: flex; }
.auth-box { width: 100%; max-width: 400px; padding: 40px; background: var(--cor-branco); box-shadow: var(--sombra-card); border-radius: 12px; text-align: center; position: relative; }
.login-logo { height: 90px; width: auto; display: block; margin: 0 auto 20px; }
.auth-box h2 { font-family: var(--fonte-titulo); font-size: 2.5rem; margin-bottom: 25px; color: var(--cor-preto); }
.auth-error { color: var(--cor-vermelho-escuro); margin-top: 15px; display: none; }
.auth-toggle-link { margin-top: 20px; font-size: 0.9rem; color: var(--cor-azul-claro); cursor: pointer; text-decoration: underline; font-weight: bold; }
.form-group label.inline-label { text-align: left; display: block; margin-bottom: 5px; font-weight: 600; }

.site-footer { text-align: center; padding: 20px; margin-top: 40px; background-color: var(--cor-preto); color: var(--cor-branco); }

.content-section { background-color: rgba(255, 255, 255, 0.95); backdrop-filter: blur(8px); padding: 25px; box-shadow: 0 10px 25px rgba(0,0,0,0.05); border: 1px solid rgba(255,255,255,0.2); margin-top: 0; border-radius: 12px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 25px; }
.btn { padding: 10px 20px; font-size: 0.95rem; font-weight: 600; border: none; border-radius: 8px; cursor: pointer; transition: all 0.2s ease-in-out; display: inline-flex; align-items: center; gap: 8px; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.15); }
.btn[disabled] { background-color: #ccc; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { background-color: var(--cor-laranja); color: var(--cor-branco); }

.admin-only, .logged-in-only, .logged-out-only { display: none; }
#admin-users-table-wrapper { display: block; overflow-x: auto; }
#admin-users-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
#admin-users-table th, #admin-users-table td { padding: 12px; border: 1px solid #ddd; text-align: left; white-space: nowrap; }
#admin-users-table th { background-color: var(--cor-cinza-fundo); }
.user-actions { display: flex; gap: 8px; align-items: center;}
.action-btn { background: none; border: none; font-size: 1.2rem; cursor: pointer; padding: 5px; }
.action-btn:hover { opacity: 0.7; }
.btn-delete { color: var(--cor-vermelho-escuro); }
.btn-ban { color: var(--cor-laranja); }
.btn-unban { color: var(--cor-sucesso); }
.role-toggle { padding: 5px 10px; border-radius: 5px; cursor: pointer; border: none; color: white; font-size: 0.8rem;}
.role-toggle.admin { background-color: var(--cor-sucesso); }
.role-toggle.jogador { background-color: var(--cor-aviso); color: var(--cor-preto); }
.role-toggle[disabled] { background-color: #aaa; cursor: not-allowed; }
.user-status.banned { color: var(--cor-vermelho-escuro); font-weight: bold; }
.player-card, .championship-card { background-color: var(--cor-branco); border-radius: 12px; box-shadow: var(--sombra-card); text-align: center; padding: 20px; cursor: pointer; transition: all 0.2s ease-in-out; position: relative; overflow: hidden; border: 1px solid #e2e8f0; }
.player-card { padding-bottom: 50px; }
.player-card:hover, .championship-card:hover { transform: translateY(-5px); box-shadow: var(--sombra-card-hover); }
.player-card .photo-container { width: 120px; height: 120px; margin: 0 auto 15px; border-radius: 50%; overflow: hidden; background-color: var(--cor-cinza-fundo); display: flex; align-items: center; justify-content: center; border: 4px solid var(--cor-branco); box-shadow: 0 0 10px rgba(0,0,0,0.1); }
.player-card .photo-container img { width: 100%; height: 100%; object-fit: cover; }
.player-card .photo-placeholder { font-size: 3rem; color: var(--cor-laranja); }
.player-card .player-name { font-weight: 600; font-size: 1.2rem; color: var(--cor-preto); }
.championship-card { text-align: left; display: flex; flex-direction: column; justify-content: space-between; }
.championship-card .championship-name { font-size: 1.5rem; font-weight: bold; color: var(--cor-azul-escuro); margin-bottom: 10px; }
.championship-card .championship-info p { margin: 4px 0; color: #555; }
.card-actions { position: static; bottom: auto; right: auto; display: flex; gap: 8px; background: none; backdrop-filter: none; padding: 0; border-radius: 0; opacity: 1; transition: opacity 0.2s ease-in-out; z-index: 5; justify-content: flex-end; align-items: center; margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.player-card.admin-view .card-actions { position: absolute; bottom: 10px; right: 10px; margin-top: 0; padding-top: 0; border-top: none; }
.card-actions button { font-size: 1.1rem; padding: 8px; border: none; border-radius: 50%; width: 36px; height: 36px; line-height: 1; color: var(--cor-cinza-texto); background-color: var(--cor-cinza-fundo); cursor: pointer; transition: background-color 0.2s, color 0.2s, transform 0.2s; display: flex; align-items: center; justify-content: center; }
.card-actions button:hover { background-color: var(--cor-azul-claro); color: var(--cor-branco); transform: translateY(-2px); }
.modal-backdrop { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.7); backdrop-filter: blur(5px); }
.modal { display: none; position: fixed; z-index: 1001; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 90%; max-width: 600px; animation: slideDown 0.3s ease-out; }
.modal-content { background-color: #fff; padding: 30px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); position: relative; max-height: 90vh; overflow-y: auto; }
@keyframes slideDown { from { transform: translate(-50%, -60%); opacity: 0; } to { transform: translate(-50%, -50%); opacity: 1; } }
.modal.active, .modal-backdrop.active { display: block; }
.close-button { position: absolute; top: 15px; right: 20px; font-size: 28px; font-weight: bold; cursor: pointer; border: none; background: none; z-index: 10; color: #555;}
.close-button:hover { color: var(--cor-vermelho-claro); }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; }
.form-group input, .form-group select { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 8px; font-size: 1rem; }
#preview-foto { max-width: 100px; height: 100px; object-fit: cover; border-radius: 50%; display: none; margin-top: 10px; }
#preview-foto.visible { display: block; }
#lista-jogadores-escalar { max-height: 300px; overflow-y: auto; border: 1px solid #eee; background-color: #fcfcfc; padding: 5px; border-radius: 8px; }
.checkbox-item { display: flex; align-items: center; padding: 10px 15px; margin-bottom: 5px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; transition: background-color 0.2s; }
.checkbox-item:hover { background-color: #f5f5f5; }
.checkbox-item input[type="checkbox"] { margin-right: 15px; width: 1.3em; height: 1.3em; cursor: pointer; }
.checkbox-item span { flex-grow: 1; }
#ficha-jogador { display: flex; gap: 20px; align-items: center; }
#ficha-jogador img, #ficha-jogador .placeholder { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.placeholder { background-color: var(--cor-cinza-fundo); display: flex; align-items: center; justify-content: center; font-size: 3rem; color: var(--cor-laranja); }
#escalacao-container { max-height: 40vh; overflow-y: auto; margin-top: 20px; }
.jogador-escalado { display: flex; align-items: center; padding: 10px; border-bottom: 1px solid #eee; }
.jogador-escalado img, .jogador-escalado .placeholder { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; margin-right: 15px; }

@media screen and (max-width: 768px) {

    .ranking-header {
    margin-bottom: 15px; /* Reduz o espaçamento inferior */
    padding-bottom: 10px;
    /* Removemos o flex-wrap para manter tudo na mesma linha */
}

/* Reduz o tamanho dos títulos dos controles */
.control-group label {
    font-size: 0.8rem;
    margin-bottom: 5px; /* Reduz espaço abaixo do label */
}

/* Compacta a seção de Filtros */
.ranking-controls {
    margin-bottom: 15px; /* Reduz o espaçamento inferior */
}

.ranking-controls .control-group label {
    font-size: 0.9rem; /* Reduz o tamanho da fonte do label "Filtro..." */
    margin-bottom: 8px; /* Reduz o espaço abaixo dele */
}

/* Compacta o título principal do Ranking */
#ranking-title {
    font-size: 1.3rem; /* Diminui drasticamente o tamanho da fonte */
    margin-bottom: 0px; /* Reduz o espaçamento inferior */
}

/* Ajusta o tamanho dos botões de filtro no mobile */
.btn-group .btn-category, .btn-group .btn-filter {
    padding: 6px 10px; /* Diminui o padding dos botões */
    font-size: 0.8rem;
}
    .container { padding: 10px; }
    .header-container { flex-wrap: wrap; justify-content: center; gap: 10px; padding: 0 10px;}
    .header-left { order: 1; }
    .header-right { order: 2; width: 100%; justify-content: center;}
    .logo { height: 40px; }
    .site-header h1 { font-size: 1.5rem; text-align: center; }
    #welcome-message { font-size: 0.8rem; text-align: right; }
    #btn-manage-users, #btn-logout, #btn-show-login, #btn-show-register { padding: 8px 12px; }
    .section-header { 
        gap: 10px; }
    .section-header h2 { 
        font-size: 1.3rem; }
    .content-section { padding: 15px; }
    .card-grid { grid-template-columns: 1fr; gap: 20px; }
    .modal-content { padding: 20px; }
    #ficha-jogador { flex-direction: column; }
    .auth-box { padding: 20px; }
    .auth-box h2 { font-size: 2rem; }
    .card-actions { bottom: 5px; right: 5px; }
    .card-actions button { width: 30px; height: 30px; font-size: 1rem; padding: 5px; }
}

@media screen and (max-width: 768px) {
    .container { padding: 10px; }
    .header-container { flex-wrap: wrap; justify-content: center; gap: 10px; padding: 0 10px;}
    .site-header h1 { font-size: 1.5rem; text-align: center; }
    .page-content, .section-header { padding: -15px; }
    .section-header h2 { font-size: 1.5rem; }
    .card-grid { grid-template-columns: 1fr; }
}


.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 12px;
}
.loading-overlay.active {
    display: flex;
}
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--cor-azul-claro);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.championship-type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--cor-laranja);
    color: var(--cor-branco);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}
.game-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 5px;
    background-color: #f7f7f7;
}
.game-list-item:hover {
    background-color: #efefef;
}
.game-list-item .btn-sm {
    padding: 4px 8px;
    background: white;
    border: 1px solid #ddd;
    color: #333;
}
.game-list-item .btn-sm:hover {
    background-color: var(--cor-azul-claro);
    color: white;
}
.score-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.score-input-group input {
    text-align: center;
    font-weight: bold;
}
.score-input-group span {
    font-size: 1.2rem;
    font-weight: bold;
}
.score-grid {
    display: grid;
    grid-template-columns: 30px 1fr 1fr;
    gap: 8px;
    align-items: center;
    text-align: center;
}
.score-grid span {
    font-weight: bold;
}
.score-grid input {
    text-align: center;
}
.player-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.player-stat-row label {
    flex-grow: 1;
}
.player-stat-row input {
    width: 100px;
    text-align: right;
}
.tab-like-nav {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 15px;
}
.tab-like-btn {
    padding: 10px 15px;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: #888;
    border-bottom: 3px solid transparent;
}
.tab-like-btn.active {
    color: var(--cor-azul-escuro);
    border-bottom-color: var(--cor-azul-escuro);
}
.tab-like-content {
    display: none;
}
.tab-like-content.active {
    display: block;
}
.jogo-realizado-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.resultado { font-weight: bold; }
.resultado.vitoria { color: var(--cor-sucesso); }
.resultado.derrota { color: var(--cor-vermelho-escuro); }
.resultado.empate { color: var(--cor-cinza-texto); }

.classificacao-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
.classificacao-table th, .classificacao-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}
.classificacao-table th { background-color: #f7f7f7; }
.classificacao-table td:first-child, .classificacao-table td:nth-child(3), .classificacao-table td:nth-child(4) {
    text-align: center;
}
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    background-color: var(--cor-cinza-fundo);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    gap: 15px;
}

.leaderboard-rank {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--cor-cinza-texto);
    min-width: 25px;
    text-align: center;
}

.leaderboard-player-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--cor-branco);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.leaderboard-player-photo.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background-color: #d1d5db;
    color: var(--cor-branco);
}

.leaderboard-player-info {
    flex-grow: 1;
}

.leaderboard-player-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--cor-azul-escuro);
}

.leaderboard-player-stats {
    display: flex;
    gap: 20px;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--cor-preto);
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
}
.jogo-realizado-item strong {
    color: var(--cor-preto);
}
.modal-xl {
    max-width: 900px;
}

#painel-jogo-titulo {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.painel-aovivo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 15px;
}

.col-placar {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.col-placar h3, .col-registro h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.placar-display {
    font-size: 5rem;
    font-weight: bold;
    color: var(--cor-preto);
    background-color: var(--cor-cinza-fundo);
    width: 100%;
    text-align: center;
    padding: 20px 0;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
}

.botoes-placar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
}

.btn-placar {
    padding: 15px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-placar.add {
    background-color: var(--cor-sucesso);
    color: white;
}
.btn-placar.add:hover {
    background-color: #218838;
}

.btn-placar.remove {
    background-color: var(--cor-vermelho-claro);
    color: white;
    grid-column: 1 / -1;
}
.btn-placar.remove:hover {
    background-color: #c82333;
}

.registro-cestas {
    height: 300px;
    overflow-y: auto;
    background: #fdfdfd;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 8px;
}

.cesta-item {
    padding: 8px;
    border-bottom: 1px solid #f0f0f0;
}
.cesta-item:last-child {
    border-bottom: none;
}

.game-item-actions {
    display: flex;
    gap: 5px;
}
.saldo-cestas {
    display: flex;
    justify-content: space-around;
    background: #f7f7f7;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}
.saldo-item {
    text-align: center;
    font-size: 1.1rem;
}
.saldo-item strong {
    display: block;
    font-size: 1.8rem;
    color: var(--cor-azul-escuro);
}
.distribuicao-jogador-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}
.botoes-distribuicao button {
    margin-left: 5px;
    width: 40px;
    height: 30px;
    font-weight: bold;
    cursor: pointer;
}
.botoes-distribuicao button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.section-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
}
.section-header-inline h3 {
    margin: 0;
}
.painel-aovivo-grid {
    display: grid;
    grid-template-columns: 1fr 180px 1fr;
    gap: 20px;
    margin-top: 15px;
}

.col-placar.adversario {
    border-left: 1px solid #eee;
    border-right: 1px solid #eee;
    padding: 0 20px;
}

.placar-display.adversario {
    font-size: 4rem;
    padding: 10px 0;
    margin-bottom: 15px;
    background-color: #fff;
}

.col-placar.adversario .botoes-placar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
}
.jogo-realizado-item.clickable {
    cursor: pointer;
    transition: background-color 0.2s;
}
.jogo-realizado-item.clickable:hover {
    background-color: #f5f5f5;
}
.jogo-realizado-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.jogo-info {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 15px;
}
.btn-painel-jogo-view {
    background: none;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.btn-painel-jogo-view:hover {
    background-color: var(--cor-azul-claro);
    color: white;
}
#ver-jogo-header {
    text-align: center;
    margin-bottom: 15px;
}
#ver-jogo-header h2 {
    margin: 0;
}

#jogo-estatisticas-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.stat-jogador-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f9f9f9;
    padding: 8px 12px;
    border-radius: 6px;
}
.stat-jogador-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}
.stat-jogador-info img, .stat-jogador-info .placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.stat-jogador-pontos {
    display: flex;
    align-items: center;
    gap: 15px;
}
.stat-jogador-pontos span {
    display: inline-block;
    text-align: center;
    font-size: 0.9rem;
    min-width: 20px;
    padding: 2px 4px;
    border-radius: 4px;
    background-color: #e9ecef;
}
.stat-jogador-pontos strong {
    font-size: 1.1rem;
    min-width: 60px;
    text-align: right;
}
.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    font-weight: bold;
    color: #666;
    border-bottom: 2px solid #eee;
    margin-bottom: 5px;
}

.header-jogador {
    flex: 1;
    text-align: left;
}

.stat-jogador-item, .stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-jogador-info, .header-jogador {
    flex-grow: 1;
}
.stat-jogador-pontos, .header-pontos {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
    width: 220px;
    justify-content: flex-end;
}
.stat-jogador-pontos span, .header-pontos span {
    width: 35px;
    text-align: center;
    font-size: 0.9rem;
    padding: 2px 4px;
    border-radius: 4px;
    background-color: #e9ecef;
}
.header-pontos span {
    background-color: transparent;
    font-weight: bold;
}

.stat-jogador-pontos strong, .header-pontos strong {
    width: 60px;
    text-align: right;
    font-size: 1.1rem;
}
.game-item-actions-view {
    display: flex;
    gap: 5px;
    align-items: center;
}

.game-item-actions-view button {
    background: none;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1.1rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-item-actions-view button:hover {
    background-color: var(--cor-azul-claro);
    color: white;
}
.painel-aovivo-grid, .col-placar, .botoes-placar, .placar-display {
    all: unset;
    display: block;
}
#tab-painel-aovivo {
    padding: 10px;
}

.painel-scoreboard {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: var(--cor-preto);
    color: var(--cor-branco);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 20px;
}
.team-score {
    text-align: center;
    flex: 1;
}
.team-name {
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}
.score-display {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
}

.painel-controls-grid {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 25px;
}
.team-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.botoes-placar-pontos {
    display: flex;
    gap: 10px;
}

.btn-placar {
    flex-grow: 1;
    padding: 15px 10px;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.btn-placar:active {
    transform: translateY(2px);
    box-shadow: none;
}
.btn-placar.add {
    background-color: var(--cor-sucesso);
    color: white;
}
.btn-placar.remove {
    background-color: var(--cor-vermelho-claro);
    color: white;
}

.painel-log-section {
    margin-top: 15px;
}
.painel-log-section h3 {
    margin-bottom: 5px;
    font-size: 1.2rem;
}
.registro-cestas {
    height: 200px;
    overflow-y: auto;
    background: #fdfdfd;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 8px;
}
.cesta-item {
    padding: 8px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}
.cesta-item:last-child {
    border-bottom: none;
}

@media screen and (min-width: 768px) {
    #tab-painel-aovivo {
        display: grid;
        grid-template-columns: 2fr 1fr;
        grid-template-rows: auto 1fr;
        gap: 20px 30px;
        align-items: flex-start;
    }
    .painel-scoreboard {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }
    .painel-controls-grid {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
    }
    .painel-log-section {
        grid-column: 2 / 3;
        grid-row: 1 / 3;
        margin-top: 0;
    }
    .registro-cestas {
        height: 100%;
        max-height: 450px;
    }
    .team-name {
        font-size: 1.2rem;
    }
    .score-display {
        font-size: 4.5rem;
    }
}
.tab-like-container, .tab-like-nav, .tab-like-btn, .tab-like-content {
    all: unset;
    display: block;
}
.painel-divisor {
    border: none;
    border-top: 2px solid #eee;
    margin: 25px 0;
}
@media screen and (min-width: 768px) {
    #painel-jogo-container {
        display: flex;
        flex-direction: column;
    }
    .painel-secao-aovivo {
        grid-column: 1 / 2;
    }
    .painel-log-section {
        grid-column: 2 / 3;
        grid-row: 1 / 3;
    }
    .painel-secao-distribuicao {
        grid-column: 1 / 2;
    }
    .registro-cestas {
        height: 100%;
        max-height: 600px;
    }
}
.tab-like-content {
    display: none;
}

.tab-like-content.active {
    display: block;
}
.tab-like-nav {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 15px;
}

.tab-like-btn {
    padding: 10px 15px;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: #888;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease-in-out;
}

.tab-like-btn:hover {
    color: var(--cor-azul-escuro);
}

.tab-like-btn.active {
    color: var(--cor-azul-escuro);
    border-bottom-color: var(--cor-azul-escuro);
}
.btn-placar {
    touch-action: manipulation;
}
.distribuicao-jogador-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.botoes-distribuicao {
    display: flex;
    flex-wrap: nowrap;
    flex-shrink: 0;
}
.card-grid {
    position: relative;
    min-height: 150px;
}

.grid-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--cor-azul-claro);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
#instagram-feed-container {
    width: 100%;
    margin-top: 20px;
}

.section-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}
#instagram-feed-container {
    margin-top: 0;
}
@media screen and (max-width: 768px) {
    #grid-jogadores.card-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    .player-card {
        padding: 15px;
        padding-bottom: 45px;
    }

    .player-card .photo-container {
        width: 90px;
        height: 90px;
    }
    
    .player-card .player-name {
        font-size: 1rem;
    }
}
.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1.1rem;
    text-align: center;
}

.event-type-selection {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.event-type-btn {
    width: 100%;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    background-color: #fcfcfc;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.event-type-btn:hover {
    border-color: var(--cor-azul-claro);
    background-color: #f5f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.event-type-btn h4 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    color: var(--cor-azul-escuro);
}

.event-type-btn p {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
}
#secao-gerenciar-times > label {
    display: block;
    width: 100%;
}

#lista-de-times {
    margin-bottom: 10px;
}

#lista-jogadores-escalar-time {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #eee;
    padding: 5px;
    border-radius: 8px;
}
#times-container-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.time-item-view {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.time-item-view h4 {
    margin: 0 0 5px 0;
    color: var(--cor-azul-escuro);
}

.time-item-view p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}
.time-item-view.clickable {
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.time-item-view.clickable:hover {
    background-color: #f0f4f8;
    border-color: var(--cor-azul-claro);
}

.time-roster-view {
    display: none;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
    text-align: left;
}

.time-item-view.expanded .time-roster-view {
    display: block;
}

.time-roster-view h5 {
    margin: 0 0 8px 0;
    font-size: 1rem;
}

.jogador-no-elenco {
    font-size: 0.9rem;
    padding: 4px 0;
    color: #333;
}
.time-roster-view, .time-item-view.expanded {
    display: none !important;
}
#ver-time-nome {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

#ver-time-elenco-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 60vh;
    overflow-y: auto;
}
.section-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.section-header-inline h3 {
    margin: 0;
}
#painel-distribuicao-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.distribuicao-coluna {
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 8px;
}

.distribuicao-coluna h3 {
    text-align: center;
    margin-top: 0;
}
.header-pontos, .stat-jogador-pontos {
    width: auto;
    min-width: 220px;
}
#jogos-internos-container .jogo-realizado-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#preview-logo-time {
    display: none;
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    margin-top: 10px;
    border: 2px solid #eee;
}
.game-list-item .item-logo, .game-list-item .item-logo-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
    flex-shrink: 0;
}
.game-list-item .item-logo {
    object-fit: cover;
}
.game-list-item .item-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--cor-cinza-fundo);
    font-size: 1.5rem;
}
.time-item-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.time-item-view .item-logo, .time-item-view .item-logo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}
.time-item-view .item-logo {
    object-fit: cover;
}
.time-item-view .item-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--cor-cinza-fundo);
    font-size: 2.5rem;
}
.jogo-realizado-item .jogo-info {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.jogo-info .team-name {
    flex: 1;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jogo-info .team-a {
    text-align: left;
}

.jogo-info .team-b {
    text-align: right;
}

.jogo-info .score {
    flex-shrink: 0;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--cor-azul-escuro);
}
@media screen and (max-width: 768px) {
    .stat-jogador-item .stat-jogador-info {
        gap: 8px;
    }
    .stat-jogador-info span {
        font-size: 0.9rem;
    }
    .stat-jogador-info img, .stat-jogador-info .placeholder {
        width: 35px;
        height: 35px;
    }
    .header-pontos, .stat-jogador-pontos {
        gap: 8px;
        min-width: 0;
        width: auto;
        flex: 1;
        justify-content: flex-end;
    }
    .header-pontos span, .stat-jogador-pontos span {
        width: auto;
        min-width: 25px;
    }
    .header-pontos strong, .stat-jogador-pontos strong {
        width: auto;
        min-width: 50px;
    }
}
.jogo-info .team-name {
    font-size: 1rem;
    font-weight: 500; 
    color: var(--cor-preto);
}

.jogo-info .score {
    font-size: 1.15rem; 
    font-weight: 700;
}
.jogo-realizado-item .jogo-info {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    gap: 10px;
}

.jogo-info .team-name {
    font-size: 0.95rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jogo-info .team-a {
    text-align: left;
}

.jogo-info .team-b {
    text-align: right;
}

.jogo-info .score {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cor-azul-escuro);
    white-space: nowrap;
}
@media screen and (max-width: 768px) {
    .stat-jogador-item .stat-jogador-info {
       flex: 1;
       min-width: 0;
    }
    
    .stat-jogador-info span {
        font-size: 1rem;
    }
    .stat-jogador-item .stat-jogador-pontos {
        flex-shrink: 0; 
        justify-content: flex-end;
        gap: 12px;
    }
    .header-pontos span, .stat-jogador-pontos span {
        flex-basis: 28px;
        text-align: center;
    }
    .header-pontos strong, .stat-jogador-pontos strong {
        flex-basis: 65px;
        text-align: right;
    }
}
.championship-type-badge.badge-5x5 {
    background-color: var(--cor-laranja);
}
.championship-type-badge.badge-3x3 {
    background-color: var(--cor-azul-claro);
}
@media screen and (max-width: 768px) {
    #painel-distribuicao-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
.section-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
}
.section-header-inline h3 {
    margin: 0;
}
.modal-painel-jogo.view-only-mode .painel-controls-grid,
.modal-painel-jogo.view-only-mode #painel-distribuicao-container,
.modal-painel-jogo.view-only-mode .painel-divisor {
    display: none;
}
.painel-divisor {
    border: none;
    border-top: 2px solid #eee;
    margin: 25px 0;
}
.jogo-realizado-item .jogo-info {
    flex-grow: 1;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    gap: 10px;
}

.jogo-info .team-name {
    font-size: 1rem;
    font-weight: 500; 
    color: var(--cor-preto);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.jogo-info .team-a {
    text-align: left;
}
.jogo-info .team-b {
    text-align: right;
}
.jogo-info .score {
    font-size: 1.15rem; 
    font-weight: 700;
    white-space: nowrap;
}
.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    font-weight: bold;
    color: #666;
    border-bottom: 2px solid #eee;
    margin-bottom: 5px;
}

.header-jogador {
    flex: 1;
    text-align: left;
}

.header-pontos, .stat-jogador-pontos {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    flex-shrink: 0;
}
@media screen and (max-width: 768px) {

    
    #painel-distribuicao-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .stat-jogador-item .stat-jogador-info {
       flex: 1;
       min-width: 0;
       gap: 8px;
    }
    .stat-jogador-info span {
        font-size: 0.9rem;
    }
    .stat-jogador-info img, .stat-jogador-info .placeholder {
        width: 35px;
        height: 35px;
    }
    .header-pontos, .stat-jogador-pontos {
        gap: 8px;
        min-width: 0;
        width: auto;
        flex: 1;
    }
    .header-pontos span, .stat-jogador-pontos span {
        flex-basis: 28px;
        text-align: center;
    }
    .header-pontos strong, .stat-jogador-pontos strong {
        flex-basis: 65px;
        text-align: right;
    }
}
.modal-painel-jogo.view-only-mode .painel-controls-grid,
.modal-painel-jogo.view-only-mode #painel-distribuicao-container,
.modal-painel-jogo.view-only-mode .painel-divisor {
    display: none;
}
.modal-painel-jogo.view-only-mode .painel-layout-grid {
    display: block;
}
.modal-painel-jogo.view-only-mode .painel-log-section {
    margin-top: 25px;
}
.painel-layout-grid {
    display: block;
}
.painel-log-section {
    margin-top: 25px;
}
@media screen and (min-width: 769px) {
    .modal-painel-jogo:not(.view-only-mode) .painel-layout-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 30px;
        align-items: flex-start;
    }
    .modal-painel-jogo:not(.view-only-mode) .painel-log-section {
        margin-top: 0;
        height: 100%;
    }
}
.game-date-header {
    background-color: var(--cor-azul-escuro);
    color: var(--cor-branco);
    padding: 8px 12px;
    margin-top: 20px;
    margin-bottom: 10px;
    border-radius: 6px;
    font-weight: bold;
    text-align: center;
    font-size: 1.1rem;
}

.game-date-header:first-child {
    margin-top: 0;
}
#tab-eventos .event-section h2 {
    color: var(--cor-preto) !important;
    font-weight: 700;
    font-size: 1.6rem;
    border-bottom: 3px solid var(--cor-laranja);
    margin-bottom: 25px;
    padding-bottom: 8px;
}
.card-actions button.btn-edit-camp,
.card-actions button.btn-delete-camp {
    background-color: transparent;
}
.btn-status-change {
    order: -1;
    margin-right: auto;
}
.btn-status-change.start,
.btn-status-change.finish {
    border-radius: 6px;
    padding: 6px 14px;
    width: auto;
    height: auto;
}
.stats-divisor {
    border: none;
    border-top: 2px solid #eee;
    margin: 20px 0;
}

#stats-resumo-carreira {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.stat-summary-item .stat-summary-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--cor-azul-escuro);
}

.stat-summary-item .stat-summary-label {
    font-size: 0.9rem;
    color: #666;
}

#stats-por-evento h3 {
    margin-bottom: 10px;
}

.event-stats-item {
    border: 1px solid #eee;
    border-radius: 6px;
    margin-bottom: 8px;
    overflow: hidden;
}

.event-stats-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    background-color: #fcfcfc;
    list-style: none;
}
.event-stats-item summary::-webkit-details-marker {
    display: none;
}

.event-stats-item summary:hover {
    background-color: #f5f5f5;
}

.summary-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.event-stats-name {
    font-weight: 600;
}

.event-modality-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--cor-branco);
}
.event-modality-badge.badge-5x5 { background-color: var(--cor-laranja); }
.event-modality-badge.badge-3x3 { background-color: var(--cor-azul-claro); }


.event-stats-item .event-stats-total {
    font-weight: bold;
    color: var(--cor-preto);
}

.event-stats-details {
    padding: 15px;
    background-color: #fff;
    border-top: 1px solid #eee;
}

.event-stats-details p {
    margin: 0 0 5px 0;
}

.modal-loader-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    text-align: center;
    color: #666;
}
.modal-loader-container .spinner {
    width: 50px;
    height: 50px;
    border-width: 5px;
    margin-bottom: 15px;
}

.btn-status-change.start,
.btn-status-change.finish {
    border-radius: 6px;
    padding: 6px 14px;
    width: auto;
    height: auto;
}

.btn-status-change.start {
    background-color: #28a745;
    color: var(--cor-branco);
}

.btn-status-change.finish {
    background-color: #dc3545;
    color: var(--cor-branco);
}

#btn-abrir-modal-evento {
    position: absolute;
    top: 20px;
    right: 25px;
}

#btn-abrir-modal-jogador {
    position: absolute;
    top: 20px;
    right: 25px;
}

/* Estilos para a Página de Ranking Global */

.ranking-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background-color: #f8f9fa;
    padding: 0px;
    border-radius: 8px;
    margin-bottom: 25px;
    align-items: flex-end;
    margin-top: -10px; /* ADICIONE ESTA LINHA */

}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.control-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
}

.btn-group {
    display: flex;
}

.btn-group .btn {
    border-radius: 0;
    background-color: var(--cor-branco);
    color: var(--cor-cinza-texto);
    border: 1px solid #ddd;
}

.btn-group .btn:first-child {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.btn-group .btn:last-child {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    border-right: 1px solid #ddd;
}

.btn-group .btn.active {
    background-color: var(--cor-azul-escuro);
    color: var(--cor-branco);
    border-color: var(--cor-azul-escuro);
}

.ranking-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.ranking-table th, .ranking-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.ranking-table th {
    background-color: #f7f7f7;
    font-weight: 600;
}

.ranking-table td:first-child, .ranking-table td:nth-child(3) {
    font-weight: bold;
}

.ranking-table tbody tr:hover {
    background-color: #fcfcfc;
}

/* Estilos para a nova célula de jogador na tabela de ranking */

.ranking-table .player-col {
    text-align: left !important;
}

.ranking-table .player-cell {
    display: flex;
    align-items: center;
    gap: 15px;
}

.player-photo-ranking {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0; /* Impede que a imagem encolha */
}

.player-photo-ranking.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eee;
    font-size: 1.5rem;
}

.ranking-table .main-stat {
    font-weight: bold;
    font-size: 1.2rem;
    text-align: center;
}

/* Estilos para o novo cabeçalho da página de ranking */
.ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--cor-laranja);
}

/* Ajusta o contêiner de filtros para ficar centralizado */
.ranking-controls {
    justify-content: center;
    background-color: transparent;
    padding: 0;
}

.ranking-controls .control-group {
    align-items: center;
}

.ranking-controls .control-group label {
    font-size: 1rem;
    margin-bottom: 10px;
}

/* Reordena as seções do Painel de Jogo */
#painel-jogo-container {
    display: flex;
    flex-direction: column;
}

.painel-layout-grid {
    display: contents; /* Remove o container do fluxo, "promovendo" seus filhos */
}

/* Define a nova ordem visual dos elementos */
.painel-secao-aovivo { order: 1; }
#painel-distribuicao-container { order: 2; }
.painel-divisor { order: 3; }
.painel-log-section { order: 4; }


/* Unifica o estilo do placar do modal "Ver Jogo" */

#ver-jogo-header {
    background-color: var(--cor-preto);
    color: var(--cor-branco);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
    text-align: center;
}

#ver-jogo-header h2 {
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin: 0 0 5px 0;
}

#ver-jogo-header .placar-final {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--cor-branco); /* Garante que o texto do placar seja branco */
}