/*
 * default
 */
* {
  margin: 0;
  padding: 0;
}
/* 网页字体及背景 */
html {
  font-family: Ubuntu, Gs, sans-serif;
  font-size: 48px;
  font-size: 2.75vw;
  color: #fff;
  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;
}
.space-between > * {
  display: inline-block;
}
.space {
  margin: 0 -0.3em;
}
.space > * {
  margin: 0 0.3em;
}
/* 淡色背景阴影 */
.notify > div,
.bar,
.card > div,
.card > a {
  /* border: 2px solid rgba(255, 255, 255, 0.4); */
  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.75;
}
/* 二级淡文本 */
.sub {
  font-size: 0.6em;
  color: rgba(255, 255, 255, 0.75);
}
/* 页脚文本 */
footer {
  font-size: 0.3rem;
  color: rgba(255, 255, 255, 0.5);
}
/* 选中 */
::selection {
  background: rgba(255, 255, 255, 0.1);
  text-shadow: #7af -0.05em -0.01em 0, #f7a 0.05em 0.01em 0;
}
/*
 * elements
 */
/* 主体排版 */
#main {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  background: rgba(0, 0, 0, 0.5);
}
/* 主体元素间距 */
#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 Ubuntu, Gs, 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: #fff;
}
/* 卡片排版 */
.card {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100vw;
  margin: 0.5rem -1rem;
  transition: filter 0.2s;
}
/* 卡片元素字体间距等 */
.card > div,
.card > a {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: space-around;
  margin: 0.25rem;
  padding: 0.25rem 0.75rem;
  transition: 0.5s;
  border-radius: 0.5rem;
}
.card > div:hover,
.card > a:hover {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
}

/* 时钟字体 */
#clock {
  font-size: 5em;
}
#subject,
#timer {
  font-size: 3em;
}
#duration,
#activity {
  font-size: 1.5em;
  color: rgba(255, 255, 255, 0.75);
}
/* 适配竖屏 */
@media (max-aspect-ratio: 4/5) {
  html {
    font-size: 5vw;
    align-items: flex-start;
  }
  nav.space-between,
  .card {
    flex-direction: column;
    margin: auto;
  }
}
/*
 * functional
 */
/* 下拉元素定位 */
[data-title],
.dropdown {
  position: relative;
  display: inline-block;
}
/* 下拉正文定位（未下拉） */
[data-title]::after,
.dropdown > :last-child {
  position: absolute;
  z-index: 1;
  display: none;
  cursor: auto;
}
[data-title]::after {
  top: -1em;
  right: 0;
  width: 10em;
  padding: 0.1em;

  content: attr(data-title);
}
/* 下拉正文定位（已下拉） */
[data-title]:hover::after,
.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 {
  display: inline-block;
}
a {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  border-radius: 0.2rem;
}
a:hover {
  color: #fff;
  background: linear-gradient(120deg, #7af, #f9a);
  box-shadow: 0.2em 0.2em 0.5em rgba(0, 0, 0, 0.2);
}
/* 高亮/菜单/下拉正文颜色 */
.hilit,
#menu,
[data-title]::after,
.dropdown > :last-child {
  color: #000;
  border-radius: 0.2rem;
  background: rgba(255, 255, 255, 0.75);
  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;
  box-sizing: border-box;
  padding: 0.2em;
}
/* 盾 */
.shield,
.shieldlist > * {
  font-size: 0.6em;
  display: inline-block;
  margin: 0.1em;
  padding: 0.1em 0.3em;
  vertical-align: middle;
  color: #fff;
  outline: 0.1em solid rgba(255, 255, 255, 0.2);
  border-radius: 1em;
  background: rgba(0, 0, 0, 0.5);
}
