html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-y: auto;
}

main.container {
  padding-bottom: 80px; /* ページネーションの高さ + 余白 */
}

/* 🌐 テーブル全体の構成 */
.favorites-table {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.favorites-table th,
.favorites-table td {
  padding: 0px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
  text-align: left;
  color: var(--text);
  background-color: var(--bg);
}

/* 🎼 リンク（曲名・アーティスト名） */
.favorites-table td.col-title a,
.favorites-table td.col-artist a {
  display: inline-block;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  vertical-align: middle;
  text-align: left;
  color: var(--main-dark);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

.favorites-table td.col-title a:hover,
.favorites-table td.col-artist a:hover {
  text-decoration: underline;
}

/* 📐 列幅指定 */
.col-title,
.col-artist {
  width: 260px;
  max-width: 260px;
}

.col-date {
  width: 20%;
  min-width: 180px;
  text-align: center;
  white-space: nowrap;
  padding-right: 0;
  position: relative;
  font-size: 0.95rem;
  color: var(--text);
}

/* 🧩 操作ボタン群ラッパー */
.action-buttons {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: 10px;
}

/* 🧠 ボタン共通スタイル */
.action-buttons button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  transition: transform 0.1s ease;
}

/* 🎯 アイコン画像の統一スタイル */
.icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
  display: inline-block;
  vertical-align: middle;
}

/* 🎨 ホバー演出 */
.action-buttons button:hover .icon {
  transform: scale(1.2);
}

/* ⭐ お気に入り状態の強調（任意） */
.fav-button.active .icon {
  filter: drop-shadow(0 0 2px var(--accent-hover));
}

/* 🕳️ プレースホルダー行 */
.placeholder {
  text-align: center;
  color: var(--text-light);
  padding: 12px;
}

/* 🎧 サブタイトル */
.stream-title {
  font-size: 0.85em;
  color: var(--text-light);
  display: block;
  margin-top: 2px;
}

/* 💬 ツールチップ */
.custom-tooltip {
  position: absolute;
  background-color: var(--bg);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  box-shadow: 0 0 4px var(--shadow);
  z-index: 9999;
  pointer-events: none;
}

/* ✅ 𝕏共有モーダルのサイズ調整 */
#x-share-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 480px;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 4px 12px var(--shadow);
  z-index: 9999;
  box-sizing: border-box;

  /* ✅ 高さを内容に合わせて自動調整 */
  height: auto;
  max-height: none;
  overflow: visible;
}

/* ✅ テキストエリアの高さ制限 */
#x-share-text {
  width: 100%;
  height: 100px;
  max-height: 140px;
  resize: vertical;
  font-size: 0.9rem;
  padding: 8px;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 4px;
  background-color: var(--bg-light);
  color: var(--text);
  overflow-y: auto;
}

/* ✅ ボタン群の配置 */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
}

#x-share-confirm {
  background-color: var(--main-mid);
  color: var(--main-dark);
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#x-share-confirm:hover {
  background-color: var(--main-light);
  color: var(--main-dark);
}

#x-share-cancel {
  background-color: var(--main-mid);
  color: var(--main-dark);
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#x-share-cancel:hover {
  background-color: var(--main-light);
  color: var(--main-dark);
}


@media (max-width: 800px) {
  .favorites-table {
    table-layout: fixed;
    width: 100%;
  }

  .favorites-table th,
  .favorites-table td {
    white-space: normal;
    word-break: break-word;
    padding: 6px;
  }

  .col-title,
  .col-artist {
    width: auto;
    max-width: none;
  }

  .col-date {
    min-width: auto;
    font-size: 0.85rem;
  }
}

.pagination {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--bg); /* 背景色を調整 */
  padding: 10px 0;
  text-align: center;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.pagination button {
  margin: 0 4px;
  padding: 6px 12px;
  background-color: var(--bg);
  color: var(--text);
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
}

.pagination button.active-page {
  background-color: var(--main-mid);
  color: var(--main-dark);
}

.pagination button:hover {
  background-color: var(--main-dark);
  color: white;
}

