/* RPG主canvas深绿色外边框 */
#gameCanvas,
video {
    border: 6px solid #145a32;
    box-sizing: border-box;
    border-radius: 18px;
    background-color: #2b5936;
}
body {
    /* -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none; */
     margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* background-color: #f9ffeb; */
    /* background-image: url("../../img/bgi03.jpg"); */
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.bgi {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("../../img/bgi.jpg");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: -1; /* 确保背景图在最底层 */
}
.deco1 {
    position: absolute;
    top: 0;
    right: 0;
    width: 30%;
    height: 30%;
    background-image: url("../../img/rpg-deco01.png");
    background-position: right top;
    background-repeat: no-repeat;
    /* background-size: cover; */
    background-size: contain;
    pointer-events: none; /* 确保装饰图不干扰点击事件 */
    z-index: 0; /* 确保装饰图在最底层 */
}
.deco2{
    position: absolute;
    bottom: 0;
    left: 0;
    width: 20%;
    height: 20%;
    background-image: url("../../img/rpg-deco02.png");
    background-position: left bottom;
    background-repeat: no-repeat;
    /* background-size: cover; */
    background-size: contain;
    pointer-events: none; /* 确保装饰图不干扰点击事件 */
    z-index: 0; /* 确保装饰图在最底层 */
}
.deco3{
    position: absolute;
    top: 30%;
    left: -3%;
    width: 15%;
    height: 15%;
    background-image: url("../../img/rpg-deco03.png");
    background-position: right bottom;
    background-repeat: no-repeat;
    /* background-size: cover; */
    background-size: contain;
    pointer-events: none; /* 确保装饰图不干扰点击事件 */
    z-index: 0; /* 确保装饰图在最底层 */
}
.deco4{
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20%;
    height:20%;
    background-image: url("../../img/rpg-deco04.png");
    background-position: right bottom;
    background-repeat: no-repeat;
    /* background-size: cover; */
    background-size: contain;
    pointer-events: none; /* 确保装饰图不干扰点击事件 */
    z-index: 0; /* 确保装饰图在最底层 */
}
#gameCanvas,
#upperCanvas,
video {
    position: absolute;
    inset: 0;
    margin: 5%;
}


#backHomeBtn {
     border: none;
            position: fixed;
            top: 4%;
            left: 3%;

            /* width: 10%;
            height: 8%; */
            letter-spacing: 0.1em;
            background: rgba(27, 119, 15, 0.55);
            backdrop-filter: blur(8px);
            color: white;
            padding: 8px 20px;
            border-radius: 40px;
            text-decoration: none;
            font-size: 14px;
            font-weight: 500;
            transition: 0.2s;
            z-index: 100;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
            scale: 1.3;
}

#backHomeBtn:hover {
    /* background: rgba(11, 49, 1, 0.85); */
            transform: translateY(-2px);
}

.rpg-beian {
    position: fixed;
    right: 0px;
    bottom: 10px;
    z-index: 30;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 0px;
    flex-wrap: wrap;
    pointer-events: auto;
    user-select: none;
    font-family: GameFont, "Microsoft YaHei", sans-serif;
    font-size: 12px;
    line-height: 1.2;
}

.rpg-beian-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    text-decoration: none;
    background: rgba(27, 119, 15, 0.55);
    backdrop-filter: blur(8px);
    padding: 6px 6px;
    border-radius: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.rpg-beian-link:hover {
    text-decoration: underline;
}

.rpg-beian-icon {
    height: 14px;
    width: auto;
    display: inline-block;
}
/* 以下是自带的 */
#errorPrinter {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 640px;
    height: 100px;
    transform: translate(-50%, -50%);
    text-align: center;
    text-shadow: 1px 1px 3px #000;
    font-size: 20px;
    color: #2b4e02;
    z-index: 9;
}
#errorName {
    color: #ff0;
    font-weight: bold;
    -moz-user-select: text;
    -webkit-user-select: text;
    -ms-user-select: text;
    user-select: text;
}
#errorMessage {
    color: #fff;
    -moz-user-select: text;
    -webkit-user-select: text;
    -ms-user-select: text;
    user-select: text;
}
#retryButton {
    font-size: 20px;
    color: #fff;
    background-color: #000;
    border-radius: 8px;
    margin: 20px;
    padding: 10px;
}
#fpsCounterBox {
    position: absolute;
    left: 5px;
    top: 5px;
    width: 90px;
    height: 40px;
    background: #222;
    opacity: 0.8;
    z-index: 8;
}
#fpsCounterLabel {
    position: absolute;
    top: 0px;
    left: 0px;
    padding: 5px 10px;
    height: 30px;
    line-height: 32px;
    font-size: 12px;
    font-family: rmmz-numberfont, sans-serif;
    color: #fff;
    text-align: left;
}
#fpsCounterNumber {
    position: absolute;
    top: 0px;
    right: 0px;
    padding: 5px 10px;
    height: 30px;
    line-height: 30px;
    font-size: 24px;
    font-family: rmmz-numberfont, monospace;
    color: #fff;
    text-align: right;
}
#loadingSpinner {
    margin: auto;
    position: absolute;
    top: 0px;
    left: 0px;
    right: 0px;
    bottom: 0px;
    width: 120px;
    height: 120px;
    z-index: 10;
}
#loadingSpinnerImage {
    margin: 0px;
    padding: 0px;
    border-radius: 50%;
    width: 96px;
    height: 96px;
    border: 12px solid rgba(255, 255, 255, 0.25);
    border-top: 12px solid rgba(255, 255, 255, 1);
    animation: fadein 2s ease, spin 1.5s linear infinite;
}
@keyframes fadein {
    0% {
        opacity: 0;
    }
    20% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
