body {
  margin: 0;
  font-family: 'Zen Maru Gothic', sans-serif;
  overflow-x: hidden;
  background-color: #f5f5f5;
}

.wrapper {
  display: flex;
  justify-content: center;
  position: relative;
  width: 100%;
}

button,
#answer-buttons button,
.difficulty-btn,
.header-title,
h2,
h3,
p,
li,
.result-summary,
#score,
#post-result,
#back-to-top-btn {
  font-family: 'Zen Maru Gothic', sans-serif;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background-color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  box-sizing: border-box;
}

.header-title {
  font-size: 26px;
  font-weight: 700;
  color: #333;
  margin: 0;
  text-align: center;
}

main {
  padding-top: 90px;
}

#quiz-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

#start-screen,
#quiz-screen {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.08);
  box-sizing: border-box;
  max-width: 800px;
  width: 90%;
  margin: 20px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#start-screen h2 {
  flex: 0 0 auto;
}

.difficulty-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 30px;
  align-items: center;
}

.difficulty-btn {
  cursor: pointer;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  width: 270px;
  transition: all 0.2s ease;
  text-align: center;
}

.difficulty-btn.world {
  background-color: #8BC34A;
}
.difficulty-btn.world:hover {
  background-color: #7CB342;
}

.difficulty-btn.game {
  background-color: #FF9547;
}
.difficulty-btn.game:hover {
  background-color: #FF7A1F;
}

#quiz-screen h2,
#quiz-screen p {
  margin: 10px 0;
}

.question-underline.world {
  border-bottom: 4px solid #8BC34A;
  padding-bottom: 4px;
}

.question-underline.game {
  border-bottom: 4px solid #FF9547;
  padding-bottom: 4px;
}

#question-text {
  font-size: 28px;
  font-weight: 600;
  margin: 20px 0;
  line-height: 1.5;
  font-family: 'Zen Maru Gothic', sans-serif;
  text-align: center;
}

#answer-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
  width: 100%;
  align-items: center;
}

#answer-buttons button {
  background-color: #fff;
  color: #333;
  border: 2px solid #ccc;
  border-radius: 8px;
  padding: 15px 25px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.2s ease;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
  width: 450px;
  box-sizing: border-box;
}

#answer-buttons button:hover {
  background-color: #f0f0f0;
  border-color: #999;
  transform: translateY(-2px);
}

#answer-buttons button:active {
  background-color: #e0e0e0;
  border-color: #666;
  transform: translateY(0);
}

.result-screen-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
  padding: 0 20px;
  padding-bottom: 100px;
}

.result-summary {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.08);
  width: 60vw;
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
  box-sizing: border-box;
  margin: 0 auto;
}

.result-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

#post-result {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #252422;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 16px;
  cursor: pointer;
  font-weight: normal;
  transition: background 0.2s;
}

#post-result:hover {
  background-color: #3a3935;
}

#post-result .icon {
  width: 20px;
  height: 20px;
}

.result-explanations {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  max-width: 60vw;
  padding: 0;
  box-sizing: border-box;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.result-explanations li {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  list-style: none;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

#score {
  text-align: center;
  font-size: 18px;
  margin: 0;
}

#score .correct {
  color: #FF9547;
  font-size: 42px;
  font-weight: 700;
}

#score .total {
  font-size: 28px;
  font-weight: 600;
}

#score .slash,
#score .unit {
  font-size: 18px;
  font-weight: 500;
}

.icon-inline {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 6px;
}

.question-number {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #333;
}

.back-to-top {
  margin-top: 30px;
  display: flex;
  justify-content: center;
}

#back-to-top-btn {
  background-color: #FF9547;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#back-to-top-btn:hover {
  background-color: #FF7A1F;
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: #222;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}

@media screen and (max-width: 1300px) {
  .result-summary,
  .result-explanations {
    max-width: 90%;
    padding-left: 10px;
    padding-right: 10px;
  }
}

@media screen and (max-width: 700px) {
  .result-summary,
  .result-explanations {
    max-width: 100%;
    padding-left: 5px;
    padding-right: 5px;
  }
}
