Files
spotizerr-dev/static/css/main/main.css
cool.gitter.choco ce3dfd0cdd frontend prettier
2025-03-15 20:39:29 -06:00

339 lines
6.3 KiB
CSS

/* GENERAL STYLING & UTILITIES */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
body {
/* Use a subtle dark gradient for a modern feel */
background: linear-gradient(135deg, #121212, #1e1e1e);
color: #ffffff;
min-height: 100vh;
}
/* Main container for page content */
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
position: relative;
z-index: 1;
}
/* LOADING & ERROR STATES */
.loading,
.error,
.success {
width: 100%;
text-align: center;
font-size: 1rem;
padding: 1rem;
position: fixed;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
z-index: 9999;
border-radius: 8px;
max-width: 80%;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.error {
color: #fff;
background-color: rgba(192, 57, 43, 0.9);
}
.success {
color: #fff;
background-color: rgba(46, 204, 113, 0.9);
}
/* Main search page specific styles */
/* Search header improvements */
.search-header {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 30px;
position: sticky;
top: 0;
background: rgba(18, 18, 18, 0.95);
backdrop-filter: blur(10px);
padding: 20px 0;
z-index: 100;
border-bottom: 1px solid var(--color-border);
}
.search-input-container {
display: flex;
flex: 1;
gap: 10px;
}
.search-input {
flex: 1;
padding: 12px 20px;
border: none;
border-radius: 25px;
background: var(--color-surface);
color: var(--color-text-primary);
font-size: 16px;
outline: none;
transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.search-input:focus {
background: var(--color-surface-hover);
box-shadow: 0 0 0 2px rgba(29, 185, 84, 0.3);
}
.search-type {
padding: 12px 15px;
background: var(--color-surface);
border: none;
border-radius: 25px;
color: var(--color-text-primary);
cursor: pointer;
transition: background-color 0.3s ease;
min-width: 100px;
}
.search-type:hover,
.search-type:focus {
background: var(--color-surface-hover);
}
.search-button {
padding: 12px 25px;
background-color: var(--color-primary);
border: none;
border-radius: 25px;
color: white;
font-weight: 600;
cursor: pointer;
transition: background-color 0.3s ease, transform 0.2s ease;
display: flex;
align-items: center;
gap: 8px;
}
.search-button img {
width: 18px;
height: 18px;
filter: brightness(0) invert(1);
}
.search-button:hover {
background-color: var(--color-primary-hover);
transform: translateY(-2px);
}
/* Empty state styles */
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 60vh;
text-align: center;
}
.empty-state-content {
max-width: 450px;
}
.empty-state-icon {
width: 80px;
height: 80px;
margin-bottom: 1.5rem;
opacity: 0.7;
}
.empty-state h2 {
font-size: 1.75rem;
margin-bottom: 1rem;
background: linear-gradient(90deg, var(--color-primary), #2ecc71);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.empty-state p {
color: var(--color-text-secondary);
font-size: 1rem;
line-height: 1.5;
}
/* Results grid improvement */
.results-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
gap: 20px;
margin-top: 20px;
}
/* Result card style */
.result-card {
background: var(--color-surface);
border-radius: var(--radius-md);
overflow: hidden;
display: flex;
flex-direction: column;
transition: transform 0.2s ease, box-shadow 0.2s ease;
box-shadow: var(--shadow-sm);
height: 100%;
}
.result-card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow-md);
}
/* Album art styling */
.album-art-wrapper {
position: relative;
width: 100%;
overflow: hidden;
}
.album-art-wrapper::before {
content: "";
display: block;
padding-top: 100%;
}
.album-art {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.3s ease;
}
.result-card:hover .album-art {
transform: scale(1.05);
}
/* Track title and details */
.track-title {
padding: 1rem 1rem 0.5rem;
font-size: 1rem;
font-weight: 600;
color: var(--color-text-primary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.track-artist {
padding: 0 1rem;
font-size: 0.9rem;
color: var(--color-text-secondary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 0.75rem;
}
.track-details {
padding: 0.75rem 1rem;
font-size: 0.85rem;
color: var(--color-text-tertiary);
border-top: 1px solid var(--color-border);
display: flex;
justify-content: space-between;
align-items: center;
margin-top: auto;
}
/* Download button within result cards */
.download-btn {
margin: 0 1rem 1rem;
max-width: calc(100% - 2rem); /* Ensure button doesn't overflow container */
width: auto; /* Allow button to shrink if needed */
font-size: 0.9rem; /* Slightly smaller font size */
padding: 0.6rem 1rem; /* Reduce padding slightly */
overflow: hidden; /* Hide overflow */
text-overflow: ellipsis; /* Add ellipsis for long text */
white-space: nowrap; /* Prevent wrapping */
}
/* Mobile responsiveness */
@media (max-width: 768px) {
.search-header {
flex-wrap: wrap;
padding: 15px 0;
gap: 12px;
}
.search-input-container {
flex: 1 1 100%;
order: 1;
}
.search-button {
order: 2;
flex: 1;
}
.results-grid {
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
gap: 15px;
}
/* Smaller download button for mobile */
.download-btn {
padding: 0.5rem 0.8rem;
font-size: 0.85rem;
}
}
@media (max-width: 480px) {
.search-header {
padding: 10px 0;
}
.search-type {
min-width: 80px;
padding: 12px 10px;
}
.search-button {
padding: 12px 15px;
}
.results-grid {
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
gap: 12px;
}
.track-title, .track-artist {
font-size: 0.9rem;
}
.track-details {
font-size: 0.8rem;
}
/* Even smaller download button for very small screens */
.download-btn {
padding: 0.4rem 0.7rem;
font-size: 0.8rem;
margin: 0 0.8rem 0.8rem;
max-width: calc(100% - 1.6rem);
}
.empty-state h2 {
font-size: 1.5rem;
}
.empty-state p {
font-size: 0.9rem;
}
}