/* =======================================
   Sunny FPS v0.5.0 Stable
======================================= */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html,
body{

    width:100%;
    height:100%;

    overflow:hidden;

    background:#000;

    font-family:
        "Microsoft YaHei",
        Arial,
        sans-serif;

}

canvas{

    display:block;

}

/* =======================================
   Pointer Lock 提示
======================================= */

#overlay{

    position:fixed;

    left:0;
    top:0;

    width:100%;
    height:100%;

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    gap:14px;

    background:rgba(0,0,0,.65);

    color:white;

    z-index:1000;

    text-align:center;

    user-select:none;

}

#overlay h1{

    font-size:48px;

    margin-bottom:20px;

}

#overlay p{

    font-size:18px;

    opacity:.9;

}

/* 鼠标锁定后隐藏 */

body.locked #overlay{

    display:none;

}

/* =======================================
   准星
======================================= */

#crosshair{

    position:fixed;

    left:50%;
    top:50%;

    width:20px;
    height:20px;

    transform:translate(-50%,-50%);

    pointer-events:none;

    z-index:999;

}

#crosshair::before{

    content:"";

    position:absolute;

    left:9px;
    top:0;

    width:2px;
    height:20px;

    background:white;

}

#crosshair::after{

    content:"";

    position:absolute;

    left:0;
    top:9px;

    width:20px;
    height:2px;

    background:white;

}

/* 未进入游戏时隐藏准星 */

body:not(.locked) #crosshair{

    display:none;

}