﻿html, body {
  width: 100%;
  height: 100%;
  background-color: #323232;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  line-height: 0;
}

/* 计时器 */
main .timer {
  color: white;
  font-family: 'digit', 'STXihei', 'Source Han Sans', 'Microsoft YaHei', 'SimHei', sans-serif;
  font-size: 2.25rem;
  display: flex;
  align-items: center;
  flex-grow: 2;
}

@media screen and (max-width: 600px) {
  main .timer {
    font-size: 6vw;
  }
}

/* 浮动条目卡片 */
main .list {
  display: flex;
  transition: max-height 1s;
  /* 初始状态 */
  max-height: 0;
  overflow: hidden;
}

.card {
  margin: 0 1rem;
  width: 15vw;
  height: 30vw;
  max-width: 15rem;
  max-height: 30rem;
  background-size: contain;
  background-repeat: no-repeat;
  border: 1px solid black;
  border-radius: 5px;
  box-shadow: 5px 5px 5px black;
  filter: grayscale(0.8);
  transition: transform 0.5s, opacity 0.5s, box-shadow 0.5s, filter 0.5s;
  /* 初始状态 */
  opacity: 0;
  pointer-events: none;
}

.card:hover, .card:focus {
  transform: translateY(-10%);
  box-shadow: 5px 5px 5px black, inset 0 0 20px white;
  filter: grayscale(0);
}

.card:nth-child(1) {
  background-image: url("images/Gensei.png");
}

.card:nth-child(2) {
  background-image: url("images/WebGL.svg");
}

.card:nth-child(3) {
  background-image: url("images/GalBoard.png");
}

/* 电源图标动画 */
main #power-btn {
  flex-grow: 1;
  height: 0;
  width: 0;
}

main #power-btn svg {
  transition: filter 0.5s, opacity 0.5s;
}

main #power-btn.pending {
  animation: 1.5s linear infinite alternate pending;
}

main #power-btn:hover {
  animation: none;
  filter: drop-shadow(0 0 10px white);
  cursor: pointer;
}

@keyframes pending {
  from { filter: drop-shadow(0 0 0 white); }
  to { filter: drop-shadow(0 0 10px white); }
}


@media screen and (orientation: portrait) {
  main .list {
    width: 100%;
    flex-direction: column;
  }

  .card {
    margin: 2% auto;
    width: 30vh;
    height: 15vh;
    max-width: none;
    max-height: none;
  }

  .card:nth-child(1) {
    background-image: url("images/Gensei_w.png");
  }

  .card:nth-child(3) {
    background-image: url("images/GalBoard_w.png");
  }

  .card:hover, .card:focus {
    transform: translateX(-10%);
  }
}
