body{

    margin:0;

    background:#20242c;

    color:white;

    font-family:
        "Meiryo",
        sans-serif;
}

/* ==========================
   メイン
========================== */

.game-container{

    max-width:800px;

    margin:30px auto;

    text-align:center;

    padding:20px;
}

h1{

    color:#ffd966;

    margin-bottom:20px;
}

/* ==========================
   モードボタン
========================== */

.mode-select{

    margin-bottom:20px;
}

.mode-select button{

    padding:10px 20px;

    margin:5px;

    font-size:18px;

    border:none;

    border-radius:10px;

    cursor:pointer;
}

.mode-select button.active{

    background:#66d9ff;

    color:black;

    font-weight:bold;
}

/* ==========================
   ステータス
========================== */

.status{

    display:flex;

    justify-content:center;

    gap:20px;

    margin-bottom:30px;
}

.box{

    background:#2f3642;

    padding:15px;

    min-width:120px;

    border-radius:10px;
}

.box span{

    color:#aaa;

    display:block;
}

/* ==========================
   問題文字
========================== */

.question{

    font-size:120px;

    font-weight:bold;

    color:#66d9ff;

    margin-top:40px;
}

/* ==========================
   ローマ字候補
========================== */

.romaji-guide{

    font-size:32px;

    font-weight:bold;

    min-height:45px;

    margin-bottom:30px;
}

.done{

    color:#00ff66;
}

.remain{

    color:#ffffff;
}

/* ==========================
   スタートボタン
========================== */

.start-btn{

    padding:15px 40px;

    font-size:24px;

    border:none;

    border-radius:10px;

    cursor:pointer;
}

/* ==========================
   PRESS SPACE
========================== */

.start-message{

    margin-top:20px;

    font-size:32px;

    font-weight:bold;

    color:#66d9ff;

    animation:
        blinkStart 1s infinite;
}

@keyframes blinkStart{

    0%{
        opacity:1;
    }

    50%{
        opacity:.2;
    }

    100%{
        opacity:1;
    }

}

/* ==========================
   RESULT
========================== */

.result{

    margin-top:30px;

    font-size:28px;
}

.hidden{

    display:none;
}

/* ==========================
   MISS FLASH
========================== */

.flash-miss{

    animation:
        flashMiss .15s;
}

@keyframes flashMiss{

    0%{
        background:#ff0000;
    }

    100%{
        background:#20242c;
    }

}

/* ==========================
   QUESTION POP
========================== */

.question-pop{

    animation:
        questionPop .15s;
}

@keyframes questionPop{

    0%{
        transform:scale(.5);
    }

    100%{
        transform:scale(1);
    }

}

/* ==========================
   CLEAR
========================== */

.clear-message{

    font-size:72px;

    font-weight:bold;

    margin:20px 0;

    background:linear-gradient(
        90deg,
        #ff0000,
        #ff8800,
        #ffff00,
        #00ff00,
        #00ffff,
        #0000ff,
        #ff00ff,
        #ff0000
    );

    background-size:400%;

    -webkit-background-clip:text;

    -webkit-text-fill-color:transparent;

    animation:
        clearZoom .6s ease-out,
        rainbowMove 3s linear infinite;
}

@keyframes rainbowMove{

    0%{
        background-position:0% 50%;
    }

    100%{
        background-position:100% 50%;
    }

}

@keyframes clearZoom{

    0%{
        transform:scale(.2);
        opacity:0;
    }

    60%{
        transform:scale(1.3);
    }

    100%{
        transform:scale(1);
        opacity:1;
    }

}

/* ==========================
   キラキラ
========================== */

.sparkles{

    font-size:40px;

    animation:
        sparkle 1s ease-in-out infinite;
}

@keyframes sparkle{

    0%{
        opacity:.4;
        transform:scale(.8);
    }

    50%{
        opacity:1;
        transform:scale(1.2);
    }

    100%{
        opacity:.4;
        transform:scale(.8);
    }

}

/* ==========================
   ランク
========================== */

.rank{

    font-size:64px;

    font-weight:bold;

    color:#ffcc00;

    text-shadow:
        0 0 10px #ffff00,
        0 0 20px #ffaa00;
}

.title-name{

    font-size:30px;

    margin-bottom:10px;
}

/* ==========================
   PERFECT
========================== */

.perfect{

    font-size:48px;

    font-weight:bold;

    margin-top:10px;

    color:#66ffcc;

    text-shadow:
        0 0 10px #66ffcc,
        0 0 20px #66ffcc;
}

/* ==========================
   NEW RECORD
========================== */

.new-record{

    font-size:36px;

    font-weight:bold;

    margin:15px 0;

    background:linear-gradient(
        90deg,
        red,
        orange,
        yellow,
        lime,
        cyan,
        blue,
        magenta
    );

    background-size:400%;

    -webkit-background-clip:text;

    -webkit-text-fill-color:transparent;

    animation:
        rainbowRecord 1s linear infinite,
        recordBlink .5s infinite;
}

@keyframes rainbowRecord{

    from{
        background-position:0%;
    }

    to{
        background-position:400%;
    }

}

@keyframes recordBlink{

    0%{
        transform:scale(1);
    }

    50%{
        transform:scale(1.15);
    }

    100%{
        transform:scale(1);
    }

}


/* ==========================
   著作権表示
========================== */

.copyright{

    color:#cccccc;

    font-size:12px;

    letter-spacing:1px;

    margin-top:-10px;

    margin-bottom:20px;
}


/* ==========================
   ワールドランク入り表示
========================== */

.rank-in-message{

    margin-top:25px;

    font-size:36px;

    font-weight:bold;

    background:linear-gradient(
        90deg,
        #ffcc00,
        #ffffff,
        #ffcc00
    );

    background-size:300%;

    -webkit-background-clip:text;

    -webkit-text-fill-color:transparent;

    animation:
        rankGlow 1.5s linear infinite,
        rankPop .8s ease-in-out infinite;

}

.rank-sub-message{

    margin-top:10px;

    margin-bottom:15px;

    color:#cccccc;

    font-size:18px;
}

@keyframes rankGlow{

    0%{
        background-position:0%;
    }

    100%{
        background-position:300%;
    }

}

@keyframes rankPop{

    0%{
        transform:scale(1);
    }

    50%{
        transform:scale(1.05);
    }

    100%{
        transform:scale(1);
    }

}


/* ==========================
   ワールドランクの表示
========================== */
.world-ranking{

    margin-top:30px;

    padding:20px;

    background:#2f3642;

    border-radius:10px;

    max-width:500px;

    margin-left:auto;

    margin-right:auto;
}

.world-ranking-title{

    font-size:28px;

    font-weight:bold;

    color:#ffd966;

    margin-bottom:15px;
}

.ranking-row{

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:10px;

    margin:4px 0;

    font-family:monospace;

    font-size:18px;
}

.ranking-pos{

    width:30px;

    color:#ffd966;
}

.ranking-name{

    width:110px;

    text-align:left;
}

.ranking-time{

    width:70px;

    text-align:right;

    color:#66d9ff;
}

.ranking-rank{

    width:60px;

    color:#ffcc00;

    font-weight:bold;
}

.ranking-date{

    width:100px;

    color:#cccccc;

    font-size:14px;
}

.ranking-me{

    color:#66ffcc;

    font-weight:bold;

    background:rgba(
        102,
        255,
        204,
        0.15
    );

    border-radius:8px;

    animation:
        rankingGlow 1s infinite;
}

@keyframes rankingGlow{

    0%{

        box-shadow:
        0 0 0px #66ffcc;

    }

    50%{

        box-shadow:
        0 0 15px #66ffcc;

    }

    100%{

        box-shadow:
        0 0 0px #66ffcc;

    }

}