html {
  -ms-touch-action: none;
}

body,
canvas,
div {
  display: block;
  outline: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);

  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -khtml-user-select: none;

}

/* 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 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  margin: 0;

  cursor: default;
  color: #888;
  background-color: #333;

  text-align: center;
  font-family: Helvetica, Verdana, Arial, sans-serif;

  display: flex;
  flex-direction: column;

  /* fix bug: https://github.com/cocos-creator/2d-tasks/issues/791 */
  /* overflow cannot be applied in Cocos2dGameContainer, 
  otherwise child elements will be hidden when Cocos2dGameContainer rotated 90 deg */
  overflow: hidden;
  background: #000 !important;
}

#Cocos2dGameContainer {
  position: absolute;
  margin: 0;
  left: 0px;
  top: 0px;

  display: -webkit-box;
  -webkit-box-orient: horizontal;
  -webkit-box-align: center;
  -webkit-box-pack: center;
}

canvas {
  background-color: rgba(0, 0, 0, 0);
}

a:link,
a:visited {
  color: #666;
}

a:active,
a:hover {
  color: #666;
}

p.header {
  font-size: small;
}

p.footer {
  font-size: x-small;
}

#splash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #171717 url(./splash.b633e.png) no-repeat center;
  background-size: 45%;
}

#ag-render-quality-toggle {
  position: fixed;
  z-index: 2147483501;
  top: calc(8px + env(safe-area-inset-top, 0px));
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 24px;
  height: 48px;
  padding: 0;
  color: #ecf5f1;
  background: rgba(8, 14, 16, .86);
  border: 1px solid #537268;
  border-right: 0;
  border-radius: 24px 0 0 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .28);
  font: 600 13px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  writing-mode: vertical-rl;
  cursor: pointer;
  touch-action: manipulation;
}

#ag-render-quality-toggle:focus-visible,
.ag-render-quality-close:focus-visible {
  outline: 2px solid #53d39b;
  outline-offset: 2px;
}

#ag-render-quality {
  position: fixed;
  z-index: 2147483600;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  padding: 24px;
  padding-top: calc(24px + env(safe-area-inset-top, 0px));
  padding-right: calc(24px + env(safe-area-inset-right, 0px));
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  padding-left: calc(24px + env(safe-area-inset-left, 0px));
  background: rgba(4, 7, 9, .97);
  opacity: 0;
  transition: opacity .18s ease;
}

#ag-render-quality.ag-render-quality-visible {
  opacity: 1;
}

.ag-render-quality-panel {
  position: relative;
  width: 100%;
  max-width: 460px;
  box-sizing: border-box;
  padding: 24px;
  color: #f7f9fc;
  background: #111719;
  border: 1px solid #354043;
  border-radius: 8px;
  box-shadow: 0 20px 56px rgba(0, 0, 0, .52);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

.ag-render-quality-header {
  display: flex;
  align-items: center;
  min-height: 54px;
  margin-bottom: 20px;
}

.ag-render-quality-logo {
  display: block;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  margin-right: 12px;
  background: transparent url(./splash.b633e.png) no-repeat center;
  background-size: contain;
}

.ag-render-quality-brand {
  display: block;
  min-width: 0;
  text-align: left;
  letter-spacing: 0;
}

.ag-render-quality-brand strong,
.ag-render-quality-brand span {
  display: block;
  letter-spacing: 0;
}

.ag-render-quality-brand strong {
  color: #f5f8f7;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 700;
}

.ag-render-quality-brand span {
  margin-top: 3px;
  color: #7f918d;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0;
}

.ag-render-quality-panel h1 {
  margin: 0;
  color: #fff;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0;
}

.ag-render-quality-panel > p {
  margin: 8px 0 20px;
  color: #aab5b2;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
}

.ag-render-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.ag-render-option {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 120px;
  box-sizing: border-box;
  margin: 0;
  padding: 15px 14px;
  color: #f7f9fc;
  background: #192124;
  border: 1px solid #354347;
  border-radius: 6px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.ag-render-option:active,
.ag-render-option[aria-checked="true"],
.ag-render-option:focus-visible {
  border-color: #53d39b;
  outline: 2px solid rgba(83, 211, 155, .28);
  outline-offset: 1px;
}

.ag-render-option-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  margin-right: 14px;
  color: #bdf5db;
  background: #16382b;
  border: 1px solid #377e61;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}

.ag-render-option[data-mode="performance"] .ag-render-option-badge {
  color: #c8e8ff;
  background: #163247;
  border-color: #366c91;
}

.ag-render-option[data-mode="high"] .ag-render-option-badge {
  color: #ffe0a3;
  background: #3d2f19;
  border-color: #806331;
}

.ag-render-option-copy {
  display: block;
  min-width: 0;
}

.ag-render-option-heading,
.ag-render-option-description,
.ag-render-option-detail {
  display: block;
  letter-spacing: 0;
}

.ag-render-option-heading {
  display: flex;
  align-items: center;
  min-height: 22px;
  margin-bottom: 3px;
}

.ag-render-option-heading strong {
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: 0;
}

.ag-render-option-recommended {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  box-sizing: border-box;
  margin-left: 8px;
  padding: 2px 6px;
  color: #92e2bc;
  background: #183328;
  border: 1px solid #2e624d;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0;
}

.ag-render-option-description {
  color: #b0bab7;
  font-size: 12px;
  line-height: 1.4;
}

.ag-render-option-detail {
  margin-top: 5px;
  color: #738680;
  font-size: 11px;
  line-height: 1.3;
}

.ag-render-option-arrow {
  flex: 0 0 auto;
  margin-left: 10px;
  color: #6f827d;
  font-size: 28px;
  line-height: 1;
  font-weight: 300;
}

.ag-render-option[aria-checked="true"] .ag-render-option-arrow {
  font-size: 0;
}

.ag-render-option[aria-checked="true"] .ag-render-option-arrow::after {
  content: "当前";
  color: #92e2bc;
  font-size: 11px;
}

.ag-render-quality-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: #c5ced8;
  background: transparent;
  border: 0;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 420px) {
  #ag-render-quality {
    padding-right: 16px;
    padding-left: 16px;
  }

  .ag-render-quality-panel {
    padding: 20px 16px 18px;
  }

  .ag-render-option {
    min-height: 90px;
    padding: 13px 12px;
  }

  .ag-render-option-badge {
    margin-right: 11px;
  }
}

@media (max-height: 620px) {
  #ag-render-quality {
    align-items: flex-start;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .ag-render-quality-header {
    min-height: 44px;
    margin-bottom: 12px;
  }

  .ag-render-quality-logo {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .ag-render-quality-panel > p {
    margin-bottom: 12px;
  }

  .ag-render-option {
    min-height: 82px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
}

#ag-h5-fps {
  position: fixed;
  z-index: 2147483500;
  top: calc(8px + env(safe-area-inset-top, 0px));
  left: calc(8px + env(safe-area-inset-left, 0px));
  width: 150px;
  min-height: 96px;
  box-sizing: border-box;
  padding: 6px 8px 5px;
  color: #ecf5f1;
  background: rgba(8, 14, 16, .86);
  border: 1px solid rgba(157, 178, 170, .28);
  border-left: 3px solid #53d39b;
  border-radius: 5px;
  box-shadow: 0 5px 16px rgba(0, 0, 0, .28);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  text-align: left;
  pointer-events: none;
}

#ag-h5-fps[data-state="warn"] {
  border-left-color: #efb24d;
}

#ag-h5-fps[data-state="low"] {
  border-left-color: #eb6a63;
}

.ag-h5-fps-primary {
  display: flex;
  align-items: baseline;
  line-height: 1;
}

.ag-h5-fps-primary strong {
  min-width: 31px;
  color: #fff;
  font-size: 19px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
}

.ag-h5-fps-primary span {
  margin-left: 4px;
  color: #8da099;
  font-size: 10px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0;
}

.ag-h5-fps-primary .ag-h5-fps-mode {
  margin-left: auto;
  color: #a7bbb4;
  font-size: 10px;
  font-weight: 500;
}

.ag-h5-fps-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 9px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid rgba(157, 178, 170, .17);
}

.ag-h5-fps-metric {
  display: flex;
  align-items: baseline;
  min-width: 0;
  line-height: 1;
}

.ag-h5-fps-metric em {
  width: 32px;
  flex: 0 0 32px;
  color: #64766f;
  font-size: 8px;
  line-height: 1;
  font-style: normal;
  letter-spacing: 0;
}

.ag-h5-fps-metric strong {
  overflow: hidden;
  color: #cbd8d3;
  font-size: 10px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ag-h5-fps-event {
  overflow: hidden;
  min-height: 10px;
  margin-top: 7px;
  padding-top: 6px;
  color: #9bb0a8;
  border-top: 1px solid rgba(157, 178, 170, .12);
  font-size: 8px;
  line-height: 1.2;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ag-h5-fps-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  color: #6f817a;
  font-size: 8px;
  line-height: 1;
  letter-spacing: 0;
}

#extraSplashImg {
  position: absolute;
  left: 50%;
  top: 70%;
  transform: translate(-50%, -50%);
  width: 200px;
  /* 自己调整大小 */
  height: auto;
  pointer-events: none;
  /* 不阻挡触摸 */
}






/* .progress-bar {
    position: absolute;
    left: 27.5%;
    top: 80%;
    height: 3px;
    padding: 2px;
    width: 45%;
    border-radius: 7px;
    box-shadow: 0 1px 5px #000 inset, 0 1px 0 #444;           
}

.progress-bar span {
    display: block;
    height: 100%;
    border-radius: 3px;
    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;
  }
}
