/* LAYOUT */ body { height: 100dvh; display: grid; grid-template-columns: 20rem 1fr; grid-template-rows: 1fr auto auto; grid-template-areas: "sidebar main" "header header" "footer footer"; } /* HEADER */ header { grid-area: header; display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.5rem; border-top: 1px solid var(--border); background: var(--bg-tertiary); } #progress { flex: 1; } #playback #loop-btn { opacity: 0.5; } #playback #loop-btn.active { opacity: 1; } /* BASE STYLES */ button { background: none; border: none; display: inline-flex; align-items: center; gap: 0.5rem; color: inherit; font: inherit; } @keyframes pulse { 0%, 100% { background-color: var(--playing); } 50% { background-color: var(--playing-pulse); } } /* SIDEBAR */ #sidebar { grid-area: sidebar; border-right: 1px solid var(--border); background: var(--bg-secondary); display: flex; flex-direction: column; min-height: 0; } #sidebar h2 { font-size: 1rem; margin-block-start: 0.5rem; } #sidebar h2 a { color: inherit; text-decoration: none; } #sidebar ul { list-style: none; } #sidebar li { margin-block-start: 0.5rem; } /* sidebar - library */ #sidebar #library { flex: 1; overflow-y: auto; min-height: 0; padding-inline: 1rem; } /* sidebar - library - tree items */ #sidebar #library .tree-item { display: flex; align-items: center; gap: 0.5rem; } #sidebar #library .tree-toggle, #sidebar #library .tree-name { color: inherit; text-decoration: none; flex: 1; display: flex; gap: 0.5rem; align-items: center; min-width: 0; } #sidebar #library .tree-toggle span, #sidebar #library .tree-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } #sidebar #library .tree-action.disabled { opacity: 0.5; } #sidebar #library .tree-toggle img, #sidebar #library .tree-name img { width: var(--art-artist); height: var(--art-artist); aspect-ratio: 1 / 1; object-fit: cover; flex-shrink: 0; } #sidebar #library ul.nested > li .tree-toggle img, #sidebar #library ul.nested > li .tree-name img { width: var(--art-album); height: var(--art-album); } #sidebar #library .nested, #sidebar #library .nested-songs { list-style: none; margin-inline-start: 1rem; } #sidebar #library .nested li { margin-block-start: 0.25rem; } #sidebar #library #library-search { width: 100%; margin-block-start: 0.5rem; } #sidebar #library .tree-toggle.focused, #sidebar #library .tree-name.focused, #sidebar #library .section-toggle.focused { background: Highlight; color: HighlightText; } #sidebar #library:not(:focus-within) .tree-toggle.focused, #sidebar #library:not(:focus-within) .tree-name.focused, #sidebar #library:not(:focus-within) .section-toggle.focused { background: GrayText; } /* sidebar - now playing */ #sidebar #now-playing { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; padding: 1rem; border-top: 1px solid var(--border-subtle); flex-shrink: 0; } #sidebar #now-playing #cover-art { width: var(--art-now-playing); height: var(--art-now-playing); object-fit: cover; } #sidebar #now-playing #track-info { text-align: center; width: 100%; } #sidebar #now-playing #track-title { font-weight: bold; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } #sidebar #now-playing #track-artist { font-size: 0.8rem; opacity: 0.75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } #sidebar #now-playing #track-lyric { font-size: 0.8rem; opacity: 0.75; } /* QUEUE */ #queue { grid-area: main; overflow-y: auto; padding-inline: 1rem; } #queue #queue-table { width: 100%; border-collapse: collapse; table-layout: fixed; margin-block-start: 0.5rem; } #queue #queue-table th, #queue #queue-table td { text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* queue - cover art column */ #queue #queue-table th:nth-child(1), #queue #queue-table td:nth-child(1) { width: calc(var(--art-song) * 1.5); } /* queue - duration column */ #queue #queue-table th:nth-child(5), #queue #queue-table td:nth-child(5) { width: 6rem; } /* queue - actions column */ #queue #queue-table th:nth-child(6), #queue #queue-table td:nth-child(6) { text-align: right; overflow: visible; white-space: normal; } #queue #queue-table td:nth-child(6) button { margin-inline-start: 0.5rem; } /* queue - rows */ #queue #queue-table tbody tr.stripe { background: var(--bg-secondary); } #queue #queue-table tbody tr.currently-playing { background: var(--playing); animation: pulse 4s linear infinite; } #queue #queue-table tbody tr.dragging { opacity: 0.5; } #queue #queue-table tbody tr.selected { background: Highlight; color: HighlightText; } #queue:not(:focus-within) #queue-table tbody tr.selected { background: GrayText; } #queue #queue-table tbody tr.drag-over-above { border-block-start: 2px solid currentColor; } #queue #queue-table tbody tr.drag-over-below { border-block-end: 2px solid currentColor; } /* queue - row items */ #queue #queue-table .queue-cover { width: var(--art-song); height: var(--art-song); aspect-ratio: 1 / 1; object-fit: cover; flex-shrink: 0; } #queue #queue-table .queue-favorite { opacity: 0.25; } #queue #queue-table .queue-favorite:hover { opacity: 0.5; } #queue #queue-table .queue-favorite.favorited { opacity: 1; } #queue #queue-table .queue-rating-star { opacity: 0.25; } #queue #queue-table .queue-rating-star:hover { opacity: 0.5; } #queue #queue-table .queue-rating-star.rated { opacity: 1; } #queue #queue-table .queue-play, #queue #queue-table .queue-play-next, #queue #queue-table .queue-move-up, #queue #queue-table .queue-move-down { display: none; } /* FOOTER */ #footer { grid-area: footer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.5rem 1rem; border-top: 1px solid var(--border-subtle); background: var(--bg-tertiary); } #footer #actions { display: flex; align-items: center; gap: 1rem; } /* CONTEXT MENU */ #context-menu { position: fixed; background: var(--bg-context-menu); backdrop-filter: blur(16px); border: 1px solid var(--border); border-radius: 0.25rem; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); z-index: 1000; min-width: 10rem; } #context-menu .context-menu-item { display: block; width: 100%; padding: 0.25rem 1rem; background: none; border: none; text-align: left; } #context-menu .context-menu-item:hover { background: Highlight; color: HighlightText; } #context-menu .context-menu-item.focused { background: Highlight; color: HighlightText; } /* MODAL */ .modal { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.75); display: flex; align-items: center; justify-content: center; z-index: 2000; } .modal.hidden { display: none; } .modal-content { background: Menu; border: 1px solid var(--border); padding: 1rem; max-height: 100%; min-width: 24rem; overflow-y: auto; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); display: flex; flex-direction: column; gap: 1rem; } .modal-actions { display: flex; gap: 0.5rem; justify-content: end; } .modal-actions button { background: ButtonFace; padding: 0.5rem 1rem; } #keyboard-help-modal .shortcuts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 2rem; } #keyboard-help-modal .shortcut-section-group { display: flex; flex-direction: column; gap: 0.5rem; } #keyboard-help-modal .shortcuts-items-grid { display: grid; grid-template-columns: 10rem 1fr; gap: 0.5rem 1rem; } #keyboard-help-modal kbd { background: ButtonFace; padding: 0.25rem 0.5rem; font-family: ui-monospace, monospace; } /* form groups */ .form-group { display: flex; flex-direction: column; gap: 1rem; } .modal-content form { display: flex; flex-direction: column; gap: 1rem; } /* UTILITIES */ /* danger */ .danger { color: var(--error-color); } button.danger { background-color: var(--error-color); color: white; } /* famfamfam-silk icons - force pixelated rendering for retina displays */ img[src*="famfamfam-silk"] { image-rendering: pixelated; } /* MEDIA QUERIES */ @media (max-width: 768px) { /* layout */ body { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr auto auto; grid-template-areas: "main" "sidebar" "header" "footer"; } /* queue - hide album and duration columns */ #queue-table th:nth-child(4), #queue-table th:nth-child(5), #queue-table td:nth-child(4), #queue-table td:nth-child(5) { display: none; } #sidebar { border-right: none; border-top: 1px solid var(--border); overflow: hidden; } /* sidebar - now playing cover art */ #now-playing #cover-art { display: none; } /* footer - button labels */ footer button span { display: none; } } @media (pointer: coarse) { /* queue - show action buttons */ #queue #queue-table .queue-play, #queue #queue-table .queue-play-next, #queue #queue-table .queue-move-up, #queue #queue-table .queue-move-down { display: inline-block; } /* queue - hide artist column */ #queue-table th:nth-child(3), #queue-table td:nth-child(3) { display: none; } }