/* --- Global --- */
html {
  background-image: url("rainbowBG2.png");
  background-size: cover;         /* make background fill screen */
  background-repeat: no-repeat;   /* prevent tiling */
  background-attachment: fixed;   /* optional: stays in place */
}

body {
  margin: 0; /* remove default browser margins */
  font-family: sans-serif;
}

/* --- Header & Nav --- */
header {
  background-color: green;
  border: inset;
  text-align: center;
  padding: 10px;
}

nav {
  background-color: red;
  display: inline-block;
}

/* --- Head (Navigation Links) --- */
.head {
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  background-color: red;
  border: red inset;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.head > div {
  color: yellow;
  display: inline-block;
  width: 100px;
  margin: 10px;
  text-align: center;
  line-height: 45px;
  font-size: 25px;
}

.headLink {
  color: yellow;
  text-decoration: none;
}

.headLink:hover {
  color: #800080;
  text-decoration: none;
  cursor: pointer;
}

/* --- Main Content --- */
main, 
#frontMain {
  margin: 50px auto;   /* centers block horizontally */
  width: 70%;          /* use percentage instead of fixed offset */
  padding: 30px;
  background-color: white;
  border-radius: 10px; /* added unit */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  border: inset;
  height: auto;
}

h1 {
  text-align: center;
  color: cyan;
}

/* --- Layout Helpers --- */
.grid-container {
  display: grid;
  grid-template-columns: 3fr 1fr;
  grid-gap: 0px;
  margin-right: 50px;
}

.side-list-container {
  display: grid;
  grid-template-columns: auto auto auto;
  grid-gap: 10px;
  margin: 30px;
}

/* --- Flexbox Sidebar --- */
.flex-container {
  display: flex;
  flex-direction: column;
  background-color: #D3D3D3;
  width: 200px;
  padding: 2px;
  margin: 10px;
  border: inset;
  height: 420px;
  overflow-y: scroll;
}

.flex-container > div {
  background-color: #f1f1f1;
  width: 100px;
  margin: 10px;
  text-align: center;
  line-height: 75px;
  font-size: 30px;
}

/* --- Gallery --- */
.gallery { 
  display: grid;
  grid-template-columns: auto auto auto;
  padding: 10px;
}

.gallery > div {
  width: 100px;
  height: auto;
  color: blue;
}

.gallerySized {
  width: 200px;
  height: auto;
}