Files
codey.lol/src/assets/styles/player.css

299 lines
5.8 KiB
CSS
Raw Normal View History

/* Universal box-sizing for consistency */
*,
*::before,
*::after {
box-sizing: border-box;
2025-06-18 07:46:59 -04:00
}
body {
font-family: "Mukta", 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 */
2025-06-18 07:46:59 -04:00
.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);
2025-06-18 07:46:59 -04:00
}
/* Album cover section */
2025-06-18 07:46:59 -04:00
.album-cover {
aspect-ratio: 1 / 1;
width: 100%;
max-width: 30%;
height: auto;
2025-06-18 07:46:59 -04:00
}
.album-cover > img {
width: 100%;
height: 100%;
object-fit: cover;
2025-06-18 07:46:59 -04:00
}
.album-cover > img:hover {
opacity: 0.7;
2025-06-18 07:46:59 -04:00
}
/* Player info and controls */
2025-06-18 07:46:59 -04:00
.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 */
2025-06-18 07:46:59 -04:00
}
/* Text styling */
2025-06-18 07:46:59 -04:00
.music-player__title {
color: inherit;
font-size: 0.9rem;
margin: 0 0 0.1em 0;
2025-06-18 07:46:59 -04:00
}
2025-06-18 07:46:59 -04:00
.music-player__header {
color: inherit;
font-size: 1rem;
margin: 1 0 0.1em 0;
2025-06-18 07:46:59 -04:00
}
2025-06-18 07:46:59 -04:00
.music-player__author {
color: inherit;
font-size: 0.9rem;
margin: 0 0 0.5em 0;
2025-06-18 07:46:59 -04:00
}
.music-player__genre {
color: inherit;
font-size: 0.9rem;
margin: 0 0 0.5em 0;
2025-06-18 07:46:59 -04:00
}
.music-player__genre:before {
font-weight: bold;
content: "Genre: ";
2025-06-18 07:46:59 -04:00
}
.station-tabs {
padding-top: 4%;
}
2025-06-18 07:46:59 -04:00
.music-player__album {
2025-07-25 15:25:21 -04:00
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;
2025-06-18 07:46:59 -04:00
}
2025-06-18 07:46:59 -04:00
.music-bar #length {
width: 0%;
background: #2196F3;
height: 100%;
transition: width linear 200ms;
} */
2025-06-18 07:46:59 -04:00
/* Time display */
2025-06-18 07:46:59 -04:00
.music-time {
display: flex;
flex-flow: row wrap;
2025-06-18 07:46:59 -04:00
}
2025-06-18 07:46:59 -04:00
.music-time__last {
margin-left: auto;
2025-06-18 07:46:59 -04:00
}
/* Playback order icons */
2025-06-18 07:46:59 -04:00
.music-order {
display: flex;
flex-flow: row wrap;
2025-06-18 07:46:59 -04:00
}
.music-order__shuffle,
.music-order__loop {
width: 1.2em;
height: 1.2em;
opacity: 0.2;
margin: 0.3em 0;
2025-06-18 07:46:59 -04:00
}
.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;
2025-06-18 07:46:59 -04:00
}
2025-06-18 07:46:59 -04:00
.music-order__shuffle {
margin-left: auto;
2025-06-18 07:46:59 -04:00
}
/* Controls container */
2025-06-18 07:46:59 -04:00
.music-control {
display: flex;
flex-flow: row wrap;
justify-content: center;
align-items: center;
height: 2em;
2025-06-18 07:46:59 -04:00
}
2025-06-18 07:46:59 -04:00
.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 */
2025-06-18 07:46:59 -04:00
@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 {
max-height: 125px; /* limit block height */
max-width: 100%;
overflow-y: auto; /* scroll if lyrics exceed height */
margin-top: 1rem;
padding: 0 1rem;
text-align: center;
font-family: "Mukta", sans-serif;
font-size: 0.85rem;
line-height: 1.4;
color: #ccc; /* subtle default color */
user-select: none; /* prevent accidental text selection */
background-color: rgba(0, 0, 0, 0.05); /* very light highlight behind text */
border-radius: 0.375rem; /* rounded corners */
box-shadow: inset 0 0 5px rgba(0,0,0,0.8);
box-sizing: border-box;
scrollbar-width: thin; /* Firefox thinner scrollbar */
scrollbar-color: #999 transparent;
}
.lrc-text::-webkit-scrollbar {
width: 6px;
}
.lrc-text::-webkit-scrollbar-track {
background: transparent;
}
.lrc-text::-webkit-scrollbar-thumb {
background-color: #999;
border-radius: 3px;
}
/* Each lyric line */
.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;
color: inherit;
cursor: default;
font-size: 0.85rem;
}
/* Highlight the active lyric line */
.lrc-line.active {
color: #ffffff;
font-weight: 600;
font-size: 0.8rem;
text-shadow: 0 0 4px rgba(212, 175, 55, 0.6);
}
.lrc-line:hover {
color: #4fa2ff;
text-decoration: dotted underline;
}