Files
KeySelector/public/styles.css
T

737 lines
22 KiB
CSS

:root, [data-theme="dark"] {
--bg: #0E0E14;
--surface: #16161E;
--surface-2: #1E1E28;
--border: #2A2A36;
--text: #ECECF2;
--text-dim: #7878A0;
--text-bright: #FFFFFF;
--key-current: #4F9D69; /* 4B = A-Dur green */
--bpm: #E0B423;
--match: #4F9D69;
--mic: #D62828;
--accent: #3B7DD8;
}
[data-theme="light"] {
--bg: #F4F4F8;
--surface: #FFFFFF;
--surface-2: #ECECF1;
--border: #DCDCE4;
--text: #1A1A22;
--text-dim: #6A6A78;
--text-bright: #000000;
--key-current: #2E7A48;
--bpm: #B88A1A;
--match: #2E7A48;
--mic: #C4202A;
--accent: #2B60B8;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
background: var(--bg);
color: var(--text);
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
-webkit-font-smoothing: antialiased;
transition: background-color .18s, color .18s;
}
body { padding: 24px 32px; min-height: 100vh; }
.container { max-width: 1600px; margin: 0 auto; }
/* Topbar */
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.topbar-left { display: flex; align-items: center; gap: 16px; }
.brand { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; letter-spacing: 0.3em; color: var(--text-bright); }
.audio-source-wrapper { display: flex; align-items: center; gap: 8px; }
.source-select {
background: var(--surface);
border: 1px solid var(--border);
color: var(--text);
font-family: 'JetBrains Mono', monospace;
font-size: 11px;
padding: 6px 12px;
border-radius: 6px;
cursor: pointer;
outline: none;
transition: border-color .15s;
}
.source-select:hover, .source-select:focus { border-color: var(--text-dim); }
.topbar-right { display: flex; align-items: center; gap: 16px; }
/* Live Audio Level Meter */
.audio-meter-container {
width: 50px; height: 10px;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: 4px;
overflow: hidden;
position: relative;
}
.audio-meter-bar {
height: 100%; width: 0%;
background: linear-gradient(90deg, #4F9D69, #E0B423, #D62828);
border-radius: 3px;
transition: width 0.08s ease;
}
.status { display: flex; align-items: center; gap: 8px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-dim); letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; transition: color 0.12s; }
.status:hover { color: var(--text); }
.status i { color: var(--mic); font-size: 14px; }
.status.active i { color: #4F9D69; }
.status.paused i { color: var(--text-dim); }
.theme-toggle {
background: none; border: 1px solid var(--border); border-radius: 4px;
padding: 5px 12px; color: var(--text-dim);
font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase;
cursor: pointer; transition: all .12s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--text-dim); }
/* Search Box Container */
.search-box-container {
position: relative;
margin-bottom: 20px;
z-index: 20;
}
.search-input-wrapper {
position: relative;
display: flex;
align-items: center;
}
.search-icon {
position: absolute; left: 16px;
color: var(--text-dim);
font-size: 14px;
}
#search-input {
width: 100%;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
padding: 12px 40px 12px 44px;
color: var(--text-bright);
font-family: 'Inter', sans-serif;
font-size: 14px;
outline: none;
transition: border-color .15s, box-shadow .15s;
}
#search-input:focus {
border-color: var(--accent);
box-shadow: 0 0 0 2px rgba(59, 125, 216, 0.2);
}
.search-clear {
position: absolute; right: 14px;
background: none; border: none;
color: var(--text-dim); font-size: 18px;
cursor: pointer; line-height: 1;
}
.search-clear:hover { color: var(--text-bright); }
/* Search Results Dropdown */
.search-results-dropdown {
position: absolute; top: calc(100% + 4px); left: 0; right: 0;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
box-shadow: 0 12px 32px rgba(0,0,0,0.4);
max-height: 380px;
overflow-y: auto;
z-index: 30;
}
.search-result-item {
display: flex; align-items: center; gap: 14px;
padding: 10px 16px;
cursor: pointer;
border-bottom: 1px solid var(--border);
transition: background .1s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--surface-2); }
.search-result-cover {
width: 44px; height: 44px; border-radius: 4px;
background: var(--surface-2); overflow: hidden; flex-shrink: 0;
}
.search-result-cover img { width: 100%; height: 100%; object-fit: cover; }
.search-result-info { flex: 1; min-width: 0; }
.search-result-title { font-size: 13px; font-weight: 600; color: var(--text-bright); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result-artist { font-size: 11px; color: var(--text-dim); }
.search-result-badges { display: flex; align-items: center; gap: 6px; }
.search-badge {
font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700;
padding: 3px 6px; border-radius: 3px; color: #fff;
}
.search-badge-local {
background: rgba(79, 157, 105, 0.15); color: #4F9D69; border: 1px solid #4F9D69;
}
.search-badge-bpm {
font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--bpm);
}
/* Hero */
.hero {
display: grid;
grid-template-columns: 240px 1fr;
gap: 24px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
padding: 24px;
position: relative;
overflow: hidden;
transition: grid-template-columns .3s ease, padding .3s ease, min-height .3s ease;
min-height: 280px;
}
.hero::before {
content: ''; position: absolute; left: 0; top: 0; bottom: 0;
width: 3px; background: var(--key-current);
transition: background-color .18s;
}
/* WHEEL expanded mode */
.hero.wheel-mode {
grid-template-columns: 1fr;
padding: 48px;
min-height: 600px;
}
.hero.wheel-mode .cover,
.hero.wheel-mode .info-top,
.hero.wheel-mode .info-mid { display: none; }
.hero.wheel-mode .info-bot { padding-top: 0; justify-content: center; }
.hero.wheel-mode .wheel-container { width: 100%; max-width: 520px; height: 520px; }
/* COVER expanded mode */
.hero.cover-mode { grid-template-columns: 1fr; min-height: 540px; }
.hero.cover-mode .info { display: none; }
.hero.cover-mode .cover {
width: 100%; max-width: 480px; margin: 0 auto;
aspect-ratio: 1; max-height: 460px;
}
@media (max-width: 760px) {
.hero { grid-template-columns: 1fr; }
}
.cover {
width: 100%; aspect-ratio: 1; max-height: 240px;
border-radius: 8px; background: var(--surface-2);
overflow: hidden; position: relative; cursor: pointer;
transition: transform .15s;
}
.cover:hover { transform: scale(1.01); }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover::after {
content: ''; position: absolute; inset: 0;
background: linear-gradient(135deg, rgba(79, 157, 105, 0.20), transparent 60%);
pointer-events: none;
}
.cover-placeholder {
position: absolute; inset: 0;
display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px;
font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text-dim);
letter-spacing: 0.2em; text-transform: uppercase;
}
.cover-placeholder .note { font-size: 32px; opacity: 0.3; }
.info { display: flex; flex-direction: column; min-width: 0; }
.info-top { display: flex; flex-direction: column; position: relative; }
.info-mid { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.info-bot { margin-top: auto; padding-top: 20px; display: flex; justify-content: flex-end; align-items: flex-end; min-height: 160px; }
.track-title { font-size: 28px; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; margin-bottom: 4px; color: var(--text-bright); }
.track-artist { font-size: 15px; color: var(--text-dim); }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.stat {
background: var(--surface); padding: 12px 14px;
cursor: pointer; transition: background .12s;
}
.stat:hover { background: var(--surface-2); }
.stat-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.stat-label { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-dim); }
.edit-btn { font-size: 10px; color: var(--text-dim); opacity: 0.6; transition: opacity .12s, color .12s; }
.stat:hover .edit-btn { opacity: 1; color: var(--accent); }
.stat-value { font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 700; font-feature-settings: 'tnum'; line-height: 1; }
.stat-value.k { color: var(--key-current); }
.stat-value.b { color: var(--bpm); }
.stat-value.m { color: var(--match); }
.stat-sub { font-size: 10px; color: var(--text-dim); margin-top: 4px; font-family: 'JetBrains Mono', monospace; }
.tags-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 4px 10px; border-radius: 4px; font-size: 11px; font-family: 'JetBrains Mono', monospace; letter-spacing: 0.04em; }
.tag-key { background: var(--key-current); color: #fff; font-weight: 700; }
.tag-genre { background: rgba(90, 138, 229, 0.13); color: #8AA8D8; border: 1px solid rgba(90, 138, 229, 0.32); }
[data-theme="light"] .tag-genre { background: rgba(52, 90, 156, 0.10); color: #345A9C; border-color: rgba(52, 90, 156, 0.28); }
.wheel-container {
width: 140px; height: 140px;
position: relative; cursor: pointer;
transition: transform .15s, width .3s ease, height .3s ease;
}
.wheel-container:hover { transform: scale(1.04); }
.wheel-container svg { width: 100%; height: 100%; display: block; }
.close-btn {
position: absolute; top: 12px; right: 12px;
width: 32px; height: 32px;
background: var(--surface-2); border: 1px solid var(--border);
border-radius: 50%; color: var(--text-dim);
font-size: 18px; cursor: pointer;
display: none; align-items: center; justify-content: center;
line-height: 1; z-index: 5;
transition: color .12s, border-color .12s;
}
.close-btn:hover { color: var(--text); border-color: var(--text-dim); }
.hero.wheel-mode .close-btn,
.hero.cover-mode .close-btn { display: flex; }
.section-title {
font-family: 'JetBrains Mono', monospace; font-size: 11px;
letter-spacing: 0.25em; text-transform: uppercase; color: var(--text-dim);
margin: 28px 0 12px;
}
.suggestions { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.sug {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px; padding: 10px;
display: flex; flex-direction: column; gap: 8px;
cursor: pointer;
transition: border-color .12s, transform .12s, box-shadow .12s;
}
.sug:hover { border-color: var(--text-dim); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
.sug-cover { width: 100%; aspect-ratio: 1; border-radius: 4px; background: var(--surface-2); overflow: hidden; position: relative; }
.sug-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sug-cover-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 20px; opacity: 0.25; }
.sug-meta { display: flex; justify-content: space-between; align-items: center; }
.sug-key { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 3px; color: #fff; letter-spacing: 0.04em; }
.sug-bpm { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-dim); }
.sug-title { font-size: 13px; font-weight: 500; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sug-artist { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text-dim); }
.sug-compat {
font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.12em;
text-transform: uppercase; color: var(--text-dim);
padding-top: 4px; border-top: 1px solid var(--border);
}
/* Modal */
.modal-overlay {
position: fixed; inset: 0;
background: rgba(0, 0, 0, 0.65);
backdrop-filter: blur(4px);
display: flex; align-items: center; justify-content: center;
z-index: 100; padding: 16px;
}
.modal-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
width: 100%; max-width: 440px;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
overflow: hidden;
animation: modalFadeIn .18s ease;
}
@keyframes modalFadeIn {
from { opacity: 0; transform: scale(0.96); }
to { opacity: 1; transform: scale(1); }
}
.modal-header {
display: flex; justify-content: space-between; align-items: center;
padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 15px; font-weight: 600; color: var(--text-bright); }
.modal-close {
background: none; border: none; font-size: 20px;
color: var(--text-dim); cursor: pointer; line-height: 1;
}
.modal-close:hover { color: var(--text-bright); }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.modal-desc { font-size: 12px; color: var(--text-dim); line-height: 1.4; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.1em; }
.form-input {
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: 6px;
padding: 10px 12px;
color: var(--text-bright);
font-family: 'JetBrains Mono', monospace;
font-size: 13px;
outline: none;
transition: border-color .15s;
}
.form-input:focus { border-color: var(--accent); }
.modal-footer {
display: flex; justify-content: flex-end; gap: 10px;
padding: 14px 20px; border-top: 1px solid var(--border);
background: var(--surface-2);
}
.btn {
padding: 8px 16px; border-radius: 6px; font-size: 12px; font-weight: 600;
cursor: pointer; transition: all .12s; border: none;
font-family: 'Inter', sans-serif;
}
.btn-secondary { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.btn-secondary:hover { border-color: var(--text-dim); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { opacity: 0.9; }
/* ---------------------------------------------------- */
/* TUNEBAT-STYLE EXTENSIONS: Previews, Attributes, Links */
/* ---------------------------------------------------- */
/* Cover Play Button Overlay */
.cover-play-btn {
position: absolute;
bottom: 12px;
right: 12px;
width: 44px;
height: 44px;
border-radius: 50%;
background: rgba(14, 14, 20, 0.78);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
border: 1.5px solid rgba(255, 255, 255, 0.3);
color: #fff;
font-size: 16px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
transition: all 0.18s ease;
z-index: 10;
}
.cover-play-btn:hover {
transform: scale(1.1);
background: var(--accent);
border-color: #fff;
}
.cover-play-btn.playing {
background: #4F9D69;
border-color: #5BE8B5;
animation: pulsePreview 1.5s infinite;
}
@keyframes pulsePreview {
0% { box-shadow: 0 0 0 0 rgba(79, 157, 105, 0.6); }
70% { box-shadow: 0 0 0 10px rgba(79, 157, 105, 0); }
100% { box-shadow: 0 0 0 0 rgba(79, 157, 105, 0); }
}
/* Track Header & External Action Links */
.info-header-row {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 16px;
flex-wrap: wrap;
}
.track-actions {
display: flex;
align-items: center;
gap: 6px;
flex-wrap: wrap;
}
.link-btn {
display: inline-flex;
align-items: center;
gap: 5px;
font-family: 'JetBrains Mono', monospace;
font-size: 10px;
font-weight: 600;
text-decoration: none;
padding: 5px 9px;
border-radius: 5px;
background: var(--surface-2);
border: 1px solid var(--border);
color: var(--text-dim);
transition: all 0.15s ease;
}
.link-btn:hover {
color: #fff;
border-color: var(--text-dim);
transform: translateY(-1px);
}
.link-spotify:hover {
background: #1DB954;
border-color: #1DB954;
color: #000;
}
.link-deezer:hover {
background: #A238FF;
border-color: #A238FF;
color: #fff;
}
.link-youtube:hover {
background: #FF0000;
border-color: #FF0000;
color: #fff;
}
/* Tunebat Audio Attributes Grid */
.attributes-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 8px;
margin-top: 4px;
}
@media (max-width: 900px) {
.attributes-grid {
grid-template-columns: repeat(2, 1fr);
}
}
.attr-card {
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: 6px;
padding: 8px 10px;
display: flex;
flex-direction: column;
justify-content: space-between;
gap: 6px;
}
.attr-header {
display: flex;
justify-content: space-between;
align-items: center;
}
.attr-label {
font-family: 'JetBrains Mono', monospace;
font-size: 9px;
letter-spacing: 0.15em;
color: var(--text-dim);
display: flex;
align-items: center;
gap: 4px;
}
.attr-value {
font-family: 'JetBrains Mono', monospace;
font-size: 12px;
font-weight: 700;
color: var(--text-bright);
}
.attr-energy { color: #E0B423; }
.attr-dance { color: #4F9D69; }
.attr-mood { color: #00E5FF; }
.attr-bar-track {
width: 100%;
height: 4px;
background: rgba(0, 0, 0, 0.25);
border-radius: 2px;
overflow: hidden;
}
.attr-bar-fill {
height: 100%;
border-radius: 2px;
transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.fill-energy { background: linear-gradient(90deg, #E0B423, #FF7582); }
.fill-dance { background: linear-gradient(90deg, #5BE8B5, #4F9D69); }
.fill-mood { background: linear-gradient(90deg, #00E5FF, #8B94F8); }
/* Suggestions Header & Filter Controls */
.suggestions-control-header {
margin: 32px 0 14px;
display: flex;
flex-direction: column;
gap: 12px;
}
.suggestions-title-group {
display: flex;
align-items: center;
gap: 12px;
}
.suggestions-count-badge {
font-family: 'JetBrains Mono', monospace;
font-size: 10px;
font-weight: 700;
padding: 2px 8px;
border-radius: 12px;
background: var(--surface-2);
border: 1px solid var(--border);
color: var(--text-dim);
}
.suggestions-filters {
display: flex;
align-items: center;
gap: 16px;
flex-wrap: wrap;
}
.filter-group {
display: flex;
align-items: center;
gap: 6px;
flex-wrap: wrap;
}
.filter-label {
font-family: 'JetBrains Mono', monospace;
font-size: 10px;
letter-spacing: 0.12em;
color: var(--text-dim);
text-transform: uppercase;
}
.filter-pill {
font-family: 'JetBrains Mono', monospace;
font-size: 10px;
padding: 4px 10px;
border-radius: 16px;
background: var(--surface);
border: 1px solid var(--border);
color: var(--text-dim);
cursor: pointer;
transition: all 0.14s ease;
outline: none;
}
.filter-pill:hover {
border-color: var(--text-dim);
color: var(--text-bright);
}
.filter-pill.active {
background: var(--surface-2);
border-color: var(--accent);
color: var(--text-bright);
font-weight: 700;
box-shadow: 0 0 0 1px var(--accent);
}
/* Suggestion Card Updates */
.sug-cover {
position: relative;
}
.sug-play-btn {
position: absolute;
bottom: 6px;
right: 6px;
width: 32px;
height: 32px;
border-radius: 50%;
background: rgba(0, 0, 0, 0.75);
border: 1px solid rgba(255, 255, 255, 0.3);
color: #fff;
font-size: 11px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
opacity: 0.85;
transition: all 0.15s ease;
z-index: 2;
}
.sug:hover .sug-play-btn {
opacity: 1;
transform: scale(1.05);
}
.sug-play-btn:hover {
background: var(--accent);
border-color: #fff;
transform: scale(1.15) !important;
}
.sug-play-btn.playing {
background: #4F9D69;
border-color: #5BE8B5;
opacity: 1;
animation: pulsePreview 1.5s infinite;
}
.sug-sub-stats {
display: flex;
align-items: center;
justify-content: space-between;
font-family: 'JetBrains Mono', monospace;
font-size: 10px;
color: var(--text-dim);
margin-top: 2px;
}
.sug-attr-pill {
display: inline-flex;
align-items: center;
gap: 3px;
padding: 1px 5px;
border-radius: 3px;
background: var(--surface-2);
border: 1px solid var(--border);
font-size: 9px;
font-weight: 600;
}
.sug-attr-energy { color: #E0B423; }
.sug-bottom-row {
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 4px;
border-top: 1px solid var(--border);
}
.sug-links {
display: flex;
align-items: center;
gap: 4px;
}
.sug-link-icon {
color: var(--text-dim);
font-size: 12px;
text-decoration: none;
transition: color 0.12s;
}
.sug-link-icon:hover { color: var(--text-bright); }
.sug-link-spotify:hover { color: #1DB954; }
.sug-link-deezer:hover { color: #A238FF; }
.sug-link-youtube:hover { color: #FF0000; }
/* Wheel Segment Interactive Hover */
.wheel-segment {
cursor: pointer;
}
.wheel-segment polygon {
transition: filter 0.15s ease, opacity 0.15s ease;
}
.wheel-segment:hover polygon {
filter: brightness(1.25);
}
.wheel-segment:hover text {
font-weight: 800;
}
/* Suggestions Notice Banner */
.sug-notice-banner {
grid-column: 1 / -1;
padding: 8px 12px;
background: var(--surface-2);
border: 1px solid var(--border);
border-left: 3px solid var(--accent);
border-radius: 6px;
font-size: 11px;
color: var(--text-bright);
font-family: 'JetBrains Mono', monospace;
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 6px;
}
/* Pitch Badges */
.sug-pitch-badge {
display: inline-block;
padding: 1px 5px;
border-radius: 4px;
font-size: 9px;
font-weight: 700;
margin-left: 4px;
}
.sug-pitch-badge.pitch-dj {
background: rgba(0, 229, 255, 0.15);
color: #00E5FF;
border: 1px solid rgba(0, 229, 255, 0.4);
}
.sug-pitch-badge.pitch-mid {
background: rgba(255, 193, 7, 0.15);
color: #FFC107;
border: 1px solid rgba(255, 193, 7, 0.4);
}
.sug-pitch-badge.pitch-far {
background: rgba(255, 87, 34, 0.15);
color: #FF7582;
border: 1px solid rgba(255, 87, 34, 0.4);
}