Files
psysonic/src/styles/layout.css
T
Psychotoxical 59115a09d2 feat: 10-band EQ, connection indicator, new icon (v1.5.0)
### 10-Band Graphic Equalizer
- Full EQ in Rust audio engine via EqSource<S> biquad peak filters
- 10 built-in presets + custom preset save/delete
- EqSource::try_seek() implemented — also fixes waveform seek which broke
  silently when EQ was introduced (rodio returned SeekError::NotSupported)
- EQ state persisted in localStorage, synced to Rust on startup

### Connection Indicator
- LED in header (green/red/pulsing) with server name and LAN/WAN label
- Offline overlay with retry button when server is unreachable
- useConnectionStatus hook

### New App Icon
- New logo (logo-psysonic.png) applied across Login, Sidebar, Settings,
  README and all Tauri platform icons (Windows, macOS, Linux, Android, iOS)

### Now Playing Page
- New /now-playing route added

### Fixes
- WaveformSeek: mousemove/mouseup on window to fix drag outside canvas

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 22:25:32 +01:00

653 lines
13 KiB
CSS

/* ─── Psysonic App Shell ─── */
.app-shell {
position: relative;
display: grid;
grid-template-columns: var(--sidebar-width) 1fr var(--queue-width);
grid-template-rows: 1fr var(--player-height);
grid-template-areas:
"sidebar main queue"
"player player player";
height: 100vh;
overflow: hidden;
background: var(--bg-app);
}
/* ─── Resizer Handles ─── */
.resizer {
position: absolute;
top: 0;
bottom: var(--player-height);
width: 6px;
cursor: col-resize;
z-index: 50;
background: transparent;
transition: background var(--transition-fast);
}
.resizer:hover, .resizer:active {
background: var(--accent);
}
.resizer-queue { right: calc(var(--queue-width) - 3px); }
/* ─── Sidebar ─── */
.sidebar {
grid-area: sidebar;
display: flex;
flex-direction: column;
background: var(--bg-sidebar);
border-right: 1px solid var(--border-subtle);
overflow: hidden;
}
.sidebar-brand {
display: flex;
align-items: center;
gap: var(--space-3);
padding: 0 var(--space-5);
height: 64px;
box-sizing: border-box;
border-bottom: 1px solid var(--border-subtle);
}
.sidebar-brand .logo-icon {
width: 32px;
height: 32px;
flex-shrink: 0;
}
.sidebar-brand .brand-name {
font-family: var(--font-display);
font-size: 20px;
font-weight: 700;
letter-spacing: -0.02em;
background: linear-gradient(135deg, var(--ctp-mauve), var(--ctp-blue));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.sidebar-nav {
flex: 1;
padding: var(--space-4) var(--space-3);
display: flex;
flex-direction: column;
gap: var(--space-1);
overflow-y: auto;
}
.nav-section-label {
font-size: 10px;
font-weight: 600;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--text-muted);
padding: var(--space-4) var(--space-3) var(--space-2);
}
.nav-link {
display: flex;
align-items: center;
gap: var(--space-3);
padding: var(--space-3) var(--space-3);
border-radius: var(--radius-md);
color: var(--text-secondary);
font-size: 14px;
font-weight: 500;
transition: all var(--transition-fast);
cursor: pointer;
text-decoration: none;
position: relative;
}
.nav-link:hover {
background: var(--bg-hover);
color: var(--text-primary);
}
.nav-link.active {
background: var(--accent-dim);
color: var(--accent);
}
.nav-link.active::before {
content: '';
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 3px;
height: 60%;
background: var(--accent);
border-radius: 0 var(--radius-full) var(--radius-full) 0;
}
.nav-link svg {
flex-shrink: 0;
opacity: 0.7;
transition: opacity var(--transition-fast);
}
.nav-link.active svg,
.nav-link:hover svg {
opacity: 1;
}
/* Now Playing nav link */
.nav-link-nowplaying {
color: var(--accent);
background: var(--accent-dim);
font-weight: 600;
}
.nav-link-nowplaying:hover {
background: color-mix(in srgb, var(--accent) 20%, transparent);
color: var(--accent);
}
.nav-link-nowplaying.active {
background: color-mix(in srgb, var(--accent) 22%, transparent);
color: var(--accent);
}
.nav-link-nowplaying svg {
opacity: 1;
}
.nav-np-icon-wrap {
position: relative;
display: flex;
align-items: center;
flex-shrink: 0;
}
.nav-np-dot {
position: absolute;
top: -3px;
right: -4px;
width: 7px;
height: 7px;
border-radius: 50%;
background: var(--accent);
animation: np-dot-pulse 1.8s ease-in-out infinite;
}
@keyframes np-dot-pulse {
0%, 100% { opacity: 1; transform: scale(1); }
50% { opacity: 0.4; transform: scale(0.7); }
}
/* Collapsed Sidebar Styles */
.sidebar.collapsed .sidebar-brand {
justify-content: center;
padding: 0;
}
.sidebar.collapsed .nav-link {
justify-content: center;
padding: var(--space-3) 0;
}
.collapse-btn {
background: transparent;
border: none;
color: var(--text-muted);
cursor: pointer;
padding: var(--space-2);
border-radius: var(--radius-md);
display: flex;
align-items: center;
justify-content: center;
transition: all var(--transition-fast);
}
.collapse-btn:hover {
background: var(--bg-hover);
color: var(--text-primary);
}
/* ─── Update Toast ─── */
@keyframes update-toast-in {
from { opacity: 0; transform: translateY(6px); }
to { opacity: 1; transform: translateY(0); }
}
.update-toast {
margin: 0 var(--space-1) var(--space-2);
padding: var(--space-3) var(--space-3);
border-radius: var(--radius-md);
background: var(--accent-dim);
border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
display: flex;
flex-direction: column;
gap: 3px;
animation: update-toast-in 0.35s ease both;
}
.update-toast-header {
display: flex;
align-items: center;
gap: var(--space-2);
color: var(--accent);
}
.update-toast-label {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.04em;
text-transform: uppercase;
color: var(--accent);
}
.update-toast-version {
font-size: 12px;
color: var(--text-secondary);
padding-left: 22px;
}
.update-toast-link {
font-size: 11px;
font-weight: 600;
color: var(--accent);
text-decoration: none;
padding-left: 22px;
opacity: 0.8;
transition: opacity var(--transition-fast);
}
.update-toast-link:hover {
opacity: 1;
text-decoration: underline;
}
.update-toast-icon {
display: flex;
align-items: center;
justify-content: center;
padding: var(--space-2) 0;
color: var(--accent);
animation: update-toast-in 0.35s ease both;
cursor: default;
}
/* ─── Main Content ─── */
.main-content {
grid-area: main;
display: flex;
flex-direction: column;
overflow: hidden;
min-width: 0;
background: var(--bg-app);
z-index: 1;
}
.content-header {
display: flex;
align-items: center;
gap: var(--space-4);
padding: 0 var(--space-6);
height: 64px;
box-sizing: border-box;
border-bottom: 1px solid var(--border-subtle);
background: var(--bg-app);
position: relative;
z-index: 10;
}
.content-header h1 {
font-family: var(--font-display);
font-size: 18px;
font-weight: 600;
color: var(--text-primary);
}
.content-header .spacer { flex: 1; }
.content-body {
flex: 1;
overflow-y: auto;
overflow-x: hidden;
padding: var(--space-6);
}
/* ─── Player Bar ─── */
.player-bar {
grid-area: player;
display: flex;
align-items: center;
gap: var(--space-4);
padding: 0 var(--space-5);
background: var(--bg-player);
border-top: 1px solid var(--border-subtle);
height: var(--player-height);
position: relative;
z-index: 100;
}
.player-track-info {
display: flex;
align-items: center;
gap: var(--space-3);
flex-shrink: 0;
width: 220px;
min-width: 0;
}
.player-album-art {
width: 52px;
height: 52px;
border-radius: var(--radius-md);
object-fit: cover;
background: var(--bg-card);
flex-shrink: 0;
box-shadow: var(--shadow-md);
}
.player-album-art-placeholder {
width: 52px;
height: 52px;
border-radius: var(--radius-md);
background: var(--bg-card);
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
color: var(--text-muted);
}
.player-album-art-wrap {
position: relative;
flex-shrink: 0;
border-radius: var(--radius-sm);
overflow: hidden;
}
.player-album-art-wrap::after {
content: '';
position: absolute;
inset: 0;
background: rgba(0, 0, 0, 0.3);
opacity: 0;
transition: opacity var(--transition-fast);
pointer-events: none;
}
.player-album-art-wrap.clickable { cursor: pointer; }
.player-album-art-wrap:hover::after { opacity: 1; }
/* Expand icon hint that appears on cover hover */
.player-art-expand-hint {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
color: white;
opacity: 0;
transition: opacity var(--transition-fast);
pointer-events: none;
z-index: 1;
}
.player-album-art-wrap.clickable:hover .player-art-expand-hint { opacity: 1; }
.player-track-meta {
min-width: 0;
}
.player-track-name {
font-size: 14px;
font-weight: 600;
color: var(--text-primary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.player-track-artist {
font-size: 12px;
color: var(--text-secondary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-top: 2px;
}
.player-buttons {
display: flex;
align-items: center;
gap: var(--space-2);
flex-shrink: 0;
}
.player-btn {
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border-radius: 50%;
color: var(--text-muted);
transition: all var(--transition-fast);
flex-shrink: 0;
}
.player-btn:hover {
background: var(--bg-hover);
color: var(--text-primary);
transform: scale(1.12);
}
.player-btn-sm {
width: 28px;
height: 28px;
}
.player-btn-primary {
width: 46px;
height: 46px;
background: linear-gradient(135deg, var(--ctp-mauve), var(--ctp-lavender));
color: var(--ctp-crust);
border-radius: 50%;
box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
flex-shrink: 0;
}
.player-btn-primary:hover {
background: linear-gradient(135deg, var(--ctp-lavender), var(--ctp-mauve));
color: var(--ctp-crust);
transform: scale(1.06);
box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4), var(--shadow-glow);
}
/* Waveform seekbar section */
.player-waveform-section {
flex: 1;
min-width: 0;
display: flex;
align-items: center;
gap: var(--space-2);
}
.player-waveform-wrap {
flex: 1;
min-width: 0;
}
.player-time {
font-size: 11px;
color: var(--text-muted);
font-variant-numeric: tabular-nums;
white-space: nowrap;
flex-shrink: 0;
}
/* Volume section */
.player-volume-section {
display: flex;
align-items: center;
gap: var(--space-2);
flex-shrink: 0;
width: 155px;
}
.player-volume-slider {
flex: 1;
min-width: 0;
}
/* ─── Queue Panel ─── */
.queue-panel {
grid-area: queue;
background: var(--bg-sidebar);
border-left: 1px solid var(--border-subtle);
display: flex;
flex-direction: column;
overflow: hidden;
min-width: 0;
}
.queue-header {
height: 64px;
box-sizing: border-box;
padding: 0 var(--space-4);
background: var(--bg-app);
border-bottom: 1px solid var(--bg-surface);
display: flex;
justify-content: space-between;
align-items: center;
flex-shrink: 0;
}
.queue-current-track {
padding: var(--space-3) var(--space-4);
display: flex;
flex-direction: row;
align-items: flex-start;
gap: var(--space-3);
flex-shrink: 0;
border-bottom: 1px solid var(--border-subtle);
}
.queue-current-cover {
width: 90px;
height: 90px;
flex-shrink: 0;
border-radius: var(--radius-md);
overflow: hidden;
background: var(--bg-surface);
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.queue-current-cover img {
width: 100%;
height: 100%;
object-fit: cover;
}
.queue-current-cover .fallback {
color: var(--text-muted);
}
.queue-current-info {
display: flex;
flex-direction: column;
gap: 2px;
min-width: 0;
flex: 1;
}
.queue-current-info h3 {
font-size: 13px;
font-weight: 700;
margin: 0;
color: var(--text-primary);
}
.queue-current-sub {
font-size: 12px;
color: var(--text-secondary);
}
.queue-current-tech {
font-size: 10px;
font-family: monospace;
letter-spacing: 0.05em;
background: var(--bg-surface);
color: var(--text-muted);
padding: 2px 6px;
border-radius: 4px;
border: 1px solid var(--border-subtle);
display: inline-block;
}
.queue-divider {
padding: var(--space-3) var(--space-4) 0;
flex-shrink: 0;
}
.queue-list {
flex: 1;
overflow-y: auto;
padding: var(--space-2);
}
.queue-empty {
padding: var(--space-4);
color: var(--text-muted);
text-align: center;
font-size: 14px;
}
.queue-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: var(--space-2) var(--space-3);
border-radius: var(--radius-sm);
cursor: pointer;
transition: background var(--transition-fast);
color: var(--text-secondary);
}
/* Prevent child elements from stealing dragenter/dragleave events */
.queue-item > * { pointer-events: none; }
.queue-item:hover, .queue-item.context-active {
background: var(--bg-hover);
color: var(--text-primary);
}
.queue-item.active {
background: var(--accent-dim);
color: var(--accent);
}
.queue-item-info {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 2px;
}
.queue-item-title {
font-size: 12px;
font-weight: 500;
color: inherit;
}
.queue-item-artist {
font-size: 11px;
color: var(--text-muted);
}
.queue-item-duration {
font-size: 11px;
color: var(--text-muted);
flex-shrink: 0;
margin-left: var(--space-3);
}
.queue-item.active .queue-item-artist,
.queue-item.active .queue-item-duration {
color: inherit;
opacity: 0.8;
}