<template>
  <div id="Chapter1_1" class="content-wrap">
    <div style="margin: 30px 0px 50px">
        <router-link to="/MyPlan.page">
          <div class="logo mb25"><img src="../../../../resources/img/logo2.png" alt=""></div>
        </router-link>
    </div>
    <div class="title-box mb25 flex align-center mt40">
      <span class="title mr40">1. Hello WORLD</span>
      <span class="subtitle">my name is dd</span>
    </div>
    <div class="flex justify-between align-center">
      <div class="pre-btn" @click="goToPage('Chapter2_11')"><img src="../../../../resources/img/left.png" alt=""></div>
      <div class="content title-box">
        <p class="title mt25 title-bg">step2</p>
          <div class="flex align-center mb30">
          <p class="subtitle2 mr20">객관식 미니게임</p>
          <!-- <button><img src="../../../../resources/img/btn10_s.png" alt="">
          </button> -->
        </div>

        <div class="text-ct">
          <div class="imgGroup flex align-center justify-center">
            <div class="flex" style="gap: 20px; position: relative;">
              <img src="../../../../resources/img/img105_46s.png" alt="" style="width: 90%;">
              <div class="time-bg">
                  <div>
                    <div class="time">
                      <p class="second">{{ timer }}</p>
                      <p class="text">sec</p>
                    </div>
                  </div>
                </div>
              <div class="textbox ">
                <p class="title1 text-lf"> 문제</p>
                <div class="pickGroup">
                  <div>
                <article  class="flex mb10" style="gap: 60px;">
                  <div class="flex align-center">
                    <button><img src="../../../../resources/img/img136_71s.png" alt="">
                      <p>1</p>
                    </button>
                    <p class="red">a</p>
                  </div>
                </article>
                <article  class="flex mb10" style="gap: 60px;">
                  <div class="flex align-center">
                    <button><img src="../../../../resources/img/img136_71s.png" alt="">
                      <p>2</p>
                    </button>
                    <p class="orange">a</p>
                  </div>
                </article>
                <article  class="flex mb10" style="gap: 60px;">
                  <div class="flex align-center">
                    <button><img src="../../../../resources/img/img136_71s.png" alt="">
                      <p>3</p>
                    </button>
                    <p class="blue">a</p>
                  </div>
                </article>
                <article  class="flex " style="gap: 60px;">
                  <div class="flex align-center">
                    <button><img src="../../../../resources/img/img136_71s.png" alt="">
                      <p>4</p>
                    </button>
                    <p class="green">a</p>
                  </div>
                </article>
              </div>
                </div>
                <!-- 오답일 경우 아래의 이미지가 보여야함 -->
                <!-- <div class="flex justify-center wrong-anwser" style="gap: 20px;">
                  <img src="../../../../resources/img/img165_46s.png" alt="">
                </div> -->
  
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="next-btn" @click="goToPage('Chapter3')"><img src="../../../../resources/img/right.png" alt=""></div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      timer:'00'
    }
  },
  methods: {
    goToPage(page) {
      this.$router.push({ name: page });
    },
    startTimer() {
      if (this.intervalId) {
        clearInterval(this.intervalId);
      }
      this.timer = 5;
      this.intervalId = setInterval(() => {
        if (this.timer > 0) {
          this.timer--;
        } else {
          clearInterval(this.intervalId);
        }
      }, 1000);
    }
  },
  watch: {

  },
  computed: {

  },
  components: {
  },
  mounted() {

  }
}
</script>
<style scoped>
.wrong-anwser{position: absolute; top: 51%;
  left: 102%;
  transform: translate(-50%, -50%);}
.textbox{position: absolute;     top: 140px;
  left: 45px;}
  .time-bg{     top: 136px;
    right: 124px;}
  .pickGroup{margin: 45px 0 0 180px;}
.pickGroup button {
  position: relative;
  margin-right: 30px;
}
.pickGroup button img{width: 33px; height: 33px;}
.pickGroup button p {
  font-size: 20px;
  color: #c6c6c6;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.pickGroup article >div >p {
  font-size: 24px;
}
</style>