﻿@font-face {
    font-family: 'MainUI';
    src: url('project/fonts/MainUI.woff2');
    font-display: swap;
}

@font-face {
    font-family: 'num';
    src: url('project/fonts/num.woff2');
    font-display: swap;
}


    html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    overflow: hidden;
    /*project/materials/ground.png
    cursor: url('project/images/mouse.png'), auto;*/
}

#gameGroup {
    position: absolute;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    background-color: #000;
    cursor: url('project/images/mouse.png'), auto;
}

#mainTips {
    color: #fff;
    font-size: 0.8em;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 370;
}

#musicBtn {
    position: fixed;
    top: 3vh; /* vh: 相对于视口高度 */
    right: 3vw; /* vw: 相对于视口宽度 */
    cursor: pointer;
    z-index: 400;
    display: none;
}
@media (orientation: landscape) {
    #musicBtn {
        top: 5px;
        right: 5px;
    }
}

@media (orientation: portrait) {
    #musicBtn {
        top: 50px;
        right: 3px;
    }
}


#startPanel {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: #fff;
    overflow: hidden;
    z-index: 300;
}

#startTop {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: #000;
    z-index: 350;
    position: relative;
    overflow: hidden;
}

#startTopProgressBar {
    width: 90vw;
    max-width: 100%; /* 避免超出屏幕宽度 */
    height: calc(90vw * 0.08); /* 高度动态调整，保持比例 */
    max-height: 60px; /* 限制最大高度，避免横屏过矮 */
    aspect-ratio: 20 / 1; /* 让宽度始终是高度的 20 倍 */
    margin: 0 auto;
    position: absolute;
    top: 5vh;
    border: 6px solid #1E90FF;
    box-sizing: border-box;
    border-radius: 25px;
    background-color: #87CEFA;
    z-index: 15;
}


@media (orientation: landscape) {
    #startTopProgressBar {
        width: 80vw; /* 横屏时稍微缩小 */
        height: 8vh;
    }
}

@media (orientation: portrait) {
    #startTopProgressBar {
        width: 90vw; /* 竖屏时稍微放大 */
        height: 4vh;
    }
}

#startTopProgress {
    margin: 3px 3px;
    width: calc(0% - 6px);
    height: calc(100% - 6px);
    background-color: #00FFFF;
    border-radius: 25px;
    z-index: 15;
}

#startTopLoadTips {
    color: #FFFAFA;
    font-size: 3.3vmin;
    position: absolute;
    top: 3%;
    left: 10%;
    z-index: 15;
    text-align: center;
    width: 80%;
}
#startTopLoadTips2 {
    color: #FFF0F5;
    font-size: 3vmin;
    position: absolute;
    top: 3%;
    left: 5%;
    z-index: 15;
    text-align: right;
    width: 90%;
}

#slider {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    place-items: center;
    width: auto;
    height: auto;
    z-index: 1000;
    opacity: 0.7;
    transition: opacity ease-in-out 1s;
    max-width: 100%;
    max-height: 80%;
    object-fit: contain; /* 保持图片完整显示 */
}

.preload {
    width: 0px;
    height: 0px;
}

#startTopHint {
    color: #66CCFF;
    position: absolute;
    bottom: 0;
    left: 5%;
    z-index: 15;
    font-size: 1.1em;
}

#startBackground {
    position:absolute;
    top:50%;
    left:50%;
    height: 100%;
    width: auto;
    transform:translate(-50%,-50%);
    z-index: 260;
}

#startLogo {
    user-select: none;
    position: absolute;
    z-index: 290;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    margin-top: 8%;
    max-width: 100%;
    text-align: center;
    font: bold 4em STXingkai;
}

#startTitle {
    user-select: none;
    position: absolute;
    z-index: 280;
}

#startButtonGroup {
    width: auto;
    position: absolute;
    text-align: center;
    font-size: 1.4em;
    display: none;
    z-index: 310;
    bottom: 0;
    margin-bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 25px;
    min-width: 20%;
    /* default value */
    background-color: #32369F;
    opacity: 0.85;
    color: #FFFFFF;
    border: #FFFFFF 2px solid;
    caret-color: #FFD700;
    border-radius: 10px;
}

#startButtons {
    display: block;
}

#levelChooseButtons {
    display: none;
}

.startButton {
    width: 100%;
    margin: 0;
    font-weight: bold;
    display: block;
    cursor: pointer;
    padding: 4px 0;
    border-color: transparent;
    border-width: 2px;
    border-style: solid;
    border-radius: 6px;
}

.onChoiceAnimate {
    animation: onChoice 2s ease-in-out 0s infinite normal none running;
}

#floorMsgGroup {
    top: 3px;
    right: 3px;
    position: absolute;
    text-align: center;
    display: none;
    color: #fff;
    background-color: #000;
    z-index: 230;
}

#logoLabel {
    margin-top: 8%;
    font: bold 3em STXingkai;
    margin-left: auto;
    margin-right: auto;
}

#versionLabel {
    margin-top: -3%;
    font-size: 1.2em;
    font-weight: bold;
}

#floorNameLabel {
    margin-top: 30px;
    font-size: 1.6em;
    font-weight: bold;
}

#statusBar {
    position: absolute;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    background: url(project/materials/ground.png) repeat;
    z-index: 185;
    display: none;
    top: 0;
    left: 0;
    padding: 3px;
}
#statusBar .status{
    user-select: none;
    position: relative;
    display: block;
    float: left;
    width: 100%;
}
.status img{
    vertical-align: middle;
    width: auto;
    height: 100%;
    max-height: 1.6em;
}
#statusBar span{
    user-select: none;
    font: bold italic 1.1em Verdana;
    display: inline;
}
#statusBar p {
    user-select: none;
    display: inline-block;
    vertical-align: middle;
    width: 60%;
    margin: 0;
    color: white;
    font: bold italic 1.1em Verdana;
    white-space: nowrap;
}
#toolBar {
    position: absolute;
    background: url(project/materials/ground.png) repeat;
    z-index: 210;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    display: none;
    padding: 3px;
}
#toolBar .tools{
    position: relative;
    display: block;
    float: left;
}

p#hard {
    user-select: none;
    width: 6em;
    vertical-align: middle;
    display: inline-block;
    color: red;
    font: bold normal 1.1em "Arial Black";
    text-align: center;
    margin: 0 6px 6px 0;
    word-break: keep-all;
}

span#poison, span#weak, span#curse, span#pickaxe, span#bomb, span#fly {
    user-select: none;
    font-style: normal;
    font-size: 1em;
}

p#name {
    font-style: normal;
}

.gameCanvas {
    position: absolute;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
}

#gif {
    z-index: 20;
    position: absolute;
    overflow: hidden;
}

#gif2 {
    z-index: 90;
    position: absolute;
    overflow: hidden;
}

#gameDraw {
    position: absolute;
    background: #000000;
    overflow: hidden;
    z-index: 185;
}

#bg {
    z-index: 10;
}

#event {
    z-index: 30;
}

#hero {
    z-index: 40;
}

#event2 {
    z-index: 50;
}

#fg {
    z-index: 60;
}

#damage {
    z-index: 65;
}

#animate {
    z-index: 70;
}

#curtain {
    z-index: 125;
}

#ui {
    z-index: 140;
}

#data {
    z-index: 170;
}

#inputDiv {
    display: none;
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(127,127,127,0.6);
    z-index: 2000
}

#inputDialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    background: white;
    width: 250px;
    min-height: 50px;
}

#inputMessage {
    word-wrap: break-word;
    text-align: left;
    margin-left: 8%;
    margin-right: 5%;
}

#inputBox {
    margin-left: 8%;
    width: 80%;
    margin-bottom: 10px;
    padding: 5px 3px;
    border: 1px solid;
    background: #F0F0F0;
}

#inputYes {
    margin-bottom: 15px;
    margin-left: 8%;
}

#inputNo {
    float:right;
    margin-right: 10%;
}

#_selector, ._uievent_selector {
    animation: selector 2s ease-in-out 0s infinite normal none running;
}

@-webkit-keyframes selector {
    0% { opacity: 0.95; }
    50% { opacity: 0.55; }
    100% { opacity: 0.95; }
}

@keyframes selector {
    0% { opacity: 0.95; }
    50% { opacity: 0.55; }
    100% { opacity: 0.95; }
}

#next {
    width: 5px;
    height: 5px;
    display: none;
    position: absolute;
    transform: rotate(45deg);
    border-bottom-width: 4px;
    border-bottom-style: solid;
    border-right-width: 4px;
    border-right-style: solid;
    -webkit-animation: next .5s ease-in-out alternate infinite;
    animation: next .5s ease-in-out alternate infinite;
    left: 0;
    top: 0;
    opacity: 0.7;
    z-index: 169;
}

@-webkit-keyframes next {
    100% {
        transform: rotate(45deg) translate(-3px, -3px);
    }
}
@keyframes next {
    100% {
        transform: rotate(45deg) translate(-3px, -3px);
    }
}

#startImageBackgroundDiv {
    display: none;
    width: 100%;
    height: 100%;
    position: fixed;
    z-index: 10000;
}

#startImageDiv {
    width: 100%;
    height: 100%;
    position: fixed;
    background: black;
    opacity: 1;
}

#startImageLogo {
    opacity: 0;
    height: 100vh; /* 图片高度等于视口高度 */
    width: auto; /* 宽度自动调整，保持原始比例 */
    max-width: 100vw; /* 避免宽度超过屏幕 */
    object-fit: contain; /* 让整个图片显示在屏幕内，防止裁剪 */
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.startImageAnimation {
    -webkit-animation: startImage 10s ease-in-out 1s alternate 1;
    animation: startImage 6s ease-in-out 1s alternate 1;
}

@-webkit-keyframes startImage {
    0% { opacity: 0; }
    60% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes startImage {
    0% { opacity: 0; }
    60% { opacity: 1; }
    100% { opacity: 0; }
}

.startImageDivAnimation {
    -webkit-animation: startImageDivDisappear 2s ease-in-out 5s alternate 1;
    animation: startImageDivDisappear 2s ease-in-out 5s alternate 1;
}

@-webkit-keyframes startImageDivDisappear {
    0% { opacity: 1 }
    100% { opacity: 0 }
}

@keyframes startImageDivDisappear {
    0% { opacity: 1 }
    100% { opacity: 0 }
}

#ui-editor {
    z-index: 9999;
    position: absolute;
    overflow: visible;
    height: 100%;
}

@font-face {
    font-family: Fira Code;
    src: url(../src/fonts/FiraCode-Regular.ttf);
}

/* 注释下面这三行以开启抗锯齿 */

.anti-aliasing {
    image-rendering: pixelated;
}


#buttonContainer {
    width: min(28vw, 28vh); /* 横竖屏自适应 */
    height: min(7vw, 7vh);
    max-width: 150px;
    max-height: 50px;
    position: absolute;
    display: none;
    gap: 32px;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.0);
    transform: translate(-50%, -50%);
   

}

.button {
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.0);
    border: none;
    position: relative;
}

.button img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        pointer-events: none;
    }



#joystick-container {
    width: min(20vw, 20vh); /* 横竖屏自适应 */
    height: min(20vw, 20vh);
    max-width: 100px;
    max-height: 100px;
    position: absolute;
    background-color: rgba(42, 29, 29, 0.4); /* 变成白色，透明度0.8 */
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    display: none; /* 默认隐藏摇杆 */
}

#joystick {
    width: 50%;
    height: 50%;
    background-color: rgba(42, 29, 29, 0.7); /* 透明度改为 0.5 */
    border-radius: 50%;
    position: absolute;
}
#displayImage {
    width: 100%;
    height: auto;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000; /* 确保在游戏画布之外 */
    pointer-events: none; /* 避免影响点击事件 */
    opacity: 0; 
    transition: opacity 1s ease-in-out; /* 透明度渐变动画 */
}

@media (orientation: landscape) {
    #displayImage {
        content: url('project/images/bg.webp');
    }
}

