:root {
  --text-base: #ffffff;
  --text-subdued: #b3b3b3;
  --background-base: #121212;
  --background-highlight: #1f1f1f;
}

.d-none {
  display: none;
}
.d-flex {
  display: flex;
}

.player {
  /* The player is always dark whatever the page theme, so its accent is fixed
     for this background rather than following --md-accent-fg-color. That
     variable is declared on <body>, so referencing it from :root resolved to
     the theme's indigo default instead of the pink; and its light-mode value
     is only 2.25:1 here in any case. Same hue as the site accent. */
  --player-accent: #dc709b; /* 6.10:1 on #121212 */

  display: flex;
  flex-direction: column;
  background-color: var(--background-base);
  color: var(--text-base);
  border-radius: 12px;
  max-height: 450px;
}

/* Video embeds, built by video.js from `<div class="video" data-video="...">`.
   Each video keeps its own aspect ratio. Forcing 16:9 on the 4:3 material from
   2009 to 2011 pillarboxed it, which left a rounded box with a hard-edged
   picture sitting in the middle of it. Sizing from the poster instead means the
   corner radius lands on the picture itself. */
.video-frame {
  border-radius: 12px;
  /* This is what actually rounds the picture. Clipping from the wrapper works
     where a radius on the <video> does not. */
  overflow: hidden;
  /* Kills the inline descender strip that would otherwise show as a sliver
     beneath the video. */
  line-height: 0;
  background-color: var(--background-base);
}

.video-frame > video {
  width: 100%;
  height: auto;
  display: block;
}

/* Tiles in a gig grid are sized to match each other, so there the ratio is
   fixed. Every 2026 source is natively 16:9, so nothing is letterboxed by it. */
.video-grid .video-frame > video {
  aspect-ratio: 16 / 9;
}

/* Song title under a video, used when a gig has several of them. */
.video > .video-title {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  opacity: 0.75;
}

/* Pink callout around each hidden video. The theme's pattern is a tinted
   container plus a title with no background of its own, whose icon is an
   absolutely positioned 1rem box painted by background-color and cut to shape
   by a mask. Restating only the container tint, and swapping that masked icon
   for an emoji, keeps the spacing and alignment identical to every other
   callout on the site. */
.md-typeset .admonition.aged {
  background-color: rgba(205, 53, 114, 0.1);
}

.md-typeset .aged > .admonition-title::before {
  content: "\1F62C";
  /* The theme fills this box and masks it to an icon shape. Both have to go,
     or the emoji sits on top of a solid pink square. */
  background-color: transparent;
  -webkit-mask-image: none;
  mask-image: none;
  font-size: 0.8rem;
  line-height: 1rem;
  text-align: center;
}

/* Impact effect played whenever the hidden videos are toggled, see unlock.js.
   Three parts run together: a stepped shake, a brief colour flash and a vignette
   that decays. Stepped timing rather than smooth interpolation is what makes it
   read as a jolt instead of a wobble.

   The shake goes on .md-main rather than body, so scrollbars do not jump, and
   rather than .md-container, because transforming an ancestor of the sticky
   header would make it the containing block and the header would drift. */
.unlock-shake {
  animation: unlock-shake 550ms steps(2, jump-none);
}

@keyframes unlock-shake {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  20% {
    transform: translate(-11px, 6px) rotate(-0.6deg);
  }
  40% {
    transform: translate(9px, -8px) rotate(0.5deg);
  }
  60% {
    transform: translate(-7px, -4px) rotate(-0.35deg);
  }
  80% {
    transform: translate(5px, 5px) rotate(0.25deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

/* Flash and vignette share one overlay. It never takes pointer events and is
   removed from the DOM once it has run. */
.unlock-flash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  animation: unlock-vignette 800ms ease-out forwards;
}

.unlock-flash::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #e699b8;
  animation: unlock-flash 500ms ease-out forwards;
}

@keyframes unlock-flash {
  0% {
    opacity: 0.45;
  }
  100% {
    opacity: 0;
  }
}

@keyframes unlock-vignette {
  0% {
    box-shadow: inset 0 0 120px 40px rgba(205, 53, 114, 0.85);
  }
  100% {
    box-shadow: inset 0 0 120px 40px rgba(205, 53, 114, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .unlock-shake {
    animation: none;
  }

  .unlock-flash {
    display: none;
  }
}

/* Hidden until the passphrase is typed, see unlock.js. The hidden attribute
   implies display:none on its own, but stating it guards against a theme reset
   setting a display value on div and winning on specificity. */
.locked[hidden] {
  display: none;
}

/* Several videos from one gig. auto-fit collapses this to a single column on
   a narrow screen without a media query. Posters rather than video data mean
   a full set stays cheap to load. */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.player > .header {
  display: flex;
  padding: 24px;
  gap: 24px;
  background-color: var(--background-highlight);
  border-radius: inherit;
}

.player > .header > .cover {
  border-radius: 12px;
}

.player > .header > .cover > img {
  max-height: 152px;
  max-width: 152px;
  border-radius: 12px;
  box-shadow: 0 9px 9px 0 rgba(0, 0, 0, 0.1), 0 0 29px 0 rgba(0, 0, 0, 0.1);
}

.player > .header > .details {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.player > .header > .details > .title > h1 {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 0px;
  margin-top: 1rem;
  color: var(--text-base);
}

.player > .header > .details > .title > h4 {
  margin: 0px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-subdued);
}

.player > .header > .details > .actions {
  display: flex;
  margin-top: auto;
  align-items: end;
}

.player > .header > .details > .actions .seek-bar {
  width: 100%;
  margin-right: 12px;
  margin-bottom: 12px;
  appearance: none;
  height: 6px;
  background: #444;
  border-radius: 3px;
  outline: none;
  transition: background 0.2s ease;
}

.player > .header > .details > .actions .seek-bar::-webkit-slider-thumb {
  appearance: none;
  width: 5px;
  height: 18px;
  border-radius: 4px;
  background: var(--player-accent);
  cursor: pointer;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.player > .header > .details > .actions .seek-bar::-moz-range-thumb {
  width: 5px;
  height: 18px;
  border: none;
  border-radius: 4px;
  background: var(--player-accent);
  cursor: pointer;
}

.player > .header > .details > .actions .skip {
  width: 32px;
  height: 32px;
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.player > .header > .details > .actions .skip:hover {
  cursor: pointer;
  transform: scale(1.08);
}

.player > .header > .details > .actions .skip > span {
  color: var(--text-base);
  font-size: 32px !important;
}

.player > .tracks {
  border-radius: inherit;
  overflow-y: auto;
  margin-top: 10px;
}

.player > .tracks::-webkit-scrollbar {
  width: 20px;
}

.player > .tracks::-webkit-scrollbar-thumb {
  background-color: #3a3a3d;
  border-radius: 9999px;
  border: 6px solid transparent;
  background-clip: padding-box;
}

.player > .tracks::-webkit-scrollbar-track-piece {
  margin-block-end: 12px;
}

.player > .tracks > .track {
  display: flex;
  gap: 0.8rem;
  padding: 8px;
  margin-left: 10px;
  margin-right: 6px;
  align-items: center;
  font-size: 0.7rem;
  color: var(--text-subdued);
  border-radius: 4px;
}

.player > .tracks > .track:last-child {
  margin-bottom: 10px;
}

.player > .tracks > .track:hover {
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.1);
}

.player > .tracks > .track.active .track-title__title {
  font-weight: 800;
  color: var(--player-accent);
}

.player > .tracks > .track.active .equalizer {
  display: flex;
}

.player > .tracks > .track.active.paused .equalizer {
  display: none;
}

.player > .tracks > .track.active .equalizer span {
  animation-play-state: running;
}

.player > .tracks > .track > .track-number {
  text-align: center;
  min-width: 18px;
  font-size: 0.6rem;
}

.player > .tracks > .track > .track-title > .track-title__title {
  color: var(--text-base);
  font-size: 0.65rem;
}

.player > .tracks > .track > .track-title > .track-title__artist {
  font-size: 0.55rem;
  line-height: 0.7rem;
}

.player > .tracks > .track > .track-length {
  margin-left: auto;
  margin-right: 5px;
  font-size: 0.6rem;
}

.player > .tracks > .track.active > .track-length {
  display: none;
}

.player > .tracks > .track.active.paused > .track-length {
  display: block;
}

.fab {
  min-width: 48px;
  min-height: 48px;
  border-radius: 50%;
  border: none;
  background-color: var(--text-base);
  color: #000000;
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2), 0px 1px 1px rgba(0, 0, 0, 0.14),
    0px 2px 1px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.fab:hover {
  transform: scale(1.08);
}

.icon-lg {
  font-size: 36px !important;
}

/* Equalizer animation. */
@keyframes bounce {
  0%,
  100% {
    transform: scaleY(0.3);
  }
  50% {
    transform: scaleY(1);
  }
}

@keyframes bounce1 {
  0%,
  100% {
    transform: scaleY(0.2);
  }
  50% {
    transform: scaleY(0.8);
  }
}

@keyframes bounce2 {
  0%,
  100% {
    transform: scaleY(0.3);
  }
  50% {
    transform: scaleY(1.1);
  }
}

.equalizer {
  display: flex;
  align-items: flex-end;
  height: 20px;
  gap: 3px;
  margin-left: auto;
  margin-right: 6px;
  display: none;
}

.equalizer span {
  display: block;
  width: 4px;
  height: 100%;
  background: var(--player-accent);
  animation-name: bounce;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  animation-play-state: paused;
  animation-play-state: paused;
}

.equalizer span:nth-child(1) {
  animation-name: bounce;
  animation-duration: 1s;
  animation-delay: 0s;
}
.equalizer span:nth-child(2) {
  animation-name: bounce1;
  animation-duration: 1.2s;
  animation-delay: 0.2s;
}
.equalizer span:nth-child(3) {
  animation-name: bounce;
  animation-duration: 0.9s;
  animation-delay: 0.3s;
}
.equalizer span:nth-child(4) {
  animation-name: bounce1;
  animation-duration: 1.1s;
  animation-delay: 0.15s;
}
