/* ============================================
   RESET E STILI BASE
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

/* ============================================
   CONTAINER
   ============================================ */

.container {
  max-width: 900px;
  margin: 20px auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 30px;
}

/* ============================================
   TITOLI
   ============================================ */

h1 {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

h2 {
  font-size: 1.4rem;
  color: #333;
  margin-top: 25px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #ddd;
  font-weight: 600;
}

/* ============================================
   FORM
   ============================================ */

form.form-group {
  background: #fafafa;
  padding: 25px;
  border-radius: 8px;
  max-width: 450px;
  margin: 20px auto;
  border: 1px solid #e0e0e0;
}

form.form-group label {
  display: block;
  color: #555;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 6px;
  margin-top: 12px;
}

form.form-group label:first-of-type {
  margin-top: 0;
}

form.form-group input,
form.form-group select {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  background: #fff;
  color: #333;
  transition: border-color 0.2s;
}

form.form-group input:focus,
form.form-group select:focus {
  outline: none;
  border-color: #666;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

form.form-group button {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

form.form-group button:hover {
  background: #555;
}

/* ============================================
   LISTA ANIMALI
   ============================================ */

.animali-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.animale-card {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.animale-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-color: #999;
}

.animale-card strong {
  color: #666;
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 10px;
  font-weight: 600;
}

.animale-card strong:first-of-type {
  margin-top: 0;
}

.animale-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  margin-top: 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
}

/* ============================================
   LINK E BOTTONI
   ============================================ */

a {
  color: #333;
  text-decoration: none;
  display: inline-block;
  margin-top: 20px;
  padding: 9px 18px;
  background: #e8e8e8;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.2s;
  border: 1px solid #ddd;
}

a:hover {
  background: #d0d0d0;
}

/* ============================================
   MESSAGGI
   ============================================ */

p {
  font-size: 0.95rem;
  color: #666;
  text-align: center;
  margin: 15px 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 600px) {
  .container {
    padding: 20px;
    margin: 10px;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.1rem;
  }

  form.form-group {
    padding: 20px;
    max-width: 100%;
  }

  .animali-list {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }

  .animale-card img {
    height: 120px;
  }
}


