UI Update

This commit is contained in:
Brian Fertig 2026-04-09 20:23:54 -06:00
parent ed13c2821c
commit f34ff9b8fb
10 changed files with 850 additions and 93 deletions

View File

@ -1,160 +1,522 @@
/* ============================================================
Bri-Tunes — retrofuture / cyberpunk skin
============================================================ */
@font-face {
font-family: 'Orbitron';
src: url('/static/vendor/fonts/Orbitron.woff2') format('woff2');
font-weight: 400 900;
font-display: swap;
}
@font-face {
font-family: 'Inter';
src: url('/static/vendor/fonts/Inter.woff2') format('woff2');
font-weight: 400 700;
font-display: swap;
}
:root { :root {
--bg: #0f1115; --bg: #05060d;
--bg-2: #171a21; --bg-panel: #0c0e1a;
--bg-3: #1f232c; --bg-inset: #141830;
--fg: #e6e8ee; --grid: #1a1f3d;
--muted: #8a92a4; --fg: #e8ecff;
--accent: #6aa6ff; --muted: #7a84b8;
--accent-2: #8f7bff;
--danger: #ff6a6a; --neon-cyan: #00e5ff;
--border: #262b36; --neon-magenta: #ff2bd6;
--radius: 10px; --neon-violet: #8f5bff;
--neon-amber: #ffb347;
--danger: #ff4d6d;
--border: rgba(143, 91, 255, 0.45);
--border-strong: rgba(143, 91, 255, 0.85);
--glow-cyan: 0 0 8px rgba(0, 229, 255, 0.75), 0 0 18px rgba(0, 229, 255, 0.35);
--glow-magenta: 0 0 8px rgba(255, 43, 214, 0.75), 0 0 18px rgba(255, 43, 214, 0.35);
--glow-violet: 0 0 6px rgba(143, 91, 255, 0.9), 0 0 16px rgba(143, 91, 255, 0.4);
--radius: 4px;
} }
* { box-sizing: border-box; } * { box-sizing: border-box; }
html, body { margin: 0; padding: 0; } html, body { margin: 0; padding: 0; }
body { body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, sans-serif; font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
background: var(--bg); background: var(--bg);
color: var(--fg); color: var(--fg);
line-height: 1.5; line-height: 1.55;
padding-bottom: 120px; padding-bottom: 140px;
min-height: 100vh;
position: relative;
overflow-x: hidden;
} }
a { color: var(--accent); text-decoration: none; } /* ---------- Background canvas ---------- */
a:hover { text-decoration: underline; } #bg-canvas {
position: fixed;
inset: 0;
width: 100%;
height: 100%;
z-index: 0;
pointer-events: none;
}
.container { max-width: 1000px; margin: 0 auto; padding: 1rem 1.25rem; } /* ---------- Scanlines + vignette overlays ---------- */
body::before {
content: "";
position: fixed;
inset: 0;
z-index: 2;
pointer-events: none;
background: repeating-linear-gradient(
to bottom,
rgba(255, 255, 255, 0.035) 0px,
rgba(255, 255, 255, 0.035) 1px,
transparent 1px,
transparent 3px
);
mix-blend-mode: overlay;
}
body::after {
content: "";
position: fixed;
inset: 0;
z-index: 3;
pointer-events: none;
background:
radial-gradient(ellipse at center, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.55) 60%, rgba(0,0,0,0.8) 100%);
}
/* Everything interactive sits above the background canvas and below the overlays. */
.site-header,
main.container,
.player-bar,
.flash { position: relative; z-index: 4; }
/* ---------- Typography ---------- */
h1, h2, h3, .brand, .card-title, .tabs a, .data-table th, .btn-primary, .btn-small, .btn-play {
font-family: 'Orbitron', 'Inter', sans-serif;
letter-spacing: 0.08em;
text-transform: uppercase;
}
h1 { font-size: 1.7rem; margin: 1.25rem 0 0.6rem; text-shadow: var(--glow-violet); }
h2 { font-size: 1.15rem; margin: 1.5rem 0 0.75rem; color: var(--neon-cyan); text-shadow: var(--glow-cyan); }
h3 { font-size: 1rem; color: var(--neon-magenta); text-shadow: var(--glow-magenta); }
a { color: var(--neon-cyan); text-decoration: none; transition: color .15s, text-shadow .15s; }
a:hover { color: #fff; text-shadow: var(--glow-cyan); text-decoration: none; }
.muted { color: var(--muted); }
.small { font-size: 0.82rem; letter-spacing: 0.02em; }
/* ---------- Layout ---------- */
.container { max-width: 1040px; margin: 0 auto; padding: 1rem 1.25rem; }
.site-header { .site-header {
background: var(--bg-2); background: linear-gradient(180deg, rgba(12,14,26,0.92), rgba(12,14,26,0.75));
border-bottom: 1px solid var(--border); border-bottom: 1px solid var(--border-strong);
position: sticky; top: 0; z-index: 10; box-shadow: 0 1px 0 rgba(0, 229, 255, 0.25), 0 0 24px rgba(143, 91, 255, 0.2);
backdrop-filter: blur(6px);
-webkit-backdrop-filter: blur(6px);
position: sticky; top: 0;
} }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1.25rem; max-width: 1000px; margin: 0 auto; } .header-inner {
.brand { font-weight: 700; font-size: 1.2rem; color: var(--fg); } display: flex; align-items: center; justify-content: space-between;
.nav { display: flex; gap: 1rem; align-items: center; } padding: 0.75rem 1.25rem; max-width: 1040px; margin: 0 auto;
.nav a { color: var(--muted); } }
.nav a.active, .nav a:hover { color: var(--fg); } .brand {
font-weight: 700;
.btn-small { background: var(--accent); color: #0b0d12 !important; padding: 0.35rem 0.75rem; border-radius: var(--radius); font-weight: 600; } font-size: 1.15rem;
.btn-small:hover { text-decoration: none; background: var(--accent-2); } color: var(--fg);
text-shadow: var(--glow-magenta);
.btn-primary { }
background: var(--accent); color: #0b0d12; border: none; .brand:hover { color: #fff; text-shadow: var(--glow-cyan); }
padding: 0.55rem 1rem; border-radius: var(--radius); font-weight: 600; cursor: pointer; .nav { display: flex; gap: 1.1rem; align-items: center; }
.nav a {
color: var(--muted);
font-family: 'Orbitron', sans-serif;
text-transform: uppercase;
font-size: 0.78rem;
letter-spacing: 0.12em;
padding: 0.4rem 0.1rem;
border-bottom: 1px solid transparent;
}
.nav a.active, .nav a:hover {
color: var(--neon-cyan);
border-bottom-color: var(--neon-cyan);
text-shadow: var(--glow-cyan);
} }
.btn-primary:hover { background: var(--accent-2); }
.btn-link { color: var(--muted); margin-left: 0.75rem; }
button.linklike { background: none; border: none; color: var(--accent); padding: 0; cursor: pointer; font: inherit; } /* ---------- Buttons ---------- */
.btn-primary, .btn-small {
background: transparent;
color: var(--neon-cyan);
border: 1px solid var(--neon-cyan);
padding: 0.55rem 1rem;
border-radius: var(--radius);
font-weight: 600;
font-size: 0.82rem;
cursor: pointer;
box-shadow: var(--glow-cyan), inset 0 0 0 1px rgba(0,229,255,0.1);
transition: transform .12s, background .15s, color .15s, box-shadow .15s;
}
.btn-primary:hover, .btn-small:hover {
background: var(--neon-cyan);
color: #05060d;
transform: translateY(-1px);
text-decoration: none;
box-shadow: 0 0 18px rgba(0,229,255,0.85), 0 0 36px rgba(0,229,255,0.45);
}
.btn-small { padding: 0.35rem 0.75rem; font-size: 0.72rem; }
.btn-link { color: var(--muted); margin-left: 0.75rem; font-size: 0.82rem; }
.btn-link:hover { color: var(--neon-magenta); text-shadow: var(--glow-magenta); }
button.linklike {
background: none; border: none; color: var(--neon-cyan);
padding: 0; cursor: pointer; font: inherit;
}
button.linklike:hover { color: #fff; text-shadow: var(--glow-cyan); }
button.linklike.danger { color: var(--danger); } button.linklike.danger { color: var(--danger); }
button.linklike.danger:hover { color: #fff; text-shadow: 0 0 6px var(--danger); }
.inline-form { display: inline; margin-left: 0.5rem; } .inline-form { display: inline; margin-left: 0.5rem; }
.inline-row { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.5rem; } .inline-row { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.5rem; }
.hero { padding: 2rem 0 1rem; } /* ---------- Focus ring ---------- */
.hero h1 { margin: 0 0 0.25rem 0; font-size: 1.8rem; } :focus-visible {
.muted { color: var(--muted); } outline: 2px dashed var(--neon-magenta);
.small { font-size: 0.85rem; } outline-offset: 3px;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.card { /* ---------- Hero ---------- */
background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); .hero { padding: 2rem 0 1rem; }
overflow: hidden; display: block; color: var(--fg); .hero h1 {
margin: 0 0 0.25rem 0;
font-size: 2.1rem;
background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta), var(--neon-violet));
background-clip: text;
-webkit-background-clip: text;
color: transparent;
text-shadow: none;
}
/* ---------- Cards / grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.card {
background: var(--bg-panel);
border: 1px solid var(--border);
border-radius: var(--radius);
overflow: hidden;
display: block;
color: var(--fg);
position: relative;
transition: transform .15s, border-color .15s, box-shadow .15s;
}
.card::before, .card::after {
content: "";
position: absolute;
width: 12px; height: 12px;
border: 1px solid var(--neon-cyan);
pointer-events: none;
}
.card::before { top: 4px; left: 4px; border-right: none; border-bottom: none; }
.card::after { bottom: 4px; right: 4px; border-left: none; border-top: none; }
.card:hover {
transform: translateY(-2px);
border-color: var(--neon-magenta);
box-shadow: 0 0 0 1px var(--neon-magenta), 0 0 24px rgba(255,43,214,0.35);
text-decoration: none;
} }
.card:hover { border-color: var(--accent); text-decoration: none; }
.card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; } .card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.cover-fallback { .cover-fallback {
aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
background: linear-gradient(135deg, var(--bg-3), var(--bg-2)); background: linear-gradient(135deg, #1a1f3d, #0c0e1a);
font-size: 2.5rem; color: var(--muted); font-size: 2.5rem; color: var(--neon-violet); text-shadow: var(--glow-violet);
} }
.card-body { padding: 0.6rem 0.8rem; } .card-body { padding: 0.65rem 0.85rem; }
.card-title { font-weight: 600; } .card-title { font-size: 0.85rem; color: var(--fg); }
/* ---------- Song list ---------- */
.song-list { list-style: none; margin: 0; padding: 0; } .song-list { list-style: none; margin: 0; padding: 0; }
.song-row { .song-row {
display: flex; align-items: center; gap: 0.75rem; display: flex; align-items: center; gap: 0.75rem;
padding: 0.5rem 0.5rem; border-bottom: 1px solid var(--border); padding: 0.55rem 0.6rem;
border-bottom: 1px solid rgba(143, 91, 255, 0.18);
transition: background .15s;
} }
.song-row:hover { background: var(--bg-2); } .song-row:hover { background: rgba(143, 91, 255, 0.08); }
.song-cover { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; } .song-cover { width: 44px; height: 44px; border-radius: 4px; object-fit: cover; border: 1px solid var(--border); }
.song-cover.cover-fallback { font-size: 1.25rem; } .song-cover.cover-fallback { font-size: 1.25rem; }
.song-main { flex: 1; min-width: 0; } .song-main { flex: 1; min-width: 0; }
.song-title { display: block; color: var(--fg); font-weight: 500; } .song-title { display: block; color: var(--fg); font-weight: 600; }
.song-meta { width: 56px; text-align: right; } .song-row:hover .song-title { color: var(--neon-cyan); text-shadow: var(--glow-cyan); }
.song-meta { width: 60px; text-align: right; font-family: 'Orbitron', monospace; font-size: 0.75rem; color: var(--muted); }
.btn-play { .btn-play {
background: var(--bg-3); color: var(--fg); border: 1px solid var(--border); background: transparent;
padding: 0.35rem 0.7rem; border-radius: var(--radius); cursor: pointer; color: var(--neon-magenta);
border: 1px solid var(--neon-magenta);
padding: 0.35rem 0.75rem;
border-radius: var(--radius);
cursor: pointer;
font-size: 0.72rem;
box-shadow: 0 0 6px rgba(255,43,214,0.35);
transition: all .15s;
}
.btn-play:hover {
background: var(--neon-magenta);
color: #05060d;
box-shadow: var(--glow-magenta);
} }
.btn-play:hover { background: var(--accent); color: #0b0d12; border-color: var(--accent); }
/* ---------- Song detail ---------- */
.song-detail { display: flex; gap: 1.5rem; align-items: center; padding: 1rem 0 2rem; } .song-detail { display: flex; gap: 1.5rem; align-items: center; padding: 1rem 0 2rem; }
.song-detail-cover { width: 200px; height: 200px; border-radius: var(--radius); object-fit: cover; } .song-detail-cover {
width: 220px; height: 220px; border-radius: var(--radius); object-fit: cover;
.form-card { border: 1px solid var(--neon-violet);
background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--glow-violet);
padding: 1.25rem 1.5rem; margin: 1rem 0; max-width: 560px; }
/* ---------- Forms ---------- */
.form-card {
background: var(--bg-panel);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 1.5rem 1.75rem;
margin: 1.25rem 0;
max-width: 580px;
position: relative;
box-shadow: 0 0 0 1px rgba(143, 91, 255, 0.15), 0 0 28px rgba(143, 91, 255, 0.1);
}
.form-card::before, .form-card::after {
content: ""; position: absolute; width: 14px; height: 14px;
border: 1px solid var(--neon-cyan); pointer-events: none;
}
.form-card::before { top: 6px; left: 6px; border-right: none; border-bottom: none; }
.form-card::after { bottom: 6px; right: 6px; border-left: none; border-top: none; }
.stacked { display: flex; flex-direction: column; gap: 1rem; }
.stacked label {
display: flex; flex-direction: column; gap: 0.35rem;
font-size: 0.72rem; color: var(--muted);
font-family: 'Orbitron', sans-serif;
text-transform: uppercase;
letter-spacing: 0.12em;
} }
.stacked { display: flex; flex-direction: column; gap: 0.9rem; }
.stacked label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.9rem; color: var(--muted); }
.stacked input[type=text], .stacked input[type=email], .stacked input[type=password], .stacked input[type=text], .stacked input[type=email], .stacked input[type=password],
.stacked input[type=number], .stacked textarea, .stacked select, .stacked input[type=search] { .stacked input[type=number], .stacked textarea, .stacked select, .stacked input[type=search] {
background: var(--bg-3); color: var(--fg); border: 1px solid var(--border); background: var(--bg-inset);
border-radius: 8px; padding: 0.55rem 0.7rem; font: inherit; color: var(--fg);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 0.6rem 0.8rem;
font: inherit;
font-family: 'Inter', sans-serif;
text-transform: none;
letter-spacing: 0;
transition: border-color .15s, box-shadow .15s;
} }
.stacked input[type=file] { color: var(--muted); } .stacked input:focus, .stacked textarea:focus, .stacked select:focus {
outline: none;
border-color: var(--neon-cyan);
box-shadow: var(--glow-cyan);
}
.stacked input[type=file] { color: var(--muted); font-family: 'Inter', sans-serif; }
.stacked .row { flex-direction: row; gap: 0.75rem; align-items: center; } .stacked .row { flex-direction: row; gap: 0.75rem; align-items: center; }
.stacked .checkbox { flex-direction: row; align-items: center; gap: 0.5rem; } .stacked .checkbox { flex-direction: row; align-items: center; gap: 0.5rem; }
.err { color: var(--danger); font-size: 0.8rem; } .err { color: var(--danger); font-size: 0.75rem; text-shadow: 0 0 4px rgba(255, 77, 109, 0.6); }
/* ---------- Search ---------- */
.search-form { display: flex; gap: 0.5rem; align-items: center; margin: 1rem 0; } .search-form { display: flex; gap: 0.5rem; align-items: center; margin: 1rem 0; }
.search-form input[type=search] { .search-form input[type=search] {
flex: 1; background: var(--bg-2); color: var(--fg); border: 1px solid var(--border); flex: 1;
padding: 0.55rem 0.8rem; border-radius: var(--radius); font: inherit; background: var(--bg-inset);
color: var(--fg);
border: 1px solid var(--border);
padding: 0.6rem 0.9rem;
border-radius: var(--radius);
font: inherit;
}
.search-form input[type=search]:focus {
outline: none; border-color: var(--neon-cyan); box-shadow: var(--glow-cyan);
} }
.search-form button { .search-form button {
background: var(--bg-3); color: var(--fg); border: 1px solid var(--border); background: transparent; color: var(--neon-cyan);
padding: 0.55rem 1rem; border-radius: var(--radius); cursor: pointer; border: 1px solid var(--neon-cyan);
padding: 0.6rem 1.1rem; border-radius: var(--radius); cursor: pointer;
font-family: 'Orbitron', sans-serif; font-size: 0.78rem; letter-spacing: 0.1em;
} }
.search-form button:hover { background: var(--neon-cyan); color: #05060d; }
.pagination { display: flex; gap: 1rem; align-items: center; padding: 1rem 0; } .pagination { display: flex; gap: 1rem; align-items: center; padding: 1rem 0; }
.flash { margin: 0.75rem auto; max-width: 1000px; padding: 0.6rem 1rem; border-radius: var(--radius); } /* ---------- Flash ---------- */
.flash-success { background: rgba(106, 255, 166, 0.1); color: #8af0b5; border: 1px solid rgba(106,255,166,0.3); } .flash {
.flash-error { background: rgba(255, 106, 106, 0.1); color: #ffb0b0; border: 1px solid rgba(255,106,106,0.3); } margin: 0.75rem auto;
max-width: 1040px;
padding: 0.7rem 1rem;
border-radius: var(--radius);
font-family: 'Orbitron', sans-serif;
font-size: 0.78rem;
text-transform: uppercase;
letter-spacing: 0.08em;
animation: glitch-in .4s ease-out;
}
.flash-success {
background: rgba(0, 229, 255, 0.06);
color: var(--neon-cyan);
border: 1px solid var(--neon-cyan);
box-shadow: var(--glow-cyan);
}
.flash-error {
background: rgba(255, 77, 109, 0.06);
color: var(--danger);
border: 1px solid var(--danger);
box-shadow: 0 0 10px rgba(255, 77, 109, 0.5);
}
@keyframes glitch-in {
0% { transform: translate(0); opacity: 0; }
20% { transform: translate(-4px, 2px); opacity: 1; }
40% { transform: translate(4px, -1px); }
60% { transform: translate(-2px, 1px); }
100% { transform: translate(0); }
}
/* ---------- Admin tabs + tables ---------- */
.row-between { display: flex; justify-content: space-between; align-items: center; } .row-between { display: flex; justify-content: space-between; align-items: center; }
.tabs { display: flex; gap: 1rem; border-bottom: 1px solid var(--border); margin: 1rem 0; } .tabs { display: flex; gap: 1rem; border-bottom: 1px solid var(--border); margin: 1rem 0; }
.tabs a { padding: 0.5rem 0; color: var(--muted); border-bottom: 2px solid transparent; } .tabs a {
.tabs a.active { color: var(--fg); border-color: var(--accent); } padding: 0.55rem 0.5rem;
color: var(--muted);
font-size: 0.78rem;
border-bottom: 2px solid transparent;
transition: color .15s, border-color .15s, text-shadow .15s;
}
.tabs a.active {
color: var(--neon-cyan);
border-bottom-color: var(--neon-cyan);
text-shadow: var(--glow-cyan);
}
.tabs a:hover { color: var(--neon-cyan); text-decoration: none; }
.data-table { width: 100%; border-collapse: collapse; } .data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); } .data-table th, .data-table td {
.data-table th { color: var(--muted); font-weight: 500; font-size: 0.85rem; } text-align: left; padding: 0.65rem 0.7rem;
.data-table .actions { white-space: nowrap; } border-bottom: 1px solid rgba(143, 91, 255, 0.2);
}
.data-table th {
color: var(--neon-violet);
font-weight: 600;
font-size: 0.72rem;
letter-spacing: 0.12em;
}
.data-table tr:hover td { background: rgba(0, 229, 255, 0.04); }
.data-table .actions { white-space: nowrap; font-size: 0.85rem; }
.track-list { padding-left: 1.2rem; } .track-list { padding-left: 1.2rem; }
.track-list li { margin: 0.35rem 0; display: flex; justify-content: space-between; gap: 1rem; } .track-list li { margin: 0.4rem 0; display: flex; justify-content: space-between; gap: 1rem; }
/* ---------- Player bar ---------- */
.player-bar { .player-bar {
position: fixed; left: 0; right: 0; bottom: 0; position: fixed; left: 0; right: 0; bottom: 0;
background: var(--bg-2); border-top: 1px solid var(--border); background: linear-gradient(180deg, rgba(12,14,26,0.9), rgba(5,6,13,0.96));
padding: 0.6rem 1rem; display: flex; align-items: center; gap: 1rem; border-top: 1px solid var(--neon-magenta);
z-index: 20; box-shadow: 0 -1px 0 rgba(255,43,214,0.6), 0 -8px 28px rgba(255,43,214,0.2);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
padding: 0.75rem 1rem;
display: flex; align-items: center; gap: 1rem;
z-index: 5;
}
.player-now { display: flex; align-items: center; gap: 0.6rem; width: 320px; flex-shrink: 0; }
#player-cover {
width: 44px; height: 44px;
border-radius: 4px; object-fit: cover;
background: var(--bg-inset);
border: 1px solid var(--border);
flex-shrink: 0;
}
#player-viz {
width: 72px; height: 44px;
flex-shrink: 0;
pointer-events: none;
} }
.player-now { display: flex; align-items: center; gap: 0.75rem; min-width: 0; width: 260px; }
.player-now img { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; background: var(--bg-3); }
.player-meta { min-width: 0; } .player-meta { min-width: 0; }
.player-meta #player-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .player-meta #player-title {
#player-audio { flex: 1; max-width: 100%; } font-family: 'Orbitron', sans-serif;
.player-queue { display: flex; align-items: center; gap: 0.5rem; } font-weight: 600;
#player-next { background: var(--bg-3); color: var(--fg); border: 1px solid var(--border); padding: 0.4rem 0.6rem; border-radius: 8px; cursor: pointer; } font-size: 0.82rem;
letter-spacing: 0.08em;
text-transform: uppercase;
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
color: var(--neon-cyan);
text-shadow: var(--glow-cyan);
}
#player-audio { flex: 1; min-width: 160px; filter: hue-rotate(200deg) saturate(1.2); }
.player-queue { display: flex; align-items: center; gap: 0.6rem; }
#player-queue-info { font-family: 'Orbitron', monospace; font-size: 0.72rem; }
#player-next {
background: transparent;
color: var(--neon-cyan);
border: 1px solid var(--neon-cyan);
padding: 0.45rem 0.7rem;
border-radius: 4px;
cursor: pointer;
box-shadow: var(--glow-cyan);
transition: all .15s;
}
#player-next:hover { background: var(--neon-cyan); color: #05060d; }
/* ---------- Boot sequence overlay ---------- */
#boot-overlay {
position: fixed;
inset: 0;
z-index: 999;
background: #05060d;
display: flex;
align-items: center;
justify-content: center;
font-family: 'Orbitron', 'Courier New', monospace;
color: var(--neon-cyan);
text-shadow: var(--glow-cyan);
transition: opacity .3s ease-out;
}
#boot-overlay.hidden { opacity: 0; pointer-events: none; }
#boot-overlay.gone { display: none; }
#boot-overlay .boot-inner {
max-width: 560px;
padding: 2rem;
white-space: pre;
font-size: 0.95rem;
line-height: 1.7;
}
#boot-overlay .boot-cursor {
display: inline-block;
width: 0.6em;
background: var(--neon-cyan);
margin-left: 2px;
animation: boot-blink 0.7s steps(1) infinite;
}
@keyframes boot-blink { 50% { opacity: 0; } }
/* ---------- Mobile ---------- */
@media (max-width: 720px) { @media (max-width: 720px) {
.player-bar { flex-wrap: wrap; } .player-bar { flex-wrap: wrap; }
.player-now { width: auto; flex: 1; } .player-now { width: auto; flex: 1; }
#player-viz { width: 56px; }
#player-audio { width: 100%; order: 3; } #player-audio { width: 100%; order: 3; }
.song-detail { flex-direction: column; align-items: flex-start; } .song-detail { flex-direction: column; align-items: flex-start; }
.song-detail-cover { width: 100%; height: auto; max-width: 300px; } .song-detail-cover { width: 100%; height: auto; max-width: 300px; aspect-ratio: 1 / 1; object-fit: cover; }
.hero h1 { font-size: 1.6rem; }
}
/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
.flash { animation: none; }
.card, .btn-primary, .btn-small, .btn-play, #player-next { transition: none; }
#boot-overlay { display: none; }
} }

199
public/js/bg-grid.js Normal file
View File

@ -0,0 +1,199 @@
// Synthwave horizon grid background. Three.js module.
import * as THREE from 'three';
const canvas = document.getElementById('bg-canvas');
if (canvas) {
const reduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
const scene = new THREE.Scene();
scene.fog = new THREE.Fog(0x05060d, 18, 80);
const camera = new THREE.PerspectiveCamera(70, 1, 0.1, 200);
camera.position.set(0, 2.2, 10);
camera.lookAt(0, 1.8, 0);
const renderer = new THREE.WebGLRenderer({ canvas, antialias: false, alpha: true });
renderer.setClearColor(0x000000, 0);
function resize() {
const w = window.innerWidth;
const h = window.innerHeight;
const dpr = Math.min(window.devicePixelRatio || 1, 1.5);
renderer.setPixelRatio(dpr);
renderer.setSize(w, h, false);
camera.aspect = w / h;
camera.updateProjectionMatrix();
}
resize();
window.addEventListener('resize', resize);
// ---------- Sunset backdrop (a large plane far behind the grid) ----------
const sunsetGeo = new THREE.PlaneGeometry(200, 120);
const sunsetMat = new THREE.ShaderMaterial({
uniforms: { uTime: { value: 0 } },
transparent: true,
depthWrite: false,
vertexShader: `
varying vec2 vUv;
void main() {
vUv = uv;
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
}
`,
fragmentShader: `
varying vec2 vUv;
uniform float uTime;
vec3 c1 = vec3(0.02, 0.01, 0.05); // deep space
vec3 c2 = vec3(0.22, 0.08, 0.36); // violet (dimmed)
vec3 c3 = vec3(0.40, 0.06, 0.34); // magenta (dimmed)
vec3 c4 = vec3(0.42, 0.26, 0.12); // amber (dimmed)
void main() {
float y = vUv.y;
// horizon around y = 0.45
vec3 col;
if (y < 0.45) {
col = mix(c1, c1 * 0.8, y / 0.45);
} else if (y < 0.58) {
col = mix(c4, c3, (y - 0.45) / 0.13);
} else if (y < 0.78) {
col = mix(c3, c2, (y - 0.58) / 0.20);
} else {
col = mix(c2, c1, (y - 0.78) / 0.22);
}
// subtle horizontal scan-bands over the sun
float band = sin((vUv.y - 0.45) * 90.0) * 0.5 + 0.5;
if (vUv.y > 0.46 && vUv.y < 0.58) {
float mask = smoothstep(0.58, 0.46, vUv.y);
col *= mix(1.0, 0.55, band * mask);
}
// Global darken so foreground text retains contrast
col *= 0.75;
gl_FragColor = vec4(col, 1.0);
}
`,
});
const sunset = new THREE.Mesh(sunsetGeo, sunsetMat);
sunset.position.set(0, 10, -60);
scene.add(sunset);
// ---------- Horizon line (thin cyan) ----------
const horizonGeo = new THREE.BufferGeometry();
horizonGeo.setAttribute(
'position',
new THREE.Float32BufferAttribute([-100, 5.5, -55, 100, 5.5, -55], 3),
);
const horizon = new THREE.Line(
horizonGeo,
new THREE.LineBasicMaterial({ color: 0x00e5ff, transparent: true, opacity: 0.9 }),
);
scene.add(horizon);
// ---------- Infinite recessing grid ----------
const GRID_SIZE = 200;
const GRID_DIVS = 40;
const gridGeo = buildGridGeometry(GRID_SIZE, GRID_DIVS);
const gridMat = new THREE.LineBasicMaterial({
color: 0x8f5bff,
transparent: true,
opacity: 0.85,
});
const grid = new THREE.LineSegments(gridGeo, gridMat);
grid.rotation.x = -Math.PI / 2;
grid.position.y = 0;
scene.add(grid);
function buildGridGeometry(size, divs) {
const verts = [];
const step = size / divs;
const half = size / 2;
for (let i = 0; i <= divs; i++) {
const p = -half + i * step;
// lines along X
verts.push(-half, p, 0, half, p, 0);
// lines along Y (which becomes Z after rotation)
verts.push(p, -half, 0, p, half, 0);
}
const geo = new THREE.BufferGeometry();
geo.setAttribute('position', new THREE.Float32BufferAttribute(verts, 3));
return geo;
}
// ---------- Beat / bass reactivity surface ----------
const state = {
beat: 0, // smoothed bass energy 0..1
scrollX: 0, // accumulated grid scroll on X
scrollZ: 0, // accumulated grid scroll on Z
dirAngle: 0, // current heading (radians, 0 = +Z toward camera)
targetAngle: 0, // target heading we're easing toward
nextTurnAt: performance.now() + 10000,
lastT: performance.now(),
visible: true,
};
function pickNewDirection() {
// Pick a random heading biased toward the forward hemisphere so the
// horizon remains in frame, then ease toward it over the next second.
const spread = Math.PI * 0.9; // ±~80° around forward
state.targetAngle = (Math.random() - 0.5) * spread;
state.nextTurnAt = performance.now() + 10000;
}
window.briTunesBg = {
setBeat(v) {
// called from player-viz.js
state.beat = Math.max(state.beat * 0.6, Math.min(1, v));
},
};
document.addEventListener('visibilitychange', () => {
state.visible = !document.hidden;
});
function frame() {
if (!state.visible) {
requestAnimationFrame(frame);
return;
}
const now = performance.now();
const dt = Math.min(0.05, (now - state.lastT) / 1000);
state.lastT = now;
// Decay beat
state.beat *= 0.92;
// Time to pick a new heading?
if (now >= state.nextTurnAt) pickNewDirection();
// Ease current angle toward target
const angleDelta = state.targetAngle - state.dirAngle;
state.dirAngle += angleDelta * Math.min(1, dt * 1.2);
// Scroll the grid in the current heading
const baseSpeed = 6;
const speed = baseSpeed * (1 + state.beat * 1.2);
state.scrollX += dt * speed * Math.sin(state.dirAngle);
state.scrollZ += dt * speed * Math.cos(state.dirAngle);
const step = (GRID_SIZE / GRID_DIVS);
// Keep scroll in [0, step) so the grid wraps seamlessly on both axes.
grid.position.x = ((state.scrollX % step) + step) % step;
grid.position.z = ((state.scrollZ % step) + step) % step;
// Pulse color on beat (violet -> magenta)
const mix = Math.min(1, state.beat);
gridMat.color.setRGB(0.56 + mix * 0.44, 0.35 - mix * 0.2, 0.94);
gridMat.opacity = 0.75 + mix * 0.25;
horizon.material.opacity = 0.7 + mix * 0.3;
sunsetMat.uniforms.uTime.value = now * 0.001;
renderer.render(scene, camera);
requestAnimationFrame(frame);
}
if (reduced) {
// Render a single still frame and stop.
renderer.render(scene, camera);
} else {
requestAnimationFrame(frame);
}
}

View File

@ -0,0 +1,49 @@
// Session-scoped "terminal boot" intro overlay.
const overlay = document.getElementById('boot-overlay');
const textEl = document.getElementById('boot-text');
if (overlay && textEl) {
const reduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
const alreadyBooted = sessionStorage.getItem('briTunes.booted') === '1';
if (reduced || alreadyBooted) {
overlay.classList.add('hidden', 'gone');
overlay.setAttribute('aria-hidden', 'true');
} else {
const lines = [
'BRI-TUNES OS v1.0',
'',
'> boot loader ........................ OK',
'> initializing audio subsystem ....... OK',
'> mounting /media .................... OK',
'> loading neon grid shader ........... OK',
'> linking synthwave subroutines ...... OK',
'> ready.',
];
const full = lines.join('\n');
let i = 0;
const cursor = '<span class="boot-cursor">&nbsp;</span>';
const charMs = 14;
let interval = null;
function finish() {
if (interval) { clearInterval(interval); interval = null; }
textEl.innerHTML = full + '\n' + cursor;
sessionStorage.setItem('briTunes.booted', '1');
setTimeout(() => {
overlay.classList.add('hidden');
setTimeout(() => overlay.classList.add('gone'), 350);
}, 220);
}
interval = setInterval(() => {
i += 1;
textEl.innerHTML = full.slice(0, i) + cursor;
if (i >= full.length) finish();
}, charMs);
const skip = () => finish();
overlay.addEventListener('click', skip, { once: true });
window.addEventListener('keydown', skip, { once: true });
}
}

123
public/js/player-viz.js Normal file
View File

@ -0,0 +1,123 @@
// Audio-reactive visualizer for the player bar.
// Uses Canvas2D (simpler + lighter than Three.js for a tiny radial visualizer).
// Feeds bass energy to the synthwave grid background via window.briTunesBg.
const canvas = document.getElementById('player-viz');
const audio = document.getElementById('player-audio');
if (canvas && audio) {
const reduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
const ctx = canvas.getContext('2d');
let audioCtx = null;
let analyser = null;
let freqData = null;
let hooked = false;
let rafId = null;
let visible = true;
function resize() {
const rect = canvas.getBoundingClientRect();
const dpr = Math.min(window.devicePixelRatio || 1, 2);
canvas.width = Math.max(1, Math.round(rect.width * dpr));
canvas.height = Math.max(1, Math.round(rect.height * dpr));
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
}
resize();
window.addEventListener('resize', resize);
function hookAudio() {
if (hooked) return;
try {
audioCtx = new (window.AudioContext || window.webkitAudioContext)();
const src = audioCtx.createMediaElementSource(audio);
analyser = audioCtx.createAnalyser();
analyser.fftSize = 128; // 64 freq bins
analyser.smoothingTimeConstant = 0.82;
freqData = new Uint8Array(analyser.frequencyBinCount);
src.connect(analyser);
analyser.connect(audioCtx.destination);
hooked = true;
} catch (err) {
console.warn('[player-viz] could not hook audio:', err.message);
}
}
window.addEventListener('briTunes:play', () => {
hookAudio();
if (audioCtx && audioCtx.state === 'suspended') audioCtx.resume();
if (!rafId && !reduced) rafId = requestAnimationFrame(frame);
});
audio.addEventListener('play', () => {
// Covers the case where native <audio> controls are used.
hookAudio();
if (audioCtx && audioCtx.state === 'suspended') audioCtx.resume();
if (!rafId && !reduced) rafId = requestAnimationFrame(frame);
});
document.addEventListener('visibilitychange', () => {
visible = !document.hidden;
});
function frame() {
rafId = requestAnimationFrame(frame);
if (!visible || !analyser) return;
analyser.getByteFrequencyData(freqData);
const w = canvas.clientWidth;
const h = canvas.clientHeight;
const cx = w / 2;
const cy = h / 2;
const innerR = Math.min(w, h) * 0.10; // small hub — no cover to ring
const maxBarLen = Math.min(w, h) * 0.40;
ctx.clearRect(0, 0, w, h);
const bars = 36;
const binStep = Math.floor(freqData.length / bars);
let bassSum = 0;
const bassBins = 6;
for (let i = 0; i < bassBins; i++) bassSum += freqData[i];
const bassEnergy = (bassSum / (bassBins * 255));
// Pass bass energy to the background grid animator.
if (window.briTunesBg && typeof window.briTunesBg.setBeat === 'function') {
window.briTunesBg.setBeat(bassEnergy);
}
// Draw each bar as a short line sprouting outward from innerR.
for (let i = 0; i < bars; i++) {
const v = freqData[i * binStep] / 255;
if (v < 0.02) continue;
const angle = (i / bars) * Math.PI * 2 - Math.PI / 2;
const len = v * maxBarLen;
const x1 = cx + Math.cos(angle) * innerR;
const y1 = cy + Math.sin(angle) * innerR;
const x2 = cx + Math.cos(angle) * (innerR + len);
const y2 = cy + Math.sin(angle) * (innerR + len);
// Color by frequency band: bass → magenta, mid → violet, high → cyan
let color;
if (i < bars * 0.25) color = 'rgba(255, 43, 214, 1)'; // magenta
else if (i < bars * 0.6) color = 'rgba(143, 91, 255, 1)'; // violet
else color = 'rgba(0, 229, 255, 1)'; // cyan
ctx.strokeStyle = color;
ctx.lineWidth = 2;
ctx.shadowColor = color;
ctx.shadowBlur = 8;
ctx.beginPath();
ctx.moveTo(x1, y1);
ctx.lineTo(x2, y2);
ctx.stroke();
}
ctx.shadowBlur = 0;
}
if (!reduced) {
// Idle ambient frame (does nothing until audio hooks up).
rafId = requestAnimationFrame(frame);
}
}

View File

@ -32,7 +32,9 @@
const cur = state.queue[state.index]; const cur = state.queue[state.index];
if (!cur) return; if (!cur) return;
audio.src = `/stream/${cur.id}`; audio.src = `/stream/${cur.id}`;
audio.play().catch((err) => console.warn('play failed', err)); audio.play()
.then(() => window.dispatchEvent(new CustomEvent('briTunes:play', { detail: cur })))
.catch((err) => console.warn('play failed', err));
render(); render();
} }

BIN
public/vendor/fonts/Inter.woff2 vendored Normal file

Binary file not shown.

BIN
public/vendor/fonts/Orbitron.woff2 vendored Normal file

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -3,17 +3,32 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="viewport" content="width=device-width,initial-scale=1">
<title><%= typeof title !== 'undefined' ? title : 'Tunes' %></title> <title><%= typeof title !== 'undefined' ? title : 'Bri-Tunes' %></title>
<link rel="preload" href="/static/vendor/fonts/Orbitron.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/static/vendor/fonts/Inter.woff2" as="font" type="font/woff2" crossorigin>
<link rel="stylesheet" href="/static/css/app.css"> <link rel="stylesheet" href="/static/css/app.css">
<script type="importmap">
{ "imports": { "three": "/static/vendor/three/three.module.min.js" } }
</script>
</head> </head>
<body> <body>
<canvas id="bg-canvas" aria-hidden="true"></canvas>
<div id="boot-overlay" aria-hidden="true">
<div class="boot-inner" id="boot-text"></div>
</div>
<%- include('partials/header') %> <%- include('partials/header') %>
<%- include('partials/flash') %> <%- include('partials/flash') %>
<main class="container"> <main class="container">
<%- body %> <%- body %>
</main> </main>
<%- include('partials/player') %> <%- include('partials/player') %>
<script src="/static/vendor/htmx.min.js" defer></script> <script src="/static/vendor/htmx.min.js" defer></script>
<script src="/static/js/player.js" defer></script> <script src="/static/js/player.js" defer></script>
<script type="module" src="/static/js/bg-grid.js"></script>
<script type="module" src="/static/js/player-viz.js"></script>
<script type="module" src="/static/js/boot-sequence.js"></script>
</body> </body>
</html> </html>

View File

@ -1,12 +1,13 @@
<div id="player-bar" class="player-bar" aria-label="Audio player"> <div id="player-bar" class="player-bar" aria-label="Audio player">
<div class="player-now"> <div class="player-now">
<img id="player-cover" src="/static/vendor/cover-placeholder.svg" alt="" /> <img id="player-cover" src="/static/vendor/cover-placeholder.svg" alt="" />
<canvas id="player-viz" aria-hidden="true"></canvas>
<div class="player-meta"> <div class="player-meta">
<div id="player-title">Nothing playing</div> <div id="player-title">Nothing playing</div>
<div id="player-artist" class="muted"></div> <div id="player-artist" class="muted"></div>
</div> </div>
</div> </div>
<audio id="player-audio" preload="metadata" controls></audio> <audio id="player-audio" preload="metadata" controls crossorigin="anonymous"></audio>
<div class="player-queue"> <div class="player-queue">
<span id="player-queue-info" class="muted"></span> <span id="player-queue-info" class="muted"></span>
<button id="player-next" type="button" title="Next">⏭</button> <button id="player-next" type="button" title="Next">⏭</button>