#content{
    position: relative;
    height: 100%;
}

header {
    position: relative;
    height: 5%;
    /* background-color: rgb(44, 44, 44); */
    background-color: #212529;
}

#main {
    position: relative;
    height: 100%;
    background-color: #212529;
    display: flex;
    flex-direction: column;
}

.window-wrap {
    position: relative;
    width: 100%;
    height: 60%;
    display: flex;
    flex-direction: column;
    /* justify-content: center; */
    align-items: center;
    font-size: 0;
}

#window {
    position: relative;
    background-color: #212529;
    width: 90%;
    height: 100%;
    /* display: flex;
    flex-direction: column;
    justify-content: center; */
}

#start-menu {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
}

#start-menu.active {
    transform: translatey(-150%);
}

#start-menu .start-menu-title {
    font-size: 40px;
    color: white;
}

#end-menu {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(200, 100, 20, 0.7);
    transform: translateY(-150%);
    transition: 0.3s;
}

#end-menu.active {
    transform: translateY(0);
}

#end-menu .end-menu-title {
    font-size: 40px;
}

#pause-menu {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(200, 100, 20, 0.7);
    transform: translateY(-150%);
    transition: 0.3s;
}

#pause-menu.active {
    transform: translateY(0);
}

#pause-menu .pause-menu-title {
    font-size: 40px;
}

#window canvas {
    background-color: rgb(75, 128, 116);
}

#info-table {
    position: relative;
    
    width: 100%;
    display: flex;
    justify-content: center;
}

#score-table {
    position: relative;
    background-color: #f4a261;
    width: 20%;
    font-size: 15px;
}

#panel {
    display: flex;
    justify-content: space-around;
}

.arrow-keys button {
    width: 64px;
    height: 64px;
    background-color: transparent;
    border: none;
    background-image: url("../asset/arrow_keys_all_sheet.png");
    background-size: calc(64px * 64 / 32) auto; 
                    /*總寬度 x 目標寬度 x 原寬度*/
    /* background-size: cover;*/
}

.arrow-keys-firstlevel {
    display: flex;
    justify-content: center;
}

.arrow-keys-secondlevel {
    display: flex;
    justify-content: space-between;
}

.arrow-keys-firstlevel #up-key {
    background-position: 0 0;
    background-size: calc(64px * 64 / 32) auto; 
}

.arrow-keys-firstlevel #up-key.active {
    background-position: calc(-32px * (64 / 32)) 0;
}

.arrow-keys-firstlevel #up-key:active {
    background-position: calc(-32px * (64 / 32)) 0;
}

.arrow-keys-secondlevel #right-key {
    background-position: 0 calc(-32px * 1 * (64 / 32));
                                /*負的原長度 x index(從0開始) x (目標長度 / 原長度)*/
}

.arrow-keys-secondlevel #right-key.active {
    background-position: calc(-32px * (64 / 32)) calc(-32px * 1 * (64 / 32));
}

.arrow-keys-secondlevel #right-key:active {
    background-position: calc(-32px * (64 / 32)) calc(-32px * 1 * (64 / 32));
}

.arrow-keys-secondlevel #down-key {
    background-position: 0 calc(-32px * 2 * (64 / 32));
}

.arrow-keys-secondlevel #down-key.active {
    background-position: calc(-32px * (64 / 32)) calc(-32px * 2 * (64 / 32));
}

.arrow-keys-secondlevel #down-key:active {
    background-position: calc(-32px * (64 / 32)) calc(-32px * 2 * (64 / 32));
}

.arrow-keys-secondlevel #left-key {
    background-position: 0 calc(-32px * 3 * (64 / 32));
}

.arrow-keys-secondlevel #left-key.active {
    background-position: calc(-32px * (64 / 32)) calc(-32px * 3 * (64 / 32));
}

.arrow-keys-secondlevel #left-key:active {
    background-position: calc(-32px * (64 / 32)) calc(-32px * 3 * (64 / 32));
}

.input-btn {
    display: flex;
    width: 250px;
    justify-content: space-between;
    align-items: center;
}

.input-btn button {
    width: 69px;
    height: 69px;
    background-color: transparent;
    border: none;
}

.input-btn #A-btn {
    background-image: url("../asset/A_btn_all_sheet.png");
    background-size: cover;
}

.input-btn #A-btn.active {
    background-position: 100% 0;
}

.input-btn #A-btn:active {
    background-position: 100% 0;
}

.input-btn #B-btn {
    background-image: url("../asset/B_btn_all_sheet.png");
    background-size: cover;
}

.input-btn #B-btn.active {
    background-position: 100% 0;
}

.input-btn #B-btn:active {
    background-position: 100% 0;
}

.A-btn-class {
    width: 69px;
    height: 69px;
    background-image: url("../asset/A_btn_all_sheet.png");
    background-color: transparent;
    border: none;
    background-size: cover;
    animation: play-ABtn 0.5s steps(2) infinite;
}

@keyframes play-ABtn {
    from { background-position: 0 0; }
    to { background-position: 200% 0; }
}

.B-btn-class {
    width: 69px;
    height: 69px;
    background-image: url("../asset/B_btn_all_sheet.png");
    background-color: transparent;
    border: none;
    background-size: cover;
    animation: play-BBtn 0.5s steps(2) infinite;
}

@keyframes play-BBtn {
    from { background-position: 0 0; }
    to { background-position: 200% 0; }
}