/* ==========================================
   全体基本スタイル
   ========================================== */
:root {
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-color: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --badge-success: #22c55e;
  --badge-danger: #ef4444;
  --badge-neutral: #94a3b8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  padding: 20px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  background: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

h1, h2, h3 {
  margin-bottom: 16px;
  color: var(--text-color);
}

h1 {
  font-size: 1.8rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 8px;
}

h2 {
  font-size: 1.4rem;
  margin-top: 30px;
}

p {
  margin-bottom: 12px;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ==========================================
   ボタン関係
   ========================================== */
.btn-group {
  margin: 20px 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  text-decoration: none;
}

.btn-secondary {
  background-color: #64748b;
  color: #ffffff;
}

.btn-secondary:hover {
  background-color: #475569;
  text-decoration: none;
}

/* ==========================================
   アコーディオン (details / summary)
   ========================================== */
details {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin-bottom: 8px;
  background: #fff;
  overflow: hidden;
}

summary {
  padding: 12px 16px;
  font-weight: bold;
  cursor: pointer;
  background-color: #f1f5f9;
  user-select: none;
}

summary:hover {
  background-color: #e2e8f0;
}

.accordion-content {
  padding: 16px;
  border-top: 1px solid var(--border-color);
}

.song-list-item {
  padding: 6px 0;
  border-bottom: 1px dashed var(--border-color);
}

.song-list-item:last-child {
  border-bottom: none;
}

/* ==========================================
   テーブル（楽曲進捗・登録状況一覧）
   ========================================== */
.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 8px;
}

th, td {
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  text-align: center;
}

th {
  background-color: #f1f5f9;
  font-weight: bold;
}

td.text-left {
  text-align: left;
}

/* ステータス記号 */
.status-yes { color: var(--badge-success); font-weight: bold; }
.status-no { color: var(--badge-danger); font-weight: bold; }
.status-none { color: var(--badge-neutral); }

/* ==========================================
   仮想フォルダツリー構造
   ========================================== */
.tree-view {
  background-color: #0f172a;
  color: #f8fafc;
  padding: 16px;
  border-radius: 6px;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 0.9rem;
  overflow-x: auto;
  line-height: 1.5;
}

.tree-view ul {
  list-style-type: none;
  padding-left: 20px;
}

.tree-view > ul {
  padding-left: 0;
}

.tree-view li {
  position: relative;
}

.tree-title {
  color: #38bdf8;
  margin-left: 4px;
}

/* ==========================================
   個別ページ（プレビュー＆プレイヤー）
   ========================================== */
.section-box {
  margin-bottom: 24px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.youtube-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.youtube-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 6px;
}

audio {
  width: 100%;
  margin-top: 8px;
}

.pdf-preview {
  width: 100%;
  height: 500px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.related-list {
  list-style: none;
}

.related-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}