@charset "utf-8";

html {
    font-size: 16px;
}

/* 「*」はユニバーサルセレクタ(すべての要素を対象にするセレクタ)でbox-sizing: border-box;を指定 */
/* この指定(してい)はborderとpaddingをボックスサイズ(widthとheight)の中に含めて算出するので、スタイリングがしやすい*/
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    line-height: normal;
    /*ブラウザが自動的に行間を決める*/
    font-family: "Helvetica Neue",
        Arial,
        "Hiragino Kaku Gothic ProN",
        "Hiragino Sans",
        Meiryo,
        sans-serif;
    /*background: rgb(233, 168, 227); */
    background-image: url(../img/chiikawa.jpg);
    background-size: contain;
    overflow: hidden;
}

p {
    margin: 0;
    padding: 0;
}

/*  ゲームヘッダー  */
header {
    margin-top: 40px;
    color: rgba(253, 4, 79, 0.7);
    font-size: 38px;
    font-weight: bold;
    text-shadow: 5px 5px 5px rgba(255, 255, 255, 0.65);
    text-align: center;
}

/*  ゲーム全体  */
.wrapper {
    position: relative;
    max-width: 100vw;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    padding-bottom: 23px;
    text-align: center;
}

/*  おみくじボタン  */
#btn1 {
    position: relative;
    margin: 20px auto;
    width: 200px;
    height: 400px;
    background-image: url(../img/omikuji.png);
    background-size: contain;
    background-repeat: no-repeat;
    cursor: pointer;
    user-select: none;
}

/* class = back ; id = btn99 backボタン */
.back {
    text-align: left;
}

#btn99 {
    padding: 0.5em;
    border-radius: 0.3em;
    color: whitesmoke;
    font-size: 1.5em;
    background: rgb(26, 212, 212);
    cursor: pointer;
}

#btn1:hover {
    animation: shaking 0.3s infinite;
}

@keyframes shaking {
    0% {
        transform: translate(0px, 0px) rotateZ(0deg)
    }

    25% {
        transform: translate(2px, 2px) rotateZ(1deg)
    }

    50% {
        transform: translate(0px, 2px) rotateZ(0deg)
    }

    75% {
        transform: translate(2px, 0px) rotateZ(-1deg)
    }

    100% {
        transform: translate(0px, 0px) rotateZ(0deg)
    }
}

#btn1:active {
    position: relative;
    top: 10px;
    left: 10px;
}

#omikujiText {
    position: relative;
    margin: 10px auto;
    font-weight: 800;
    text-shadow: 3px 3px 3px rgba(255, 255, 255, 0.65);
    transition: 1s;
}

/*  フッター  */
footer>p {
    position: absolute;
    bottom: 5px;
    width: 100%;
    margin: 0px;
    padding: 1px;
    color: whitesmoke;
    font: 16px Rajdhani;
    text-align: center;
    background: rgba(1, 24, 31, 0.7);
}

/* オープニングシャッター */
.shutter {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    margin: 0em;
    padding: 0em;
    background-color: #1e1e1e;
    animation: byeShutter 2.5s forwards;
}

.shutter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 0;
    margin: auto;
    background-color: #fff;
    animation: shutterOpen 2.5s forwards;
}

@keyframes byeShutter {
    70% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        display: none;
        z-index: -1;
    }
}

@keyframes shutterOpen {
    0% {
        width: 0;
        height: 0.05em;
    }

    50% {
        width: 100%;
        height: 0.05em;
    }

    90% {
        width: 100%;
        height: 100%;
    }

    100% {
        width: 100%;
        height: 100%;
    }
}

@media screen and (max-width:480px) {
    body {
        background-position: 50% 20%;
        background-size: auto 800px;
    }

    header {
        color: aqua;
        font-size: 28px;
    }
}

/* モバイル表示 */
@media screen and (max-width:480px) {
    body {
        background-position: 75% 0%;
        background-size: auto 1000px;
    }

    header {
        margin-top: 20px;
        font-size: 30px;
    }

    #btn1 {
        width: 150px;
        height: 280px;
    }

    #omikujiText {
        margin: 0;
    }

}