body { margin: 0; overflow: hidden; background-color: #87CEEB; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
canvas { display: block; }

/* PLACAR ESTILO TV */
#tv-scoreboard {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(15, 15, 15, 0.9);
    color: white;
    padding: 10px;
    border-radius: 2px;
    border-left: 5px solid #ffd700;
    box-shadow: 0 4px 10px rgba(0,0,0,0.8);
    z-index: 1000;
    min-width: 240px;
    pointer-events: none;
    user-select: none;
}

.scoreboard-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
    padding: 2px 5px;
}

.logo-equipe {
    width: 24px;         /* Tamanho proporcional ao seu placar de 240px */
    height: 24px;
    margin-right: 10px;  /* Espaço entre a logo e o nome */
    object-fit: contain; /* Não distorce a imagem */
    background-color: #333; /* Fundo escuro enquanto carrega */
    border: 1px solid rgba(255,255,255,0.2);
    display: block;      /* Garante que ela seja tratada como bloco no flex */
}

.team-info {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

/* Se você não for mais usar as cores, pode remover ou comentar a .color-boxes */
.color-boxes { display: none; }

.box { width: 10px; height: 10px; }
.name { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }

.score-box {
    background: #000;
    color: #ffd700;
    font-family: 'Courier New', monospace;
    font-weight: 900;
    font-size: 18px;
    padding: 0 10px;
    border-radius: 2px;
    margin-left: 10px;
    min-width: 30px;
    text-align: center;
}

#match-timer {
    font-family: 'Courier New', monospace;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    text-align: center;
    border-top: 1px solid #444;
    margin-top: 5px;
    padding-top: 5px;
}

/* OVERLAYS */
#goal-overlay {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: #ffd700; font-size: 80px; font-weight: 900;
    text-shadow: 4px 4px 0 #000;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none; z-index: 100; text-align: center;
}
#goal-overlay.active { transform: translate(-50%, -50%) scale(1); animation: bounce 0.5s infinite alternate; }

@keyframes bounce { 
    from { transform: translate(-50%, -50%) scale(1); } 
    to { transform: translate(-50%, -50%) scale(1.1); } 
}

#fade-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: black; opacity: 0; pointer-events: none; transition: opacity 0.8s; z-index: 200;
}

/* MODAL FIM DE JOGO */
#end-game-modal {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    color: white;
    pointer-events: none;
}

.modal-content {
    text-align: center;
    background: rgba(26, 26, 26, 0.95);
    padding: 40px;
    border-radius: 15px;
    border: 2px solid #ffd700;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
}

.modal-title { font-size: 50px; font-weight: 900; margin-bottom: 30px; color: #ffd700; }
.result-row { display: flex; align-items: center; justify-content: center; gap: 20px; font-size: 30px; font-weight: bold; margin-bottom: 40px; }
.team-block { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.colors-group { display: flex; }
.score-final { font-size: 60px; background: #000; padding: 10px 25px; border-radius: 10px; color: #ffd700; }

.btn-back {
    background: #ffd700; color: #000; border: none; padding: 15px 50px;
    font-size: 20px; font-weight: bold; border-radius: 50px; cursor: pointer;
    transition: transform 0.2s;
}
.btn-back:hover { transform: scale(1.1); background: #fff; }