@charset "UTF-8";

body {
  font-family: Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: #EEAECA;
  background: radial-gradient(circle, rgba(238, 174, 202, 1) 15%, rgba(148, 187, 233, 1) 100%);
}

#wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.bigbox {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

h1 {
  /* Centering the title */
  font-family: "Permanent Marker", cursive;
  font-weight: 400;
  font-style: normal;
  margin: 50px auto;
  color: #008b8b;
  font-size: 4em;
  text-align: center;
}

#buttons {
  /* Centering the buttons */
  text-align: center;
  margin-bottom: 20px;
}

button {
  font-size: 1em;
  margin-right: 10px;
  margin-bottom: 10px;
  color: #eee;
  padding: 10px 25px;
  /* Corrected gradient background */
  background: linear-gradient(90deg, rgba(255, 99, 71, 1) 0%, rgba(0, 128, 0, 1) 50%, rgba(237, 221, 83, 1) 91%);
  border-radius: 20px;
  border: none;
  display: inline-block;
  cursor: pointer;
}

#buttons button:last-child {
  margin-right: 0;
}

button:focus {
  outline: none;
}

button:hover {
  background: #808000;
}

/* 🍇 Final Grid Layout for 4x3 Images - Ensures Equal Left/Right Space */
#list {
  display: grid; 
  /* Defines 3 columns, each 150px wide */
  grid-template-columns: 150px 150px 150px; 
  
  /* Defines spacing between grid items */
  column-gap: 12px; /* Horizontal space */
  row-gap: 25px; /* Vertical space */
  
  /* CRITICAL FIX: Distributes space evenly across the container */
  justify-content: space-evenly; 
  
  list-style: none;
  padding: 10px; /* Padding for the top/bottom */
  background: #fff;
  box-shadow: 0 0 10px gray;
  border: solid 1px #fff;
  
  /* Use a slightly larger max-width to give space-evenly room to work */
  max-width: 550px; 
  margin: 0 auto; 
}

#list li {
  /* IMPORTANT: Margins are managed by grid-gap, so list item margins must be zeroed */
  margin: 0; 
  
  width: 150px;
  height: 150px;
  list-style-type: none;
  filter: drop-shadow(2px 4px 8px gray);
  
  /* Centers image content inside the <li> box */
  display: flex; 
  justify-content: center;
  align-items: center;
}