* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Hachi Maru Pop", cursive;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* キャンバスコンテナ */
#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* ヘッダー */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  z-index: 1000;
  background: transparent;
}

/* ナビゲーションメニュー（デスクトップ） */
.nav-menu {
  display: none;
  justify-content: center;
}

.menu-list {
  display: flex;
  list-style: none;
  gap: 30px;
}

.menu-item a {
  text-decoration: none;
  color: #ff6b9d;
  font-size: 20px;
  padding: 10px 20px;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  display: block;
  border: 2px solid transparent;
}

.menu-item a:hover {
  background: #feca57;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(254, 202, 87, 0.4);
  border-color: #ff6b9d;
}

/* モバイルメニューボタン */
.mobile-menu-btn {
  display: block;
  position: fixed;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  z-index: 1001;
  transition: all 0.3s ease;
}

.mobile-menu-btn span {
  display: block;
  width: 25px;
  height: 3px;
  background: #ff6b9d;
  margin: 5px auto;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
  background: #feca57;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translateY(8px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-8px);
}

/* モバイルメニュー */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: linear-gradient(135deg, #feca57 0%, #feca57 100%);
  padding: 80px 30px;
  transition: right 0.3s ease;
  z-index: 999;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-list {
  list-style: none;
}

.mobile-menu-item {
  margin-bottom: 20px;
  animation: slideInRight 0.5s ease forwards;
  opacity: 0;
}

.mobile-menu.active .mobile-menu-item {
  opacity: 1;
}

.mobile-menu-item:nth-child(1) {
  animation-delay: 0.1s;
}
.mobile-menu-item:nth-child(2) {
  animation-delay: 0.2s;
}
.mobile-menu-item:nth-child(3) {
  animation-delay: 0.3s;
}
.mobile-menu-item:nth-child(4) {
  animation-delay: 0.4s;
}

.mobile-menu-item a {
  color: #ff6b9d;
  text-decoration: none;
  font-size: 22px;
  display: block;
  padding: 15px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  transition: all 0.3s ease;
  text-align: center;
}

.mobile-menu-item a:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateX(-10px);
}

/* ギャラリーコンテンツ */
.gallery-container {
  position: relative;
  z-index: 100;
  padding: 100px 20px 50px;
  min-height: 100vh;
}

.gallery-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.page-title {
  text-align: center;
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: #fffb01;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.8),
      -2px -2px 0 rgba(0, 0, 0, 0.9),
      2px -2px 0 rgba(0, 0, 0, 0.9),
      -2px 2px 0 rgba(0, 0, 0, 0.9),
      2px 2px 0 rgba(0, 0, 0, 0.9);
  -webkit-text-stroke: 3px #ff7bde;
  font-weight: 700;
  margin-bottom: 10px;
  animation: float 4s ease-in-out infinite;
}

.gallery-subtitle {
  text-align: center;
  font-size: 1.5rem;
  color: #ff6b9d;
  margin-bottom: 40px;
  font-weight: 500;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* 小説グリッド */
.novels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  padding: 20px 0;
}

/* 小説カード */
.novel-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
  animation-fill-mode: forwards;
  position: relative;
  backdrop-filter: blur(10px);
  border: 2px solid transparent;
}

.novel-card:nth-child(1) { animation-delay: 0.1s; }
.novel-card:nth-child(2) { animation-delay: 0.2s; }
.novel-card:nth-child(3) { animation-delay: 0.3s; }
.novel-card:nth-child(4) { animation-delay: 0.4s; }
.novel-card:nth-child(5) { animation-delay: 0.5s; }
.novel-card:nth-child(6) { animation-delay: 0.6s; }
.novel-card:nth-child(7) { animation-delay: 0.7s; }
.novel-card:nth-child(8) { animation-delay: 0.8s; }

.novel-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(255, 107, 157, 0.2);
  border-color: #ff6b9d;
}

.novel-link {
  display: block;
  padding: 30px;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.novel-number {
  position: absolute;
  top: 15px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #ff6b9d, #ff7bde);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(255, 107, 157, 0.3);
}

.novel-title {
  font-size: 1.5rem;
  color: #ff6b9d;
  margin-bottom: 15px;
  font-weight: 700;
  transition: color 0.3s ease;
}

.novel-card:hover .novel-title {
  color: #ff7bde;
}

.novel-decoration {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.decoration-dot {
  width: 8px;
  height: 8px;
  background: #feca57;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.decoration-dot:nth-child(2) { animation-delay: 0.2s; }
.decoration-dot:nth-child(3) { animation-delay: 0.4s; }

.novel-excerpt {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
}

.read-more {
  font-size: 1rem;
  color: #feca57;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
}

.novel-card:hover .read-more {
  transform: translateX(5px);
  color: #ff6b9d;
}

/* アニメーション */
@keyframes slideInRight {
  from {
      transform: translateX(50px);
      opacity: 0;
  }
  to {
      transform: translateX(0);
      opacity: 1;
  }
}

@keyframes float {
  0%, 100% {
      transform: translateY(0);
  }
  50% {
      transform: translateY(-10px);
  }
}

@keyframes fadeInUp {
  from {
      opacity: 0;
      transform: translateY(30px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
      transform: scale(1);
      opacity: 1;
  }
  50% {
      transform: scale(1.2);
      opacity: 0.7;
  }
}

/* レスポンシブデザイン */
@media (min-width: 768px) {
  .nav-menu {
      display: flex;
  }

  .mobile-menu-btn {
      display: none;
  }

  .mobile-menu {
      display: none;
  }
}

/* タブレット対応 */
@media (max-width: 768px) {
  .novels-grid {
      grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
      gap: 20px;
  }

  .novel-link {
      padding: 25px;
  }

  .novel-title {
      font-size: 1.3rem;
  }

  .mobile-menu {
      width: 320px;
  }

  .mobile-menu-item a {
      font-size: 20px;
  }
}

/* スマートフォン対応 */
@media (max-width: 480px) {
  .header {
      padding: 15px;
  }

  .mobile-menu-btn {
      top: 15px;
      right: 15px;
      width: 35px;
      height: 35px;
  }

  .mobile-menu {
      width: 250px;
      padding: 70px 20px;
  }

  .mobile-menu-item a {
      font-size: 18px;
      padding: 12px;
  }

  .gallery-container {
      padding: 80px 15px 30px;
  }

  .page-title {
      font-size: 2rem;
      margin-bottom: 5px;
  }

  .gallery-subtitle {
      font-size: 1.2rem;
      margin-bottom: 30px;
  }

  .novels-grid {
      grid-template-columns: 1fr;
      gap: 15px;
  }

  .novel-link {
      padding: 20px;
  }

  .novel-number {
      width: 35px;
      height: 35px;
      font-size: 0.8rem;
  }

  .novel-title {
      font-size: 1.2rem;
      padding-right: 40px;
  }

  .novel-excerpt {
      font-size: 0.9rem;
  }

  .read-more {
      font-size: 0.95rem;
  }
}