/* 🌐 全体設定 */
main.container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: visible;
}

/* 🔒 検索フォーム＋結果ヘッダー */
.sticky-header {
  position: sticky;
  top: 32px;
  z-index: 900;
  background-color: var(--bg);
  padding: 16px 24px 20px;
  box-shadow: 0 2px 6px var(--shadow);
  min-height: 120px;
}

.sticky-header h1 {
  margin: 0 0 12px;
  font-size: 24px;
  color: var(--success);
}

/* 🔍 検索フォーム */
.search-form {
  margin-bottom: 16px;
}

.search-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 100%;
}

.search-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  align-items: center;
  overflow-x: auto;
  min-width: fit-content;
}

.search-row label {
  width: 100px;
  text-align: right;
  flex-shrink: 0;
  font-size: 14px;
}

.search-row input[type="text"],
.search-row select {
  width: 130px;
  flex-shrink: 0;
  padding: 6px;
  font-size: 14px;
}

.search-button {
  margin-left: auto;
  padding: 8px 16px;
  background-color: var(--success);
  color: white;
  border: none;
  border-radius: 4px;
  flex-shrink: 0;
}

/* 🎼 検索結果ヘッダー */
.results-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.results-heading h2 {
  margin: 0;
  font-size: 20px;
  color: var(--success);
}

.results-meta {
  font-size: 14px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 📜 楽曲リストスクロール領域 */
.scrollable-results {
  flex: 1;
  overflow-y: auto;
  position: relative;
  padding: 0;
  box-sizing: border-box;
  padding-bottom: 110px;
  max-height: calc(100vh - 32px - 120px);
}

/* 🎯 検索結果の列ヘッダー */
.results-header-row {
  display: flex;
  align-items: center;
  padding: 0;
  background-color: var(--bg-alt);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 800;
}

.header-cell {
  display: flex;
  color: var(--text);
  align-items: center;
  padding: 0 12px;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 40px;
}

.header-cell.title {
  flex-grow: 2.5;
  min-width: 240px;
}

.header-cell.artist {
  flex-grow: 2;
  min-width: 200px;
}

.header-cell.release {
  width: 160px;
  flex: 0 0 auto;
}

.header-cell.sing-count {
  justify-content: flex-end;
  width: 72px;
  flex: 0 0 auto;
  padding-right: 12px;
}

/* 🎼 楽曲リストの行 */
.result-row {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding-top: 12px;
  padding-right: 32px;
  padding-bottom: 3px;
  align-items: flex-start;
  min-height: 48px;
  position: relative;
}

.result-row:hover {
  background-color: var(--bg-hover);
}

.cell {
  flex: 1;
  color: var(--text);
  padding: 0 12px;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell.title {
  flex-grow: 2.5;
  min-width: 240px;
  position: relative;
  overflow: visible;
}

.cell.artist {
  flex-grow: 2;
  min-width: 200px;
  position: relative;
  overflow: visible;
}

.cell.release {
  width: 160px;
  padding-top: 10px;
  flex: 0 0 auto;
}

.cell.sing-count {
  flex: 0 0 72px;
  width: 72px;
  text-align: right;
  padding-right: 12px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 🧠 読み仮名の補足表示 */
.title-kana,
.artist-kana {
  font-size: 13px;
  color: var(--text-light);
}

/* 🧩 省略表示＋ツールチップ（JS対応） */
.ellipsis {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

.custom-tooltip {
  position: absolute;
  background-color: var(--bg);
  color: var(--text);
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 4px;
  white-space: normal;
  box-shadow: 0 2px 6px var(--shadow);
  z-index: 9999;
  max-width: 400px;
  display: none;
}

/* 🕳️ 空データ・登録案内 */
.placeholder {
  color: var(--text-light);
  font-style: italic;
  margin-top: 16px;
  text-align: center;
}

.register-invite {
  text-align: center;
  margin-top: 24px;
}

.register-button {
  padding: 8px 16px;
  background-color: var(--main-mid);
  color: var(--main-dark); /* ← コントラストを保つために濃色文字に */
  border-radius: 4px;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
}

.register-button:hover {
  background-color: var(--main-dark); /* ← ホバー時は少し濃くして操作感を演出 */
  color: white;
}

.stream-table-wrapper.scrollable {
  padding-bottom: 60px;
}

.copy-icon-button {
  position: absolute;
  top: 12px;
  right: 4px;
  background: rgba(255, 255, 255, 0.8);
  padding: 4px;
  border-radius: 4px;
  box-shadow: 0 1px 4px var(--shadow);
  opacity: 0.6;
  transition: border-color 0.2s ease, opacity 0.2s ease;
  z-index: 2;
  cursor: pointer;
}

.copy-icon-button:hover {
  background: var(--accent-hover);
  box-shadow: 0 2px 6px var(--shadow);
  opacity: 1;
}

.result-row:hover .copy-icon-button {
  border-color: var(--accent-hover);
  opacity: 1;
  box-shadow: 0 0 0 2px rgba(208, 84, 136, 0.2); /* ← アクセント色の演出 */
}

button,
.search-button,
.primary-button {
  padding: 8px 16px;
  background-color: var(--success);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.search-button {
  background-color: var(--main-mid);
  color: var(--main-dark); /* ← コントラストを保つために濃色文字に */
}

.search-button:hover {
  background-color: var(--main-dark); /* ← ホバー時は少し濃くして操作感を演出 */
  color: white;
}

.results-heading h2 {
  margin: 0;
  font-size: 20px;
  color: var(--text);
}

.cell a {
  color: var(--main-dark);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

.cell a:hover {
  text-decoration: underline;
}


