body {
  font-family: "Hiragino Kaku Gothic Pro", "Hiragino Sans", "Meiryo", sans-serif;
  max-width: 900px;
  margin: 20px auto;
}
h1 {
  color: #333;
}
table {
  width: 100%;
  max-width: 900px;
  border-collapse: collapse;
  margin-top: 20px;
}
th, td {
  border: 1px solid #ddd;
  padding: 4px;
  text-align: left;
  height: 24px;
}
td {
  border: 1px solid #ddd;
  padding: 6px 12px;
  text-align: left;
  height: 36px;
  vertical-align: middle;
  white-space: nowrap;
}

/* テーブルセルの幅と配置の調整 */
td:first-child {
  text-align: center;
}

/* キャラクター紹介カラムの調整 */
td:nth-child(2) {
  align-items: center;
}

/* 感情・タイプカラムの最小幅設定 */
td:nth-child(3) {
  min-width: 48px;
}

/* アクションボタンカラムの配置 */
td.action-buttons {
  text-align: center;
}

td:nth-child(2) span {
  flex: 1 1 auto;
  margin-right: 6px;
}

th {
    background-color: #f2f2f2;
    color: #333;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    padding: 6px 12px;
    height: 36px;
}

th:nth-child(1) {
    width: 60px;
}

th:nth-child(3) {
    width: 140px;
}

th:nth-child(4) {
    width: 140px;
    padding-right: 16px;
}

th.sort-asc::after, th.sort-desc::after {
  content: "";
  position: absolute;
  right: 10px;
  border: 5px solid transparent;
}
th.sort-asc::after {
  border-bottom-color: #333;
  top: 50%;
  transform: translateY(-50%);
}
th.sort-desc::after {
  border-top-color: #333;
  bottom: 50%;
  transform: translateY(50%);
}
tr:nth-child(even) {
  background-color: #f9f9f9;
}
tr:hover {
  background-color: #f1f1f1;
}
.copy-button {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 6px 12px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 13px;
  margin: 4px 2px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s;
}
.copy-button:hover {
  background-color: #45a049;
}
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  max-width: 900px;
  margin: 10px 0;
  width: 100%;
  padding: 0;
  border-radius: 5px;
}
.filters-bar .nav {
  display: flex;
  flex-wrap: wrap;
  list-style-type: none;
  justify-content: center;
  padding: 0;
}
.filters-bar .nav li {
  margin: 0 6px 6px 0;
}
.filters-bar .nav a {
  padding: 5px 10px;
  background-color: #ddd;
  border-radius: 16px;
  text-decoration: none;
  color: #333;
  cursor: pointer;
  white-space: nowrap;
  display: inline-block;
}
.filters-bar .nav a.selected {
  background-color: #ccc;
}
.filters-bar .nav a.reset-filter {
  background-color: #ffcccb;
}
.filters-bar .nav a.reset-filter:hover {
  background-color: #ffb3b0;
}
.filters-bar .nav a.zundamon {
  background-color: #e0f7e9;
}
.filters-bar .nav a.zundamon.selected {
  background-color: #c1e7d4;
}
.filters-bar .search-box {
  display: flex;
  align-items: center;
  margin-left: auto;
  flex-grow: 1;
  margin-right: auto;
}
.filters-bar .search-box input {
  width: 200px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

/* 検索コンテナのスタイル */
.search-container {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 15px 0;
  width: 100%;
  justify-content: space-between;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  padding: 0;
}

/* 検索ボックスのスタイル */
.search-box {
  flex: 1;
  max-width: 500px;
  margin: 0 16px;
}

.search-box input {
  width: 100%;
  max-width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

/* 全て表示ボタンのスタイル */
.reset-all-button {
  padding: 8px 16px;
  background: linear-gradient(45deg, #FF6B6B, #FF8E8E);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
  background-color: #666;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.reset-all-button:hover {
  background: linear-gradient(45deg, #FF8E8E, #FFA5A5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.reset-all-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(255, 107, 107, 0.2);
}

/* フィルタグループのスタイル */
.filter-groups-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.filter-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.system-filter-button {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  min-width: 120px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-weight: bold;
}

.system-filter-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.system-filter-button.selected {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px currentColor;
  outline: 2px solid #000;
}

.system-filter-button,
.filter-group .character-filter-button {
  text-align: center;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  vertical-align: middle;
}

.system-filter-button.system-VOICEVOX {
  background-color: rgb(165, 212, 173);
  color: white;
}

.system-filter-button.system-SHAREVOX {
  background-color: rgb(146, 170, 212);
  color: white;
}

.system-filter-button.system-AIVISSPEECH {
  background-color: rgb(65, 162, 236);
  color: white;
}

.system-filter-button.system-OTHER {
  background-color: rgb(180, 180, 180);
  color: white;
}

.filter-group .character-filter-button {
  min-height: 36px;
  min-width: 80px;
}

.character-buttons-container {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.character-filter-button {
  padding: 6px 12px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.5;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  min-width: 80px;
}

.character-filter-button.system-VOICEVOX {
  background-color: rgb(165, 212, 173);
  color: white;
}

.character-filter-button.system-SHAREVOX {
  background-color: rgb(146, 170, 212);
  color: white;
}

.character-filter-button.system-AIVISSPEECH {
  background-color: rgb(65, 162, 236);
  color: white;
}

.character-filter-button.system-OTHER {
  background-color: rgb(180, 180, 180);
  color: white;
}

.system-filter-button.selected,
.character-filter-button.selected {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px currentColor;
  outline: 2px solid #000;
}

.action-button {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.action-button.info-label {
    padding: 2px 6px 2px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    line-height: 16px;
    background-color: #ddf4ff;
    color: #0969da;
    border: 1px solid rgba(9, 105, 218, 0.1);
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    margin: 0;
}

.action-button.info-label:hover {
    background-color: #b6e3ff;
    border-color: rgba(9, 105, 218, 0.2);
    transform: translateY(-1px);
}

.action-button.cv-label {
    padding: 2px 6px 2px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    line-height: 16px;
    background-color: #fff3c4;
    color: #856404;
    border: 1px solid rgba(133, 100, 4, 0.1);
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    margin: 0 4px;
}

.action-button.cv-label:hover {
    background-color: #ffeeba;
    border-color: rgba(133, 100, 4, 0.2);
    transform: translateY(-1px);
}

/* ツールチップのスタイル */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease;
}

[data-tooltip]:hover:before {
    visibility: visible;
    opacity: 1;
}

.info-button {
  background-color: #2196F3;
  color: white;
}

.info-button:hover {
  background-color: #1976D2;
}

.action-buttons {
  padding: 4px;
  text-align: center;
  vertical-align: middle;
}

/* 続行ボタンのスタイル */
.continue-button {
  display: block;
  margin: 20px auto;
  padding: 10px 24px;
  background: linear-gradient(45deg, #4CAF50, #45a049);
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
  width: fit-content;
}

/* 件数表示のスタイル */
.status-text {
  text-align: center;
  color: #666;
  font-size: 14px;
  white-space: nowrap;
  margin: 0;
  min-width: 60px;
  font-weight: bold;
  margin-right: auto;
}

#table-container {
  position: relative;
  margin-bottom: 40px;
}
