@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@300;400;500;600;700&display=swap');

/* Base Styling */
body {
  font-family: 'IBM Plex Sans Thai', sans-serif;
  font-size: 16px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  padding-inline: 15px;
}

.navbar{
  box-shadow: none !important;
}

.navbar .nav-links {
  width: 45%;
}

/* Cover Image */
.cover-wrapper {
  width: 100%;
  margin: 0 auto 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  border: none;
  padding: 10px;
  box-sizing: border-box;
}

.content{
  position: relative;
  width: 45%;
  margin-inline: auto;
}

#cover-image {
  max-width: 100%;
  max-height: 400px;
  height: auto;
  width: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

/* Tag Container */
.tag-container {
  margin-bottom: 20px;
}

.tag-container span {
  display: inline-block;
  background: #FABACA;
  color: #EF3C66;
  padding: 5px 10px;
  margin: 0 5px 5px 0;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.3s;
}

.tag-container span:hover {
  background: #F37290;
}

/* Article Container */
.article-container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
}

/* Quill Editor Images */
.ql-editor img {
  max-width: 100%;
  height: auto;
}
.ql-video {
  max-width: 100%;
  height: auto;
}

/* Title */
#article-title {
  text-align: left;
  font-size: 2em;
  margin-bottom: 20px;
  margin-left: 20px;
}

/* Quiz Section */
#quiz-wrapper {
  margin-top: 40px;
  padding: 20px;
  border: 1px solid #ccc;
  text-align: center;
}

#quiz-container #question-text {
  font-weight: bolder;
  font-size: 24px;
}

.question-note {
  font-size: 18px;
  font-weight: 300;
  color: #666;
  display: block;
  margin-top: 5px;
  text-align: center;
}

#answers {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.quiz-btn {
  font-family: 'IBM Plex Sans Thai', sans-serif;
  font-size: 16px;
  padding: 10px 20px;
  width: 100%;
  text-align: center;
  margin: 10px 0;
  cursor: pointer;
  background-color: #fabaca;
  color: #242424;
  border: none;
  border-radius: 10px;
}

.quiz-btn.selected {
  background-color: #EF3C66;
  color: white;
}

/* Start Button */
#startBtn {
  background-color: #ff4081;
  color: #fff;
  border: none;
  padding: 12px 24px;
  font-size: 18px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

#startBtn:hover {
  background-color: #d9366a;
  transform: scale(1.05);
}

/* Next Button */
.next-btn {
  font-family: 'IBM Plex Sans Thai', sans-serif;
  font-size: 18px;
  font-weight: bold;
  display: block;
  width: 80%;
  margin: 20px auto;
  padding: 15px;
  background-color: #FFDF70;
  color: #242424;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.next-btn:hover {
  background-color: #ffbe44;
}

/* Result Section */
#result-text {
  max-width: 80%;
  margin: 20px auto;
  text-align: center;
  padding: 15px;
  line-height: 1.6;
}

#result-image {
  display: block;
  max-width: 60%;
  height: auto;
  margin: 20px auto;
  border-radius: 10px;
}

/* Tablet Responsive */
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  .content{
    top: 0;
    width: 100%;
  }

  .article-container {
    padding: 0 10px;
  }

  #article-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    margin-left: 10px;
  }

  .cover-wrapper {
    height: auto;
    padding: 10px;
  }

  .tag-container span {
    padding: 3px 8px;
    margin: 0 4px 4px 0;
    font-size: 0.9em;
  }

  .user-info {
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    font-size: 13px;
  }

  .home-button {
    width: 40px;
    height: 40px;
  }

  .home-button img {
    width: 30px;
    height: 30px;
  }

  #quiz-container #question-text {
    font-size: 20px;
  }

  .question-note {
    font-size: 16px;
  }

  .quiz-btn,
  .next-btn {
    font-size: 15px;
    padding: 10px 16px;
    width: 100%;
  }

  #result-text {
    font-size: 15px;
  }

  #result-image {
    max-width: 80%;
  }
}

/* Mobile Responsive */
@media (max-width: 480px) {
  #article-title {
    font-size: 1.2em;
  }

  .home-button {
    width: 36px;
    height: 36px;
  }

  .home-button img {
    width: 24px;
    height: 24px;
  }

  .quiz-btn,
  .next-btn {
    font-size: 14px;
  }

  #quiz-container #question-text {
    font-size: 18px;
  }

  .question-note {
    font-size: 14px;
  }
}
