/* 🌟 Pretendard 기본 설정 + 비상시 시스템 폰트 폴백 */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@latest/dist/web/static/pretendard.css');

/* 🌟 공통 기본 스타일 */
body {
  font-family: 
    'Pretendard',   /* 기본 폰트 */
    sans-serif;      /* CDN 실패 시 OS 기본 산세리프 폰트 적용 */
  
  /* FOIT 방지 & 자연스러운 폰트 전환 */
  font-display: swap; /* 폰트 로딩 지연 시 즉시 시스템 폰트 표시 */
  
  /* 기본 스타일 */
  background: #1a1a1a;
  color: white;
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  text-align: center;
  padding: 20px;
  width: 100%;
}

/* ✅ 버튼 그룹 (캐릭터 선택, 자세 선택 등) */
.button-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

/* ✅ 버튼 스타일 */
button {
  padding: 15px 30px;
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  height: 50px;
  transition: background-color 0.3s ease;
}

button:hover {
  transform: scale(1.05);
  background-color: #c0392b;
}

/* ✅ 퀴즈 보기용 버튼 */
.answers-container {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 16px;
  min-width: 80vw;
  flex-wrap: wrap;
}

.answers-container .answer {
  background: #e74c3c;
  flex-shrink: 0;
  min-width: 200px;
  transform: scale(1);
  transition: transform 0.2s ease-in-out;
}

.answer.animate {
  animation: pop-on-click 0.3s ease-in-out;
}

.correct-answer {
  background-color: #2ecc71 !important;
}

/* ✅ 퀴즈 영상 */
.quiz-video {
  max-width: 90%;
  max-height: 400px;
  object-fit: contain;
  border-radius: 10px;
  margin-top: 20px;
}

/* ✅ 소리 버튼 가운데 정렬 */
.audio-control {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

/* ✅ 소리 버튼 */
#toggle-audio {
  background-color: #000 !important;
  color: #fff !important;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#toggle-audio:active {
  background-color: #fff !important;
  color: #000 !important;
}

/* ✅ 뒤로가기, 포기, 다시하기 등 */
.back-button-container {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 16px;
}

#back-to-character,
#give-up,
#retry,
#retry-wrong,
#go-home {
  padding: 12px 24px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  min-width: 200px;
}

#back-to-character:hover,
#give-up:hover,
#retry:hover,
#go-home:hover {
  background-color: #2980b9;
}

/* ✅ 결과 메시지 통일 정렬 */
#success-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#success-message h1 {
  color: #00ff00;
  margin-bottom: 16px;
  font-size: 2rem;
}

#wrong-count-text {
  font-size: 18px;
  margin: 16px 0 30px 0;
  text-align: center;
}

/* ✅ 유튜브 버튼 (다른 버튼과 동일 사이즈) */
.youtube-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: transparent;
  color: rgb(255, 0, 0);
  border: 2px solid #ff0000;
  border-radius: 8px;
  font-size: 16px;
  width: 200px; /* 고정 너비 */
  margin: 10px auto;
  text-decoration: none;
  transition: all 0.2s ease;
}

@media (max-width: 768px) {
  .youtube-btn {
    width: 180px !important; /* 모바일 고정 너비 */
    padding: 10px 15px;
    font-size: 14px;
  }

}

/* ✅ 로고 */
.header-logo {
  width: 120px;
  height: auto;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

/* ✅ 애니메이션 정의 */
@keyframes pop-on-click {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* ✅ 모바일 대응 */
@media (max-width: 768px) {
  .container {
    width: 95%;
    padding: 10px;
  }

  button {
    font-size: 14px;
    padding: 12px 20px;
    width: 90%;
    height: auto;
  }

  .quiz-video {
    max-height: 280px;
  }

  .answers-container {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 0 10px;
  }

  .answers-container .answer {
    width: 90%;
    max-width: 400px;
  }
}

/* ✏️ 제작자 크레딧 스타일 */
.credit {
  color: #888;
  font-size: 13px;
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}

.credit strong {
  color: #aaa;
  font-weight: 500;
}

@media (max-width: 768px) {
  .credit {
    font-size: 11px;
    margin-top: 5px;
  }
}

.mail {
  color: #888;
  font-size: 13px;
  text-align: center;
  margin-top: 8px;
  
}

.mail strong {
  color: #aaa;
  font-weight: 500;
}

.disclaimer {
  margin-top: 20px;
  font-size: 13px;
  color: #aaa;
  line-height: 1.6;
  text-align: center;
}

.youtube-guide,
.support-note {
  font-size: 13px;
  color: #aaa;
  text-align: center;
  margin-bottom: 8px;
  line-height: 1.5;
}