/*
Theme Name: CD Special Site Theme
Description: 特設サイト用テーマ
Version: 2.5
*/

html { 
  scroll-behavior: smooth; 
  overflow-x: hidden; /* 横スクロールを根本から防止 */
}

body {
  margin: 0; 
  padding: 0;
  background-color: var(--bg-color) !important; /* PHPからの背景色を優先 */
  color: var(--text-color);
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', sans-serif;
  line-height: 1.6; 
  letter-spacing: 0.05em;
  overflow-x: hidden; /* コンテンツのはみ出しによる横揺れを防止 */
  width: 100%;
}

/* 全ての要素でサイズ計算を「余白込み」に設定 (横スクロール対策) */
*, *::before, *::after {
  box-sizing: border-box;
}
a { color: var(--accent-color); text-decoration: none; transition: opacity 0.3s; }
a:hover { opacity: 0.7; }

/* 全体のコンテナ幅を拡張 (1000px) */
.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box; /* パディングを含めた幅計算にする */
}
/* --- セクション構造（PCスプリット / スマホ中央） --- */
section { 
  margin-bottom: 60px; /* スマホでは余白を詰める */
  padding-top: 20px; 
  display: flex;
  flex-direction: column; 
  align-items: center;
  width: 100%;
  box-sizing: border-box; /* 横スクロール防止 */
}

@media (min-width: 768px) {
  section {
    margin-bottom: 120px;
    flex-direction: row; 
    align-items: flex-start;
    justify-content: space-between;
  }
  /* 特定セクションはPCでも中央揃えを維持 */
  section.hero-section, section.buy-section, section#credit, footer {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
}

/* --- 見出しデザイン --- */
h2.section-title {
  text-align: center; font-size: 1.5rem; text-transform: uppercase;
  letter-spacing: 0.1em; margin-bottom: 30px;
  border-bottom: 1px solid var(--accent-color);
  display: inline-block; padding-bottom: 10px;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  /* PC表示での見出しエリアを拡張 (300px) */
  section:not(#credit) h2.section-title {
    width: 300px; 
    font-size: 1.8rem; 
    text-align: left;
    margin-bottom: 0;
    line-height: 1.2;
  }
}

.section-content { width: 100%; }
@media (min-width: 768px) {
  section:not(#credit) .section-content {
    /* 見出し幅300px + 余白50px分を引いた残り */
    width: calc(100% - 350px);
  }
}

/* --- 背景色が伸びるアニメーション --- */
.bgextend { animation-name: bgextendAnimeBase; animation-duration: 1s; animation-fill-mode: forwards; position: relative; overflow: hidden; opacity: 0; display: inline-block; }
@keyframes bgextendAnimeBase { from { opacity: 0; } to { opacity: 1; } }
.bgappear { animation-name: bgextendAnimeSecond; animation-duration: 1s; animation-delay: 0.6s; animation-fill-mode: forwards; opacity: 0; }
@keyframes bgextendAnimeSecond { 0% { opacity: 0; } 100% { opacity: 1; } }
.bgLRextend::before { animation-name: bgLRextendAnime; animation-duration: 1s; animation-fill-mode: forwards; content: ""; position: absolute; width: 100%; height: 100%; background-color: var(--accent-color); z-index: 1; }
@keyframes bgLRextendAnime { 0% { transform-origin: left; transform: scaleX(0); } 50% { transform-origin: left; transform: scaleX(1); } 50.001% { transform-origin: right; } 100% { transform-origin: right; transform: scaleX(0); } }
.bgappearTrigger, .bgLRextendTrigger { opacity: 0; }

/* --- ハンバーガーメニュー --- */
.hamburger { position: fixed; top: 25px; right: 25px; width: 30px; height: 20px; cursor: pointer; z-index: 9999; }
.hamburger span { position: absolute; width: 100%; height: 2px; background-color: var(--text-color); border-radius: 2px; transition: all 0.3s ease; }
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 9px; }
.hamburger span:nth-child(3) { bottom: 0; }
.hamburger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); background-color: var(--accent-color); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); background-color: var(--accent-color); }

.nav-menu { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background-color: rgba(18, 18, 18, 0.95); backdrop-filter: blur(5px); z-index: 9998; display: flex; flex-direction: column; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: all 0.4s ease; }
.nav-menu.active { opacity: 1; visibility: visible; }
.nav-menu ul { list-style: none; padding: 0; margin: 0; text-align: center; }
.nav-menu ul li { margin-bottom: 25px; transform: translateY(20px); opacity: 0; transition: all 0.4s ease; }
.nav-menu.active ul li { transform: translateY(0); opacity: 1; }
.nav-menu a.nav-link { color: var(--text-color); font-size: 1.8rem; font-weight: bold; text-transform: uppercase; letter-spacing: 0.15em; }

.nav-sns { margin-top: 50px; display: flex; gap: 20px; transform: translateY(20px); opacity: 0; transition: all 0.4s ease 0.6s; }
.nav-menu.active .nav-sns { transform: translateY(0); opacity: 1; }
.nav-sns a { display: flex; justify-content: center; align-items: center; width: 50px; height: 50px; font-size: 1.5rem; color: var(--accent-color); border: 1px solid var(--accent-color); border-radius: 50%; transition: all 0.3s ease; }
.nav-sns a:hover { transform: scale(1.1); background: var(--accent-color); color: #000; }

/* --- Hero Section --- */
.hero-section { 
  position: relative; 
  min-height: 90vh; 
  display: flex !important; 
  flex-direction: column !important; 
  align-items: center !important; 
  justify-content: center !important; 
  gap: 40px; 
  margin-bottom: 100px; 
  padding-bottom: 120px; 
  box-sizing: border-box;
}

@media (max-width: 767px) {
  .hero-section {
    min-height: 100vh;
    padding-top: 60px;
    padding-bottom: 160px;
    height: auto;
  }
}

.jacket-img { width: 100%; height: auto; box-shadow: 0 15px 30px rgba(0,0,0,0.5); border-radius: 4px; max-width: 350px; }
.album-title { font-size: 3rem; font-weight: bold; text-align: center; margin-bottom: 5px; line-height: 1.1; }
.artist-subtitle { font-size: 1.4rem; opacity: 0.8; margin-bottom: 30px; text-align: center; font-weight: bold; }

.release-details { list-style: none; padding: 0; margin: 0; text-align: center; }
.release-details li { margin-bottom: 30px; }
.detail-label { display: block; opacity: 0.6; font-weight: bold; font-size: 0.8rem; letter-spacing: 0.2em; margin-bottom: 8px; text-transform: uppercase; }
.detail-value { display: block; font-size: 1.6rem; font-weight: bold; line-height: 1.2; }

@media (min-width: 768px) {
  .hero-section { flex-direction: row !important; justify-content: center !important; gap: 80px; min-height: 100vh; padding-bottom: 60px; }
  .jacket-img { max-width: 480px; }
  .info-wrapper { text-align: left; flex: 1; }
  .album-title, .artist-subtitle, .release-details { text-align: left; }
}

.scroll-down { 
  position: absolute; 
  bottom: 30px; 
  left: 50%; 
  transform: translateX(-50%); 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  opacity: 0.8;
  z-index: 10;
}
.scroll-down span { font-size: 0.7rem; letter-spacing: 0.2em; margin-bottom: 10px; }
.scroll-down .line { 
  width: 1px; 
  height: 50px; 
  background-color: rgba(255, 255, 255, 0.2); 
  position: relative; 
  overflow: hidden; 
}
.scroll-down .line::before { content: ""; position: absolute; top: -100%; left: 0; width: 100%; height: 100%; background-color: var(--accent-color); animation: scrollDownAnime 2s infinite; }
@keyframes scrollDownAnime { 0% { top: -100%; } 100% { top: 100%; } }

/* --- BUYボタン --- */
.buy-section { margin: 60px 0; display: flex !important; flex-wrap: wrap; justify-content: center !important; gap: 20px; flex-direction: row !important; }
.btn-buy { display: inline-block; padding: 10px; cursor: pointer; text-decoration: none; }
.btn-buy span {
  display: inline-block; background-color: var(--accent-color); color: #000; padding: 18px 50px; font-weight: bold; border-radius: 50px; box-shadow: 0 4px 15px var(--accent-shadow-light); transition: transform 0.3s, box-shadow 0.3s; pointer-events: none; 
}
.btn-buy:hover span { transform: translateY(-5px); box-shadow: 0 8px 25px var(--accent-shadow-dark); }

/* --- Tracklist --- */
.tracklist { list-style: none; padding: 0; width: 100%; margin-bottom: 40px; }
.tracklist li { 
  padding: 15px 0; 
  border-bottom: 1px solid rgba(255,255,255,0.1); 
  display: flex; 
  flex-direction: column; 
  align-items: flex-start;
  width: 100%; /* 横幅を固定 */
  box-sizing: border-box;
}

.track-title-row { 
  display: flex; 
  align-items: flex-start; /* 上揃えで固定 */
  width: 100%;
  white-space: normal; 
  word-break: break-all;
}

.track-num { 
  color: var(--accent-color); 
  margin-right: 12px; 
  font-weight: bold; 
  font-size: 0.9rem;
  flex-shrink: 0;
  /* タイトルと高さを完璧に合わせるための設定 */
  line-height: 1.5; 
  display: inline-block;
  min-width: 1.5rem; /* 番号の幅を確保してズレを防止 */
}

.track-title { 
  font-size: 1.1rem;
  font-weight: bold;
  line-height: 1.5; /* track-numと合わせる */
  text-align: left;
  flex: 1; /* 残りの幅をすべて使う */
}

.track-artist { 
  font-size: 0.8rem;
  opacity: 0.6; 
  margin-top: 4px; 
  /* 番号の幅(min-width) + 余白(margin-right)分だけ左を空ける */
  padding-left: calc(1.5rem + 12px); 
  text-align: left; 
  width: 100%;
  box-sizing: border-box;
}

/* --- Credit --- */
.credit-box { 
  background-color: rgba(255, 255, 255, 0.03); 
  padding: 50px 20px; 
  border-radius: 8px; 
  border: 1px solid var(--border-color); 
  width: 100%; 
  box-sizing: border-box; 
}

.credit-list { 
  display: grid; 
  gap: 30px; 
  /* スマホでは1列、PCでは2列以上に自動調整 */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
  list-style: none; 
  padding: 0; 
  margin: 0; 
}

/* 項目全体を左揃えに変更 */
.credit-item { 
  display: flex; 
  flex-direction: column; 
  align-items: flex-start; /* 左揃え */
}

.credit-role { 
  display: block; 
  color: var(--accent-color); 
  font-size: 0.8rem; 
  font-weight: bold; 
  letter-spacing: 0.1em; 
  margin-bottom: 5px; 
  text-transform: uppercase; 
}

/* 名前とアイコンの横並びを維持し、改行させない設定 */
.credit-artist-name { 
  display: flex; 
  align-items: center; 
  justify-content: flex-start; /* 左揃え */
  font-size: 1.3rem; /* 少しサイズを調整して収まりを良くします */
  font-weight: bold; 
  width: 100%; 
  white-space: nowrap; /* テキストの折り返しを禁止 */
}

.credit-sns-icon {
  margin-left: 10px; 
  width: 24px; 
  height: 24px; 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 1rem; 
  color: var(--text-color); 
  opacity: 0.5; 
  transition: all 0.3s ease; 
  cursor: pointer;
  background-color: transparent;
  flex-shrink: 0; /* アイコンが潰れるのを防ぐ */
}

/* 横幅が狭いデバイスで名前がはみ出す場合の対策（オプション） */
@media (max-width: 375px) {
  .credit-artist-name {
    font-size: 1.1rem; /* 非常に狭い画面では文字サイズを少し下げる */
  }
}
/* --- Footer --- */
footer { padding: 100px 0 60px; text-align: center; width: 100%; display: flex; flex-direction: column; align-items: center; }
.share-title { font-size: 0.8rem; letter-spacing: 0.2em; opacity: 0.6; margin-bottom: 25px; text-transform: uppercase; }
.share-buttons { display: flex; justify-content: center; gap: 25px; }
.share-btn { width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-color); }
.share-btn .btn-inner {
  width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; 
  border: 1px solid rgba(255,255,255,0.1); border-radius: 50%; transition: all 0.3s; pointer-events: none;
}
.share-btn:hover .btn-inner { transform: translateY(-5px); color: var(--accent-color); border-color: var(--accent-color); }
.share-btn i, .share-btn svg { font-size: 1.4rem; width: 1.4rem; height: auto; fill: currentColor; }

#wpadminbar { display: none !important; }
html { margin-top: 0 !important; }

/* コンテンツふんわり表示 */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }