/* -------------------------
   Layout generale
------------------------- */
body {
  font-family: Arial, sans-serif;
  text-align: center;
  background: #f5f5f5;
  margin: 0;
  padding: 20px;
}

h1 {
  margin-bottom: 20px;
}

h2 {
  margin-top: 40px;
  margin-bottom: 10px;
}

/* -------------------------
   Selettore squadra
------------------------- */
label {
  display: block;
  margin-bottom: 20px;
  font-weight: bold;
}

select {
  padding: 5px 10px;
  font-size: 16px;
}

/* -------------------------
   Mappa e canvas
------------------------- */
#map-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 30px;
}

#map-image {
  display: block;
  max-width: 100%;
  height: auto;
}

#draw-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;   /* scala visivamente */
  height: auto;
  pointer-events: auto;
}

/* -------------------------
   Tabella percentuali squadre
------------------------- */
#team-stats {
  margin: 0 auto;
  border-collapse: collapse;
  width: 90%;
  max-width: 600px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#team-stats th, #team-stats td {
  padding: 8px 12px;
  border: 1px solid #ddd;
  text-align: center;
}

#team-stats th {
  background: #f0f0f0;
  font-weight: bold;
}

/* -------------------------
   Barre percentuali
------------------------- */
.percent-bar {
  background: #e0e0e0;
  width: 100%;
  height: 20px;
  border-radius: 10px;
  overflow: hidden;
  margin: 0 auto;
}

.percent-bar-inner {
  height: 100%;
  line-height: 20px;
  color: #fff;
  font-weight: bold;
  text-align: center;
  border-radius: 10px 0 0 10px;
}

/* -------------------------
   Responsive
------------------------- */
@media screen and (max-width: 600px) {
  #team-stats th, #team-stats td {
    font-size: 12px;
    padding: 6px 8px;
  }

  .percent-bar {
    height: 16px;
  }

  .percent-bar-inner {
    font-size: 10px;
    line-height: 16px;
  }
}
