/* コード譜ページ用CSS */
/* バージョン管理用: v=20251213b */

:root {
  --primary: #53B3A7;
  --primary-light: #7DD3C8;
  --primary-dark: #3D9A8E;
  --bg: #F5FAFA;
  --card-bg: #fff;
  --text: #333;
  --text-light: #666;
  --shadow: 0 4px 12px rgba(83,179,167,0.15);
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  font-family: "M PLUS 1 Code", monospace;
  font-size: 20px;
  padding: 0;
  margin: 0;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}

/* ヘッダー */
.header {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo {
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  font-family: "Zen Maru Gothic", sans-serif;
}

.header-home {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-size: 14px;
  margin-left: auto;
  font-family: "Zen Maru Gothic", sans-serif;
}

/* 曲情報 */
.song-header { margin-bottom: 4px; }
.song-title { font-size: 22px; font-weight: 700; }
.song-artist { font-size: 14px; margin-left: 8px; color: var(--text-light); }
.song-capo { font-size: 16px; margin-bottom: 8px; }

/* コード数バッジ */
.song-chord-count { 
  display: inline-block; 
  padding: 4px 12px; 
  border-radius: 20px; 
  font-size: 14px; 
}

.chord-level-easy { background: #d4edda; color: #333; }
.chord-level-medium { background: #fff3cd; color: #333; }
.chord-level-hard { background: #f8d7da; color: #333; }

/* 曲本文（基本スタイル - スマホ） */
.song-body { 
  margin-top: 12px; 
  white-space: pre-wrap; 
  background: var(--card-bg); 
  padding: 12px 6px; 
  border-radius: var(--radius); 
  box-shadow: var(--shadow); 
  font-size: 16px; 
  line-height: 1.6; 
  -webkit-user-select: none; 
  -moz-user-select: none; 
  -ms-user-select: none; 
  user-select: none; 
}

/* コンテナ（基本スタイル - スマホ） */
.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 8px 4px;
}

/* レスポンシブ対応（メディアクエリは基本スタイルの後に！） */
@media (min-width: 600px) {
  .container { max-width: 600px; padding: 16px; }
  .song-body { font-size: 22px; padding: 16px; }
}

@media (min-width: 900px) {
  .container { max-width: 800px; }
  .song-body { font-size: 24px; }
}

/* コードハイライト */
.chord { 
  color: #cc0000; 
  cursor: pointer; 
  transition: background 0.2s; 
  border-radius: 4px; 
}

.chord:hover { background: rgba(204,0,0,0.1); }

/* 小節線 */
.bar-line { color: #cc0000; }

/* コード画像オーバーレイ */
.chord-overlay { 
  position: fixed; 
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0; 
  background: rgba(0,0,0,0.7); 
  z-index: 9999; 
  display: flex; 
  justify-content: center; 
  align-items: center; 
  opacity: 0; 
  visibility: hidden; 
  transition: opacity 0.3s, visibility 0.3s; 
}

.chord-overlay.show { opacity: 1; visibility: visible; }

.chord-overlay-content { 
  background: #fff; 
  padding: 20px; 
  border-radius: 16px; 
  text-align: center; 
  max-width: 90%; 
  max-height: 90%; 
  cursor: pointer; 
}

.chord-overlay-content img { 
  max-width: 750px; 
  max-height: 750px; 
  width: 80vw; 
  height: auto; 
}

.chord-overlay-content .chord-hint { 
  font-size: 14px; 
  color: var(--text-light); 
  margin-top: 12px; 
}

.chord-not-found { 
  font-size: 18px; 
  color: var(--text-light); 
  padding: 40px; 
}

/* 次の曲セクション */
.next-songs { 
  margin-top: 32px; 
  padding-top: 24px; 
  border-top: 2px solid var(--primary-light); 
}

.next-songs-title { 
  font-size: 18px; 
  font-weight: 700; 
  margin-bottom: 16px; 
  color: var(--primary-dark); 
  font-family: "Zen Maru Gothic", sans-serif; 
}

.next-songs-grid { 
  display: flex; 
  flex-direction: column; 
  gap: 10px; 
}

.next-song-btn { 
  display: flex; 
  align-items: center; 
  gap: 10px; 
  padding: 14px 16px; 
  background: var(--card-bg); 
  border-radius: var(--radius); 
  text-decoration: none; 
  color: var(--text); 
  box-shadow: var(--shadow); 
  transition: all 0.2s; 
  font-family: "Zen Maru Gothic", sans-serif; 
}

.next-song-btn:hover { 
  transform: translateX(4px); 
  box-shadow: 0 6px 20px rgba(83,179,167,0.25); 
}

.next-song-btn .icon { font-size: 24px; flex-shrink: 0; }
.next-song-btn .info { flex: 1; min-width: 0; }
.next-song-btn .label { font-size: 11px; color: var(--primary); font-weight: 600; }
.next-song-btn .title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-song-btn .artist { font-size: 12px; color: var(--text-light); }
.next-song-btn .badge { padding: 3px 8px; border-radius: 50px; font-size: 11px; font-weight: 600; flex-shrink: 0; }

/* フッター */
.footer { 
  margin-top: 40px; 
  padding: 24px 16px; 
  background: var(--text); 
  text-align: center; 
}

.footer a { 
  color: rgba(255,255,255,0.8); 
  text-decoration: none; 
  font-size: 14px; 
  font-family: "Zen Maru Gothic", sans-serif; 
}

.footer a:hover { color: #fff; }

.loading-next { 
  text-align: center; 
  padding: 20px; 
  color: var(--text-light); 
  font-size: 14px; 
}

/* アドバイスボックス */
.advice-box { 
  margin-top: 20px; 
  padding: 16px; 
  background: linear-gradient(135deg, #fff9e6, #fff3cd); 
  border-radius: var(--radius); 
  border-left: 4px solid var(--primary); 
}

.advice-box .advice-title { 
  font-size: 14px; 
  font-weight: 700; 
  color: var(--primary-dark); 
  margin-bottom: 8px; 
  font-family: "Zen Maru Gothic", sans-serif; 
}

.advice-box .advice-text { 
  font-size: 15px; 
  color: var(--text); 
  line-height: 1.6; 
  font-family: "Zen Maru Gothic", sans-serif; 
}
