:root {
  color-scheme: dark;
}

body {
  background-color: #000;
  color: #00ab1a;
  height: 100vh;

  font-family: "Doto", sans-serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
  font-variation-settings: "ROND" 100;

  width: 100%;
  margin: 0;

  display: flex;
  justify-content: center;
}

.page-wrapper {
  width: 100%;
  max-width: 1400px;
  
  display: flex;
  gap: 4rem;
}


h1 {
  margin-block: 0;
  font-size: 1.8em;
}
h2 {
  border-top: 1px solid #00ab1a;
  margin-block-start: 0.63em;
  padding-top: 0.3em;
  margin-block-end: 0.3em;
}
h3 {
  margin-block: 0.5rem;
}
p {
  margin-top: 0;
  margin-bottom: 0.5em;
}
ul {
  margin-block: 0;
}

.page-subtitle {
  height: 45px;
}

.nav {
  flex-grow: 0;
  flex-shrink: 0;
  width: 400px;
  max-width: calc(100vw - 4rem);

  display: flex;
  flex-direction: column;
  justify-content: center;

  margin-inline: 4rem;
}

.content {
  flex-grow: 1;
  height: 100vh;

  display: flex;
  align-items: center;
}

.content-inner-wrapper {
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  padding-block: 100px;
  padding-inline-end: 50px;
  width: 100%;
}

.position-relative {
  position: relative;
}

.page-link:link,
.page-link:visited,
.page-link:hover,
.page-link:active {
  color: #00ab1a !important;
}

.page-link.disabled {
  pointer-events: none;
  opacity: 0.7;
}

.material-symbols-outlined {
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
  font-size: 1rem;
}

.ascii-art {
  font-size: 6px;
}

.back-nav-placeholder {
  height: 35px
}

@view-transition {
  navigation: auto;
}


@property --hue {
  syntax: "<number>";
  initial-value: 0;
  inherits: true;
}

@keyframes rainbow {
  from { --hue: 0; }
  to { --hue: 360; }
}

.party {
  animation: rainbow 4s linear infinite;
  color: hsl(var(--hue) 100% 50%);

  .page-link:link,
  .page-link:visited,
  .page-link:hover,
  .page-link:active {
    color: hsl(var(--hue) 100% 50%) !important;
  }
}


@media only screen and (width < 1400px) {
  .page-wrapper {
    margin-top: 1.5rem;
    flex-direction: column;
    align-items: center;
  }
  .content {
    display: block; /* Turn flex off */
    width: 100vw;
  }
  .content-minh {
    min-height: 50vh;
  }
  .content-index {
    /* ASCII art has position: absolute on the index page - this prevents an overflow */
    overflow: hidden;
  }
  .content-inner-wrapper {
    padding-inline: 2rem;
    max-width: calc(100vw - 4rem);
    max-height: unset;
    overflow-x: hidden;
    overflow-y: unset;
  }
  .ascii-art {
    font-size: 5px;
    overflow-x: hidden;
  }
  .ascii-art-inner {
    display: inline-block;
    /* transition: transform 50ms ease; */
  }
  .ascii-art-face {
    opacity: 0.4;
    position: absolute;
    right: 0;
    left: 0;
    bottom: 0;
    overflow: hidden;
    z-index: -9;
  }
  .page-subtitle {
    margin-bottom: 1rem;
  }
  .page-link:link,
  .page-link:visited,
  .page-link:hover,
  .page-link:active {
    background: rgba(0, 0, 0, 0.4);
    padding: 0.25rem 0.5rem;
  }
  .nav-li {
    margin-block: 1rem;
    font-size: 1.2rem;
  }
  .back-nav-placeholder {
    height: 43px;
  }
}

.content-val {
  .content-inner-wrapper {
    padding-inline: 0;
    padding-top: 0;
  }
}
@property --valTop {
  syntax: "<length>";
  initial-value: 0px;
  inherits: true;
}
@keyframes valDance {
  0% { --valTop: 0px; }
  50% { --valTop: 100px; }
  100% { --valTop: 0px; }
}
@media only screen and (width < 1400px) {
  .content-val {
    .content-inner-wrapper {
      width: 100vw;
      max-width: 100vw;
    }
  }
  .val-dance {
    animation: valDance 400ms linear infinite;
    transform: translateY(var(--valTop));
  }
}

.tracklist {
  margin-bottom: 4rem;
  width: 100%;

  .trackListItem {
    position: relative;
    display: flex;
    padding-block: 0.5rem;
    padding-left: 2rem;
    padding-right: 0.5rem;
    margin-bottom: 0.6rem;
    font-size: 1.2rem;
    background: rgba(0, 0, 0, 0.2);

    &::after {
      position: absolute;
      top: 0;
      bottom: 0;
      left: 0.3rem;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    &:hover {
      cursor: pointer;

      &::after {
        font-size: 1rem;
        content: '>>';
        letter-spacing: unset;
      }
    }
    &.is-playing {
      &::after {
        left: 0.4rem;
        font-size: 1.5rem;
        content: '|>';
        letter-spacing: -0.75rem;
      }
    }

    .trackListItemTitle {
      flex-grow: 1;
    }
    .trackListItemLength {
      flex-grow: 0;
      flex-shrink: 0;
    }
  }
}
.jukebox-wrapper {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  right: 2rem;
  display: flex;
  justify-content: center;
}
.jukebox {
  width: 100%;
  max-width: 1300px;
  height: 4rem;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
  border: 2px dotted #00ab1a;

  -webkit-user-select: none;
  user-select: none;

  display: flex;
  align-items: center;

  .play-pause-wrapper {
    flex-grow: 0;
    flex-shrink: 0;
    width: 4rem;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;

    .play-pause {
      font-size: 2rem;

      .play-icon {
        letter-spacing: -16px;
        margin-left: -8px;
        margin-right: 8px;
        display: none;
      }
      .pause-icon {
        letter-spacing: -6px;
        margin-left: -3px;
        margin-right: 3px;
        display: block;
      }

      &.play {
        .play-icon {
          display: block;
        }
        .pause-icon {
          display: none;
        }
      }
    }
  }
  .now-playing {
    flex-grow: 1;
    position: relative;
    min-width: 0;
    padding-block: 1rem;
    margin-block: -1rem;

    .label {
      font-size: 0.85rem;
      margin-top: -8px;
      margin-bottom: -1px;
    }
    .track-info {
      display: flex;
      align-items: center;
      margin-right: 0.5rem;

      .track-title-wrapper {
        overflow-x: hidden;
        flex-grow: 1;

        .track-title {
          font-size: 1.5rem;
          white-space: nowrap;
        }
      }
      .track-length {
        flex-grow: 0;
        flex-shrink: 0;
        margin-left: 1rem;
        margin-top: -1.2rem;
      }
    }
    .progress-bar {
      position: absolute;
      bottom: 10px;
      left: 0;
      width: 0;
      height: 3px;
      background-color:#00ab1a;
      opacity: 1;
      transition: opacity 500ms ease;
    }
  }
}
@media only screen and (width < 1400px) {
  .jukebox-wrapper {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
  }
  .tracklist {
    width: calc(100vw - 4rem);
  }
}

.hidden {
  display: none;
}
.hidden-keep-layout {
  visibility: hidden;
}


/* --- Audio Visualizer --- */
:root {
  --audio-bass: 0;
  --audio-mids: 0;
  --audio-highs: 0;
  --audio-level: 0;
}

html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  background-attachment: fixed;
  transition: background 200ms ease-out;

  &.music-effects-enabled {
    --bass-hue: 129;
    --mids-hue: 82;
    --highs-hue: 9;

    background: linear-gradient(
      0deg,
      hsl(
        var(--bass-hue),
        calc(20% + var(--audio-bass) * 80%),
        calc(var(--audio-bass) * 10%)
      ),
      hsl(
        var(--mids-hue),
        calc(20% + var(--audio-mids) * 80%),
        calc(var(--audio-mids) * 10%)
      ),
      hsl(
        var(--highs-hue),
        calc(20% + var(--audio-highs) * 80%),
        calc(var(--audio-highs) * 12%)
      )
    );
  }
}

.effect-controls {
  display: flex;
  justify-content: end;
  align-items: center;
  gap: 2rem;
  min-height: 29px;
  margin-bottom: 1rem;
  padding-inline: 0.7rem;

  .effect-control {
    display: flex;
    align-items: center;

    .effect-box {
      width: 1rem;
      height: 1rem;
      border: 1px solid #00ab1a;
    }
    .effect-enabled {
      font-size: 1.5rem;
      margin-left: -1rem;
      margin-right: 1.5px;
      display: none;
    }

    &.enabled {
      .effect-enabled {
        display: block;
      }
    }
  }
}
@media only screen and (width < 500px) {
  .effect-controls {
    justify-content: space-between;
  }
}