body {
  font-family: 'Noto Sans JP', sans-serif;
  padding-top: 3.5rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 70px;
  background: #f8f9fa;
  color: #1f2937;
}

footer {
  bottom: 0;
  width: 100%;
  height: 70px;
  /* フッターの高さ */
}


.middle-container {
  flex-grow: 1;
}

.lesson-title {
  color: #111827;
  font-weight: 700;
}

.card:hover {
  background-color: #f1f5f9;
}

.card-body {
  position: relative;
}

.card-body a {
  text-decoration: none;
  color: inherit;
}

.card-body a:hover {
  text-decoration: none;
  color: inherit;
}

.navbar {
  background-color: #f1f5f9;
  border-bottom: 1px solid #dfe6ee;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.navbar a.nav-link,
.navbar .navbar-brand {
  color: #1f2937;
  font-weight: 600;
}

.navbar a.nav-link:hover {
  color: #0f172a;
}

.lesson-title {
  color: #111827;
}

.scroll-to-lesson,
.scroll-to-task {
  cursor: pointer;
}

.table-custom {
  position: sticky;
  top: 110px;
  background-color: white;
}

.table-custom td {
  color: gray;
}

.lesson-container {
  margin-bottom: 70px;
}

.lesson-container:last-child {
  margin-bottom: 800px;
}

.lesson-title {
  margin-bottom: 5px;
}

.task-card {
  margin-bottom: 15px;
}

.custom-embed-container {
  position: relative;
  overflow: hidden;
  padding-top: 64.35%;
  /* 1920x1109 Aspect Ratio */
}

.custom-embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.choice-card {
  cursor: pointer;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

/* .body-container {
    padding-top: 4rem;
} */

.login-content {
  margin-top: 6rem;
}

.quiz-content {
  margin-top: 4rem;
  margin-bottom: 3rem;
}

label input[type="radio"] {
  display: none;
}

.flash-message {
  position: fixed;
  top: 3.5rem;
  /* Adjust this value based on the height of your navbar */
  left: 0;
  right: 0;
  z-index: 1030;
  /* Place the message above other elements */
  text-align: center;
  padding: 0.5rem;
}

.card-ignore:hover {
  background-color: white;
  cursor: default;
}

.assignment-icon {
  font-size: 25px;
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
}

.form-check {
  display: inline-block;
  width: 50%;
  box-sizing: border-box;
}

.flashcard {
  perspective: 1000px;
}

.card-content {
  transition: transform 0.5s;
  transform-style: preserve-3d;
  position: relative;
}

.card-content.flip {
  transform: rotateY(180deg);
}


.navbar-brand {
  background: url("./logo-new.093419bd82ca.svg") no-repeat left center;
  background-size: contain;
  height: 44px;
  width: 132px;
}



.top-container {
  background: linear-gradient(135deg, #f8fafc, #eef2f7);
  color: #0f172a;
  padding-top: 23%;
  height: 320px;
}

/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) {
  .top-container {
    height: 400px;
    padding-top: 20%;
  }
}

/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) {
  .top-container {
    height: 500px;
    padding-top: 15%;
  }
}

/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {
  .top-container {
    height: 600px;
    padding-top: 12%;
  }
}


.footer {
  width: 100%;
}

.middle-container {
  padding: 70px 0 100px 0;
  /* Adjust this to match the height of your footer */
}

.login-btn {
  display: inline-block;
  transition: all 0.3s ease;
}

.login-btn:hover {
  opacity: 0.8;
}

.profile-row {
  padding-left: 0;
}

.profile-image {
  padding-right: 20px;
}

.profile-text {
  padding-right: 20px;
}

.navbar .navbar-brand {
  flex-grow: 1;
}

/* nav-item 間の間隔を増やすためのスタイル */
.navbar-nav .nav-item {
  margin-right: 1rem;
}

.my-navbar .navbar-collapse {
  width: 100%;
}

/* 通知アイコンとバッジの位置調整 */
.navbar-nav .nav-item .fa-bell {
  position: relative;
  top: 10px;

  /* アイコンの位置を少し下に調整 */
}

.navbar-nav .nav-item .badge {
  position: relative;
  top: -28px;
  left: 17px;
  /* バッジの位置を少し上に調整 */
}

.badge-collapse {
  transform: translateY(-50%);
  margin-right: 14px;
  /* バッジの位置をさらに上に調整 */
}

.navbar-toggler {
  margin-left: auto;
}

.non-copyable {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.disabled-select {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}


.wider-card {
  width: 90% !important;
}

.lesson-container {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.task-card,
.assignment-card {
  display: flex;
  flex-direction: column;
}

.card-body {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-title {
  min-height: 3em;
  /* 2行分の高さ */
  max-height: 4em;
  /* タイトルが3行以上にならないように */
  overflow: hidden;
  /* タイトルが3行以上のときに、追加のテキストを隠す */
  display: flex;
  /* タイトルのテキストを中央揃えするために追加 */
  align-items: center;
  /* タイトルのテキストを中央揃えするために追加 */
}

.badges-container-wrapper {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  /* 追加 */

  min-height: 3em;
  /* 2行分の高さ */
  max-height: 4em;
  /* 追加：縦方向中央揃え */

}

.badges-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.fixed-height-badge {
  height: 21px;
  display: flex;
  align-items: center;
  margin-top: 2px;
}

.choice-card:active {
  background-color: rgb(212, 255, 212);
}

.timer {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 20px;
  color: red;
}

.btn-margin {
  margin-right: 6px;
  /* Adjust this value as needed */
}

.choice-card.selected {
  background-color: #d4edda;
  /* This is a light green color */
}

.ok-button-parent {
  text-align: center;
}

#searchForm {
  width: 100%;
  min-width: 300px;
  max-width: 400px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.nav-item {
  margin-top: 3px;
  /* あるいは好みのピクセル値を設定 */
}

.user-msg {
  max-width: 50%;
  margin-left: 0;
  margin-right: auto;
}

.assistant-msg {
  max-width: 50%;
  margin-left: auto;
  margin-right: 0;
}

.msg-card {
  border: 1px solid rgba(0, 0, 0, .125);
  border-radius: .55rem;
  background: white;
  padding: 13px;
}

#chatArea {
  max-height: calc(100vh - 300px);
  /* 300px はチャットエリア以外の要素の高さの推定値 */
  height: auto;
  overflow-y: auto;
}

.highlighted {
  background-color: #ffff99;
}

.tooltip.show {
  opacity: 1;
}

.tooltip .tooltip-inner {
  max-width: 500px;
  background: lightgray;
  border-color: black;
  color: black;
  text-align: left;
}

/* デフォルトのスタイル（背景は透明） */
.tooltip-phrase {
  background: transparent;
}

.tooltip-phrase.vocab-active {
  background: lightgray;
  /* 語彙表示が有効な場合はグレー */
}

/* TTSが有効な場合に背景をグレーに変更 */
.tts-enabled .tooltip-phrase {
  background: lightgray;
}

.task-detail-page .tooltip-phrase {
  background: rgb(233, 231, 231);
  /* これでグレーになります */
}

.msg-card {
  /* Other existing styles... */

  overflow: auto;
  /* Add this line */
}

.play-button {
  float: right;
  margin-left: 20px;
  margin-top: 3px;
  cursor: pointer;
}

.play-button-2 {
  cursor: pointer;
}

.assistant-msg {
  background-color: #ccffcc;
}

.gpt-msg {
  text-align: left;
  background-color: #f0f0f0;
  /* set the background to light gray */
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 15px;
}

.user-msg {
  text-align: left;
  margin-bottom: 15px;
}

.chat-container {
  background-color: white;
  /* set the background to white */
  border: 1px solid #f0f0f0;
  border-radius: 5px;
  padding: 15px;
  margin-bottom: 20px;
}

.text-area-wrapper {
  position: relative;
  flex-grow: 1;
}

.text-area-wrapper textarea {
  padding-right: 50px;
  width: 100%;
}

.btn-submit {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background-color: transparent;
  font-size: 20px;
  color: black;
  z-index: 10;
  /* This ensures the button is always in front */
}

.btn-submit:hover {
  background-color: transparent;
}

#custom-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.caption-item {
  cursor: pointer;
  border: 1px solid #ddd;
  padding: 5px;
  margin-bottom: 5px;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.caption-item:hover {
  background-color: #f5f5f5;
}

.active-caption {
  background-color: #d9edf7;
  /* この色はお好みで変更してください */
}

/* .select-margin {
  margin-left: 40px;
}

.stepback-button {
  margin-right: 30px;
} */

/* 画面が狭くなったときのスタイル */
@media (max-width: 768px) {

  .op-buttons .control-button,
  .op-buttons .play-button-2 {
    height: 40px;
  }

  .op-buttons .control-button i,
  .op-buttons .play-button-2 i {
    /* アイコンのサイズを調整 */
    line-height: 40px;
    /* アイコンを中央に配置 */
  }

  .op-buttons select.form-select {
    height: 40px;
    /* パディングを調整してテキストが中央に来るように */
  }

  .left-buttons {
    left: calc(45% - 98px) !important;
    /* 左側のボタン群の新しいleftの値 */
  }

  .right-buttons {
    left: calc(45% + 60px) !important;
    /* 右側のボタン群の新しいleftの値 */
  }

  .select-margin {
    margin: 0, 0, 0, 18px;
  }
}

.answer-card {
  background-color: #fff;
  padding: 15px;
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.clickable-text {
  cursor: pointer;
}

.youtube-container {
  position: relative;
  pointer-events: none;
  /* これを追加 */
}

.youtube-mask {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
}

.rewind-button:hover {
  cursor: pointer;
}

/* 問と解説セットのスタイル */
.question-explanation-set {
  border-collapse: collapse;
  /* セルの境界線を重ねる */
}

.question-explanation-set td {
  border-top: 2px solid black;
  /* 各セットの上側の境界線を表示 */
  border-bottom: none;
  /* 下側の境界線を非表示 */
}

.question-explanation-set td:first-child {
  border-left: 2px solid black;
  /* 左側の境界線を表示 */
}

.question-explanation-set td:last-child {
  border-right: 2px solid black;
  /* 右側の境界線を表示 */
}

.question-explanation-set tr:last-child td {
  border-bottom: 2px solid black;
  /* 最後の行の下側の境界線を表示 */
}

/* 問の行の下側の境界線を非表示 */
.question-row td {
  border-bottom: none;
}

/* 解説の行の上側の境界線を非表示 */
.explanation-row td {
  border-top: none;
  border-right: none;
}

/* 最後の解説行のスタイル */
.last-explanation-row td {
  border-bottom: 2px solid black;
  /* 下側の境界線を表示 */
}

.last-explanation-row td:first-child {
  border-left: 2px solid black;
  /* 左側の境界線を表示 */
}

.last-explanation-row td:not(:first-child):not(:last-child) {
  border-left: none;
  /* 最初と最後のセル以外の左側の境界線を非表示 */
}

.last-explanation-row td:last-child {
  border-right: 2px solid black;
  /* 最後のセルの右側の境界線を表示 */
}


.narrow-column {
  width: 50px;
  /* 例として50pxの幅を設定 */
}

.choice-card {
  display: flex;
  align-items: center;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  cursor: pointer;
}

.correct-choice {
  background-color: #d4edda;
  /* 薄い緑色 */
}

.incorrect-choice {
  background-color: #f8d7da;
  /* 薄い赤色 */
}

.correct-choice,
.incorrect-choice {
  pointer-events: none;
  /* マウスイベントを無効化 */
}

.choice-container {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.choice-card {
  margin-bottom: 15px;
  cursor: pointer;
}

.choice-text {
  margin-bottom: 5px;
}

.progress {
  background-color: #e9ecef;
  border-radius: .25rem;
}

.progress-bar {
  font-weight: bold;
  color: black;
  text-align: left;
  padding-left: .75rem;
  transition: width .6s ease;
}

.bg-info {
  background-color: #17a2b8 !important;
  /* 薄い青色 */
}

.bg-secondary {
  background-color: #6c757d !important;
  /* 灰色 */
}

.quiz-question-container .form-check {
  display: block;
  /* 各選択肢をブロック要素として表示 */
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.loading-spinner {
  border: 5px solid #f3f3f3;
  border-top: 5px solid #3498db;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

.card-img-top {
  width: 100%;
  /* カードの幅に合わせる */
  height: 200px;
  /* 高さを固定 */
  object-fit: cover;
  /* アスペクト比を維持して枠内に収める */
  object-position: center;
  /* 画像の中心を表示 */
  display: block;
  /* 画像をブロック要素にすることで余計なスペースを削除 */
}

.centered-overlay {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, -110%);
  width: 150px;
  /* お好みでサイズを調整してください */
  height: auto;
}

.centered-overlay-listening {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -110%);
  width: 180px;
  /* お好みでサイズを調整してください */
  height: auto;
}

.custom-radio-group {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 20px;
  /* 必要に応じて調整 */
  align-items: center;
}

.form-check-inline-wrapper {
  display: flex;
  align-items: center;
  gap: 5px;
  /* 必要に応じて調整 */
}

.form-check-inline-wrapper span {
  display: inline-block;
  margin-right: 5px;
  /* 必要に応じて調整 */
}

.question-number {
  display: inline-block;
  padding: 5px 10px;
  border: 2px solid #000;
  border-radius: 4px;
  margin-right: 10px;
}

footer.fixed-bottom {
  background-color: #f8f9fa;
}

#audio-player {
  width: 50%;
}

@media (max-width: 1200px) {
  #audio-player {
    width: 75%;
  }
}

@media (max-width: 768px) {
  #audio-player {
    width: 90%;
  }
}

.total-score-display {
  font-size: 20px;
  /* 必要に応じて調整 */
  font-weight: bold;
}

.total-score-display span {
  font-size: 20px;
  /* 必要に応じて調整 */
}

.underline-question {
  text-decoration: underline;
  font-weight: bold;
}
