@font-face {
  src: url("./fonts/Ionicons.ttf");
  font-family: Ionicons;
}

@font-face {
  src: url("./fonts/MaterialIcons.ttf");
  font-family: MaterialIcons;
}

@font-face {
  src: url("./fonts/AlteDIN.ttf");
  font-family: "Alte DIN 1451 Mittelschrift";
}

:root {
  --inset-top: env(safe-area-inset-top);
  --inset-right: env(safe-area-inset-right);
  --inset-bottom: env(safe-area-inset-bottom);
  --inset-left: env(safe-area-inset-left);
}

html,
body,
#root {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  background: url("./background.jpg") no-repeat center / cover;
  overflow: hidden;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -khtml-user-select: none;
  -webkit-touch-callout: none;
}

#root {
  display: flex;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
}

/* ----------- Non-Retina Screens ----------- */
@media screen and (min-device-width: 1200px) and (max-device-width: 1600px) and (
    -webkit-min-device-pixel-ratio: 1
  ) {
  #root {
    box-shadow: 0px 4px 30px 20px rgba(120, 203, 238, 0.6);
    border: solid 16px rgba(255, 255, 255, 0.4);
  }
}

/* ----------- Retina Screens ----------- */
@media screen and (min-device-width: 1200px) and (max-device-width: 1600px) and (
    -webkit-min-device-pixel-ratio: 2
  ) and (min-resolution: 192dpi) {
  #root {
    box-shadow: 0px 4px 30px 20px rgba(120, 203, 238, 0.6);
    border: solid 16px rgba(255, 255, 255, 0.4);
  }
}

@media all and (display-mode: standalone) {
  html {
    height: 100vh;
  }
}

input {
  outline: none;
}

/* #root 元素未挂载时加载元素 */
.loading-container {
  margin: auto;
  color: #273352;
}

.loading-char {
  width: 60px;
  height: 60px;
  color: #273352;
  font-size: 40px;
  text-align: center;
  animation: char-dump 1.5s ease-in-out infinite alternate;
}

.loading-border {
  position: relative;
  top: -70px;
  width: 60px;
  height: 60px;
  border-left: 1px solid #273352;
  border-radius: 50%;
  animation: border-rotate 1.2s linear infinite;
}

@keyframes char-dump {
  100% {
    transform: scaleX(-1);
  }
}

@keyframes border-rotate {
  100% {
    transform: rotate(360deg);
  }
}
