/* ===== ベース設定 ===== */
body {
  margin: 0;
  font-family: "SharpOldLogo", sans-serif;
  background: radial-gradient(circle at center, #fff5d9, #ffcf70, #ff6d6d, #00d4a0);
  background-size: 300% 300%;
  animation: bgDrift 25s ease infinite;
  color: #3a2200;
  text-align: center;
  line-height: 1.6;
}

/* ゆらめく背景 */
@keyframes bgDrift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ===== ロゴ ===== */
.header {
  padding: 40px 0 20px;
  filter: drop-shadow(0 0 10px rgba(255,200,0,0.4));
}
.logo {
  width: 200px;
  height: auto;
  animation: sway 6s ease-in-out infinite;
}

@keyframes sway {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(1.5deg); }
}

/* ===== セクションタイトル ===== */
.section-title {
  font-size: 1.4rem;
  letter-spacing: 2px;
  margin-bottom: 20px;
  background: linear-gradient(90deg, #ff8a00, #ff3c6a, #00d4a0, #c8872b);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
}

/* ===== 説明文 ===== */
.description {
  max-width: 700px;
  margin: 0 auto 40px;
  font-size: 1rem;
  color: #3a2200;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.4);
}

/* ===== キャラクターギャラリー ===== */
.character-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  max-width: 900px;
  margin: 0 auto 60px;
  padding: 0 20px;
}

.character-item {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.4s ease, filter 0.4s ease;
  filter: hue-rotate(0deg) saturate(1.2);
}

.character-item:hover {
  transform: scale(1.07) rotate(-1deg);
  filter: hue-rotate(30deg) saturate(1.7) brightness(1.2);
  box-shadow: 0 0 18px rgba(255, 180, 0, 0.6);
}

/* ===== メインギャラリー ===== */
.main-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 0 20px;
}

.gallery-item {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.4s ease, filter 0.4s ease;
  filter: hue-rotate(0deg);
}

.gallery-item:hover {
  transform: scale(1.06) rotate(1.5deg);
  filter: hue-rotate(-20deg) saturate(1.8) brightness(1.1);
  box-shadow: 0 0 25px rgba(255, 150, 0, 0.4);
}

/* ===== モーダル ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 10;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(60, 30, 10, 0.9);
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(8px);
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 0 40px rgba(255, 180, 0, 0.3);
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff7e1;
  font-size: 2.5rem;
  cursor: pointer;
  text-shadow: 0 0 8px #ff8a00;
  transition: transform 0.2s ease;
}

.close:hover {
  transform: rotate(90deg);
}

/* ===== 戻るボタン ===== */
.back {
  margin-bottom: 40px;
}

.back-btn {
  display: inline-block;
  padding: 12px 32px;
  font-size: 1rem;
  color: #3a2200;
  text-decoration: none;
  border: 2px solid #3a2200;
  border-radius: 40px;
  background: transparent;
  transition: all 0.3s ease;
}

.back-btn:hover {
  background: linear-gradient(90deg, #ff8a00, #ff3c6a, #00d4a0);
  color: #fff;
  box-shadow: 0 0 20px rgba(255, 150, 0, 0.6);
}

/* ===== フッター ===== */
.footer {
  font-size: 0.8rem;
  padding: 20px;
  color: #3a2200;
  border-top: 1px solid rgba(255, 220, 180, 0.6);
  background: rgba(255, 240, 220, 0.4);
}