/*
 * default
 */
* {
  margin: 0;
  padding: 0;
}

/* 网页字体及背景 */
html {
  background: #333 fixed center url("https://examined.thisis.host/campus.jpg");
  background-size: cover;
  color: #fff;
  font-size: 48px;
  font-size: 2.7vw;
  font-family: Ubuntu, 'Genshin65W', sans-serif;
}

body {
  background: transparent fixed center;
  background-size: cover;
}

/* 分散对齐 */
.space-between {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

#msg {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: baseline;
}

.space {
  margin: 0 -.2em;
}

.space>* {
  margin: 0 .2em;
}

/* 一级淡文本（保留字体颜色） */
.dim {
  opacity: .75;
  font-size: .75em;
}

/* 二级淡文本 */
.sub {
  color: rgb(255 255 255 / 75%);
  font-size: .6em;
}

/* 页脚文本 */
footer {
  color: rgb(255 255 255 / 50%);
  font-size: .3rem;
}

/* 选中 */
::selection {
  background: rgb(255 255 255 / 10%);
  text-shadow: #7af -.05em -.01em .1em, #a7f .05em .01em .1em;
}

/*
 * elements
 */

/* 主体排版 */
#main {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgb(0 0 0 / 50%);
  min-height: 100vh;
}

/* 主体元素间距 */
#main>* {
  margin: .5rem 1rem;
}

/* 通知气泡 */
.notify {
  top: 0;
  z-index: 1;
}

/* 通知气泡元素 */
.notify>div {
  display: none;
  animation: fade .5s;
  margin: .2rem auto;
  border-radius: .2rem;
  padding: .2rem;
  font-size: .5rem;
}

.hilit {
  animation: hilit 60s infinite alternate;
}

@keyframes hilit {
  50% {
    color: #fff;
    text-shadow: 0 0 .1em #fff;
  }

  100% {
    color: auto;
  }
}

/* 等宽图标 */
.fa-solid,
.fa-regular,
.fa-brands,
.fa-width {
  min-width: 1.2em;
  text-align: center;
}

/* 带注释的图标 */
[data-sub] {
  display: inline-block;
  vertical-align: middle;
  padding: .1em;
  text-align: center;
}

[data-sub]::after {
  display: block;
  margin-top: .2em;
  content: attr(data-sub);
  font: normal normal .5em Ubuntu, 'Genshin65W', sans-serif;
}

/* 进度条 */
.bar {
  margin: .5rem auto;
  height: .2rem;
}

#bar {
  transition: linear 2s;
  background: linear-gradient(to right, transparent, #fff);
  height: 100%;
}

/* 卡片排版 */
.card {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: .5rem -1rem;
  max-width: 100vw;
}

/* 淡色背景阴影 */
.notify>div,
.bar,
.card>* {
  transition: .2s;
  box-shadow: .2em .2em 1em rgb(0 0 0 / 20%);
  background: rgb(255 255 255 / 10%);
  text-shadow: .1em .1em .2em rgb(0 0 0 / 20%);
}

/* 卡片元素字体间距等 */
.card>* {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  margin: .2rem;
  border-radius: .5rem;
  padding: .2rem .75rem;
  text-align: center;
}

:hover .notify>div,
:hover .bar,
:hover .card>* {
  backdrop-filter: blur(.1rem);
}

.notify>div:hover,
.bar:hover,
.card>*:hover {
  backdrop-filter: blur(0);
  background: rgb(255 255 255 / 20%);
}

/* 时钟字体 */
#clock {
  font-size: 5em;
}

#subject,
#timer {
  width: 100%;
  font-size: 3em;
}

#duration,
#activity {
  color: rgb(255 255 255 / 75%);
  font-size: 1.5em;
}

/* 适配竖屏 */
@media (aspect-ratio <=8/7) {
  html {
    align-items: flex-start;
    font-size: 5vw;
  }

  nav.space-between,
  .card {
    flex-direction: column;
    margin: auto;
  }
}

/*
 * functional
 */

/* 下拉元素定位 */
[data-title],
.dropdown {
  display: inline-block;
  position: relative;
}

/* 下拉正文定位（未下拉） */
[data-title]::after,
.dropdown> :last-child {
  display: none;
  position: absolute;
  z-index: 1;
  cursor: auto;
}

[data-title]::after {
  right: 0;
  bottom: 1em;
  padding: .1em;
  width: 12em;
  content: attr(data-title);
}

/* 下拉正文定位（已下拉） */
[data-title]:hover::after,
.dropdown:hover> :last-child {
  display: block;
  animation: fade .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;
  border-radius: .2rem;
  color: inherit;
  text-decoration: none;
}

a:hover {
  box-shadow: .2em .2em .5em rgb(0 0 0 / 20%);
  background: linear-gradient(120deg, #7af, #a7f);
  color: #fff !important;
}

/* 高亮/菜单/下拉正文颜色 */
.btn,
#menu,
[data-title]::after,
.dropdown> :last-child {
  backdrop-filter: blur(.5em);
  box-shadow: .2rem .2rem 1rem rgb(0 0 0 / 20%);
  border-radius: .2rem;
  background: rgb(255 255 255 / 75%);
  color: #000;
}

/* 高亮按钮/菜单元素/下拉正文元素边距 */
a.btn,
#menu>*,
.dropdown> :last-child>* {
  display: block;
  box-sizing: border-box;
  padding: .2em;
}

/* 标签 */
.shield,
.shieldlist>* {
  display: inline-block;
  vertical-align: middle;
  margin: .1em;
  outline: .1em solid rgb(255 255 255 / 20%);
  border-radius: 1em;
  background: rgb(0 0 0 / 50%);
  padding: .1em .2em;
  color: #fff;
  font-size: .6em;
}