/* Modus Mukke – oldschool MP3 player for the NQA Radio */

@font-face {
  font-family: 'Doto';
  font-weight: 700;
  font-display: block;
  src: url(/fonts/doto-latin-700-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Doto';
  font-weight: 700;
  font-display: block;
  src: url(/fonts/doto-latin-ext-700-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #e8e8e4;
  --ink: #17231f;      /* LCD pixels */
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:focus, :focus-visible { outline: none; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--page-bg, var(--bg));
  color: #555;
  font: 13px/1.4 -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* same background as nqa.world (copied by the server script into hintergrund.css / hintergrund.jpg) */
.page-bg {
  position: fixed; left: 0; right: 0; top: 0; z-index: -1;
  height: 100vh; height: 100lvh;
  background-color: var(--page-bg, var(--bg));
  background-image: var(--page-bg-image, none);
  background-size: cover;
  background-position: center;
}

.stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

/* The player is drawn in the units of its SVG (982.14 × 238).
   1 unit = --u, so everything scales together with the player width. */
.player {
  position: relative;
  width: min(92vw, 550px);
  aspect-ratio: 982.14 / 238;
  container-type: inline-size;
  --u: calc(100cqw / 982.14);
  user-select: none;
  -webkit-user-select: none;
}
.player > svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Play button: pressed look */
#Play_Press {
  transform-box: view-box;
  transform-origin: 153.7px 120.33px;   /* centre of the button */
  transition: transform .12s ease-out;
}
.player.is-down #Play_Press { transform: scale(.88); }

.play-hit {
  position: absolute;
  left: calc(98 * var(--u));
  top: calc(64 * var(--u));
  width: calc(112 * var(--u));
  height: calc(112 * var(--u));
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

/* LCD screen – placed exactly on the "Screen" layer (x 371.81, y 70, 287.67 × 98) */
.screen {
  position: absolute;
  left: calc(371.81 * var(--u));
  top: calc(70 * var(--u));
  width: calc(287.67 * var(--u));
  height: calc(98 * var(--u));
  overflow: hidden;
  color: var(--ink);
}
/* unlit pixels of the display */
.screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, .07) calc(.7 * var(--u)), transparent calc(1 * var(--u))) 0 0 / calc(3 * var(--u)) calc(3 * var(--u));
  pointer-events: none;
}

.marquee {
  position: absolute;
  left: calc(31 * var(--u));
  overflow: hidden;
  right: 0;
  top: calc(11 * var(--u));
  white-space: nowrap;
  font-family: 'Doto', monospace;
  font-weight: 700;
  font-size: calc(34 * var(--u));
  line-height: 1.1;
  text-shadow: calc(1 * var(--u)) calc(1 * var(--u)) 0 rgba(0, 0, 0, .12);
}
/* play / pause symbol, drawn in the same dots as the font (7 dots high) */
.state {
  position: absolute;
  left: calc(9 * var(--u));
  top: calc(11 * var(--u));
  height: calc(37.4 * var(--u));
  display: flex;
  align-items: center;
  filter: drop-shadow(calc(1 * var(--u)) calc(1 * var(--u)) 0 rgba(0, 0, 0, .12));
}
.state svg { flex: none; width: calc(16.2 * var(--u)); height: calc(23 * var(--u)); fill: var(--ink); }
/* like on the real devices: ▶ while it plays, ❚❚ while it is paused */
.state .i-play { display: none; }
.player.is-playing .state .i-play { display: inline; }
.player.is-playing .state .i-pause { display: none; }
.marquee span { display: inline-block; will-change: transform; }
.marquee.is-static { text-align: center; }

.wave {
  position: absolute;
  left: calc(9 * var(--u));
  bottom: calc(9 * var(--u));
  width: calc(269.67 * var(--u));
  height: calc(28 * var(--u));
  cursor: ew-resize;
  touch-action: none;
}

.foot {
  padding: 0 16px 18px;
  text-align: center;
  font-size: 12px;
  letter-spacing: .04em;
}
.foot a { color: #8a8a86; text-decoration: none; }
.foot a:hover { color: #333; }

@media (max-width: 600px) {
  .player { width: calc(100vw - 32px); }
}
