diff --git a/index.html b/index.html index 8637c4f..363ce55 100644 --- a/index.html +++ b/index.html @@ -142,23 +142,75 @@ .results-table { width: 100%; border-collapse: collapse; - margin: 20px 0; + margin: calc(var(--spacing-unit) * 2) 0; + background: var(--color-surface); + border-radius: var(--radius); + overflow: hidden; + box-shadow: var(--shadow-md); } + .results-table th, .results-table td { - padding: 8px 12px; + padding: calc(var(--spacing-unit) * 2); text-align: left; - border-bottom: 1px solid #333; + border-bottom: 1px solid var(--color-border); } + .results-table th { - background: #222; - color: #00ff88; + background: var(--color-surface-elevated); + color: var(--color-accent-primary); + font-weight: 600; + font-size: 12px; + letter-spacing: 0.05em; + text-transform: uppercase; } - .results-table tr:hover { - background: #1a1a1a; + + .results-table .duration-col, + .results-table .tracks-col { + width: 80px; + text-align: center; } + + .results-table tbody tr { + cursor: pointer; + transition: background 150ms ease; + } + + .results-table tbody tr:hover { + background: rgba(255, 255, 255, 0.05); + } + + .results-table tbody tr:last-child td { + border-bottom: none; + } + .results-table tr.selected { - background: #2a2a2a; + background: rgba(0, 255, 136, 0.12); + } + + .results-table tr.selected td:first-child { + border-left: 4px solid var(--color-accent-primary); + padding-left: calc(var(--spacing-unit) * 2 - 4px); + } + + @media (max-width: 640px) { + .results-table th, + .results-table td { + padding: calc(var(--spacing-unit) * 1.5); + font-size: 14px; + } + + .results-table th { + font-size: 11px; + } + + .results-table .tracks-col { + display: none; + } + + .results-table .duration-col { + width: 60px; + } } .confidence-bar { @@ -399,49 +451,72 @@ } .progress-bar-wrapper { position: relative; - height: 32px; + height: 44px; display: flex; align-items: center; + padding: calc(var(--spacing-unit) * 2) 0; } + .progress-bar { width: 100%; - height: 8px; + height: 6px; -webkit-appearance: none; appearance: none; - background: rgba(255, 255, 255, 0.1); - border-radius: 4px; + background: transparent; + border-radius: 3px; outline: none; cursor: pointer; position: relative; z-index: 2; } + + .progress-bar::-webkit-slider-runnable-track { + height: 6px; + background: rgba(255, 255, 255, 0.1); + border-radius: 3px; + } + .progress-bar::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; - width: 16px; - height: 16px; + width: 20px; + height: 20px; border-radius: 50%; - background: #ffaa44; + background: var(--color-accent-secondary); cursor: pointer; - box-shadow: 0 0 10px rgba(255, 170, 68, 0.5); + box-shadow: 0 0 8px rgba(255, 170, 68, 0.6), var(--shadow-sm); + margin-top: -7px; + transition: transform 100ms ease; } + + .progress-bar:active::-webkit-slider-thumb { + transform: scale(1.15); + } + + .progress-bar::-moz-range-track { + height: 6px; + background: rgba(255, 255, 255, 0.1); + border-radius: 3px; + } + .progress-bar::-moz-range-thumb { - width: 16px; - height: 16px; + width: 20px; + height: 20px; border-radius: 50%; - background: #ffaa44; + background: var(--color-accent-secondary); cursor: pointer; border: none; - box-shadow: 0 0 10px rgba(255, 170, 68, 0.5); + box-shadow: 0 0 8px rgba(255, 170, 68, 0.6), var(--shadow-sm); } + .progress-fill { position: absolute; left: 0; top: 50%; transform: translateY(-50%); - height: 8px; - background: linear-gradient(90deg, #ffaa44, rgba(255, 170, 68, 0.6)); - border-radius: 4px; + height: 6px; + background: linear-gradient(90deg, var(--color-accent-secondary), rgba(255, 170, 68, 0.5)); + border-radius: 3px; pointer-events: none; z-index: 1; width: 0%; @@ -485,11 +560,8 @@ Title - Source - Match - Duration - Tracks - + Duration + Tracks diff --git a/src/main.ts b/src/main.ts index 2a02605..fd4e4c3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -112,10 +112,13 @@ class MotifApp { const volume = parseFloat((e.target as HTMLInputElement).value); this.motifEngine.setVolume(volume); }); - this.motifProgressBar.addEventListener('input', (e) => { + // Use both input and change for iOS compatibility + const seekHandler = (e: Event) => { const progress = parseFloat((e.target as HTMLInputElement).value) / 100; this.handleMotifSeek(progress); - }); + }; + this.motifProgressBar.addEventListener('input', seekHandler); + this.motifProgressBar.addEventListener('change', seekHandler); this.nextResultBtn.addEventListener('click', () => this.handleNextResult()); } @@ -160,31 +163,27 @@ class MotifApp { private displayResults(): void { this.resultsBody.innerHTML = ''; - + this.searchResults.forEach((result, index) => { const row = document.createElement('tr'); if (index === this.selectedResultIndex) { row.classList.add('selected'); } - + row.innerHTML = ` ${result.title} - ${result.source} - -
-
-
- - ${result.parsed ? Math.round(result.parsed.durationSec) + 's' : '?'} - ${result.parsed ? result.parsed.tracks.length : '?'} - + ${result.parsed ? Math.round(result.parsed.durationSec) + 's' : '?'} + ${result.parsed ? result.parsed.tracks.length : '?'} `; - + + // Make entire row clickable + row.addEventListener('click', () => this.selectResult(index)); + this.resultsBody.appendChild(row); }); - + this.resultsSection.classList.add('visible'); - + // Auto-select first result if (this.searchResults.length > 0) { this.selectResult(0);