/* リセットCSS */

html {
  background-color: #fff;
  -webkit-overflow-scrolling: touch;
}

body::before {
  display: none !important;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ベース設定 */
body {
  font-family: "M PLUS Rounded 1c", "Bubblegum Sans", "Arial Rounded MT Bold",
    sans-serif;
  background: linear-gradient(135deg, #ffb3c1 0%, #ffc8dd 50%, #ffb3c1 100%);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ヘッダー */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  padding: 20px 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(255, 182, 193, 0.3);
}

/* ナビゲーションメニュー */
.nav-menu {
  display: none;
}

.menu-list {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 40px;
}

.menu-item {
  text-decoration: none;
  color: #ff69b4;
  font-size: 18px;
  padding: 10px 20px;
  border-radius: 25px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.menu-item::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 182, 193, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.menu-item:hover::before {
  width: 100%;
  height: 100%;
}

.menu-item:hover {
  color: #fff;
  background: linear-gradient(135deg, #ff69b4, #ffb3c1);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 105, 180, 0.3);
}

.menu-item.active {
  background: linear-gradient(135deg, #ff69b4, #ffb3c1);
  color: #fff;
}

/* モバイルメニューボタン */
.mobile-menu-btn {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  width: 35px;
  height: 30px;
  cursor: pointer;
  z-index: 1002;
  padding: 5px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
  background: rgba(255, 182, 193, 0.3);
  transform: translateY(-50%) scale(1.1);
}

.mobile-menu-btn span {
  display: block;
  width: 25px;
  height: 3px;
  background: linear-gradient(90deg, #ff69b4, #ffb3c1);
  border-radius: 3px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-btn span:nth-child(1) {
  top: 8px;
}

.mobile-menu-btn span:nth-child(2) {
  top: 50%;
  transform: translate(-50%, -50%);
}

.mobile-menu-btn span:nth-child(3) {
  bottom: 8px;
}

.mobile-menu-btn.active {
  background: rgba(255, 105, 180, 0.2);
}

.mobile-menu-btn.active span {
  background: linear-gradient(90deg, #ff1493, #ff69b4);
}

.mobile-menu-btn.active span:nth-child(1) {
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
}

.mobile-menu-btn.active span:nth-child(3) {
  bottom: 50%;
  transform: translate(-50%, 50%) rotate(-45deg);
}

/* モバイルメニュー */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  /* Fallback then dynamic viewport to avoid iOS Safari overflow */
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(255, 230, 240, 0.98) 50%,
    rgba(255, 240, 250, 0.98) 100%
  );
  backdrop-filter: blur(20px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  /* Safe area paddings for iPhone notch/home bar */
  padding-right: 20px;
  padding-left: 20px;
  padding-top: calc(70px + env(safe-area-inset-top));
  padding-bottom: calc(30px + env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  box-shadow: 0 10px 40px rgba(255, 105, 180, 0.2);
}

.mobile-menu.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-decoration {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.deco-emoji {
  position: absolute;
  font-size: 2.5rem;
  opacity: 0.15;
  animation: floatDeco 6s ease-in-out infinite;
}

.deco-1 {
  top: 15%;
  left: 10%;
  animation-delay: 0s;
}

.deco-2 {
  top: 25%;
  right: 15%;
  animation-delay: 1.5s;
}

.deco-3 {
  bottom: 25%;
  left: 15%;
  animation-delay: 3s;
}

.deco-4 {
  bottom: 15%;
  right: 10%;
  animation-delay: 4.5s;
}

.mobile-menu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-top: 80px;
  position: relative;
}

.mobile-menu-list::before {
  content: "";
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    #ffb3c1,
    #ff69b4,
    #ffb3c1,
    transparent
  );
  border-radius: 3px;
}

.mobile-menu-item {
  display: inline-block;
  text-decoration: none;
  color: #ff69b4;
  padding: 18px 40px;
  margin: 5px 0;
  border-radius: 30px;
  transition: all 0.3s ease;
  text-align: center;
  font-size: 20px;
  min-width: 220px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.9),
    rgba(255, 240, 250, 0.9)
  );
  box-shadow: 5px 5px 15px rgba(255, 182, 193, 0.2),
    -5px -5px 15px rgba(255, 255, 255, 0.9);
  position: relative;
  overflow: hidden;
  font-weight: bold;
  letter-spacing: 1px;
}

.mobile-menu-item::before {
  content: "✨";
  position: absolute;
  top: 50%;
  left: -30px;
  transform: translateY(-50%);
  opacity: 0;
  transition: all 0.3s ease;
}

.mobile-menu-item::after {
  content: "✨";
  position: absolute;
  top: 50%;
  right: -30px;
  transform: translateY(-50%);
  opacity: 0;
  transition: all 0.3s ease;
}

.mobile-menu-item:hover::before,
.mobile-menu-item:hover::after {
  opacity: 1;
}

.mobile-menu-item:hover::before {
  left: 10px;
}

.mobile-menu-item:hover::after {
  right: 10px;
}

.mobile-menu-item:hover,
.mobile-menu-item.active {
  background: linear-gradient(135deg, #ff69b4, #ffb3c1);
  color: #fff;
  transform: scale(1.08) rotate(-1deg);
  box-shadow: 0 8px 25px rgba(255, 105, 180, 0.4),
    inset 0 0 20px rgba(255, 255, 255, 0.3);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.mobile-menu.active .mobile-menu-item {
  animation: slideInBounce 0.6s ease forwards;
  opacity: 0;
}

.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:nth-child(5) {
  animation-delay: 0.5s;
}

/* メインコンテンツ */
.main-content {
  padding-top: 100px;
  padding-bottom: 50px;
  min-height: 100vh;
}

/* ページタイトル */
.page-title-container {
  text-align: center;
  margin-bottom: 40px;
  animation: fadeInDown 0.8s ease;
}

.page-title {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.title-en {
  font-family: "Bubblegum Sans", cursive;
  font-size: 3.5rem;
  color: #fff;
  text-shadow: 3px 3px 0px #ff69b4, 6px 6px 0px rgba(255, 105, 180, 0.5),
    9px 9px 20px rgba(255, 105, 180, 0.3);
  letter-spacing: 3px;
  animation: float 3s ease-in-out infinite;
}

.title-jp {
  font-size: 1.2rem;
  color: #ff69b4;
  background: rgba(255, 255, 255, 0.8);
  padding: 5px 20px;
  border-radius: 20px;
  box-shadow: 0 3px 10px rgba(255, 105, 180, 0.2);
}

.gallery-subtitle {
  font-size: 1rem;
  color: #fff;
  margin-top: 10px;
  text-shadow: 1px 1px 3px rgba(255, 105, 180, 0.5);
}

/* ギャラリーセクション */
.gallery-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.gallery-container {
  width: 100%;
}

/* ギャラリーグリッド - 常に3列 */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}

/* ギャラリーアイテム */
.gallery-item {
  position: relative;
  animation: fadeInUp 0.8s ease backwards;
}

.gallery-item:nth-child(1) {
  animation-delay: 0.05s;
}
.gallery-item:nth-child(2) {
  animation-delay: 0.1s;
}
.gallery-item:nth-child(3) {
  animation-delay: 0.15s;
}
.gallery-item:nth-child(4) {
  animation-delay: 0.2s;
}
.gallery-item:nth-child(5) {
  animation-delay: 0.25s;
}
.gallery-item:nth-child(6) {
  animation-delay: 0.3s;
}
.gallery-item:nth-child(7) {
  animation-delay: 0.35s;
}
.gallery-item:nth-child(8) {
  animation-delay: 0.4s;
}
.gallery-item:nth-child(9) {
  animation-delay: 0.45s;
}
.gallery-item:nth-child(10) {
  animation-delay: 0.5s;
}
.gallery-item:nth-child(11) {
  animation-delay: 0.55s;
}
.gallery-item:nth-child(12) {
  animation-delay: 0.6s;
}
.gallery-item:nth-child(13) {
  animation-delay: 0.65s;
}
.gallery-item:nth-child(14) {
  animation-delay: 0.7s;
}
.gallery-item:nth-child(15) {
  animation-delay: 0.75s;
}

.gallery-frame {
  position: relative;
  width: 100%;
  padding-top: 133.33%; /* 縦長画像用 (4:3の逆) */
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.95),
    rgba(255, 240, 250, 0.95)
  );
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(255, 182, 193, 0.3),
    inset 0 0 20px rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.gallery-frame:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 10px 25px rgba(255, 105, 180, 0.4),
    inset 0 0 30px rgba(255, 255, 255, 0.7);
}

.gallery-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-frame:hover .gallery-image {
  transform: scale(1.05);
}

/* オーバーレイ */
.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(255, 105, 180, 0.7),
    rgba(255, 179, 193, 0.7)
  );
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-frame:hover .gallery-overlay {
  opacity: 1;
}

.overlay-icon {
  font-size: 2rem;
  animation: sparkle 1s ease-in-out infinite;
}

.overlay-text {
  font-family: "Bubblegum Sans", cursive;
  font-size: 1.2rem;
  color: #fff;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* ライトボックス */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffb3c1;
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

.lightbox.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 10px 50px rgba(255, 105, 180, 0.3);
  animation: zoomIn 0.3s ease;
}

.lightbox-caption {
  margin-top: 20px;
  text-align: center;
  color: #fff;
}

.lightbox-title {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.lightbox-number {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* ライトボックスボタン */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  transition: all 0.3s ease;
  z-index: 2001;
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 105, 180, 0.5);
  border-color: #ff69b4;
  transform: scale(1.1) translateY(-50%);
}

.lightbox-close:hover {
  transform: scale(1.1);
}

/* ページ装飾 */
.page-decorations {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;

}

.float-emoji {
  position: absolute;
  font-size: 2rem;
  opacity: 0.3;
  animation: floatAround 15s ease-in-out infinite;
}

.emoji-1 {
  top: 20%;
  left: 5%;
  animation-delay: 0s;
}

.emoji-2 {
  top: 40%;
  right: 5%;
  animation-delay: 3s;
}

.emoji-3 {
  bottom: 30%;
  left: 10%;
  animation-delay: 6s;
}

.emoji-4 {
  bottom: 20%;
  right: 10%;
  animation-delay: 9s;
}

.emoji-5 {
  top: 60%;
  left: 50%;
  animation-delay: 12s;
}

/* アニメーション */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes sparkle {
  0%,
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.2) rotate(180deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes floatAround {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(30px, -30px) rotate(90deg);
  }
  50% {
    transform: translate(-20px, 20px) rotate(180deg);
  }
  75% {
    transform: translate(40px, 10px) rotate(270deg);
  }
}

@keyframes floatDeco {
  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  25% {
    transform: translateY(-20px) rotate(10deg) scale(1.1);
  }
  50% {
    transform: translateY(10px) rotate(-5deg) scale(0.95);
  }
  75% {
    transform: translateY(-10px) rotate(5deg) scale(1.05);
  }
}

@keyframes slideInBounce {
  0% {
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
  }
  60% {
    opacity: 1;
    transform: translateY(5px) scale(1.02);
  }
  80% {
    transform: translateY(-2px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

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

  .mobile-menu {
    display: none;
  }

  .gallery-grid {
    gap: 20px;
  }
}

/* スマホサイズでも3列を維持 */
@media (max-width: 767px) {
  .title-en {
    font-size: 2.5rem;
  }

  .title-jp {
    font-size: 1rem;
  }

  .gallery-subtitle {
    font-size: 0.9rem;
  }

  .gallery-grid {
    gap: 10px;
  }

  .overlay-icon {
    font-size: 1.5rem;
  }

  .overlay-text {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding-top: 80px;
    padding-bottom: 30px;
  }

  .title-en {
    font-size: 2rem;
  }

  .gallery-section {
    padding: 0 10px;
  }

  .gallery-grid {
    gap: 8px;
  }

  .gallery-frame {
    border-radius: 10px;
  }

  .lightbox-close,
  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .float-emoji {
    font-size: 1.5rem;
  }
}

/* 非常に小さい画面用 */
@media (max-width: 360px) {
  .gallery-grid {
    gap: 5px;
  }

  .gallery-frame {
    border-radius: 8px;
  }
}

/* カスタムスクロールバー */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #ff69b4, #ffb3c1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #ff1493, #ff69b4);
}
