:root{
  --blu:#123c7c;
  --rosso:#ef233c;
  --arancio:#f97316;
  --verde:#22c55e;
  --giallo:#ffd43b;
  --nero:#151515;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:Arial, sans-serif;
  background:linear-gradient(135deg,#fff2b8,#dff7ff);
  color:var(--nero);
}

header{
  text-align:center;
  padding:28px 18px;
}

.back{
  display:inline-block;
  margin-bottom:18px;
  color:white;
  background:var(--blu);
  padding:12px 18px;
  border-radius:999px;
  text-decoration:none;
  font-weight:900;
  border:3px solid var(--nero);
  box-shadow:4px 4px 0 var(--nero);
}

h1{
  font-size:clamp(2.3rem,8vw,4.5rem);
  color:var(--arancio);
  text-shadow:3px 3px 0 white,6px 6px 0 var(--nero);
  margin:10px 0;
}

.wrapper{
  max-width:1100px;
  margin:auto;
  padding:18px;
}

.tool-card{
  display:grid;
  grid-template-columns:260px 1fr;
  gap:24px;
  align-items:center;
  background:white;
  border:4px solid var(--nero);
  border-radius:30px;
  padding:24px;
  box-shadow:8px 8px 0 var(--nero);
}

.ticro-img{
  width:100%;
  max-width:240px;
}

.speech{
  background:#fff7d6;
  border:3px solid var(--nero);
  border-radius:22px;
  padding:16px;
  font-size:1.15rem;
  font-weight:900;
  margin-top:12px;
}

.period-box{
  text-align:center;
  background:#fff7d6;
  border:4px solid var(--nero);
  border-radius:24px;
  padding:16px;
  margin-bottom:18px;
  box-shadow:5px 5px 0 var(--nero);
}

.period-box span{
  font-size:2rem;
  font-weight:900;
  color:var(--blu);
}

.scoreboard{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}

.team{
  border:4px solid var(--nero);
  border-radius:24px;
  padding:20px;
  text-align:center;
  box-shadow:5px 5px 0 var(--nero);
}

.team.blue{background:#dbeafe}
.team.orange{background:#ffedd5}

.team h2{
  font-size:1.8rem;
  margin:0 0 10px;
}

.score{
  font-size:5.5rem;
  font-weight:900;
  margin:8px 0;
}

.controls{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  margin-top:12px;
}

.small-controls{
  display:flex;
  justify-content:center;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}

button{
  border:3px solid var(--nero);
  border-radius:16px;
  padding:12px 14px;
  font-size:1rem;
  font-weight:900;
  cursor:pointer;
  box-shadow:4px 4px 0 var(--nero);
}

.p1{background:#fde68a}
.p2{background:#fb923c;color:white}
.p3{background:#ef4444;color:white}
.minus{background:white}
.reset{background:var(--rosso);color:white}
.period{background:var(--blu);color:white}

.tools{
  margin-top:26px;
  background:white;
  border:4px solid var(--nero);
  border-radius:28px;
  padding:22px;
  box-shadow:7px 7px 0 var(--nero);
}

.locked{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
  gap:12px;
}

.locked div{
  background:#f3f4f6;
  padding:14px;
  border-radius:16px;
  border:2px solid #ccc;
  font-weight:900;
}

@media(max-width:820px){
  .tool-card{
    grid-template-columns:1fr;
    text-align:center;
  }

  .scoreboard{
    grid-template-columns:1fr;
  }

  .ticro-img{
    max-width:220px;
    margin:auto;
  }
}
.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
}

.footer p {
    margin: 8px 0;
}

.footer .sign a {
    color: #009688;
    text-decoration: none;
    font-weight: bold;
}

.footer .sign a:hover {
    color: #00695c;
}

.footer .sign a:hover {
    color: #27ae60;      /* verde campo da calcio */
    text-decoration: underline;
}
.tools-grid{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:15px;
    margin-top:20px;
}

.tool-link{
    display:block;
    background:#ffffff;
    color:#1f2937;
    text-decoration:none;
    padding:18px 25px;
    border-radius:12px;
    font-weight:600;
    box-shadow:0 3px 8px rgba(0,0,0,.12);
    transition:.3s;
    min-width:220px;
}

.tool-link:hover{
    transform:translateY(-3px);
    box-shadow:0 6px 15px rgba(0,0,0,.18);
    background:#f0fdf4;
}

.tool-link small{
  display:block;
  margin-top:6px;
  font-size:.86rem;
  font-weight:700;
  opacity:.75;
}

button,
.back,
.tool-link {
  -webkit-user-select: none;
  user-select: none;
}
