* {
    margin: 0;
    padding: 0;

    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: black;
    font-family: 'Arial';
}

h1 {
    font-size: 2.5vw;
}

h2 {
    font-size: 2.2vw;
}

h3 {
    font-size: 1.5vw;
}

h5 {
    font-size: 1.5vw;
}

p {
    font-size: 1vw;
}

img {
    width: 100%;
    height: auto;
}

/* loading screen */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000000;
    /* background-image: url(img/bg.jpg); */
    background-repeat: no-repeat;
    background-size: 100% 100%;
    transition: 2s opacity ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlayContent {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 100%;
    padding: 0 0.4em;
    background-color: #ffc360;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: .5s cubic-bezier(.77, 0, .18, 1)
}

.loading {
    display: flex;
    font-weight: 400;
    transition: 0.2s ease;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loading h3 {
    text-align: center;
    color: #562918;
}

.loading img {
    margin-top: 10%;
    width: 50%;
    animation: fade 2s linear infinite;
    cursor: pointer;
}

@keyframes fade {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@-webkit-keyframes fade {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@-moz-keyframes fade {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@-o-keyframes fade {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* loading screen END */

.main {
    width: 100%;
    height: 100%;
}

.container {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.chapter0,
.chapter1 {
    background: url(../Assets/img/bg1.png) center center no-repeat;
    background-color: white;
    background-size: cover;
}

.chapter2 {
    background: url(../Assets/img/bg2.png) center center no-repeat;
    background-color: white;
    background-size: cover;
}

.chapter3 {
    background: url(../Assets/img/bg3.png) center center no-repeat;
    background-color: white;
    background-size: cover;
}

.chapter4 {
    background: url(../Assets/img/bg4.png) center center no-repeat;
    background-color: white;
    background-size: cover;
}

.chapter5 {
    background: url(../Assets/img/bg5.png) center center no-repeat;
    background-color: white;
    background-size: cover;
}

.chapter6 {
    background: url(../Assets/img/bg6.png) center center no-repeat;
    background-color: white;
    background-size: cover;
}

/* Home */
.home.container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    background-color: #ffc360;
}

.home.container h1,
.start_button {
    font-weight: bold;
    color: #562918;
}

.start_button {
    background-color: #fe981c;
    border: 3px solid #562918;
    width: 35%;
    padding: 1em 0.5em;
    border-radius: 2em;
    text-align: center;
    cursor: pointer;
}

/* iframe episodes */
.iframe_episodes {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;
}

.content-frame {
    width: 100%;
    height: 100%;
}

/* audio button */
.audio_button_holder {
    position: absolute;
    width: 100%;
    top: 0%;
    display: none;
}

.audio_button {
    position: relative;
    max-width: 600px;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    margin: 0 auto;
    padding: 1em 0.5em 1em 0.5em;
}

.audio_button img {
    width: 100%;
    max-width: 50px;
    cursor: pointer;
    z-index: 4;
    background-color: white;
    border-radius: 2em;
    padding: 0.3em;
}

.mute {
    display: none;
}

/* Skip */
.skip {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
}

/* Character */
.character {
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 50%;
}

.winnie,
.kc,
.behchin,
.chiying {
    display: none;
}

.all_out {
    position: absolute;
    bottom: 0;
}

/* iframe */
.tsp_video,
.tsp_video2,
.iframe360 {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.7);

    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.tsp_video div:nth-child(1),
.tsp_video2 div:nth-child(1),
.iframe360 div:nth-child(1) {
    width: 95%;
    height: 80%;
}

.tsp_video div.skip_btn,
.tsp_video2 div.skip360_btn,
.iframe360 div.skip360_btn {
    position: absolute;
    bottom: 2%;
    right: 1%;
    width: 30%;
    padding: 1em 0.5em;
    border: 1px solid black;
    color: black;
    text-align: center;
    cursor: pointer;
    background-color: white;
}

.tsp_video iframe,
.tsp_video2 iframe,
.iframe360 iframe {
    width: 100%;
    height: 100%;
}

/* Chapter */
.chapter_text {
    position: absolute;
    width: 100%;
    top: 3%;
    text-align: center;
}

.chapter_text h3 {
    margin: 0 auto;
    padding: 0.5em;
    width: 60%;
    border: 1px solid black;
    background-color: white;
    border-radius: 0.5em;
}

.bottom_text {
    position: fixed;
    max-width: 600px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.dialogue-box,
.answer-box {
    width: 95%;
    display: flex;
    flex-direction: column;
    position: relative;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5em 0.5em 0.5em 1em;
    ;
    border-radius: 0.5em;
    margin: 0 auto 20% auto;
}

.answer-box {
    background: transparent;
    justify-content: flex-end;
    flex-direction: row;
    margin: 0 0 0 auto;

    display: none;
    opacity: 0;
    transition: opacity 0.5s;
}

.answer-box div {
    width: 15%;
    padding: 1em 0.5em;
    border: 1px solid black;
    color: black;
    text-align: center;
    cursor: pointer;
    background-color: white;
}

.circle_next {
    position: absolute;
    bottom: 10%;
    right: 3%;
    animation: blinking 2s ease-out infinite;
    pointer-events: none;
}

.yes_btn {
    margin-right: 2%;
}

.next_btn {
    display: none;
    cursor: pointer;
}

.character-text {
    margin-bottom: 2%;
}

.dialogue-text {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    /* border-right: 2px solid black; */
}

/* chap0 lines */
.chap0,
.chap1-1,
.chap2-1,
.chap2-2,
.chap2_yes,
.chap2_no,
.chap3-3,
.chap3-3-2,
.chap3_yes,
.chap3_no,
.chap3-4,
.chap3-4-2,
.chap3-4_yes,
.chap3-4_no,
.chap4-4,
.chap4-4-2,
.chap4-4-3 {
    display: none;
}

.chap0_yes,
.chap0_no,
.chap2_yes,
.chap2_no,
.chap3_yes,
.chap3_no,
.chap3-4_yes,
.chap3-4_no {
    display: none;
}

.chap2_yes_btn,
.chap2_no_btn,
.chap3_yes_btn,
.chap3_no_btn,
.chap3-4_yes_btn,
.chap3-4_no_btn {
    display: none;
    pointer-events: none;
}

.chap0line1,
.chap0line3,
.chap1line1,
.chap1-1line1,
.chap2line1,
.chap2line4,
.chap2-2line1,
.chap3line1,
.chap3-2line1,
.chap3line4,
.chap3-4line1,
.chap3-4line4,
.chap3-4line3,
.chap4-4line1,
.chap4-4line2,
.chap4-4line4 {
    width: 0;
    animation: typing 2.5s steps(150, end) forwards;
}

.chap0line2,
.chap0line4,
.chap1line2,
.chap1-1line2,
.chap2line2,
.chap2line5,
.chap2-2line2,
.chap3line2,
.chap3-2line2,
.chap3line5,
.chap3-4line2,
.chap3-4line5,
.chap3-4line3-2,
.chap4-4line3 {
    width: 0;
    animation: typing 2.5s steps(150, end) 2.5s forwards;
}

.chap0line4-2,
.chap0line5,
.chap0-1line2,
.chap1line3,
.chap2line3,
.chap2-2line3,
.chap2line6,
.chap1line2-2,
.chap3line3,
.chap3-4line2-2,
.chap3line6,
.chap3-4line6 {
    width: 0;
    animation: typing 2.5s steps(150, end) 5s forwards;
}

.show-full {
    animation: none !important;
    width: 100% !important;
}

@keyframes typing {
    from {
        width: 0
    }

    to {
        width: 100%
    }
}

@keyframes blink {
    50% {
        border-color: transparent
    }
}

@keyframes blinking {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@media screen and (max-width: 600px) {
    h1 {
        font-size: 7vw;
    }

    h2 {
        font-size: 5vw;
    }

    h3 {
        font-size: 4.2vw;
    }

    h5 {
        font-size: 3.9vw;
    }

    p {
        font-size: 3.7vw;
    }

    .loading h3 {
        font-size: 5vw;
    }

    .loading img {
        width: 70%;
    }

    .home.container h1 {
        font-size: 9vw;
    }

    .start_button h3 {
        font-size: 5vw;
    }

    .answer-box div {
        width: 20%;
    }

    /* Character */
    .character {
        left: -100%;
        width: 60%;
    }

    /* Chapter */
    .chapter_text {
        width: 100%;
    }

}

@media screen and (min-width: 600px) {
    .skip {
        position: relative;
    }
}