* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  overflow: hidden;
}
/* 头部 */
header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0.6rem;
}
.header-iconbar {
  display: flex;
  gap: 1rem;
}
.toggle-button {
  visibility: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.icon-button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 48px;
  height: 48px;
  border-radius: 24%;
  background-color: #cccccc;
  margin-bottom: 14px;
  border: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 左侧栏 */
.nav-bar {
  padding: 0.6rem;
  height: calc(100% - 4rem);
}
.nav-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 48px;
  background-color: white;
  height: 48px;
  border-radius: 24%;
  margin-bottom: 14px;
  border: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.main-content {
  padding: 1rem;
  border-top-left-radius: 25px;
  border-top-right-radius: 25px;
  background-color: #dff7f7;
  height: calc(100% - 4rem);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
/* 在768px及以下宽度的屏幕上应用样式 */
@media (max-width: 768px) {
  .nav-bar {
    position: fixed;
    left: -100%;
    transition: left 0.3s;
  }
  .nav-bar.open {
    left: 0;
    z-index: 999;
  }
  header {
    justify-content: space-between;
  }
  .toggle-button {
    visibility: visible;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    border-radius: 24%;
    background-color: #cccccc;
    margin-bottom: 14px;
    border: none;
  }
}
/* 按钮 */
.button {
  display: block;
  width: 80%;
  max-width: 148px;
  margin: 20px auto;
  padding: 10px;
  border: none;
  border-radius: 5px;
  background-color: #007bff;
  color: white;
  text-decoration: none;
  text-align: center;
  font-size: 18px;
}
/* 输入框 */
.inp {
  margin: 4px 0;
  padding: 14px;
  border: 0px solid #ddd;
  border-radius: 12px;
  width: 100%;
  font-size: 16px;
  max-width: 400px;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* check box */
.switcher {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 20px;
  align-items: center;
}

.switcher input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* 滑块样式 */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 3px;
  background-color: white;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: #2196f3;
}

input:focus + .slider {
  box-shadow: 0 0 1px #2196f3;
}

input:checked + .slider:before {
  -webkit-transform: translateX(14px);
  -ms-transform: translateX(14px);
  transform: translateX(14px);
}

/* 圆角滑块 */
.slider.round {
  border-radius: 22px;
}

.slider.round:before {
  border-radius: 50%;
}
/* snack bar */
#snackbar {
  visibility: hidden;
  min-width: 250px;
  margin-left: -125px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 12px;
  padding: 16px;
  position: fixed;
  z-index: 1;
  left: 50%;
  top: 80px;
  font-size: 17px;
}

#snackbar.show {
  visibility: visible;
  -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
  animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@-webkit-keyframes fadein {
  from {
    top: 0;
    opacity: 0;
  }
  to {
    top: 80px;
    opacity: 1;
  }
}

@keyframes fadein {
  from {
    top: 0;
    opacity: 0;
  }
  to {
    top: 80px;
    opacity: 1;
  }
}

@-webkit-keyframes fadeout {
  from {
    top: 80px;
    opacity: 1;
  }
  to {
    top: 0;
    opacity: 0;
  }
}

@keyframes fadeout {
  from {
    top: 80px;
    opacity: 1;
  }
  to {
    top: 0;
    opacity: 0;
  }
}
