Lumi/plugins/now_playing/public/render.css
2026-07-24 14:44:27 +02:00

273 lines
4.8 KiB
CSS

:root {
color-scheme: normal;
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* {
box-sizing: border-box;
}
html,
body,
#now-playing-root {
background-color: rgba(0, 0, 0, 0) !important;
}
html,
body {
width: 100%;
height: 100%;
margin: 0;
overflow: hidden;
}
body {
display: flex;
align-items: flex-end;
justify-content: center;
padding: 2.5%;
}
#now-playing-root {
width: 100%;
height: 100%;
display: flex;
align-items: flex-end;
justify-content: center;
pointer-events: none;
}
.np-card {
--np-primary: #1f2937;
--np-secondary: #111827;
--np-opacity: .92;
--np-radius: 18px;
--np-scale: 1;
--np-duration: 450ms;
position: relative;
display: grid;
grid-template-columns: auto minmax(0, 1fr);
gap: 1rem;
align-items: center;
width: min(100%, 920px);
min-height: 118px;
padding: 1rem 1.15rem;
border: 1px solid rgba(255, 255, 255, .16);
border-radius: var(--np-radius);
overflow: hidden;
color: #fff;
transform-origin: center bottom;
filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .32));
font-size: calc(18px * var(--np-scale));
isolation: isolate;
}
.np-card::before,
.np-card::after {
content: "";
position: absolute;
inset: 0;
}
.np-card::before {
z-index: -2;
background: linear-gradient(125deg, var(--np-primary), var(--np-secondary));
}
.np-card::after {
z-index: -1;
background: linear-gradient(90deg, rgba(0, 0, 0, .38), rgba(0, 0, 0, .1));
backdrop-filter: blur(24px);
}
.np-card.background-solid::before {
background: var(--np-primary);
}
.np-card.scope-everything {
opacity: var(--np-opacity);
}
.np-card.scope-background::before,
.np-card.scope-background::after {
opacity: var(--np-opacity);
}
.np-card.scope-everything-except-image-text::before,
.np-card.scope-everything-except-image-text::after,
.np-card.scope-everything-except-image-text .np-timeline {
opacity: var(--np-opacity);
}
.np-card.scope-everything-except-text::before,
.np-card.scope-everything-except-text::after,
.np-card.scope-everything-except-text .np-cover,
.np-card.scope-everything-except-text .np-timeline {
opacity: var(--np-opacity);
}
.np-cover {
width: 92px;
height: 92px;
object-fit: cover;
border-radius: calc(var(--np-radius) * .72);
box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
}
.np-content {
min-width: 0;
display: grid;
gap: .24rem;
}
.np-provider {
font-size: .66em;
font-weight: 800;
letter-spacing: .12em;
text-transform: uppercase;
opacity: .74;
}
.np-title {
font-size: 1.45em;
line-height: 1.04;
font-weight: 800;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.np-artist {
font-size: .94em;
font-weight: 650;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
opacity: .92;
}
.np-meta {
display: flex;
gap: .5rem;
min-width: 0;
font-size: .75em;
opacity: .72;
}
.np-meta span {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.np-timeline {
display: grid;
grid-template-columns: auto minmax(40px, 1fr) auto;
gap: .55rem;
align-items: center;
margin-top: .38rem;
font-size: .66em;
font-variant-numeric: tabular-nums;
}
.np-track {
height: 5px;
border-radius: 999px;
background: rgba(255, 255, 255, .22);
overflow: hidden;
}
.np-progress {
height: 100%;
width: 0;
background: rgba(255, 255, 255, .9);
border-radius: inherit;
}
.np-card.is-entering {
animation: np-enter var(--np-duration) cubic-bezier(.22, .8, .2, 1) both;
}
.np-card.is-exiting {
animation: np-exit var(--np-duration) ease both;
}
.np-card[data-animation="fade"] {
--np-from: translateY(0) scale(1);
--np-to: translateY(0) scale(1);
}
.np-card[data-animation="slide-left"] {
--np-from: translateX(-14%);
--np-to: translateX(0);
}
.np-card[data-animation="slide-right"] {
--np-from: translateX(14%);
--np-to: translateX(0);
}
.np-card[data-animation="slide-up"] {
--np-from: translateY(32%);
--np-to: translateY(0);
}
.np-card[data-animation="slide-down"] {
--np-from: translateY(-32%);
--np-to: translateY(0);
}
.np-card[data-animation="jump"] {
--np-from: translateY(20%) scale(.88);
--np-to: translateY(0) scale(1);
}
.np-card[data-animation="drop"] {
--np-from: translateY(-85%) rotate(-2deg);
--np-to: translateY(0) rotate(0);
}
.np-card[data-animation="none"] {
--np-from: translateY(0);
--np-to: translateY(0);
}
@keyframes np-enter {
from {
opacity: 0;
transform: var(--np-from);
}
to {
opacity: 1;
transform: var(--np-to);
}
}
@keyframes np-exit {
from {
opacity: 1;
transform: var(--np-to);
}
to {
opacity: 0;
transform: var(--np-from);
}
}
@media (max-width: 600px) {
.np-card {
gap: .7rem;
padding: .75rem;
min-height: 96px;
}
.np-cover {
width: 72px;
height: 72px;
}
.np-title {
font-size: 1.18em;
}
}