* {
  box-sizing: border-box;
}

button {
  cursor: pointer;
  font-family: inherit;
  line-height: 1.6;
}

ul {
  padding: 0;
  list-style: none;
}

li {
  line-height: 1.6;
}

hr {
  border: 2px dashed #fff7;
}

body {
  margin: 0;
  width: 100vw;
  height: 100vh;
  background: #2b2b2b;
  color: #e1e1e1;
  font-family: sans-serif;
  font-size: 16px;
  overflow: hidden;
  display: grid;
  grid-template-rows: 44px 1fr;
  transition: transform 0.8s ease-in-out;
}

details {
  --speed: 0.1s;

  all: unset;
  right: calc(36px - 33px);

  summary {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    background: var(--background);
    height: 36px;
    min-width: 36px;
    opacity: 0.5;
    right: 0;
    border-radius: 12px 0 0 12px;
    padding: 0 12px;
    transition: right 0 ease-out, opacity 0.2s ease-in-out;

    &:hover, &:focus {
      opacity: 1;
    }
  }

  & > div {
    background: var(--background);
    position: absolute;
    top: 0;
    right: min(-33vw, -300px);
    width: max(33vw, 300px);
    height: 100vh;
    transition: right 0s;
    padding: 0.5ch 1ch;
  }

  &[open] {
    right: 0;

    summary {
      right: max(33vw, 300px);
      opacity: 1;
      transition: right var(--speed) ease-out;
    }

    & > div {
      right: 0;
      transition: right var(--speed) ease-out;
    }

    .coverall { /* allow click-anywhere closing of details with a span.coverall in their summary */
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      z-index: 9;
      cursor: default;
    }
  }

  &#playlist {
    --background: #3e2810ee;

    summary {
      bottom: 12px;
    }

    ul {
      display: grid;
      grid-template-columns: 4em 1fr;
      grid-gap: 4px 0;

      li {
        display: grid;
        grid-template-columns: subgrid;
        grid-column: span 2;

        &:not(:has(time)) span {
          grid-column: 2;
        }
      }
    }
  }
}

time {
  font-family: monospace;
  font-size: 78%;
  line-height: 2;
  color: #7c7c7c;
}

.concealed-title {
  color: black;
  background: black;
  padding: 4px;
  filter: blur(2px);
}

#whatsapp-qr {
  text-align: center;

  img {
    width: auto;
    max-height: 25vh;
  }
}

header {
  text-align: center;
  padding: 10px;
  background: #3b3b3b;
}

main {
  height: 100%;
}

h1 {
  margin: 0;
  font-size: 24px;
  font-weight: normal;
}

#gateway {
  width: 100%;
  height: 100%;
  background: url('futuristic.png') no-repeat center center;
  background-size: cover;
}

#sponge-container {
  width: 50vw;
  position: absolute;
  top: calc(50% - 25vw);
  left: calc(50% - 25vw);
  animation: sponge-spin 3s linear infinite;
  transform-origin: 25vw 25vw;
}

#sponge {
  width: 50vw;
  position: absolute;
  animation: sponge-pulse 2.4s ease-in-out infinite;
}

#enter {
  position: absolute;
  bottom: 10%;
  left: calc(50% - 170px);
  width: 340px;
  font-size: 26px;
  font-weight: bold;
}

#low-def, #ele-mode, #test-video {
  position: absolute;
  bottom: 5%;
  font-size: 16px;
  font-style: italic;
}

#low-def, #test-video {
  right: 5%;
}

#ele-mode {
  left: 5%;
}

@keyframes sponge-spin {
  0%   { transform: rotate(0deg);   }
  100% { transform: rotate(360deg); }
}

@keyframes sponge-pulse {
  0%   { transform: scale(1);   }
  50%  { transform: scale(0.7); }
  100% { transform: scale(1);   }
}

#application {
  width: 100vw;
}

#video {
  width: 100%;
  height: 100%;
}

#fullscreen {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  position: absolute;
  bottom: 12px;
  left: 0;
  height: 36px;
  padding: 0 12px;
  background: #1e3e10ed;
  border: 0;
  border-radius: 0 12px 12px 0;
  opacity: 0.5;

  &:hover, &:focus {
    opacity: 1;
  }
}

#countdown-timer {
  position: absolute;
  bottom: 64px;
  right: 43px;
  font-size: 24px;
  background: white;
  color: black;
  opacity: 0.5;
  padding: 8px 12px;
  user-select: none;
  border-radius: 6px;
  min-width: 4em;
  text-align: center;
}

.ele-mode {
  transform: rotate(180deg);
}

.pre-desc {
  position: absolute;
  bottom: 100px;
  margin: 1vh 2vw;
  padding: 1.5vw;
  background: #0009;
  font-size: 32px;
  line-height: 1.4;
  text-align: justify;
}
