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

457 lines
8.0 KiB
CSS

/* Spotizerr Base Styles
Provides consistent styling across all pages */
/* Reset and base styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
:root {
/* Main colors */
--color-background: #121212;
--color-background-gradient: linear-gradient(135deg, #121212, #1e1e1e);
--color-surface: #1c1c1c;
--color-surface-hover: #2a2a2a;
--color-border: #2a2a2a;
/* Text colors */
--color-text-primary: #ffffff;
--color-text-secondary: #b3b3b3;
--color-text-tertiary: #757575;
/* Brand colors */
--color-primary: #1db954;
--color-primary-hover: #17a44b;
--color-error: #c0392b;
--color-success: #2ecc71;
/* Spacing */
--space-xs: 0.25rem;
--space-sm: 0.5rem;
--space-md: 1rem;
--space-lg: 1.5rem;
--space-xl: 2rem;
/* Shadow */
--shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
--shadow-md: 0 4px 6px rgba(0,0,0,0.1);
--shadow-lg: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
/* Border radius */
--radius-sm: 4px;
--radius-md: 8px;
--radius-lg: 12px;
--radius-round: 50%;
}
body {
background: var(--color-background-gradient);
color: var(--color-text-primary);
min-height: 100vh;
line-height: 1.4;
}
a {
color: inherit;
text-decoration: none;
transition: color 0.2s ease;
}
a:hover, a:focus {
color: var(--color-primary);
text-decoration: underline;
}
/* Container for main content */
.app-container {
max-width: 1200px;
margin: 0 auto;
padding: var(--space-lg);
position: relative;
z-index: 1;
}
/* Card component */
.card {
background: var(--color-surface);
border-radius: var(--radius-md);
padding: var(--space-md);
box-shadow: var(--shadow-sm);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-md);
}
/* Button variants */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: var(--space-sm) var(--space-md);
border: none;
border-radius: var(--radius-sm);
cursor: pointer;
font-weight: 500;
transition: background-color 0.2s ease, transform 0.2s ease;
background-color: var(--color-surface-hover);
color: var(--color-text-primary);
}
.btn:hover {
transform: translateY(-1px);
}
.btn:active {
transform: scale(0.98);
}
.btn-primary {
background-color: var(--color-primary);
color: white;
}
.btn-primary:hover {
background-color: var(--color-primary-hover);
}
/* Icon button */
.btn-icon {
width: 40px;
height: 40px;
border-radius: var(--radius-round);
padding: 0;
display: inline-flex;
align-items: center;
justify-content: center;
background: transparent;
border: none;
cursor: pointer;
transition: background-color 0.2s ease;
}
.btn-icon:hover {
background-color: var(--color-surface-hover);
}
.btn-icon img {
width: 20px;
height: 20px;
filter: brightness(0) invert(1);
}
/* Queue icon styling */
.queue-icon {
background-color: transparent;
transition: background-color 0.2s ease, transform 0.2s ease;
}
.queue-icon:hover {
background-color: var(--color-surface-hover);
}
/* Floating icons (queue and settings) */
.floating-icon {
position: fixed;
width: 56px;
height: 56px;
bottom: 20px;
background-color: var(--color-primary);
border-radius: var(--radius-round);
box-shadow: var(--shadow-lg);
z-index: 9999;
display: flex;
align-items: center;
justify-content: center;
transition: transform 0.2s ease, background-color 0.2s ease;
text-decoration: none !important;
}
.floating-icon:hover,
.floating-icon:active {
background-color: var(--color-primary-hover);
transform: scale(1.05);
}
.floating-icon img {
width: 24px;
height: 24px;
filter: brightness(0) invert(1);
margin: 0;
}
/* Settings icon - bottom left */
.settings-icon {
left: 20px;
}
/* Queue icon - bottom right */
.queue-icon {
right: 20px;
}
/* Home button */
.home-btn {
background-color: transparent;
border: none;
cursor: pointer;
padding: 0;
}
.home-btn img {
width: 32px;
height: 32px;
filter: invert(1);
transition: transform 0.2s ease;
}
.home-btn:hover img {
transform: scale(1.05);
}
.home-btn:active img {
transform: scale(0.98);
}
/* When home button is used as a floating button */
.floating-icon.home-btn {
background-color: var(--color-primary);
padding: 0;
display: flex;
align-items: center;
justify-content: center;
}
.floating-icon.home-btn img {
width: 24px;
height: 24px;
filter: brightness(0) invert(1);
margin: 0;
}
/* Download button */
.download-btn {
background-color: var(--color-primary);
border: none;
border-radius: var(--radius-sm);
padding: 0.7rem 1.2rem;
cursor: pointer;
font-weight: 600;
transition: background-color 0.2s ease, transform 0.2s ease;
display: inline-flex;
align-items: center;
justify-content: center;
color: white;
}
.download-btn img {
width: 18px;
height: 18px;
margin-right: 8px;
filter: brightness(0) invert(1);
}
.download-btn:hover {
background-color: var(--color-primary-hover);
transform: translateY(-2px);
}
.download-btn:active {
transform: scale(0.98);
}
.download-btn--circle {
width: 40px;
height: 40px;
border-radius: var(--radius-round);
padding: 0;
}
.download-btn--circle img {
margin-right: 0;
}
/* Header patterns */
.content-header {
display: flex;
align-items: center;
gap: var(--space-md);
margin-bottom: var(--space-xl);
padding-bottom: var(--space-md);
border-bottom: 1px solid var(--color-border);
}
.header-image {
width: 180px;
height: 180px;
object-fit: cover;
border-radius: var(--radius-md);
box-shadow: var(--shadow-md);
}
.header-info {
flex: 1;
}
.header-title {
font-size: 2rem;
margin-bottom: var(--space-sm);
font-weight: 700;
}
.header-subtitle {
font-size: 1.1rem;
color: var(--color-text-secondary);
margin-bottom: var(--space-xs);
}
.header-actions {
display: flex;
gap: var(--space-sm);
margin-top: var(--space-md);
}
/* Track list styling */
.tracks-list {
display: flex;
flex-direction: column;
gap: var(--space-xs);
margin-top: var(--space-md);
}
.track-item {
display: grid;
grid-template-columns: 40px 1fr auto auto;
align-items: center;
padding: var(--space-sm) var(--space-md);
border-radius: var(--radius-sm);
transition: background-color 0.2s ease;
}
.track-item:hover {
background-color: var(--color-surface-hover);
}
/* Utility classes */
.text-truncate {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.hidden {
display: none !important;
}
.flex {
display: flex;
}
.flex-column {
flex-direction: column;
}
.items-center {
align-items: center;
}
.justify-between {
justify-content: space-between;
}
.gap-sm {
gap: var(--space-sm);
}
.gap-md {
gap: var(--space-md);
}
/* Loading and error states */
.loading,
.error {
width: 100%;
text-align: center;
font-size: 1rem;
padding: var(--space-md);
}
.error {
color: var(--color-error);
}
/* Mobile responsiveness */
@media (max-width: 768px) {
.content-header {
flex-direction: column;
text-align: center;
}
.header-image {
width: 150px;
height: 150px;
}
.header-title {
font-size: 1.75rem;
}
.track-item {
grid-template-columns: 30px 1fr auto;
}
}
@media (max-width: 480px) {
.app-container {
padding: var(--space-md);
}
.header-image {
width: 120px;
height: 120px;
}
.header-title {
font-size: 1.5rem;
}
.header-subtitle {
font-size: 0.9rem;
}
.header-actions {
flex-direction: column;
width: 100%;
}
.download-btn {
width: 100%;
}
/* Adjust floating icons size for very small screens */
.floating-icon {
width: 60px;
height: 60px;
}
.floating-icon img {
width: 28px;
height: 28px;
}
/* Position floating icons a bit closer to the edges on small screens */
.settings-icon {
left: 16px;
bottom: 16px;
}
.queue-icon {
right: 16px;
bottom: 16px;
}
}