html {
  box-sizing: border-box;
  overflow: hidden;
}
*, *:before, *:after {
  box-sizing: inherit;
}

body { 
  background-image: radial-gradient(circle, #2a2a2a, #212121, #191919, #0f0f0f, #000000);
  
  /* Disable text select */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;

  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;

  font-family: "Open-Sans", sans-serif;
}

.title-wrapper { /* "登入以繼續"文字排版 */
  height: 80px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.title-wrapper img {
  width: 60px;
  height: 60px;
  margin-right: 10px;
  user-select: none;
}

.title-wrapper h1 {
  color: white;
  font-size: 3.3rem;
}

.container {
  border-radius: 20px;
  border: 1px solid rgb(58, 60, 58);
  background: rgb(23, 25, 24);
  padding: 20px;
  
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;

  box-shadow: 5px 8px 40px rgba(0, 0, 0, 0.7);
  max-height: 85vh;
  min-height: 70vh;
}

/* 裝置單元 */

.card-wrapper {
  width: 450px;
  height: 110px;
  margin: 10px auto 10px auto;
  padding: 10px;
  background-color: rgb(56, 56, 55);
  border-radius: 10px;
  border: none;

  display: flex;
  justify-content: start;
  align-items: start;
  flex-direction: row;

  transition: all 350ms ease-in-out;
}

.card-wrapper:hover {
  background-color: rgb(61, 61, 60);
  transform: scale(0.97);
  transition: all 150ms ease-out;
}

.card-wrapper:active {
  transform: scale(0.95);
  transition: all 50ms ease-in-out;
  background-color: rgb(48, 48, 47);
  opacity: 80%;
}

.card-wrapper img {
  position: absolute;
  height: 90px;
  width: 90px;
}

.card-wrapper span[id=name] {
  color: white;
  font-size: 1.8rem;
  position: absolute;
  margin: 10px auto auto 95px;
}

.card-wrapper span[id=ip] {
  color: gray;
  font-size: 1.1rem ;
  position: absolute;
  margin: 40px auto auto 95px;
}

.card-wrapper span[id^='status-dev'] {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  position: absolute;
  background-color: #f3c53f;
  margin: 65px auto auto 65px;
}

/* 按鈕單元 */
.function-wrapper {
  position: relative;
  height: auto;
  width: 500px;
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.function-wrapper button[id=logout] {
  position: relative;
  width: 230px;
  height: 45px;
  background-color: red;
  color: white;
  border: 0px;
  margin: 0px 9px 0px 9px;
  text-align: center;
  font-size: 20px;
  cursor: pointer;
  border-radius: 50px;
}

.function-wrapper button[id=refresh] {
  width: 230px;
  height: 45px;
  background-color: rgb(4, 97, 196);
  color: white;
  border: 0px;
  margin: 0px 9px 0px 9px;
  text-align: center;
  font-size: 20px;
  cursor: pointer;
  border-radius: 50px;
}

.list-wrapper {
  width: 100%;
  margin-bottom: auto;
  overflow-y: auto;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, black var(--top-mask-size, 0), black calc(100% - var(--bottom-mask-size, 0)), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, black var(--top-mask-size, 0), black calc(100% - var(--bottom-mask-size, 0)), transparent 100%);
  --top-mask-size: 0px;
  --bottom-mask-size: 0px;

}

.list-wrapper.is-top-overflowing {
  --top-mask-size: 48px !important;
}

.list-wrapper.is-bottom-overflowing {
  --bottom-mask-size: 48px !important;
}

.list-wrapper div {
  /* Column viewport */
  position: relative;
}

::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  -webkit-border-radius: 10px;
  border-radius: 10px;
  margin: 0px 0 5px 0;
}
::-webkit-scrollbar-thumb {
  -webkit-border-radius: 4px;
  border-radius: 4px;
  background: rgb(219,219,219);
}

@media (max-width: 990px) { 
  .container {
    padding: 50px;
    max-height: calc(100vh - 10vw);
    max-height: calc(100svh - 10vw);
  }

  .title-wrapper { /* "登入以繼續"文字排版 */
    padding: 30px 0px 80px 0px;
  }
  
  .title-wrapper img {
    width: 6rem;
    height: 6rem;
  }
  
  .title-wrapper h1 {
    font-size: 6rem;
  }

  .card-wrapper {
    width: 80vw;
    height: 20vw;
  }

  .card-wrapper:hover {
    transform: scale(1);
  }

  .card-wrapper:active {
    transform: scale(0.95);
  }

  .list-wrapper {
    height: auto;
  }

  .card-wrapper img {
    height: calc(20vw - 15px);
    width: calc(20vw - 15px);
    margin: 0px 0px 10px 0px;
  }

  .card-wrapper span[id=name] {
    font-size: 3rem ;
    margin: 15px auto auto calc(20vw - 5px);
  }
  
  .card-wrapper span[id=ip] {
    font-size: 2rem ;
    margin: 70px auto auto calc(20vw - 5px);
  }
  
  .card-wrapper span[id^='status-dev'] {
    height: 2.6rem;
    width: 2.6rem;
    margin: calc(20vw - 65px) auto auto calc(20vw - 65px);
  }

  .function-wrapper {
    height: auto;
    width: 80vw;
    margin-top: 20px;
  }
  
  .function-wrapper button[id=logout] {
    width: 45%;
    height: auto;
    font-size: 3rem;
    padding: 10px;
  }
  
  .function-wrapper button[id=refresh] {
    width: 45%;
    height: auto;
    font-size: 3rem;
    padding: 10px;
  }
}
