/* グローバルスタイル */
body {
  display: flex;
  justify-content: center;
  margin-bottom: 0px;
}


h3 {
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text-color);
}

/* コンテナ */
.container {
  width: 100%;
  max-width: 900px;
  background: var(--accent3-color);
  overflow: hidden;
}

/* --- タブのコンテナ --- */
.tabs-container {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--main-color) var(--accent2-color);
  max-width: 100%;
}

/* Webkit対応 */
.tabs-container::-webkit-scrollbar {
  height: 12px;
}

.tabs-container::-webkit-scrollbar-thumb {
  background-color: var(--main-color);
  border-radius: 10px;
}

.tabs-container::-webkit-scrollbar-track {
  background-color: var(--accent2-color);
}

/* --- タブのレイアウト --- */
.tabs {
  display: flex;
  gap: 10px;
  min-width: max-content; /* タブの合計幅が足りない場合に拡張する */
  padding: 10px;
  justify-content: flex-start; /* タブを左寄せ */
}

.tabs .tab {
  flex-shrink: 0;
  padding: 8px 24px;
  font-weight: bold;
  color: #555;
  background: var(--accent2-color);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
}

.tab.active {
  background: var(--main-color);
  color: #333;
  transform: scale(1.1);
}

.tab:hover {
  background: color-mix(in srgb, var(--main-color) 70%, var(--accent2-color));
}

/* ヘッダー */
.header {
  align-items: center;
  text-align: center;
  padding: 20px;
  color: var(--main-color);
}
.character-img {
  width: 90%;
  object-fit: cover;
  border-radius: 25px;
  margin-bottom: 10px;
}
.header-info h2 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: bold;
}
.header-info p {
  margin: 5px 0 0 0;
  color: #555;
}

/* コンテンツエリア */
.contents {
  position: relative;
  padding: 0 16px;
  margin-bottom: 40px;
}
.content {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  
}
.content.active {
  opacity: 1;
  max-height: 2000px; /* 十分な高さに */
  transform: translateX(0);
}

/* プロフィールテーブル：丸みのあるデザイン */
.profile-table {
  margin: 0 auto;
  width: 90%;
  border-collapse: separate;
  border-spacing: 1px;
  margin-bottom: 20px;
}
.profile-table th, .profile-table td {
  padding: 10px;
  font-size: 1rem;
  text-align: left;
  /* border-bottom: 1px solid #fafafa; */
}
.profile-table th {
  background:  color-mix(in srgb, var(--accent-color) 90%, var(  --accent2-color));
  color: var(--accent2-color);
}
.profile-table tr {
  background:  color-mix(in srgb, var(--accent-color) 75%, var(  --accent2-color));
}
.profile-table tr:first-child th {
  border-top-left-radius: 8px;
}
.profile-table tr:first-child td {
  border-top-right-radius: 8px;
}
.profile-table tr:last-child th {
  border-bottom-left-radius: 8px;
  border-bottom: none;
}
.profile-table tr:last-child td {
  border-bottom-right-radius: 8px;
  border-bottom: none;
}

/* 出演作リスト */
.movie-list {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* 100pxのアイテムを均等配置 */
}
.movie-item {
  text-align: center;
}
.movie-poster {
  width: 140px;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
}

.movie-item p {
  margin-bottom: 10px;
}



/* SNS投稿 */
.sns-post {
  display: flex;
  flex-direction: column;
  background: var(--accent2-color);
  border-radius: 10px;
  padding: 20px;
  margin:20px auto;
  width: 100%;
  max-width: 600px;
}

.sns-post img {
  width: 100%;
  border-radius: 8px;
  margin-top: 10px;
}
.sns-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.like-button {
  background: var(--main-color);
  border: none;
  color: #fafafa;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}
.like-button:hover {
  background: var(--main-color);
}
.comment-button {
  background: var(--main-color);
  border: none;
  color: var(--accent2-color);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}
.comment-button:hover {
  background: var(--main-color);
}
.sns-comments p {
  margin: 16px;
  color: #666;
}

/* SNSにアイコン、名前、ユーザーネームを追加 */
.sns-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.sns-user img {
  width: 75px;
  height: 75px;
  object-fit: cover;
  border-radius: 50%;
}

.sns-user .name {
  font-size: 1,2rem;
  font-weight: bold;
}

.sns-user .username {
  color: #999;
  font-size: 1.1rem;
}


/* コメント：吹き出しデザイン */
.comment {
  display: flex;
  margin-bottom: 15px;
  align-items: center;
}

.comment-img {
  width: 60px;
  height: 60px;
}

.comment-bubble {
  background: var(--accent2-color);
  border-radius:16px;
  padding:10px;
  position: relative;
}

.comment-bubble:after {
  content: "";
  position: absolute;
  top: 50%;
  left: -21px;
  margin-top: -15px;
  border: 15px solid transparent;
  border-right: 15px solid var(--accent2-color);
}

.comment-bubble p {
  font-size: 0.95rem;
}

.comment-img-wrap {
  display: flex;
  flex-direction: column;
  margin-right: 16px;
}

.comment-name {
  font-size: 0.8em;
  color: #555;
  text-align: center;
}

.comment-mini-name {
  font-size: 0.6em;
  text-align: center;
}


/* --- イメソンのスタイル --- */
.song-box {
  padding: 16px;
  background: var(--accent2-color);
  border-radius: 8px;
  margin: 20px auto;
  width: 100%;
  max-width: 500px;
}

.song-header {
  display: flex;
  align-items: center;
  gap: 10px; /* タイトルとアーティストの間隔 */
}

.song-title {
  font-size: 1.3rem;
  font-weight: bold;
  flex-shrink: 0; /* タイトルが縮まないようにする */
  color: #333;
}

.artist-name {
  font-size: 1rem;
  color: #666;
}

.lyrics {
  font-size: 1rem;
  font-style: italic;
  color: #444;
  margin-top: 10px;
  border-top: 2px solid var(--main-color);
  padding-top: 10px;
}



/* 関連する俳優のリンクをタブ外に */
.related-actors {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); /* 100pxのアイテムを均等配置 */
    gap: 8px;
    margin-bottom: 30px;
    padding: 16px;
  }



.related-actors a {
  color: #555;
}

.related-actors .actor-link {
  text-align: center; /* 文字を中央揃えに */
}

.related-actors img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
}


@media (min-width: 600px) {
  .tabs-container {
    justify-content: center; /* タブを中央寄せに */
  }

  .character-img {
    width: 55%;
  }

  .header {
    display: flex;
    text-align: left;
  }

  .header-info h2 {
    font-size: 1.8rem;
    font-weight: bold;
    padding-left: 20px;
}

.header-info p {
  font-size: 1.2rem;
  padding-left: 20px;
}

  .actor-comment {
    padding-left: 16px;
  }

  .actor-comment-img {
    width: 65px;
    height: 65px;
  }

  .actor-comment-bubble {
    padding: 15px 30px;
  }
}