/*
 * default
 */
* {
  margin: 0;
  padding: 0;
}
/* 网页字体及背景 */
html {
  font: 48px "Montserrat", "Noto Sans SC", "微软雅黑", sans-serif;
  font: 2.75vw "Montserrat", "Noto Sans SC", "微软雅黑", sans-serif;
  color: white;
  background: #333 fixed center url(https://images.xuewuzhibu.cn/02a08bf8bad1ef3e8e15d7da1066d62d.jpg);
  background-size: cover;
}
/* 分散对齐 */
.space-between {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
}
/* 淡色背景阴影 */
.notify > div,
.bar,
.card > div,
.card > a {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0.2rem 0.2rem 1rem rgba(0, 0, 0, 0.2);
  text-shadow: 0.1em 0.1em 0.2em rgba(0, 0, 0, 0.2);
}
/* 一级淡文本（保留字体颜色） */
.dim {
  font-size: 0.75em;
  opacity: 0.6;
}
/* 二级淡文本 */
.sub {
  font-size: 0.6em;
  color: rgba(255, 255, 255, 0.6);
}
/* 页脚文本 */
footer {
  font-size: 0.3rem;
  color: rgba(255, 255, 255, 0.3);
}
/* 选中 */
::selection {
  color: #fc0;
  background: rgba(255, 255, 255, 0.2);
  text-shadow: #fa3 0 0 0.1em;
}
/*
 * elements
 */
/* 主体排版 */
#main {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  background: rgba(0, 0, 0, 0.75);
}
/* 主体元素间距 */
#main > * {
  margin: 0.5rem 1rem;
}
/* 通知气泡 */
.notify {
  z-index: 1;
  top: 0;
}
/* 通知气泡元素 */
.notify > div {
  font-size: 0.5rem;
  display: none;
  margin: 0.2rem auto;
  padding: 0.2rem;
  animation: fade 0.5s;
  border-radius: 0.2rem;
}
/* 右键菜单 */
#menu {
  font-size: 0.5rem;
  position: fixed;
  z-index: 1;
  display: none;
}
/* 带注释的图标 */
[data-sub] {
  line-height: 1em;
  display: inline-block;
  text-align: center;
  vertical-align: middle;
}
[data-sub]::after {
  font: normal normal 0.5em "Montserrat", "微软雅黑", sans-serif;
  display: block;
  margin-top: 0.2em;
  content: attr(data-sub);
}
/* 进度条 */
.bar {
  height: 0.25rem;
  margin: 0.5rem auto;
}
#bar {
  height: 100%;
  transition: linear 2s;
  background: white;
}
/* 卡片排版 */
.card {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100vw;
  margin: 0.5rem -1rem;
  transition: filter 0.2s;
}
/* 卡片元素字体间距等 */
.card > div,
.card > a {
  /* font-family: "Montserrat", "Helvetica", "微软雅黑", sans-serif; */
  display: inline-block;
  margin: 0.25rem;
  padding: 0.25rem 0.75rem;
  transition: 0.5s;
  text-align: center;
  border-radius: 0.5rem;
}
.card > div:hover {
  background: rgba(0, 0, 0, 0.6);
}
/* 时钟字体 */
#clock {
  font-size: 5em;
  min-width: 2.5em;
}
#subject,
#timer {
  font-size: 3em;
}
#duration,
#activity {
  font-size: 1.5em;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.6);
  /* border-radius: 0.5rem; */
}
/* 适配竖屏 */
@media (max-aspect-ratio: 4/5) {
  html {
    font: 5vw "Montserrat", "微软雅黑", sans-serif;
    align-items: flex-start;
  }
  nav.space-between,
  .card {
    flex-direction: column;
    margin: auto;
  }
}
/*
 * functional
 */
/* 下拉元素定位 */
.dropdown {
  position: relative;
  display: inline-block;
  border-radius: 0.2rem;
}
/* 下拉正文定位（未下拉） */
.iconset > * > :last-child,
.dropdown > :last-child {
  position: absolute;
  z-index: 1;
  display: none;
  cursor: auto;
}
/* 下拉正文定位（已下拉） */
.iconset > *:hover > :last-child,
.dropdown:hover > :last-child {
  display: block;
  animation: fade 0.2s;
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
/* 菜单展开定位 */
#menu .dropdown > :last-child {
  bottom: 0;
  left: 5em;
  min-width: 12em;
  max-height: 20em;
}
/* 下拉/点击文本 */
.dropdown,
a {
  cursor: pointer;
  transition: color 0.1s, background 0.2s;
  text-decoration: none;
  color: inherit;
  border-radius: 0.2rem;
}
.dropdown:hover,
a:hover {
  color: #fff;
  background: rgba(0, 154, 114, 0.8);
}
/* 高亮/菜单/下拉正文颜色 */
.hilit,
#menu,
.dropdown > :last-child {
  color: rgba(0, 0, 0, 0.9);
  border-radius: 0.2rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0.2rem 0.2rem 1rem rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(0.5em);
}
/* 高亮按钮/菜单元素/下拉正文元素边距 */
a.hilit,
#menu > *,
.dropdown > :last-child > * {
  display: block;
  padding: 0.2em;
  box-sizing: border-box;
}
/* 调节框样式 */
.selectbar {
  display: flex;
  float: right;
  overflow: hidden;
  align-items: center;
  justify-content: space-between;
  min-width: 5em;
  color: rgba(0, 0, 0, 0.8);
  border-radius: 0.2em;
  background: rgba(0, 0, 0, 0.1);
}
