html, body {
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
  scroll-behavior: smooth;
  font-family: sans-serif;
}

ol, ul {
  list-style: none;
}

blockquote, q {
  quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
  content: '';
  content: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* 共通スタイル */
body {
  line-height: 1;
  background-color: #ecece7;
  color: black;
  margin: 0;
}

.about {
  margin-top: 50px;
}

.about p {
  font-size: 25px;
  padding-left: 20px;
}

.about td {
  font-size: 25px;
  padding: 0 0 20px 20px;
}

.container {
  max-width: 1312px;
  margin: 0 auto;
  padding: 0 48px;
}

.header {
  background-color: #ecece7;
  font-family: Arial, Helvetica, sans-serif;
  padding-top: 20px;
}

.main-title-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  font-size: 4vw;
  font-weight: bold;
  line-height: 1;
}

.header .sub-title {
  font-size: 1.5vw;
  margin-top: 20px;
}

.header .sub-title a {
  text-decoration: none;
}

.about-section .text p {
  font-size: 1.5vw;
}

.about a {
  text-decoration: none;
}

.tab_list {
  display: flex;
  justify-content: space-between;
  background-color: #ecece7;
  position: relative;
  top: 0;
  width: calc(100% - 96px);
  z-index: 1000; /* Ensure the tab list stays on top */
  margin-top: 48px;
}

.tab_button {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 10px 0;
  margin: 0 -1px; /* Adjust margin to make buttons appear attached */
  background-color: #ecece7;
  border-bottom: 2px solid black;
  transition: background-color 0.3s, border-color 0.3s;
  color: black;
  font-weight: bold;
  text-decoration: none; /* アンダーラインをなくす */
  height: 60px; /* タブボタンの高さを指定 */
  box-sizing: border-box; /* paddingを含めた高さを指定 */
}

.tab_button.selected {
  border-bottom: 2px solid red;
}

.tab_button:visited,
.tab_button:active,
.tab_button:focus,
.tab_button:hover {
  color: black; /* すべての状態で文字色を黒に設定 */
  text-decoration: none; /* すべての状態でアンダーラインをなくす */
}

.tab_button:hover {
  background-color: #e0e0d8; /* ホバー時の背景色を設定 */
}

.tab_button.active {
  border-bottom: 3px solid red; /* 現在のページのタブのアンダーラインを赤に設定 */
}

/* Animation for border transition */
.tab_button::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: red;
  transition: width 0.3s ease, left 0.3s ease;
}

.tab_button.selected::before {
  width: 100%;
  left: 0;
}

.button-container {
  display: flex;
  justify-content: center;
  margin: 30px 0px 10px 0px;
}

.count-button {
  text-decoration: none;
  width: 240px;
  border-radius: 25px;
  padding: 10px 20px;
  font-size: 18px;
  cursor: pointer;
  text-align: center;
  background-color: #010101;
  color: #ecece7;
  position: relative;
  z-index: 1;
  transition: z-index 0.3s;
}

.count-button.active {
  text-decoration: none;
  background-color: #010101;
  color: #ecece7;
  z-index: 2; /* activeな要素を全面に表示 */
}

.count-button:not(.active) {
  color: #9a9a9a;
  text-decoration: none;
  background-color: #dddddd;
  border-radius: 25px;
}

.count-button:first-child {
  margin-right: -30px; /* ボタンを重ねるために負のマージンを設定 */
}

.main_content {
  padding-top: 30px; /* Adjust this value based on the height of your tab list */
  overflow: auto;
  height: calc(100vh - 50px); /* Adjust the height to match the padding */
}

.video-table {
  width: 100%;
  border-collapse: collapse;
}

.video-table th, .video-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #e8e8e8;
}

.video-table th {
  position: relative;
}

.video-table th a {
  color: black; /* テーブルヘッダーのリンクを黒色に */
  text-decoration: none; /* アンダーラインをなくす */
}

.video-table th a:hover,
.video-table th a:focus,
.video-table th a:active {
  text-decoration: underline; /* ホバー時、フォーカス時、アクティブ時にアンダーラインを表示 */
}

.video-table th a:after {
  content: "▼";
  position: absolute;
  right: -20px;
  font-size: 12px;
  color: #777;
}

.video-table th a.asc:after {
  content: "▲";
}

.video-table th a.desc:after {
  content: "▼";
}

.video-row {
  display: flex;
  align-items: flex-start;
  padding: 15px 0;
  position: relative;
}

.thumbnail {
  flex-shrink: 0;
  margin-right: 15px;
  margin-left: 10px; /* 左側に余白を追加 */
  position: relative;
}

.channel-thumbnail {
  flex-shrink: 0;
  margin-right: 15px;
  margin-left: 10px; /* 左側に余白を追加 */
  position: relative;
}

.thumbnail img {
  display: block;
  width: 360px; /* 16:9 ratio for thumbnail */
  height: 203px; /* 16:9 ratio for thumbnail */
  object-fit: cover;
  border-radius: 8px; /* 角を丸くする */
}

.channel-icon {
  width: 150px; /* チャンネルアイコンのサイズ */
  height: 150px; /* チャンネルアイコンのサイズ */
  border-radius: 50%; /* 角を丸くする */
  margin-left: 50px;
}

.default-icon {
  width: 150px; /* デフォルトアイコンのサイズ */
  height: 150px; /* デフォルトアイコンのサイズ */
  border-radius: 50%;
  background-color: rgb(185, 181, 181); /* グレーの背景色 */
  margin-left: 50px;
}

.rank-icon {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 40px;
  height: 40px;
  color: white;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  z-index: 1;
}

.rank-1 {
  background-color: gold;
}

.rank-2 {
  background-color: silver;
}

.rank-3 {
  background-color: #cd7f32; /* 銅色 */
}

.rank-4 {
  background-color: #4caf50; /* その他の色 */
}

.rank-5 {
  background-color: #2196f3; /* その他の色 */
}

.rank-over6 {
  background-color: #9e9e9e; /* シンプルな灰色 */
}

.video-info {
  flex-grow: 1;
}

.video-info .title {
  font-size: 18px;
  font-weight: bold;
  padding: 10px;
  color: black; /* 黒字に設定 */
  text-decoration: none; /* アンダーラインをなくす */
}

.video-info .title:hover,
.video-info .title:focus,
.video-info .title:active {
  text-decoration: none; /* ホバー時、フォーカス時、アクティブ時のアンダーラインをなくす */
}

.video-info .channel-info {
  display: flex;
  align-items: center; /* 縦方向の中心に配置 */
  padding: 10px;
  margin-bottom: 5px;
}

.channel-info .channel-icon {
  width: 40px; /* アイコンのサイズを小さく */
  height: 40px; /* アイコンのサイズを小さく */
  border-radius: 50%;
  margin: 0 10px;
}

.video-info .channel {
  font-size: 18px;
  color: #555;
  padding: 10px;
}

.video-info .details {
  font-size: 16px; /* 文字を少し大きくする */
  color: #777;
  text-decoration: none; /* アンダーラインをなくす */
  padding-left: 10px;
}

.video-info .details div {
  margin-bottom: 10px;
}

.video-link {
  display: block;
  color: inherit; /* リンクの色を継承 */
  text-decoration: none; /* アンダーラインをなくす */
}

.video-link:hover,
.video-link:focus,
.video-link:active {
  background-color: #e0e0d8; /* ホバー時の背景色を設定 */
}

.footer {
  width: 100vw;
  height: 10vw;
  display: block;
  background-color: #e0e0d8;
  position: relative;
}

.footer-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.footer-inner-copy, .disclaimer {
  font-size: 1vw;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  letter-spacing: .3em;
  margin: 0.5em 0; /* 追加して間隔を調整 */
}

#page-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  font-size: 14px;
  line-height: 1;
  z-index: 99;
}
#page-top a {
  background: #ab101b;
  text-decoration: none;
  color: #fff;
  width: 60px;
  padding: 28px 5px;
  text-align: center;
  display: block;
  border-radius: 90px;
  opacity: 0.9;
  transition: all .3s ease;
}
#page-top a:hover {
  text-decoration: none;
  opacity: .5;
}

/* メディアクエリ */
/* タブレット用のスタイル */
@media (min-width: 600px) and (max-width: 960px) {
  .container {
    padding: 0 16px;
    width: 86vw;
  }

  .main-title-link {
    font-size: 6vw;
    margin-top: 10px;
    width: 100%;
  }

  .header .sub-title {
    font-size: 1.2rem;
    margin-top: 20px;
  }

  .about-section .text p {
    font-size: 1.2rem;
  }

  .tab_list {
    width: 100%;
    margin-top: 20px;
  }

  .tab_button {
    font-size: 12px;
  }

  .about h1 {
  font-size: 20px;
  }

  .about p {
    font-size: 16px;
    padding-left: 20px;
  }

  .about td {
    font-size: 16px;
    padding: 0 0 20px 20px;
  }

}

/* スマホ用のスタイル */
@media screen and (max-width: 600px) {
  .container {
    padding: 0 16px;
    width: 86vw;
  }

  .main-title-link {
    font-size: 8vw;
    margin-top: 10px;
    width: 100%;
  }
  
  .header .sub-title {
    font-size: 1rem;
    margin-top: 15px;
  }

  .about-section .text p {
    font-size: 1.0rem;
  }

  .about h1 {
  font-size: 20px;
  }

  .about p {
    font-size: 16px;
    padding-left: 20px;
  }

  .about td {
    font-size: 16px;
    padding: 0 0 20px 20px;
  }

  .tab_list {
    flex-direction: column;
    width: 85vw;
    margin-top: 20px;
  }

  .tab_button {
    padding: 8px 0;
    font-size: 14px;
  }

  .video-row {
    flex-direction: column; /* ビデオ行を縦並びにする */
    align-items: flex-start;
  }

  .thumbnail img {
    width: 100%; /* サムネイルの幅を100%に設定 */
    height: auto; /* 高さを自動に設定 */
  }

  .video-info .title {
    font-size: 16px; /* タイトルのフォントサイズを小さくする */
  }

  .video-info .details {
    font-size: 14px; /* 詳細のフォントサイズを小さくする */
  }

  .footer {
    height: auto; /* 高さを自動に設定 */
    padding: 10px 0; /* 上下にパディングを追加 */
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .footer-inner-copy, .disclaimer {
    font-size: 1.4vw;
    text-align: center;
    letter-spacing: .2em;
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

 /* app/assets/stylesheets/application.css */
/*

*/
