@charset "UTF-8";

* {
  margin: 0;
  padding: 0;
  vertical-align: bottom;
}

body {
  display: grid;
  justify-content: center;
    background: linear-gradient(180deg, #ffe6f2, #fffafc);
    font-family: "Baloo 2", cursive;
  color: #ff2d96;
}

#main-image {
  width: 100%;
  border-radius: 15px; /* ← ここを追加！ */
  border: 3px solid #ffb6d9;
  box-shadow: 0 0 20px rgba(255, 153, 204, 0.6);
  transition: transform 0.3s ease;
}

img {
  width: 100%;
  height: auto;
}

/* タイトル */
h1 {
  text-align: center;
  padding: 20px 0;
  color: #ff80b3;
  font-size: 2.2rem;
  text-shadow: 2px 2px #fff;
  letter-spacing: 2px;
}


/* ギャラリー全体 */
.gallery {
  max-width: 700px;
  padding: 20px;
  border: 5px double #ffcce0;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 5px 20px rgba(255, 182, 193, 0.4);
}

/* サムネイル一覧 */
ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* ← 4列表示に変更 */
  padding-top: 15px;
  gap: 15px;
}

.thumb {
  border-radius: 15px;
  border: 2px solid #ffb6c1;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.thumb:hover {
  transform: scale(1.1) rotate(2deg);
  box-shadow: 0 0 15px #ffb3ec, 0 0 25px #ffe0f7;
  transition: 0.3s;
}

/* フッター */
footer {
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  color: #ff00a6;
}

ul li img {
  transition: opacity .5s;
}

ul li img:hover {
  cursor: pointer;
  opacity: .7;
}

.gallery div {
  position: relative;
}

#caption {
  position: absolute;
  bottom: 0;
   border-radius: 5px; /* ← ここを追加！ */
  background: rgba(255, 244, 252, 0.336);
  padding: 10px;
  width: 100%;
  box-sizing: border-box;
  color: #f952ff;
}

@media screen and (max-width: 640px) {
  ul {
    grid-template-columns: 1fr 1fr;
  }
}