body{
    margin: 0;
    font-size: 16px;
    background-color: #009688;
    width: 100%;
}

*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
}
.container{
    margin: 80px auto 0 auto;
    display: flex;
    max-width: 1300px;
    width: 100%;
}
main{
    max-width: 1000px;
    width: 100%;
    margin: 80px auto 0;
}
/* QuizHome */
h1{
    width: 70%;
    font-size: 3em;
    background-color: rgb(3, 42, 3);
    margin: 60px auto;
    position: relative;
    padding: .5em;
    text-align: center;
    border-radius: 50px;
    box-shadow: 2px 2px 4px gray;
    color: white;
}
main .content{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr) );
    gap: 30px;
    margin: 100px 100px;
}
a{
    text-decoration: none;
}

/* QuizHome */

/* QuizApp */

.custom-box{
    max-width: 700px;
    background: #ffffff;
    margin: 40px 30px;
    padding: 30px;
    border-radius: 10px;
    animation: fedeInRight 1s ease;
}

@keyframes fedeInRight {
    0%{
        transform: translateX(40px);
        opacity: 0;
    }
    100%{
        transform: translateX(0px);
        opacity: 1;
    }
}

.custom-box::before,
.custom-box::after{
    content: '';
    clear: both;
    display: table;
}
.custom-box.hide{
    display: none;
}

.home-box h3{
    font-size: 25px;
    color: #000000;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 25px;
}

#totalQuiz::before{
    content: '総問題数：';
}

.home-box p{
    font-size: 25px;
    margin-bottom: 10px;
    line-height: 28px;
    color: #000000;
    font-weight: 500;
}

.home-box p span{
    font-weight: 500;
}

.home-box .btn{
    margin-top: 20px;
}
.custom-box .btn,
.quiz-box .btn{
    padding: 15px 45px;
    background-color: #009688;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    display: inline-block;
}

.quiz-box{
    max-width: 700px;
    background: #ffffff;
    margin: 40px auto;
    border-radius: 10px;
    animation: fedeInRight 1s ease;
}

.quiz-box::before,
.quiz-box::after{
    content: '';
    clear: both;
    display: table;
}
.quiz-box.hide{
    display: none;
}

.quiz-box .question-number,
.quiz-box .question-text,
.quiz-box .option-container,
.quiz-box .next-question-btn,
.quiz-box .answers-indicator{
    width: 100%;
    float: left;
}

.quiz-box .next-question-btn .btn{
    margin-right: 30px;
}

.quiz-box .question-number{
    font-size: 18px;
    color: #009688;
    font-weight: 600;
    line-height: 25px;
}

.quiz-box header{
    position: relative;
    z-index: 2;
    width: 100%;
    height: 70px;
    padding: 0 30px;
    background: #fff;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0px 5px 5px 1px rgba(0,0,0,0.1);
}

.quiz-box header .timer{
    color: #004085;
    background: #fff;
    border: 1px solid #fff;
    height: 50px;
    width: 250px;
    padding-right: 8px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quiz-box header .timer .time_left_txt{
    font-weight: 400;
    font-size: 17px;
    user-select: none;
}

.quiz-box header .timer .timer_sec{
    height: 50px;
    width: 50px;
    border-radius: 50%;
    background-color: #28344e;/*紺色*/
    position: relative;
}

.quiz-box header .timer .timer_sec.ani{
    font-size: 18px;
    font-weight: 500;
    height: 50px;
    width: 50px;
    color: #fff;
    border-radius: 50%;
    line-height: 50px;
    text-align: center;
    background: linear-gradient(to right, #28344e 50%, rgb(40, 147, 246) 0);/*左が紺色、右が黄色*/
    user-select: none;
    position: relative;
    animation: aniR 40s linear;
}
.log{
    z-index: 1000;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    line-height: 50px;
}
.quiz-box header .timer .timer_sec.ani::before{
    content: '';
    display: block;
    margin-left: 50%;
    height: 100%;
    border-radius: 0 100% 100% 0 / 50%;
    background-color: #28344e;/*紺色*/
    transform-origin: left;
    animation: spin 10s linear 2,color 20s step-end;/*半円が反転するのにかかる時間は10秒。20秒の半分で半円の色を変える*/
}
.quiz-box header .timer .timer_sec.ani::after{
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #28344e;
    position: absolute;
    top: 5px;
    left: 5px;
}
@keyframes spin {
    to { transform: rotate(.5turn); }
}

@keyframes color {
50% { background: rgb(40, 147, 246); }/*黄色*/
85% { background: red;}
}

@keyframes aniR{
    85%{background: linear-gradient(to right, #28344e 50%, red 0);/*左が紺色、右が黄色*/
    } 
}

/* .quiz-box header .time_line{
    position: absolute;
    bottom: 0px;
    left: 0px;
    height: 3px;
    background: #007bff;
} */
section{
    padding: 10px 30px;
    height: 100%;
}
.quiz-box .question-text{
    font-size: 22px;
    color: #000000;
    line-height: 35px;
    font-weight: 400;
    padding: 20px 0;
    margin: 0;
    white-space: break-spaces;
}
.quiz-box .question-text .bold{
    font-weight: bold;
    color: rgb(192, 0, 0);
}
.quiz-box .question-text .kasen{
    border-bottom: 3px solid rgb(192, 0, 0);
}
.quiz-box .question-text .gray{
    background: rgba(128, 128, 128, 0.3);
}
.quiz-box .question-text .red{
    background: rgba(255, 0, 0, 0.3);
}

.quiz-box .question-text img {
    max-width: 100%;
    display: block;
    margin-top: 20px;
}
.quiz-box .option-container .option{
    background-color: #cccccc;
    padding: 15px;
    font-size: 16px;
    line-height: 22px;
    color: #000000;
    border-radius: 5px;
    margin-bottom: 10px;
    cursor: pointer;
    text-transform: capitalize;
    opacity: 0;
    animation: fadeIn .3s ease forwards;
    position: relative;
    overflow: hidden;
}

.quiz-box .option-container .option.already-answered{
    pointer-events: none;
}

@keyframes fadeIn {
    0%{
        opacity: 0;
    }
    100%{
        opacity: 1;
    }
}

.quiz-box .option-container .option.correct::before{
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    background: green;
    z-index: -1;
    animation: slideInLeft .5s ease forwards;
}
@keyframes slideInLeft {
    0%{
        transform: translateX(-100%);
    }
    100%{
        transform: translateX(0%);
    }
}

.quiz-box .option-container .option.wrong::before{
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    background: red;
    z-index: -1;
    animation: slideInLeft .5s ease forwards;
}

.quiz-box .option-container .option.correct,
.quiz-box .option-container .option.wrong{
    color: #ffffff;
}
.quiz-box .btn{
    margin: 15px 0;
}

.quiz-box .answers-indicator{
    border-top: 1px solid #cccccc;
    margin-bottom: 10px;
}

.quiz-box .answers-indicator div{
    height: 40px;
    width: 40px;
    display: inline-block;
    background-color: #cccccc;
    border-radius: 50%;
    margin-right: 3px;
    margin-top: 15px;
}

.quiz-box .answers-indicator div.correct{
    background: green;
    background-image: url(../images/correct.png);
    background-size: 50%;
    background-repeat: no-repeat;
    background-position: center;
}

.quiz-box .answers-indicator div.wrong{
    background: red;
    background-image: url(../images/wrong.png);
    background-size: 50%;
    background-repeat: no-repeat;
    background-position: center;
}

.result-box{
    text-align: center;
}
.result-box.hide{
    display: none;
}

.result-box h1{
    font-size: 36px;
    line-height: 42px;
    color: #009688;
}

.result-box table{
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
}

.result-box table td{
    border: 1px solid #cccccc;
    padding: 8px 15px;
    font-weight: 500;
    color: #000000;
    width: 50%;
    text-align: left;
    font-size: 18px;
}

.result-box .btn{
    margin-right: 20px;
}

@media screen and (max-width: 970px) {
    .container{
      display: grid;
      grid-template:
      "main"
      "aside";
    }
    main{
      margin: 80px auto 0 auto;
    }
    .container aside{
      margin: 50px auto 30px auto;
    }
}

@media(max-width: 767px){
    .result-box .btn{
        margin-bottom: 15px;
    }
   
   
    h1{
        margin: 20px auto;
    }
    main .content{
        margin: 20px auto;
    }
}

@media(max-width: 480px){
    section{
        padding: 10px;
    }
    .custom-box,.quiz-box{
        width: 95%;
        margin: 0 auto;
    }
    .quiz-box{
        width: 98%;
    }
    
    .quiz-box header{
        padding: 0;
        width: 100%;
    }
    .question-number{
        margin-left: 10px;
    }
    
}
@media(max-width: 410px){
    main{
        width: 375px !important;
    }
}





  