/* 診断ページ専用スタイル */

/* ヘッダー */
.header {
  text-align: center;
  padding: 20px 0 40px;
  margin: 0 calc(50% - 50vw);
  position: relative;
  background-image: url("../../assets/bg_top_circle_pc.png");
  background-repeat: no-repeat;
  background-position: center -285px;
}
.main-title-image {
  max-width: 767px;
  width: 100%;
  height: auto;
}

/* ヘッダー画像 */
.header-image {
  width: 100%;
  text-align: center;
  margin-bottom: 40px;
}

.header-image img {
  width: 100%;
  max-width: 1200px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* 診断メインエリア */
.diagnosis-main {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 100px;
  background-color: white;
}

/* 質問番号画像 */
.question-number-image {
    text-align: center;
    margin: 0 auto 40px;
}

.question-number-image img {
    max-width: 280px;
    width: 100%;
    height: auto;
    display: inline-block;
}

/* 質問エリア */
.question-area {
    margin-bottom: 40px;
}

.question-image {
  margin-bottom: 30px;
  text-align: center;
}

/* 質問テキスト画像 */
#question-text-image {
  width: 70%;
  max-width: 420px;
  height: auto;
  display: block;
  margin: 0 auto 20px;
}

/* シチュエーション画像 */
#scene-image {
  width: 100%;
  max-width: 600px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.image-placeholder {
  width: 100%;
  height: 300px;
  background: linear-gradient(135deg, var(--light-pink) 0%, rgba(255, 255, 255, 0.5) 100%);
  border: 2px dashed var(--primary-pink);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  font-size: 16px;
  font-weight: bold;
}

.question-content {
  text-align: center;
}

.question-text {
  font-size: 28px;
  font-weight: bold;
  color: var(--text-main);
  line-height: 1.4;
  margin: 0;
}

/* 回答選択肢エリア */
.choices-area {
  margin-bottom: 40px;
}

.choices-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.choice-item {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  position: relative;
  flex: 0 1 calc(50% - 10px);
  max-width: 250px;
}

/* 選択肢画像 */
.choice-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.choice-item:hover .choice-image {
  transform: scale(1.02);
  opacity: 0.9;
}

.choice-item.selected .choice-image {
  transform: scale(1.05);
  opacity: 0.8;
}

/* 3つの選択肢がある場合の調整 */
.choices-container.three-choices .choice-item {
  flex: 0 1 calc(33.333% - 14px);
  max-width: 250px;
}

/* 進行状況 */
.progress-area {
  margin-bottom: 40px;
  text-align: center;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 27, 109, 0.2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 15px;
}

.progress-fill {
  height: 100%;
  background: var(--primary-pink);
  transition: width 0.5s ease;
  border-radius: 4px;
}

.progress-text {
  font-size: 16px;
  color: var(--text-sub);
  font-weight: bold;
}

/* ナビゲーション */
.navigation {
  text-align: center;
  margin-top: 40px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  color: var(--primary-pink);
  font-size: 16px;
  text-decoration: none;
  padding: 10px 20px;
  border: 1px solid var(--primary-pink);
  border-radius: 20px;
  transition: all 0.3s ease;
  background-color: white;
}

.back-link:hover {
  background: var(--primary-pink);
  color: var(--text-white);
}

/* ローディング状態 */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.loading .choice-item {
  cursor: not-allowed;
}

/* アニメーション */
@keyframes questionFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.question-fade-in {
  animation: questionFadeIn 0.6s ease-out;
}

@keyframes choiceSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.choice-slide-in {
  animation: choiceSlideIn 0.4s ease-out;
  animation-fill-mode: both;
}

/* レスポンシブ対応 */
@media (max-width: 767px) {

  .header {
    padding: 5vw 2vw 6vw;
    background-image: url("../../assets/bg_top_circle_sp.png");
    background-repeat: no-repeat;
    background-position: center -31vw;
    background-size: cover;
  }

  .diagnosis-main {
    padding: 20px 15px;
  }

  .question-text {
    font-size: 22px;
  }

  /* 質問番号画像のモバイル対応 */
  .question-number-image img {
    max-width: 220px;
  }

  /* 質問テキスト画像のモバイル対応 */
  #question-text-image {
    width: 70%;
    max-width: 70%;
    margin-bottom: 15px;
  }

  /* シチュエーション画像のモバイル対応 */
  #scene-image {
    max-width: 100%;
  }

  .image-placeholder {
    height: 200px;
    font-size: 14px;
  }

  /* 選択肢のモバイル対応 */
  .choices-container {
    flex-direction: row;
    max-width: 100%;
    gap: 10px;
  }

  .choice-item {
    font-size: 16px;
    padding: 0;
    flex: 0 1 calc(50% - 5px);
    width: auto;
    max-width: 150px;
  }

  /* 3つの選択肢がある場合のモバイル対応 */
  .choices-container.three-choices .choice-item {
    flex: 0 1 calc(33.333% - 7px);
    max-width: 110px;
  }

  /* 選択肢画像のモバイル調整 */
  .choice-image {
    width: 100%;
    height: auto;
  }
}
