/* ==== Stile globale ==== */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #123;
  background: linear-gradient(180deg, #cceeff 0%, #ffffff 100%);
  line-height: 1.6;
  text-align: center; /* centra il contenuto di default */
}

/* ==== Container ==== */
.container {
  width: 90%;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  display: inline-block;
  text-align: left; /* reset per testi all’interno delle card */
}

/* ==== Header ==== */
.site-header {
  background: #0077cc;
  color: white;
  padding: 30px 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.site-header h1 {
  margin: 0;
  font-size: 2rem;
}

.site-header .subtitle {
  margin-top: 5px;
  font-size: 1rem;
  opacity: 0.9;
}

/* ==== Card ==== */
.card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  padding: 25px;
  margin: 25px auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: left;
}

/* ==== Elenco navigazione (home) ==== */
.nav-list {
  list-style-type: disc;
  margin-left: 2rem;
  line-height: 2;
  font-size: 1.1rem;
}

.nav-list a {
  color: #0077cc;
  text-decoration: none;
  font-weight: bold;
}

.nav-list a:hover {
  color: #00b3a6;
  text-decoration: underline;
}

/* ==== Pulsanti ==== */
.button {
  background-color: #0077cc;
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  display: inline-block;
  margin-top: 10px;
}

.button:hover {
  background-color: #005fa3;
  transform: translateY(-2px);
}

/* ==== Gallery ==== */
.gallery-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

.gallery h3 {
  color: #0077cc;
  margin-bottom: 10px;
}

.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.thumbs img {
  width: 30%;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.thumbs img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.caption {
  font-size: 0.9rem;
  color: #444;
  margin-top: 8px;
}

/* ==== Output del gioco ==== */
#output {
  background: #f6f6f6;
  padding: 12px;
  border-radius: 8px;
  min-height: 50px;
  margin-top: 10px;
  text-align: left;
  white-space: pre-wrap;
}

/* ==== Footer ==== */
.site-footer {
  background: #004c8c;
  color: #f5f5f5;
  text-align: center;
  padding: 16px 0;
  font-size: 0.9rem;
  margin-top: 30px;
  border-top: 3px solid #0077cc;
}

/* ==== Responsive ==== */
@media (min-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .thumbs img { width: calc(50% - 10px); }
}

@media (min-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .thumbs img { width: calc(33.33% - 10px); }
}
