:root {
  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
  touch-action: pan-x pan-y;
  height: 100% 
}

body {
  overscroll-behavior-y: contain;
  margin: 0;
  place-items: center;
  min-width: 320px;
  width: 100%;
  min-height: 100vh;
  background-color: #000;
}

button {
  margin-left: 10px;
  margin-right: 10px;
  border-radius: 8px;
  border: 1px solid #fff;
  padding: 0.6em 1.2em;
  font-size: 0.8em;
  font-weight: 500;
  font-family: inherit;
  color: #fff;
  background-color: #000;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
  background-color: #333;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

#app {
  margin: 0 auto;
  text-align: center;
}
.campo {
  user-select: none;
  width: 100%;
  display: table;
  color: #fff;
  position: relative;
}
/* Linea centrale che separa i due campi, come un tabellone reale */
.campo::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
  z-index: 1;
}
.hea {
  float: left;
  width: 50%;
  font-size: xx-large;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 18px 4px 12px;
  box-sizing: border-box;
  border-bottom: 3px solid currentColor;
  opacity: 0.96;
}
.hea span {
/* Bordo di debug: border: 1px solid #f3fb00; */
  padding-left: 10px;
  padding-right: 10px;
  border-radius: 5px;
}
.score-inline {
  display: inline-block;
  min-width: 3ch;
  text-align: center;
}
.serv-slot {
  display: inline-flex;
  width: 25px;
  height: 25px;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
}
.mr3, .ml3 {
  display: inline-flex;
  align-items: center;
  font-size: 3vh;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 16px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.mr3 {
  margin-right: 14px;
}
.ml3 {
  margin-left: 14px;
}
.tal {
  text-align: left;
}
.tar {
  text-align: right;
}
.bot {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  margin-top: 10px;
  margin-bottom: 1px;
  background-color: #111;
}
.col {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  float: left;
  width: 50%;
}
.punteggio-container {
  width: 100%;
  height: 100%;
  display: flex;
}
.punt {
  font-size: 60vh;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  min-height: 50vh;
  min-width: 50vw;
  max-width: 50vw;
  overflow: hidden;
  box-sizing: border-box;
  text-shadow: 0 0 40px currentColor;
}
.form {
  font-size: 5vh;
  border-top: 2px solid rgba(255, 255, 255, 0.18);
  padding-top: 50px;
}
.formtit {
  font-size: 5vh;
  margin-top: 30px;
  margin-bottom: 20px;
}
.formdiv {
  font-size: 20vh;
  float: left;
  width: 32%;
  box-sizing: border-box;
  margin: 3px 0;
  color: #ddd;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 10px;
}
.text-bold {
  font-weight: 800;
}
.home {
  background-color: transparent;
  color: #f5c518;
}
.guest {
  background-color: transparent;
  color: #2196f3;
}
.striscia {
  position: fixed;
  bottom: 50px;
  left: 10px;
  right: 10px;
  display: grid;
  grid-template-columns: max-content 1fr;
  row-gap: 6px;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  z-index: 2;
}
.striscia-nome {
  white-space: nowrap;
  padding-right: 10px;
  font-size: 2.2vh;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.striscia-items {
  display: flex;
  flex-wrap: nowrap;
  overflow: hidden;
  gap: 2px;
}
.striscia .item {
  width: 25px;
  min-width: 25px;
  text-align: center;
  font-weight: bold;
  flex-shrink: 0;
  border-radius: 6px;
}
.striscia .item:not(.item-vuoto) {
  background-color: #f5c518;
  color: #111;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.striscia-items.guest-striscia .item:not(.item-vuoto) {
  background-color: #2196f3;
  color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.campo-config {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.campo-pallavolo {
  border: 3px solid #999;
  background-color: rgba(205, 133, 63, 0.25);
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.fila-anteriore {
  height: 33.33%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
}

.fila-posteriore {
  height: 66.67%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
}

.linea-tre-metri {
  border-top: 2px solid #666;
  width: 100%;
  height: 0;
  margin: 0;
}

.cambi-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
}

.cambi-dialog {
  padding: 8px 6px 2px;
}

.cambi-title {
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.cambi-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.cambi-arrow {
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.cambi-input {
  min-width: 48px;
  max-width: 64px;
}

.cambi-input input {
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  padding: 6px 10px;
  color: #000;
  text-align: center;
  box-sizing: border-box;
}

.cambi-in input {
  background: rgba(120, 200, 120, 0.4);
}

.cambi-out input {
  background: rgba(200, 120, 120, 0.4);
}

.cambi-input input:focus {
  border-color: rgba(255, 255, 255, 0.7);
  outline: none;
}
