I fixed it it now looks like a card

This commit is contained in:
minster586
2026-09-29 17:46:12 -04:00
parent c2f1bbda46
commit 7d6ad0aaa0
+68 -57
View File
@@ -1,38 +1,36 @@
body { background-color: rgba(0, 0, 0, 0); margin: 0px auto; overflow: hidden; } /* OBS Default Reset & Transparent Canvas */
body {
background-color: rgba(0, 0, 0, 0) !important;
margin: 0 auto;
overflow: visible !important;
display: flex;
justify-content: center;
align-items: flex-start;
min-height: 100vh;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
* { * {
margin: 0; margin: 0;
padding: 0; padding: 0;
box-sizing: border-box; box-sizing: border-box;
} }
body { /* Main widget container */
background: transparent;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
/* Main Vertical Card Container */
.widget-container { .widget-container {
position: relative; position: relative;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; width: 100%;
width: 320px; max-width: 400px;
height: auto; /* Lets container naturally expand to fit all text */ height: auto !important;
border-radius: 20px; border-radius: 20px;
overflow: hidden; overflow: hidden;
box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.95);
margin: 20px; margin: 20px;
background: rgba(18, 18, 18, 0.88);
backdrop-filter: blur(25px) brightness(0.6);
border: 1px solid rgba(255, 255, 255, 0.12);
padding: 16px 16px 24px 16px; /* Extra bottom padding creates the stretched height naturally */
} }
/* Blurred background layer */ /* Blurred background layer using album art */
.background-blur { .background-blur {
position: absolute; position: absolute;
top: 0; top: 0;
@@ -44,20 +42,25 @@ body {
} }
.background-image { .background-image {
position: absolute;
top: 0;
left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: cover; object-fit: cover;
filter: blur(35px) brightness(0.4); filter: blur(25px) brightness(0.4); /* Strong blur and dimmed for readability */
transform: scale(1.2); /* Prevents hard/unblurred edges around borders */
z-index: 0;
} }
/* Dark overlay layer */ /* Dark overlay to ensure text contrast */
.overlay { .overlay {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.75) 100%); background: rgba(0, 0, 0, 0.35);
z-index: 1; z-index: 1;
pointer-events: none; pointer-events: none;
} }
@@ -67,24 +70,30 @@ body {
position: relative; position: relative;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; gap: 16px;
gap: 16px; /* Spacing between image box and song info */ padding: 24px;
z-index: 2; z-index: 2;
width: 100%; width: 100%;
height: auto !important;
align-items: center;
} }
/* Large Square Album Art (Top) */ /* Album art box & Fallback Image Handler */
.album-art-box { .album-art-box {
position: relative;
flex-shrink: 0; flex-shrink: 0;
width: 100%; width: 100%;
aspect-ratio: 1 / 1; aspect-ratio: 1 / 1;
border-radius: 14px; height: auto;
border-radius: 15px;
overflow: hidden; overflow: hidden;
background: rgba(40, 40, 40, 0.6); /* REPLACE URL WITH YOUR CUSTOM FALLBACK IMAGE */
background: #1e1e1e url('https://i.imgur.com/8Q9Z4Zm.png') center/cover no-repeat;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
z-index: 2;
} }
.album-art { .album-art {
@@ -93,55 +102,57 @@ body {
object-fit: cover; object-fit: cover;
} }
/* Song Info Box (Bottom, Centered Stack) */ /* Hides broken image icons so background fallback shows cleanly */
.album-art[src=""],
.album-art:not([src]) {
opacity: 0;
}
/* Song info box */
.song-info { .song-info {
display: flex; width: 100%;
display: flex !important;
flex-direction: column; flex-direction: column;
align-items: center;
justify-content: center; justify-content: center;
gap: 6px; align-items: center;
width: 100%;
min-width: 0;
text-align: center; text-align: center;
padding: 4px 0; gap: 6px;
min-width: 0;
padding: 4px 0 8px 0;
z-index: 3;
} }
/* Song Title */ /* Song title */
.song-title { .song-title {
font-size: 18px; width: 100%;
font-weight: 700; font-size: 20px;
color: #ffffff; font-weight: 600;
text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9); color: #ffffff !important;
text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.9);
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
width: 100%; line-height: 1.2;
letter-spacing: -0.2px;
line-height: 1.3;
} }
.song-title::after { /* Song artist */
display: none !important;
}
/* Song Artist */
.song-artist { .song-artist {
font-size: 14px; width: 100%;
font-weight: 500; font-size: 15px;
color: rgba(255, 255, 255, 0.75); font-weight: 400;
text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9); color: #ffffff !important;
opacity: 0.75;
text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.9);
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
width: 100%; line-height: 1.2;
letter-spacing: -0.1px;
line-height: 1.3;
} }
/* Smooth fade animation for updates */ /* Smooth fade animation for updates */
@keyframes fadeIn { @keyframes fadeIn {
from { from {
opacity: 0.4; opacity: 0.5;
} }
to { to {
opacity: 1; opacity: 1;