324 lines
6.3 KiB
CSS
324 lines
6.3 KiB
CSS
/* Universal box-sizing for consistency */
|
|
*,
|
|
*::before,
|
|
*::after {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
:root {
|
|
--lrc-text-color: #333; /* darker text */
|
|
--lrc-bg-color: rgba(0, 0, 0, 0.05);
|
|
--lrc-active-color: #000; /* bold black for active */
|
|
--lrc-active-shadow: none; /* no glow in light mode */
|
|
--lrc-hover-color: #005fcc; /* darker blue hover */
|
|
}
|
|
|
|
[data-theme="dark"] {
|
|
--lrc-text-color: #ccc; /* original gray */
|
|
--lrc-bg-color: rgba(255, 255, 255, 0.02);
|
|
--lrc-active-color: #fff; /* bright white for active */
|
|
--lrc-active-shadow: 0 0 4px rgba(212, 175, 55, 0.6); /* gold glow */
|
|
--lrc-hover-color: #4fa2ff; /* original blue hover */
|
|
}
|
|
|
|
body {
|
|
font-family: sans-serif;
|
|
width: 100%;
|
|
height: 100%;
|
|
margin: 0;
|
|
padding: 0;
|
|
min-width: 100vw;
|
|
min-height: 100vh;
|
|
/* background: linear-gradient(-45deg, #FFCDD2 50%, #B2EBF2 50%); */
|
|
}
|
|
|
|
/* Container for the player and album cover */
|
|
.music-container {
|
|
width: 800px; /* fixed desktop width */
|
|
max-width: 90vw; /* prevent overflow on smaller screens */
|
|
height: auto !important;
|
|
margin: 0 auto 120px auto; /* increased bottom margin */
|
|
overflow-x: visible; /* allow horizontal overflow if needed */
|
|
overflow-y: hidden;
|
|
position: relative;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
box-sizing: border-box;
|
|
padding: 1rem;
|
|
box-shadow: 1px 1px 5px 0 rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
/* Album cover section */
|
|
.album-cover {
|
|
aspect-ratio: 1 / 1;
|
|
width: 100%;
|
|
max-width: 30%;
|
|
height: auto;
|
|
}
|
|
|
|
.album-cover > img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
|
|
.album-cover > img:hover {
|
|
opacity: 0.7;
|
|
}
|
|
|
|
/* Player info and controls */
|
|
.music-player {
|
|
flex: 1 1 70%; /* Take remaining ~70% */
|
|
max-width: 70%;
|
|
width: auto;
|
|
height: auto !important; /* Match container height */
|
|
padding: 1em;
|
|
text-align: center;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
background: inherit;
|
|
box-sizing: border-box;
|
|
min-width: 0; /* Fix flex overflow */
|
|
flex-shrink: 0; /* Prevent shrinking that hides content */
|
|
}
|
|
|
|
/* Text styling */
|
|
.music-player__title {
|
|
color: inherit;
|
|
font-size: 0.9rem;
|
|
margin: 0 0 0.1em 0;
|
|
}
|
|
|
|
.music-player__header {
|
|
color: inherit;
|
|
font-size: 1rem;
|
|
margin: 1 0 0.1em 0;
|
|
}
|
|
|
|
.music-player__author {
|
|
color: inherit;
|
|
font-size: 0.9rem;
|
|
margin: 0 0 0.5em 0;
|
|
}
|
|
|
|
.music-player__genre {
|
|
color: inherit;
|
|
font-size: 0.9rem;
|
|
margin: 0 0 0.5em 0;
|
|
}
|
|
|
|
.music-player__genre:before {
|
|
font-weight: bold;
|
|
content: "Genre: ";
|
|
}
|
|
|
|
.station-tabs {
|
|
padding-top: 4%;
|
|
}
|
|
|
|
.music-player__album {
|
|
font-style: italic;
|
|
text-align: center;
|
|
font-size: 0.85rem;
|
|
padding-bottom: 5px;
|
|
}
|
|
|
|
/* Music bar and progress */
|
|
/* .music-bar {
|
|
background: #efefef;
|
|
stroke-width: 1;
|
|
height: 8px;
|
|
width: 100%;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.music-bar #length {
|
|
width: 0%;
|
|
background: #2196F3;
|
|
height: 100%;
|
|
transition: width linear 200ms;
|
|
} */
|
|
|
|
/* Time display */
|
|
.music-time {
|
|
display: flex;
|
|
flex-flow: row wrap;
|
|
}
|
|
|
|
.music-time__last {
|
|
margin-left: auto;
|
|
}
|
|
|
|
/* Playback order icons */
|
|
.music-order {
|
|
display: flex;
|
|
flex-flow: row wrap;
|
|
}
|
|
|
|
.music-order__shuffle,
|
|
.music-order__loop {
|
|
width: 1.2em;
|
|
height: 1.2em;
|
|
opacity: 0.2;
|
|
margin: 0.3em 0;
|
|
}
|
|
|
|
.music-order__shuffle.is-loop,
|
|
.music-order__loop.is-loop,
|
|
.music-order__shuffle.is-loop-one,
|
|
.music-order__loop.is-loop-one {
|
|
opacity: 1 !important;
|
|
}
|
|
|
|
.music-order__shuffle {
|
|
margin-left: auto;
|
|
}
|
|
|
|
/* Controls container */
|
|
.music-control {
|
|
display: flex;
|
|
flex-flow: row wrap;
|
|
justify-content: center;
|
|
align-items: center;
|
|
height: 2em;
|
|
}
|
|
|
|
.music-control__play {
|
|
width: 3em;
|
|
height: 3em;
|
|
margin: 0 1em;
|
|
padding-top: 5px;
|
|
padding-bottom: 5px;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.music-control__backward,
|
|
.music-control__forward {
|
|
width: 1.5em;
|
|
height: 1.5em;
|
|
}
|
|
|
|
|
|
/* Mobile override */
|
|
@media all and (max-width: 960px) {
|
|
.music-container {
|
|
flex-direction: column !important;
|
|
width: 100% !important;
|
|
max-width: 100% !important;
|
|
height: auto !important;
|
|
margin-bottom: 50px !important;
|
|
overflow: visible !important;
|
|
padding: 1rem !important;
|
|
}
|
|
|
|
.album-cover {
|
|
flex: none !important;
|
|
width: 100% !important;
|
|
max-width: 100% !important;
|
|
height: auto !important;
|
|
margin-bottom: 1rem !important;
|
|
min-width: 0 !important;
|
|
}
|
|
|
|
.album-cover > img {
|
|
aspect-ratio: unset !important;
|
|
height: auto !important;
|
|
width: 100% !important;
|
|
}
|
|
|
|
.music-player {
|
|
flex: none !important;
|
|
width: 100% !important;
|
|
max-width: 100% !important;
|
|
height: auto !important;
|
|
padding: 0 !important;
|
|
min-width: 0 !important;
|
|
flex-shrink: 0 !important;
|
|
}
|
|
}
|
|
.progress-bar-container {
|
|
position: relative;
|
|
margin: 0.5rem 0;
|
|
height: 0.5rem; /* Ensure visible height */
|
|
background-color: #e5e7eb; /* fallback light gray */
|
|
border-radius: 9999px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.progress-bar-fill {
|
|
height: 100%;
|
|
transition: width 0.2s linear;
|
|
border-radius: 9999px;
|
|
}
|
|
|
|
.lrc-text {
|
|
opacity: 1;
|
|
pointer-events: auto;
|
|
transition: opacity 0.3s ease;
|
|
max-height: 125px;
|
|
max-width: 100%;
|
|
overflow-y: auto;
|
|
margin-top: 1rem;
|
|
padding: 0 1rem 1rem;
|
|
text-align: center;
|
|
font-family: sans-serif;
|
|
font-size: 0.85rem;
|
|
line-height: 1.4;
|
|
color: var(--lrc-text-color);
|
|
user-select: none;
|
|
background-color: var(--lrc-bg-color);
|
|
border-radius: 0.375rem;
|
|
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.8);
|
|
box-sizing: border-box;
|
|
scrollbar-width: thin;
|
|
scrollbar-color: #999 transparent;
|
|
scroll-padding-bottom: 1rem;
|
|
}
|
|
|
|
.lrc-text.empty {
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.lrc-line {
|
|
margin: 0.1rem 0;
|
|
white-space: normal;
|
|
word-wrap: break-word;
|
|
line-height: 1.4;
|
|
transition: color 0.3s ease, font-weight 0.3s ease, text-shadow 0.3s ease;
|
|
color: inherit;
|
|
cursor: default;
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.lrc-line.active {
|
|
color: var(--lrc-active-color);
|
|
font-weight: 600;
|
|
font-size: 0.8rem;
|
|
text-shadow: var(--lrc-active-shadow);
|
|
}
|
|
|
|
.lrc-line:hover {
|
|
color: var(--lrc-hover-color);
|
|
text-decoration: dotted underline;
|
|
}
|
|
|
|
.lrc-line:last-child {
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.lrc-text::-webkit-scrollbar {
|
|
width: 6px;
|
|
}
|
|
|
|
.lrc-text::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
|
|
.lrc-text::-webkit-scrollbar-thumb {
|
|
background-color: #999;
|
|
border-radius: 3px;
|
|
} |