body {
    cursor: default;
    color: #888;
    background-color: #333;

    display: -webkit-flex;
    display: flex;

    -webkit-flex-direction: column;
    flex-direction: column;

    height: 100%;    /* for firefox */
    width: 100%;

    position: absolute;
    padding: 0px;
    border: 0px;
    margin: 0px;
}

/* Remove spin of input type number */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    /* display: none; <- Crashes Chrome on hover */
    -webkit-appearance: none;
    margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
}

body, canvas, div {
    outline: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -khtml-user-select: none;
    -webkit-tap-highlight-color: rgba(179, 179, 179, 0);
}

canvas {
  background-color: rgba(0, 0, 0, 0);
}

#splash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: #171717 url(./logo.jpg) no-repeat center;
    background-size: 40%;
}

.content {
    display: -webkit-flex;
    display: flex;

    -webkit-justify-content: center;
    justify-content: center;

    -webkit-align-items: center;
    align-items: center;

    -webkit-flex-direction: column;
    flex-direction: column;

    -webkit-flex: auto;
    flex: auto;
}

.contentWrap {
    width: 100%;
    overflow: auto;

    display: -webkit-flex;
    display: flex;

    -webkit-align-items: center;
    align-items: center;

    -webkit-flex-direction: column;
    flex-direction: column;
}

#GameDiv {
    visibility: hidden;
}

.wrapper {
    position: relative;

    border: 1px solid #444;
    background: #222;
    margin: 0 auto;
}

.toolbar {
    /*position: absolute;*/
    /*left: 10px;*/
    /*top: 10px;*/
    min-height: 27px;
    padding: 4px 0px 4px 10px;

    display: -webkit-flex;
    display: flex;

    -webkit-align-items: center;
    align-items: center;

    -webkit-flex-direction: row;
    flex-direction: row;

    z-index: 999;
    
    border-bottom: 1px solid #171717;
}

.toolbar * {
    font-size: 12px;
    font-family: /* https://www.smashingmagazine.com/2015/11/using-system-ui-fonts-practical-guide/ */    
                 -apple-system, BlinkMacSystemFont,
                 "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans",
                 "Helvetica Neue", sans-serif;
}

.toolbar .item {
    display: inline-block;
    margin-right: 10px;
}

.toolbar select {
    height: 25px;
    padding: 0px 8px;

    box-shadow: none;
    background-image: none;

    border: 1px solid #171717;
    background: #444;
    color: #aaa;
    /* reference: https://developer.mozilla.org/zh-CN/docs/Web/CSS/appearance */
    -webkit-appearance: button;
    -moz-appearance: button;
}

.toolbar select:focus {
    outline: none;
    /* border: 1px solid #09f; */
}

.toolbar button {
    border: 1px solid #171717;
    border-radius: 2px;
    text-align: center;
    padding: 4px 8px;

    cursor: pointer;
    color: #bdbdbd;
    font-weight: bold;

    background-image: linear-gradient(#5a5a5a, #444);
}

.toolbar button.checked {
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
    color: #09f;
    background-image: linear-gradient(#333, #222);
}

.toolbar button:focus {
    outline: none;
}

.toolbar button:active {
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
    color: #888;
    background-image: linear-gradient(#333, #222);
}

.toolbar input {
    width: 41px;
    height: 24px;
    padding: 4px 4px;
    box-shadow: inset 0px 0px 2px 1px rgba(0,0,0,0.3);
    border: 1px solid #171717;
    background: #444;
    color: #aaa;
}

@media screen and (max-width: 760px) {
    .toolbar {
        display: none;
    }

    .wrapper {
        border: 0px;

        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
}

#bulletin {
    position: absolute;
    left: 50%;
    top: 50%;
    display: none;
}

#bulletin .inner {
    position: relative;
    left: -50%;
    top: -50%;
    display: none;
}

#recompiling {
    position: relative;
    /*left: 50%;
    top: 50%;*/
    display: none;
}

.progress-bar {
    background-color: #646f76;
    position: absolute;
    left: 29.75%;
    top: 50%;
    width: 40.5%;
    height: 3px;
    border-radius: 2px;
}

.progress-bar span {
    display: block;
    height: 100%;
    border-radius: 2px;
    transition: width .4s ease-in-out;
    background-color: #3dc5de;
}

.stripes span {
    background-size: 30px 30px;
    background-image: linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
                        transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
                        transparent 75%, transparent);            
    
    animation: animate-stripes 1s linear infinite;             
}

@keyframes animate-stripes {
    0% {background-position: 0 0;} 100% {background-position: 60px 0;}
}


.normal-btn {
    background-color: #007bff;
    color: #fff;
    padding: 10px 20px;
    margin: 5px;
    border-radius: 5px;
    cursor: pointer;
    width: max-content;
    height: min-content;
  }

  .simple-btn {
    /* background-color: #007bff; */
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
    /* padding: 3px 6px; */
    /* border-radius: 4px; */
  }

  /* Styling for the modal overlay */
  .modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1001;
  }

  /* Styling for the modal content */
  .modal-content {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1003;
    height: 90%;
    width: 90%;
  }

  .modal-panel {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    z-index: 1003;
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  .table-header {
    /* 添加固定定位属性，使其固定在 <ul> 元素的顶部 */
    position: sticky;
    top: 0;
    background-color: #a0a0a0;
    font-size: smaller;
    /* font-weight: bold; */
    color: #000;
    padding: 10px;
    display: flex;
    /* justify-content: space-between; */
  }

  select {
    width: min-content;
    height: 40px;
    font-size: x-large;
    font-weight: bold;
    border: none;
  }

  .flag-select {
    width: min-content;
    border: none;
    height: auto;
    font-size: small;
    font-weight: normal;
  }

  .content-list {
    flex: 1;
    list-style-type: none;
    padding: 0;
    margin: 0;
    border: 1px solid #ccc;
    height: 100%;
    overflow-y: scroll;
  }

  #ad-level-list {
    flex: 1;
    list-style-type: none;
    padding: 0;
    margin: 0;
    border: 1px solid #ccc;
    height: 100%;
    overflow-y: auto;
  }

  #lib-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    border: 1px solid #ccc;
    /* width: max-content; */
    height: calc(100% - 50px);
    overflow-y: auto;
  }

  #group-list {
    list-style-type:decimal;
    padding: 0;
    margin: 0;
    border: 1px solid #ccc;
    width: 100%;
    height: calc(100% - 20px);
    overflow-y: auto;
  }

  #group-level-list {
    list-style-type:decimal;
    padding: 0;
    margin: 0;
    border: 1px solid #ccc;
    width: 100%;
    height: 100%;
    max-height: calc(100% - 20px);
    overflow-y: auto;
  }

  .li-selected {
    background-color: #f9c7c8;
    border: solid red 1px !important;
  }

  .li-editing {
    background-color: #79d495;
    border: solid rgb(49, 136, 95) 1px !important;
  }

  li {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #ccc;
    cursor: grab;
    font-size: 16px;
    color: #333;
    background-color: #f2f2f2;
    position: relative;
  }

  .li-before li::before {
    content: attr(data-index);
    /* 使用 data-* 属性存储页数 */
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: #4caf50;
    /* 设置图标背景色 */
    color: white;
    /* 设置图标文字颜色 */
    text-align: center;
    line-height: 20px;
    margin-right: 5px;
    border-radius: 50%;
    /* 将图标形状设置为圆形 */
    font-size: x-small;
  }
  .order
  {
    content: attr(data-index);
    /* 使用 data-* 属性存储页数 */
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: #4caf50;
    /* 设置图标背景色 */
    color: white;
    /* 设置图标文字颜色 */
    text-align: center;
    line-height: 20px;
    margin-right: 5px;
    border-radius: 50%;
    /* 将图标形状设置为圆形 */
    font-size: x-small;
  }

  .li-after li::after {
    content: attr(data-page-number);
    /* 使用 data-* 属性存储页数 */
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: #cccccc;
    /* 设置图标背景色 */
    color: white;
    /* 设置图标文字颜色 */
    text-align: center;
    line-height: 20px;
    margin-right: 5px;
    border-radius: 10%;
    /* 将图标形状设置为圆形 */
    font-size: x-small;
    position: absolute;
    /* 设置图标的 position 属性为 absolute */
    right: 0;
    /* 将图标靠右对齐 */
  }

  .toast {
    position: fixed;
    bottom: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #333;
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    display: none;
    z-index: 10;
  }

  .input-number {
    width: 70px;
  }
  .level-title {
    margin-left: 10px;
  }

  .tab_button {
    background-color: #818181;
    color: #fff;
    padding: 10px 15px;
    cursor: pointer;
    width: max-content;
    height: min-content;
    border-bottom:  0;
  }

  .tab_left {
    border-radius: 5px 0 0 5px;
  }

  .tab_middle {
    border-radius: 0;
    border-left: 1px solid #FFF;
    border-right: 1px solid #FFF;
  }

  .tab_right {
    border-radius: 0 5px 5px 0;
  }

  .tab_vertical {
    background-color: #f2f2f2;
    color: #000;
    padding: 15px 10px;
    margin-right: 2px;
    cursor: pointer;
    width: min-content;
    height: min-content;
    border-bottom:  0;
  }

  .tab_top {
    border-radius: 0 5px 0 0;
    border-bottom: 1px solid #FFF;
  }

  .tab_bottom {
    border-radius: 0 0 5px 0;
  }

  .tab_button_select {
    background-color: #007bff;
    color: #fff;
  }