/* ------------------------------
   共通スタイル
------------------------------ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Cinzel Decorative', serif;
  color: #fff;
  line-height: 1.6;
  background-color: #000;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center center;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ------------------------------
   ヘッダー
------------------------------ */

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1px 10px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 100;
}

.logo h1 {
  font-size: 1.6rem;
  font-weight: 600;
  color: #fff;
  font-family: 'Cinzel Decorative', serif;
  letter-spacing: 4px;
  margin: 0;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-toggle {
  display: none;
  font-size: 24px;
  color: white;
  cursor: pointer;
}

/* ------------------------------
   言語切り替え
------------------------------ */

.lang-switcher {
  position: relative;
}

#currentLang {
  background: transparent;
  border: none;
  color: white;
  padding: 2px 4px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
}

.lang-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  padding: 4px;
  display: none;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  z-index: 100;
}

.lang-menu.show {
  display: flex;
}

.lang-menu li {
  cursor: pointer;
  padding: 2px;
}

.flag-icon {
  width: 25px;
  height: auto;
  border-radius: 2px;
}

/* ------------------------------
   ナビゲーションメニュー
------------------------------ */

nav ul {
  display: flex;
  gap: 12px;
}

nav ul li a {
  font-size: 1rem;
  color: #fff;
  font-weight: 400;
  padding: 4px 6px;
  transition: color 0.3s;
}

nav ul li a:hover {
  color: #ffcc00;
}

/* ------------------------------
   スマホ対応（768px以下）
------------------------------ */

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    z-index: 1000;
  }

  nav ul.show {
    display: flex;
  }

  nav ul li {
    text-align: right;
    padding: 6px 0;
  }

  #currentLang {
    font-size: 12px;
    padding: 1px 4px;
  }

  .flag-icon {
    width: 20px;
  }
}

/* ------------------------------
   背景フェード切り替え用CSS
------------------------------ */

#bg-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.bg-image {
  position: absolute;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease;
  z-index: -2;
  pointer-events: none;
}

.bg-image.active {
  opacity: 1;
}

.bg-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  z-index: 1;
  background-color: rgba(0, 0, 0, 0.8);
}

/* ------------------------------
   ヒーローセクション
------------------------------ */

#hero {
  height: 65vh;
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
}

.hero-content h3,
.hero-content h2 {
  font-size: 4rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 20px;
  text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.7);
}

.hero-content p {
  font-size: 2.2rem;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.8);
}

#cta-button-header,
#cta-button-footer {
  background: linear-gradient(to bottom, #2a2a2a, #1a1a1a);
  color: #ffcc66;
  border: 3px solid #ffcc66;
  box-shadow: 0 0 12px rgba(255, 204, 102, 0.2);
  font-family: 'Cinzel Decorative', serif;
  font-size: 2.6rem;
  padding: 10px 30px;
  border-radius: 6px;
  transition: all 0.3s ease;
  cursor: pointer;
}

#cta-button-header:hover,
#cta-button-footer:hover {
  background-color: #ffcc66;
  transform: scale(1.05);
}

#footer-button-wrapper {
  width: 100%;
  text-align: center;
  margin: 100px 0 80px 0;
}

#cta-button-footer {
  display: none;
  opacity: 0;
}

#cta-button-footer.show {
  display: inline-block;
  opacity: 1;
  transform: scale(1);
}








/* ------------------------------
   特徴セクション
------------------------------ */

#features {
  padding: 40px 20px;
  background-color: #1e1e1e;
}

#features .container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.feature-item1 {
  margin-top: 100px;
  width: 100%;
  text-align: center;
  transition: transform 0.3s;
  font-size: 1.8rem;
}

.feature-item1 img {
  max-width: 100%;
  border-radius: 10px;
  margin-bottom: 15px;
}

.feature-item1 p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
}

.feature-item1:hover {
  /* ← ここに hover アニメーションが必要なら追加できます */
}

/* ------------------------------
   フッター
------------------------------ */

footer {
  padding: 20px;
  background-color: #121212;
  text-align: center;
  color: #fff;
  font-size: 1rem;
}

footer p {
  font-size: 0.9rem;
}

/* ------------------------------
   レスポンシブ対応（～768px）
------------------------------ */

@media (max-width: 768px) {
  #hero {
    height: 40vh;
    background-position: top;
  }

  .hero-content h3 {
    font-size: 2rem;
  }

  .hero-content h2 {
    font-size: 1.5rem;
  }

  .hero-content p {
    font-size: 1.2rem;
  }

  #features {
    padding: 30px 10px;
  }

  #features .container {
    flex-direction: column;
    align-items: center;
  }

  .feature-item1 {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    font-size: 1rem;
  }

  .feature-item1 h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
  }

  #cta-button-header,
  #cta-button-footer {
    border: 2px solid #ffcc66;
    font-size: 1.5rem;
  }
}









/* ------------------------------
   スライダーセクション
------------------------------ */

#slider {
  position: relative;
  width: 100%;
  height: 70vh;
  overflow: hidden;
}

@keyframes zoomLoop {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.15);
  }
}

#slider img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1);
  transition: opacity 1.2s ease, transform 6s linear;
  z-index: 0;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
}

#slider img.active {
  opacity: 1;
  transform: scale(1.2);
  z-index: 1;
}

.dots {
  display: flex;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  gap: 10px;
  z-index: 2;
}

.dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.dots button.active {
  background-color: white;
}

/* ------------------------------
   テキストふわりアニメーション
------------------------------ */

.fade-text {
  opacity: 0.1;
  transition: opacity 0.9s ease;
}

.fade-text.active {
  opacity: 1;
  transform: scale(1.02);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}




/* ------------------------------
   キャラクター紹介セクション
------------------------------ */

.character-section {
  margin: 0 auto;
}

.character-section h3 {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 90%;
  max-width: 800px;
  aspect-ratio: 8 / 1.5;
  margin: 0 auto 40px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  color: #2e2c26;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  background-image: url('../img1/section-banner.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.character-card1,
.character-card2 {
  border-radius: 8px;
  margin-bottom: 30px;
  text-align: center;
  transition: transform 0.3s;
}

.character-card1 img,
.character-card2 img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 15px;
  border: 2px solid rgba(255, 255, 255, 1.0);
}

.character-card1 {
  max-width: 800px;
  margin: 0 auto 30px;
}

.character-card2 {
  max-width: 1000px;
  margin: 0 auto 30px;
}

.character-card1 h4,
.character-card2 h4 {
  font-size: 3rem;
  margin-bottom: 10px;
  color: #ffcc00;
}

.character-card1 p,
.character-card2 p {
  font-size: 1.8rem;
  color: #fff;
  line-height: 1.7;
}

/* ------------------------------
   レスポンシブ対応（～768px）
------------------------------ */

@media (max-width: 768px) {
  #hero {
    height: 40vh;
    background-position: top;
  }

  .hero-content h3 {
    font-size: 2rem;
  }

  .hero-content h2 {
    font-size: 1.5rem;
  }

  .hero-content p {
    font-size: 1.2rem;
  }

  #features {
    padding: 30px 10px;
  }

  #features .container {
    flex-direction: column;
    align-items: center;
  }

  .feature-item1 {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    font-size: 1rem;
  }

  .feature-item1 h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
  }

  #cta-button-header,
  #cta-button-footer {
    border: 2px solid #ffcc66;
    font-size: 1.5rem;
  }

  .character-section h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
  }

  .character-card1 h4,
  .character-card2 h4 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
  }

  .character-card1 p,
  .character-card2 p {
    font-size: 1rem;
  }

  .character-card1 img,
  .character-card2 img {
    max-width: 100%;
    border: 1px solid rgba(255, 255, 255, 1.0);
  }

  .scene img {
    border: 1px solid rgba(255, 255, 255, 1.0);
  }
}

/*漫画 */

.scene {
  position: relative;
  max-width: 1000px;
  margin: 120px auto;
}

.scene img {
  width: 100%;
  display: block;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 1.0);
}

@media (max-width: 768px) {
.scene img {
  border: 1px solid rgba(255, 255, 255, 1.0);
}
}


/* ------------------------------
   セリフ共通
------------------------------ */

.speech {
  position: absolute;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  color: white;
  padding: 5px;
  font-size: clamp(14px, 2vw, 22px);
  white-space: pre-line;
  z-index: 10;
  overflow: visible;
  background: none; /* 背景はここではなしに */
}

/* 背景ぼかしの黒を別レイヤーにして後ろに */
.speech::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -10px;
  right: -10px;
  bottom: -2px;
  background: rgba(0, 0, 0, 0.8);
  filter: blur(10px); /* ← ここでふんわり */
  border-radius: 20px;
  z-index: -1;
}
.speech.active {
  opacity: 1;
  transform: translateY(0);
}

/* 各セリフの位置 */
.line1aj { top: 30%; left: 5%; font-size: clamp(14px, 2vw, 28px); }
.line1bj { top: 50%; right: 15%;font-size: clamp(14px, 2vw, 30px); }
.line1cj { top: 70%; right: 5%; font-size: clamp(14px, 2vw, 30px); }

.line2aj { top: 50%; left: 5%; font-size: clamp(14px, 1.8vw, 28px); }
.line2bj { top: 70%; right: 5%; font-size: clamp(14px, 2vw, 30px); }

.line3aj { top: 50%; left: 5%; font-size: clamp(14px, 2vw, 30px); }
.line3bj { top: 70%; right: 5%; font-size: clamp(14px, 2vw, 30px); }

.line4aj { top: 30%; left: 5%; font-size: clamp(14px, 1.8vw, 28px); }
.line4bj { top: 50%; left: 10%; font-size: clamp(14px, 2vw, 30px); }
.line4cj { top: 70%; right: 5%; font-size: clamp(14px, 2vw, 30px); }

.line5aj { top: 20%; left: 5%; font-size: clamp(14px, 1.6vw, 26px); }
.line5bj { top: 40%; right: 5%; font-size: clamp(14px, 1.8vw, 28px); }
.line5cj { top: 60%; right: 5%; font-size: clamp(14px, 1.8vw, 28px); }
.line5dj { top: 80%; right: 5%; font-size: clamp(14px, 1.8vw, 28px); }

.line6aj { top: 35%; right: 5%; font-size: clamp(14px, 1.8vw, 28px); }
.line6bj { top: 55%; right: 5%; font-size: clamp(14px, 2vw, 30px); }
.line6cj { top: 75%; right: 5%; font-size: clamp(14px, 2vw, 30px); }

.line7aj { top: 30%; left: 5%; font-size: clamp(14px, 2vw, 28px); }
.line7bj { top: 50%; right: 15%;font-size: clamp(14px, 2vw, 30px); }
.line7cj { top: 70%; right: 5%; font-size: clamp(14px, 2vw, 30px); }

.line8aj { top: 60%; left: 5%; font-size: clamp(14px, 1.8vw, 28px); }
.line8bj { top: 80%; left: 5%; font-size: clamp(14px, 2vw, 30px); }

.line9aj { top: 40%; left: 5%; font-size: clamp(14px, 2vw, 28px); }
.line9bj { top: 60%; left: 5%; font-size: clamp(14px, 2vw, 28px); }
.line9cj { top: 80%; left: 5%; font-size: clamp(14px, 2vw, 30px); }

.line10aj { top: 30%; left: 5%; font-size: clamp(14px, 2vw, 30px); }
.line10bj { top: 50%; right: 10%; font-size: clamp(14px, 2vw, 30px); }
.line10cj { top: 70%; right: 5%; font-size: clamp(14px, 2vw, 30px); }


.line11aj {
  top: 80%;
  left: 50%;
  transform: translate(-50%, 30px); /* ← 初期位置（Y方向に少し下） */
  font-size: clamp(14px, 2vw, 30px);
  text-align: center;
  white-space: nowrap;
}

/* .active になったときのtransformを上書き！ */
.line11aj.speech.active {
  transform: translate(-50%, -50%);
}





/* ------------------------------
   ポップアップ＆くち演出
------------------------------ */

#mouth-up {
  height: 500px;
}

#mouth-down {
  height: 500px;
}

/* --- スマホ --- */
@media (max-width: 768px) {
  #mouth-up{
    height:350px;
  }
  #mouth-down{
    height:300px;
  }
}

body.noscroll {
  overflow: hidden;
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 1.2s ease;
  backdrop-filter: blur(2px);
}

.popup-overlay.show {
  display: flex;
  opacity: 1;
  animation: glitch-in 0.4s ease;
}

.popup-overlay.hide {
  opacity: 0;
  transition: opacity 1.5s ease;
}

@keyframes glitch-in {
  0% {
    transform: translate(0, 0);
    filter: none;
  }
  15% {
    transform: translate(-2px, 1px);
    filter: contrast(130%) hue-rotate(10deg);
  }
  30% {
    transform: translate(2px, -1px);
    filter: contrast(90%) hue-rotate(-10deg);
  }
  50% {
    transform: translate(-1px, 2px);
    filter: brightness(1.2);
  }
  100% {
    transform: translate(0, 0);
    filter: none;
  }
}


/* --- popup window --- */
.popup-window {
  background: #222;
  border: 4px solid #888;
  padding: 1.5rem;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.popup-text {
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  color: #fff;
  margin-bottom: 1.5rem;
  line-height: 1.5;
  word-break: keep-all;
  white-space: pre-wrap;
  text-align: center;
}

.popup-options {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.popup-button {
  background: #444;
  color: #fff;
  border: 2px solid #aaa;
  padding: 0.5rem 1.2rem;
  font-size: clamp(1rem, 3.5vw, 1.2rem);
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s ease;
}

.popup-button:hover {
  animation: shake 0.25s linear;
  background: #666;
  border-color: #fff;
}

@keyframes shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-2px); }
  40% { transform: translateX(2px); }
  60% { transform: translateX(-1px); }
  80% { transform: translateX(1px); }
  100% { transform: translateX(0); }
}

/* --- スマホ：ボタンを縦並びに --- */
@media (max-width: 768px) {
  .popup-options {
    flex-direction: column;
    gap: 1rem;
  }
}






/* --- くちアニメーション --- */
@keyframes mouthZoomOut {
  0% {
    transform: scale(1);
    opacity: 0.2;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

.mouth-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 900;
  pointer-events: none;
  opacity: 0;
  transform: scale(1);
  filter: blur(2px) brightness(1.2);
  background-image: url('../img1/mouth1.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}


/* 縦長の画面（スマホ）向けに画像差し替え */
@media (max-aspect-ratio: 4/5) {
  .mouth-bg {
    background-image: url('../img1/mouth2.png');
    background-position: center 30%; /* 少し上に寄せるなど調整可能 */
  }
}

.mouth-bg.visible {
  opacity: 0.2;
  animation: mouthZoomOut 2s ease-out forwards;
}





/* ------------------------------
   センシティブコンテンツ警告
------------------------------ */

.sensitive-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  font-family: 'Cinzel Decorative', serif;
  color: #ffcc66;
}

.sensitive-popup {
  background: rgba(0, 0, 0, 0.85);
  border: 2px solid #ffcc66;
  padding: 30px 40px;
  max-width: 600px;
  text-align: center;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(255, 204, 102, 0.4);
}

.sensitive-popup h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #ffcc66;
}

.sensitive-popup p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: #ffffff;
}

.sensitive-buttons button {
  background-color: #ffcc66;
  color: #121212;
  font-weight: bold;
  border: none;
  padding: 12px 24px;
  margin: 0 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s;
}

.sensitive-buttons button:hover {
  background-color: #e0b800;
}

@media (max-width: 768px) {
  .sensitive-popup {
    width: 90%;
    padding: 20px;
  }

  .sensitive-popup h2 {
    font-size: 1.2rem;
  }

  .sensitive-popup p {
    font-size: 1rem;
  }

  .sensitive-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }

  .sensitive-buttons button {
    width: 90%;
    font-size: 1rem;
    padding: 10px;
  }
}










html {
  scroll-behavior: smooth;
}