:root {
  --fondo: #0a0a0c;
  --testo: #f6f4f2;
  --tenue: rgba(246, 244, 242, 0.62);
  --linea: rgba(255, 255, 255, 0.12);
  --vetro: rgba(28, 26, 32, 0.46);
  --a: #ff8a5c;
  --b: #ffb35a;
  --a2: #ff8a5c;
  --b2: #ffb35a;
}

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  background: var(--fondo);
  color: var(--testo);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.palco {
  position: relative;
  height: 100vh;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  touch-action: pan-y;
}

/* the light of the cover spilling on the lock screen behind the glass */
.alone {
  position: absolute;
  left: 50%; top: 56%;
  width: min(120vw, 120vh, 760px);
  aspect-ratio: 1.3;
  translate: -50% -50%;
  background:
    radial-gradient(closest-side at 38% 42%, color-mix(in srgb, var(--a) 70%, transparent), transparent),
    radial-gradient(closest-side at 64% 60%, color-mix(in srgb, var(--b) 55%, transparent), transparent);
  filter: blur(min(10vw, 10vh, 60px));
  opacity: 0.55;
  z-index: -1;
  pointer-events: none;
}

.schermo {
  width: min(352px, 90vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: min(3.4vh, 22px);
}

.ora { text-align: center; user-select: none; }
.giorno { font-size: 13px; font-weight: 520; letter-spacing: 0.01em; color: var(--tenue); font-stretch: 112%; }
.orario {
  font-size: min(17vw, 15vh, 88px);
  line-height: 0.96;
  font-weight: 300;
  font-stretch: 118%;
  letter-spacing: -0.02em;
  color: color-mix(in srgb, var(--testo) 86%, var(--b));
}

.widget {
  position: relative;
  width: 100%;
  border-radius: 26px;
  overflow: hidden;
  background: var(--vetro);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.25);
  transform-style: preserve-3d;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
}
.widget.presa { cursor: grabbing; }

/* the colour of the cover, inside the glass: the current one and the one that drips in */
.tinta {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 18% 22%, color-mix(in srgb, var(--a) 46%, transparent), transparent 70%),
    radial-gradient(100% 100% at 88% 100%, color-mix(in srgb, var(--b) 34%, transparent), transparent 72%);
  pointer-events: none;
}
.tinta.nuova {
  background:
    radial-gradient(120% 90% at 18% 22%, color-mix(in srgb, var(--a2) 46%, transparent), transparent 70%),
    radial-gradient(100% 100% at 88% 100%, color-mix(in srgb, var(--b2) 34%, transparent), transparent 72%);
  clip-path: circle(0px at 52px 52px);
}

.gocce { position: absolute; inset: 0; pointer-events: none; }
.goccia {
  position: absolute;
  left: 0; top: 0;
  width: 10px; height: 16px;
  border-radius: 50% 50% 50% 50% / 38% 38% 62% 62%;
  background: radial-gradient(circle at 40% 70%, color-mix(in srgb, var(--a2) 92%, white), var(--a2) 60%, color-mix(in srgb, var(--b2) 80%, transparent));
  filter: blur(0.4px);
  opacity: 0;
}

/* the light on the glass that follows the pointer */
.riflesso {
  position: absolute; inset: 0;
  background: radial-gradient(260px circle at var(--rx, 30%) var(--ry, 0%), rgba(255, 255, 255, 0.16), transparent 60%);
  opacity: 0.7;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* the border takes the light of the cover */
.bordo {
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--angolo, 210deg),
    color-mix(in srgb, var(--a) 80%, white) 0deg,
    rgba(255, 255, 255, 0.08) 70deg,
    rgba(255, 255, 255, 0.05) 180deg,
    color-mix(in srgb, var(--b) 60%, transparent) 290deg,
    color-mix(in srgb, var(--a) 80%, white) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

.contenuto { position: relative; padding: 18px 18px 14px; }

.riga { display: flex; align-items: center; gap: 14px; }

.copertine {
  position: relative;
  width: 68px; height: 68px;
  flex: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--a) 70%, black), 0 0 0 0.5px rgba(255, 255, 255, 0.18);
}
.copertina { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lucido {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 42%);
  pointer-events: none;
}

.testi { min-width: 0; flex: 1; }
.app { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 560; color: var(--tenue); letter-spacing: 0.02em; margin-bottom: 4px; font-stretch: 110%; }
.app svg { width: 12px; height: 12px; }
.titolo, .artista { overflow: hidden; height: 1.3em; white-space: nowrap; }
.titolo { font-size: 17px; font-weight: 640; letter-spacing: -0.01em; font-stretch: 104%; }
.artista { font-size: 14px; font-weight: 460; color: var(--tenue); }
.rullo { display: inline-block; }

.tempo { margin-top: 16px; }
.pista {
  position: relative;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
  overflow: visible;
}
.pieno {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--a) 70%, white), color-mix(in srgb, var(--b) 80%, white));
  transform-origin: 0 50%;
  transform: scaleX(0.35);
}
/* a short streak of light at the head of the bar */
.scia {
  position: absolute;
  top: 50%; left: 0;
  width: 34px; height: 6px;
  margin-top: -3px;
  margin-left: -34px;
  border-radius: 6px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95));
  filter: blur(1.5px);
  opacity: 0.75;
  pointer-events: none;
}
.numeri { display: flex; justify-content: space-between; margin-top: 7px; font-size: 11px; font-weight: 520; color: var(--tenue); font-stretch: 108%; }

.tasti { display: flex; align-items: center; justify-content: center; gap: min(9vw, 34px); margin-top: 6px; }
.tasto { display: grid; place-items: center; border-radius: 50%; position: relative; }
.tasto::before {
  content: "";
  position: absolute; inset: -8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  scale: 0.6;
  transition: opacity 0.25s, scale 0.35s cubic-bezier(.2, 1.4, .4, 1);
}
.tasto.premuto::before { opacity: 1; scale: 1; }
.tasto svg { width: 100%; height: 100%; position: relative; }
.tasto.piccolo { width: 26px; height: 26px; }
.tasto.grande { width: 38px; height: 38px; }
.tasto:focus-visible { outline: 2px solid color-mix(in srgb, var(--b) 80%, white); outline-offset: 6px; }
[data-icona-play] { opacity: 0; }

.dove { display: flex; justify-content: center; align-items: center; gap: 5px; margin-top: 8px; font-size: 11px; color: var(--tenue); font-weight: 520; }
.dove svg { width: 12px; height: 12px; }

.aiuto { font-size: 12px; color: rgba(246, 244, 242, 0.42); font-weight: 520; letter-spacing: 0.01em; }

@media (hover: hover) {
  .tasto:hover::before { opacity: 0.7; scale: 1; }
}

.ghost {
  position: absolute; left: 0; top: 0;
  width: 22px; height: 22px;
  fill: #121214; stroke: #fff; stroke-width: 1.4; stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
  pointer-events: none;
  opacity: 0;
  z-index: 50;
}

@media (max-height: 470px) {
  .contenuto { padding: 14px 16px 10px; }
  .tempo { margin-top: 12px; }
  .dove { display: none; }
  .copertine { width: 58px; height: 58px; }
}
