/* 全体のスタイル */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  background-image: url("/menu2025/background-img.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  height: 100vh;
  padding: 0;
  margin: 0;
  overflow: hidden;
  position: relative;
}

/* 背景画像が暗い場合のオーバーレイ（必要に応じて） */
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 0;
  pointer-events: none;
}

.container {
  max-width: 100vw;
  width: 100%;
  height: 100vh;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* ブックとボタンを横並びにするラッパー */
.book-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
  height: 100vh;
}

/* フリップブックのスタイル */
#flipbook {
  margin: 0;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
  background: white;
}

/* ページの基本スタイル */
.page {
  background: white;
  overflow: hidden;
}

/* メニューページ */
.menu-page {
  padding: 0;
  position: relative;
}

.menu-page img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* 表紙・裏表紙のスタイル */
.page-cover,
.page-back-cover {
  width: 460px;
  height: 650px;
  padding: 0;
  overflow: hidden;
}

.page-cover img,
.page-back-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* サイドナビゲーションボタン */
.side-nav-btn {
  width: 50px;
  height: 650px;
  background: linear-gradient(180deg, #1b4332 0%, #2d6a4f 50%, #1b4332 100%);
  border: 2px solid #40916c;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
  color: white;
  font-size: 1.8em;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 100;
}

#prev-btn {
  border-right: none;
}

#next-btn {
  border-left: none;
}

.side-nav-btn:hover {
  background: linear-gradient(180deg, #2d6a4f 0%, #52b788 50%, #2d6a4f 100%);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.side-nav-btn:active {
  transform: scale(0.98);
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.4);
}

.side-nav-btn span {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* ページ番号表示 */
.page-number-container {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 15px;
}

#page-number {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1em;
  font-weight: bold;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  display: inline-block;
  min-width: 150px;
  backdrop-filter: blur(5px);
}

/* ページナビゲーション矢印ボタン */
.page-nav-arrow {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  color: rgba(255, 255, 255, 0.9);
  padding: 0;
  width: 44px;
  height: 44px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
  transition: all 0.2s ease;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.page-nav-arrow:hover {
  background: rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.page-nav-arrow:active {
  transform: scale(0.95);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.page-nav-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.page-nav-arrow:disabled:hover {
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* ページ番号による色分け */
.p1,
.p10 {
  background: #2c1810;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  body {
    padding: 0;
    overflow: hidden;
  }

  .container {
    height: 100vh;
    width: 100vw;
    padding: 0;
    overflow: hidden;
  }

  .book-wrapper {
    flex-direction: column;
    gap: 0;
    margin: 0;
    height: 100vh;
    width: 100vw;
    justify-content: center;
  }

  #flipbook {
    margin: 0;
  }

  /* SP時はボタンを非表示 */
  .side-nav-btn {
    display: none !important;
  }

  .page-number-container {
    bottom: 20px;
    gap: 12px;
  }

  #page-number {
    font-size: 0.9em;
    padding: 6px 10px;
    min-width: 120px;
    background: rgba(0, 0, 0, 0.2);
  }

  .page-nav-arrow {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

/* 印刷時の設定 */
@media print {
  body {
    background: white;
  }

  .navigation,
  h1,
  .instruction {
    display: none;
  }
}

/* ページめくりのアニメーション用 */
.turn-page {
  background: white;
}


/* 画像の読み込み前のプレースホルダー */
.menu-page img {
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

/* ページのシャドウ効果 */
.page {
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.page:hover {
  transform: scale(1.01);
}

/* 拡大表示モーダル */
.zoom-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  cursor: zoom-out;
  animation: fadeIn 0.3s ease;
  overflow: auto;
}

.zoom-modal.show {
  display: flex;
}

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

/* 画像コンテナ */
.zoom-modal-container {
  margin: auto;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100%;
}

.zoom-modal img {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
  cursor: zoom-in;
  transition: all 0.3s ease;
  display: block;
}

.zoom-modal img.zoomed {
  max-width: none;
  max-height: none;
  width: 190vw;
  height: auto;
  cursor: zoom-out;
}

.zoom-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 50px;
  color: white;
  cursor: pointer;
  z-index: 10001;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  transition: all 0.3s ease;
  font-weight: 300;
  line-height: 1;
}

.zoom-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* 拡大のヒント表示 */
.zoom-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.6);
  padding: 10px 25px;
  border-radius: 25px;
  font-size: 14px;
  z-index: 10001;
  pointer-events: none;
  animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

