Files
carplay/public/styles.css
2026-05-02 18:53:35 -07:00

407 lines
6.8 KiB
CSS

:root {
--bg: #050505;
--fg: #f6f1e8;
--soft: rgba(246, 241, 232, 0.72);
--glass: rgba(10, 10, 10, 0.62);
--glass-strong: rgba(10, 10, 10, 0.82);
--line: rgba(246, 241, 232, 0.18);
--accent: #e8a84f;
}
* {
box-sizing: border-box;
}
html,
body,
.app {
width: 100%;
height: 100%;
}
body {
margin: 0;
color: var(--fg);
font-family: "Avenir Next", "Trebuchet MS", Verdana, sans-serif;
background: var(--bg);
}
button,
input {
font: inherit;
}
button {
cursor: pointer;
}
button:disabled {
cursor: wait;
opacity: 0.55;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
.entry-screen {
display: grid;
min-height: 100%;
place-items: center;
padding: 1rem;
background:
radial-gradient(circle at 24% 22%, rgba(232, 168, 79, 0.28), transparent 25rem),
radial-gradient(circle at 78% 74%, rgba(79, 135, 232, 0.20), transparent 28rem),
linear-gradient(135deg, #070707 0%, #11100d 48%, #030303 100%);
}
.entry-stack {
display: grid;
width: min(760px, 100%);
gap: 0.75rem;
}
.url-form {
display: flex;
width: 100%;
gap: 0.75rem;
padding: 0.75rem;
border: 1px solid var(--line);
border-radius: 999px;
background: rgba(255, 255, 255, 0.08);
box-shadow: 0 24px 100px rgba(0, 0, 0, 0.45);
backdrop-filter: blur(18px);
}
.url-form input {
min-width: 0;
flex: 1;
border: 0;
border-radius: 999px;
padding: 1rem 1.1rem;
color: var(--fg);
background: transparent;
outline: none;
}
.url-form input::placeholder {
color: rgba(246, 241, 232, 0.48);
}
.url-form button,
.control-button {
border: 1px solid var(--line);
border-radius: 999px;
color: var(--fg);
background: rgba(255, 255, 255, 0.10);
}
.url-form button {
min-width: 7rem;
padding: 1rem 1.3rem;
font-weight: 800;
background: var(--fg);
color: #070707;
}
.recent-panel {
overflow: hidden;
border: 1px solid var(--line);
border-radius: 28px;
background: rgba(255, 255, 255, 0.07);
box-shadow: 0 18px 80px rgba(0, 0, 0, 0.28);
backdrop-filter: blur(18px);
}
.recent-list {
display: grid;
max-height: min(42vh, 24rem);
overflow: auto;
padding: 0.35rem;
}
.recent-url {
display: block;
width: 100%;
overflow: hidden;
border: 0;
border-radius: 20px;
padding: 0.85rem 1rem;
color: var(--soft);
text-align: left;
text-overflow: ellipsis;
white-space: nowrap;
background: transparent;
}
.recent-url:hover,
.recent-url:focus {
color: var(--fg);
background: rgba(255, 255, 255, 0.09);
outline: none;
}
.message {
position: fixed;
bottom: 2rem;
left: 50%;
max-width: min(720px, calc(100% - 2rem));
transform: translateX(-50%);
color: var(--soft);
text-align: center;
}
.message:empty {
display: none;
}
.player-screen {
position: fixed;
inset: 0;
background: #000;
}
.video-stage {
position: absolute;
inset: 0;
display: grid;
place-items: center;
overflow: hidden;
touch-action: manipulation;
user-select: none;
}
canvas {
display: block;
width: 100%;
height: 100%;
object-fit: contain;
background: #000;
}
.loader {
position: absolute;
width: 3rem;
height: 3rem;
border: 3px solid rgba(246, 241, 232, 0.18);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 0.9s linear infinite;
}
.loader[hidden] {
display: none;
}
.player-message {
position: absolute;
top: 1.25rem;
left: 50%;
max-width: min(720px, calc(100% - 2rem));
padding: 0.7rem 1rem;
transform: translateX(-50%);
border: 1px solid var(--line);
border-radius: 999px;
color: var(--fg);
background: var(--glass-strong);
backdrop-filter: blur(16px);
}
.player-message:empty {
display: none;
}
.controls {
position: absolute;
right: 1.25rem;
bottom: 1.25rem;
left: 1.25rem;
display: flex;
justify-content: center;
gap: 0.75rem;
padding: 0.75rem;
border: 1px solid var(--line);
border-radius: 999px;
background: var(--glass);
box-shadow: 0 18px 70px rgba(0, 0, 0, 0.42);
backdrop-filter: blur(18px);
opacity: 1;
transform: translateY(0);
transition: opacity 180ms ease, transform 180ms ease;
}
.playhead {
position: absolute;
top: -1.75rem;
right: 1.1rem;
left: 1.1rem;
height: 2.2rem;
}
.time-badge {
position: absolute;
top: 0;
min-width: 3.6rem;
padding: 0.22rem 0.45rem;
border: 1px solid var(--line);
border-radius: 999px;
color: var(--fg);
font-size: 0.76rem;
font-weight: 800;
line-height: 1;
text-align: center;
font-variant-numeric: tabular-nums;
background: var(--glass-strong);
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
backdrop-filter: blur(14px);
}
.current-time {
left: 0;
}
.total-time {
right: 0;
}
.seek-slider {
position: absolute;
right: 0;
bottom: 0.18rem;
left: 0;
width: 100%;
height: 1rem;
margin: 0;
appearance: none;
background: transparent;
cursor: pointer;
--progress: 0%;
}
.seek-slider:disabled {
cursor: default;
}
.seek-slider::-webkit-slider-runnable-track {
height: 0.28rem;
border-radius: 999px;
background:
linear-gradient(
to right,
var(--accent) 0%,
var(--accent) var(--progress),
rgba(246, 241, 232, 0.28) var(--progress),
rgba(246, 241, 232, 0.28) 100%
);
}
.seek-slider::-moz-range-track {
height: 0.28rem;
border-radius: 999px;
background: rgba(246, 241, 232, 0.28);
}
.seek-slider::-moz-range-progress {
height: 0.28rem;
border-radius: 999px;
background: var(--accent);
}
.seek-slider::-webkit-slider-thumb {
width: 1rem;
height: 1rem;
margin-top: -0.36rem;
appearance: none;
border: 2px solid rgba(7, 7, 7, 0.75);
border-radius: 50%;
background: var(--fg);
box-shadow: 0 8px 22px rgba(0, 0, 0, 0.48);
}
.seek-slider::-moz-range-thumb {
width: 0.86rem;
height: 0.86rem;
border: 2px solid rgba(7, 7, 7, 0.75);
border-radius: 50%;
background: var(--fg);
box-shadow: 0 8px 22px rgba(0, 0, 0, 0.48);
}
.seek-slider:disabled::-webkit-slider-thumb {
opacity: 0;
}
.seek-slider:disabled::-moz-range-thumb {
opacity: 0;
}
.video-stage.controls-hidden .controls {
pointer-events: none;
opacity: 0;
transform: translateY(1rem);
}
.control-button {
min-width: 6rem;
padding: 0.85rem 1rem;
font-weight: 800;
}
.control-button.primary {
min-width: 8rem;
border-color: transparent;
color: #070707;
background: var(--fg);
}
audio {
display: none;
}
[hidden] {
display: none !important;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
@media (max-width: 620px) {
.url-form {
border-radius: 28px;
flex-direction: column;
}
.url-form input,
.url-form button {
width: 100%;
}
.controls {
right: 0.75rem;
bottom: 0.75rem;
left: 0.75rem;
gap: 0.5rem;
}
.playhead {
right: 0.75rem;
left: 0.75rem;
}
.control-button {
min-width: 0;
flex: 1;
padding: 0.8rem 0.7rem;
}
}