@import url('https://fonts.googleapis.com/css2?family=Anton+SC&family=M+PLUS+1+Code:wght@100..700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Jersey+25+Charted&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Jersey+10&family=Jersey+25+Charted&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Jersey+10&family=Jersey+25+Charted&family=Road+Rage&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Jersey+10&family=Jersey+25+Charted&family=Road+Rage&family=Zen+Dots&display=swap');

body {
    font-family: "Kanit", sans-serif;
    font-weight: 300;
    font-style: italic;
    background-color: #272727;
    color: #fff;
    text-align: center;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.hidden {
    display: none;
}

#loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

#loading-bar {
    width: 80%;
    height: 20px;
    background-color: #ccc;
    margin-top: 20px;
    position: relative;
}

#loading-progress {
    height: 100%;
    width: 0;
    background-color: #76c7c0;
    position: absolute;
    top: 0;
    left: 0;
}

#title-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background-image: linear-gradient(rgba(0,0,0,0.6),rgba(0,0,0,0.5)),url(img/title.jpeg);
    background-size: cover;
    /* background-color: #333; */
    color: #fff;
}

#title-screen h1 {
    font-size: 2.5rem;
    font-style: italic;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    animation: fadeIn 2s;
    text-align: left;
}

#title-screen p {
    font-size: 1.5rem;
    margin-top: 20px;
    animation: fadeIn 3s;
}

#quiz-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 40px 0 40px ;
    max-width: 600px;
    margin: 0 auto;
}

#timer-container {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

#timer-bar {
    width: 100%;
    height: 20px;
    background-color: #444;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

#timer-bar span {
    display: block;
    height: 100%;
    background-color: #00e676;
    transition: width 1s linear;
}

#timer {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5em;
    font-style: italic;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    color: #00e676;
}

#feedback{
    font-size: 10rem;
    font-style: italic;
    font-family: "Zen Dots", sans-serif;
    font-weight: 400;
    letter-spacing: 3px;
    -webkit-text-stroke: 0.1px #F8F8F8;
	/* text-shadow: 0px 1px 4px #23430C; */
    text-shadow: 0 0 10px #fff,0 0 15px #fff;
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#timer-modifier{
    font-size: 2rem;
    font-style: italic;
    font-family: "Zen Dots", sans-serif;
    font-weight: 100;
    letter-spacing: 3px;
    -webkit-text-stroke: 0.1px #F8F8F8;
	text-shadow: 0px 1px 4px #23430C;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#stylish-rank {
    font-family: "Jersey 25 Charted", sans-serif;
    font-size: 1.5rem;
    font-style: italic;
    color: rgb(31, 31, 31);
    margin-bottom: 20px;
}

.highlight {
    color: red;
    font-size: 2em;
    font-style: italic;
    animation: rankAnimation 0.5s ease-in-out;
}

@keyframes rankAnimation {
    from { transform: scale(1); }
    to { transform: scale(1.2); }
}

#rank-feedback-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 10px 0;
}

#rank-feedback {
    text-align: right;
    font-size: 1.5em;
    color: #fff;
    font-style: italic;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 1);
    opacity: 0;
    transition: opacity 0.5s, transform 0.5s;
}


.highlight {
    font-size: 32px;
    color: red;
}

#result-rank.s,
#result-rank.ss,
#result-rank.sss {
    font-size: 32px;
    color: red;
}

.rank-highlight {
    font-size: 2em;
    font-weight: bold;
    color: #ff1744;
    animation: rankBounce 0.5s ease-in-out;
}

@keyframes rankBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

#meter {
    width: 100px;
    height: 10px;
    background-color: #444;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    opacity: 0;
    transition: opacity 0.5s;
}

#meter span {
    display: block;
    height: 100%;
    background-color: #00e676;
    transition: width 4s linear;
}

#image-container {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    width: 100%;
    padding: 10px;
}

#image1, #image2 {
    width: 40%;
    /* padding: 5px; */
    height: auto;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
    transition: transform 0.3s, box-shadow 0.3s;
}

#image1:hover, #image2:hover {
    transform: scale(1.00);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.7);
}

#question-number, #feedback, #timer-modifier {
    margin: 10px;
    font-size: 1.5em;
    font-style: italic;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.correct {
    color: green;
}

.incorrect {
    color: red;
}

#correct-indicator,
#incorrect-indicator {
    font-size: 48px;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.correct-indicator.show,
.incorrect-indicator.show {
    display: block;
    animation: fadeInOut 1s forwards;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}



#result-video-container {
background-color: rgb(92, 0, 0);
}

#result-container {
    padding: 20px;
    /* margin-top: 50px; */
    background-color: linear-gradient(rgba(0,0,0,0.6),rgba(0,0,0,0.5)) #333;
}

#result-rank.sss, #result-rank.ss, #result-rank.s {
    color: red;
    font-size: 2rem;
    animation: rankAnimation 1s;
}


#result-container h2 {
    font-size: 3em;
    letter-spacing: 10px;
    margin-bottom: 20px;
    font-style: italic;
}

#result-score, #result-time, #result-rank {
    font-size: 2em;
    letter-spacing: 2px;
    font-style: italic;
    margin: 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}


/* 背景アニメーション用のスタイル */
@keyframes backgroundSlide {
    0% { background-position: 0 0; }
    100% { background-position: -100% 0; }
}

.background-animated {
    background: linear-gradient(10deg, #00091a 0%, #010313 100%);
    background-size: 200% 200%;
    animation: backgroundSlide 30s linear infinite;
    background-image: url(img/bg.png);
}

/* その他の必要なスタイル */
.quiz-container {
    position: relative;
    z-index: -1;
    /* 他のスタイル */
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

/* グリッチノイズエフェクト用のスタイル */
@keyframes glitch {
    0% {
        clip: rect(24px, 9999px, 730px, 0);
        transform: skew(0.25deg);
    }
    5% {
        clip: rect(33px, 9999px, 220px, 0);
        transform: skew(0.35deg);
    }
    10% {
        clip: rect(57px, 9999px, 890px, 0);
        transform: skew(0.45deg);
    }
    15% {
        clip: rect(48px, 9999px, 140px, 0);
        transform: skew(0.55deg);
    }
    20% {
        clip: rect(15px, 9999px, 770px, 0);
        transform: skew(0.65deg);
    }
    25% {
        clip: rect(85px, 9999px, 290px, 0);
        transform: skew(0.75deg);
    }
    30% {
        clip: rect(59px, 9999px, 380px, 0);
        transform: skew(0.85deg);
    }
    35% {
        clip: rect(66px, 9999px, 810px, 0);
        transform: skew(0.95deg);
    }
    40% {
        clip: rect(10px, 9999px, 900px, 0);
        transform: skew(1.05deg);
    }
    45% {
        clip: rect(29px, 9999px, 80px, 0);
        transform: skew(1.15deg);
    }
    50% {
        clip: rect(90px, 9999px, 470px, 0);
        transform: skew(1.25deg);
    }
    55% {
        clip: rect(75px, 9999px, 210px, 0);
        transform: skew(1.35deg);
    }
    60% {
        clip: rect(16px, 9999px, 650px, 0);
        transform: skew(1.45deg);
    }
    65% {
        clip: rect(80px, 9999px, 360px, 0);
        transform: skew(1.55deg);
    }
    70% {
        clip: rect(62px, 9999px, 90px, 0);
        transform: skew(1.65deg);
    }
    75% {
        clip: rect(52px, 9999px, 920px, 0);
        transform: skew(1.75deg);
    }
    80% {
        clip: rect(33px, 9999px, 130px, 0);
        transform: skew(1.85deg);
    }
    85% {
        clip: rect(87px, 9999px, 700px, 0);
        transform: skew(1.95deg);
    }
    90% {
        clip: rect(41px, 9999px, 850px, 0);
        transform: skew(2.05deg);
    }
    95% {
        clip: rect(27px, 9999px, 320px, 0);
        transform: skew(2.15deg);
    }
    100% {
        clip: rect(54px, 9999px, 70px, 0);
        transform: skew(2.25deg);
    }
}

.glitch {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05); /* ノイズの見え方を調整するための背景色 */
    z-index: 0; /* 十分に高い値を設定 */
    opacity: 0;
    animation: glitch 1s infinite;
    pointer-events: none;
}



/* 問題画面のコンテナにブラーをかけるクラス */
.blurred {
    filter: blur(2px); /* ブラーの強さを調整 */
    opacity: 0.8;
}


/* スライドインアニメーション */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* スタイリッシュランクのスタイル */
.rank-feedback {
    opacity: 0;
    transition: opacity 0.5s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-style: italic;
letter-spacing: 2px;
}

.rank-feedback span {
    font-size: 2rem; /* 全体のフォントサイズを調整 */
    color: rgb(255, 255, 255);
    font-family: "Road Rage", sans-serif;
    font-weight: 400;
    font-style: italic;
}

.rank-feedback span.large {
    font-size: 3rem; /* 大文字のフォントサイズを調整 */
    color: rgb(158, 0, 0);
    text-shadow: 0 0 10px #fff,0 0 15px #fff;
    font-family: "Jersey 10", sans-serif;
    letter-spacing: 3px;
    font-style: italic;

}

.rank-feedback.rank-E span.large,
.rank-feedback.rank-D span.large,
.rank-feedback.rank-C span.large,
.rank-feedback.rank-B span.large,
.rank-feedback.rank-A span.large,
.rank-feedback.rank-S span.large,
.rank-feedback.rank-SS span.large,
.rank-feedback.rank-SSS span.large {
    animation: slideIn 0.5s forwards;
}

/* 矢印のアニメーション */
@keyframes arrowUp {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    50% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

@keyframes arrowDown {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    50% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(10px);
    }
}

.rank-feedback .arrow-up {
    position: absolute;
    right: -30px;
    font-size: 1.5rem;
    color: green;
    opacity: 0;
    font-weight: bold;
}

.rank-feedback .arrow-down {
    position: absolute;
    right: -30px;
    font-size: 1.5rem;
    color: red;
    font-weight: bold;
    opacity: 0;
}

.rank-feedback.show-up .arrow-up {
    animation: arrowUp 1s forwards;
}

.rank-feedback.show-down .arrow-down {
    animation: arrowDown 1s forwards;
}

/* アニメーションリセット用 */
.rank-feedback.reset {
    animation: none;
}

/* 点滅 */
.blinking{
	-webkit-animation:blink 1.5s ease-in-out infinite alternate;
    -moz-animation:blink 1.5s ease-in-out infinite alternate;
    animation:blink 1.5s ease-in-out infinite alternate;
}
@-webkit-keyframes blink{
    0% {opacity:0;}
    100% {opacity:1;}
}
@-moz-keyframes blink{
    0% {opacity:0;}
    100% {opacity:1;}
}
@keyframes blink{
    0% {opacity:0;}
    100% {opacity:1;}
}


@keyframes rankAnimation {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


/* Mobile Styles */
@media (max-width: 600px) {
    #image1, #image2 {
        width: 90%;
        margin-bottom: 10px;
    }

    #rank-feedback-container {
        flex-direction: column;
        align-items: center;
    }

    #meter {
        width: 100%;
    }
}

/*==================================================
背景色が伸びて出現
===================================*/

/*全共通*/

.bgextend{
    animation-name:bgextendAnimeBase;
    animation-duration:1s;
    animation-fill-mode:forwards;
    position: relative;
    overflow: hidden;/*　はみ出た色要素を隠す　*/
    opacity:0;
  }
  
  @keyframes bgextendAnimeBase{
    from {
      opacity:0;
    }
  
    to {
      opacity:1;  
  }
  }
  
  /*中の要素*/
  .bgappear{
    animation-name:bgextendAnimeSecond;
    animation-duration:1s;
    animation-delay: 0.6s;
    animation-fill-mode:forwards;
    opacity: 0;
  }
  
  @keyframes bgextendAnimeSecond{
    0% {
    opacity: 0;
    }
    100% {
    opacity: 1;
  }
  }
  
  /*左から右*/
  .bgLRextend::before{
    animation-name:bgLRextendAnime;
    animation-duration:1s;
    animation-fill-mode:forwards;
      content: "";
      position: absolute;
      width: 100%;
      height: 100%;
      background-color: #666;/*伸びる背景色の設定*/
  }
  @keyframes bgLRextendAnime{
    0% {
      transform-origin:left;
      transform:scaleX(0);
    }
    50% {
      transform-origin:left;
      transform:scaleX(1);
    }
    50.001% {
      transform-origin:right;
    }
    100% {
      transform-origin:right;
      transform:scaleX(0);
    }
  }
  
  /* スクロールをしたら出現する要素にはじめに透過0を指定　*/
  .bgappearTrigger,
  .bgLRextendTrigger{
      opacity: 0;
  }