Files
tv-adb-remote/public/styles.css
T
Claude 6db1db70a0 Add local ADB web remote for Android TV
Node/Express server shells out to adb (connect/pair/keyevent/text/app
launch) and serves a mobile-first installable PWA remote: power, mute,
input switch, volume/channel rockers, D-pad, media transport, text
entry, and one-tap streaming app launch. Supports multiple saved TVs
and the Android 11+ wireless-debugging pairing flow.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RSVyYcrjrbmrMKT85G4fyn
2026-09-26 12:40:01 +00:00

357 lines
5.9 KiB
CSS

:root {
--bg: #0b0d12;
--surface: #161a23;
--surface-raised: #1e2430;
--accent: #58d68d;
--accent-dim: #2e3a4a;
--text: #eef1f6;
--text-dim: #8a93a3;
--danger: #e0605a;
--radius: 20px;
color-scheme: dark;
}
* {
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
}
html, body {
height: 100%;
}
body {
margin: 0;
background: var(--bg);
color: var(--text);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
display: flex;
flex-direction: column;
min-height: 100dvh;
overscroll-behavior: none;
user-select: none;
}
.topbar {
display: flex;
align-items: center;
justify-content: space-between;
padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 8px;
gap: 8px;
}
.device-picker {
display: flex;
align-items: center;
gap: 8px;
flex: 1;
min-width: 0;
}
#deviceSelect {
flex: 1;
min-width: 0;
background: var(--surface);
color: var(--text);
border: none;
border-radius: 12px;
padding: 10px 12px;
font-size: 15px;
}
.status-dot {
width: 10px;
height: 10px;
border-radius: 50%;
background: var(--text-dim);
flex-shrink: 0;
}
.status-dot.online { background: var(--accent); }
.status-dot.offline { background: var(--danger); }
.icon-btn {
background: var(--surface);
border: none;
color: var(--text);
font-size: 18px;
width: 42px;
height: 42px;
border-radius: 12px;
}
.remote {
flex: 1;
display: flex;
flex-direction: column;
gap: 18px;
padding: 8px 20px calc(env(safe-area-inset-bottom, 0px) + 24px);
max-width: 420px;
width: 100%;
margin: 0 auto;
}
.btn {
background: var(--surface);
color: var(--text);
border: none;
border-radius: 16px;
font-size: 16px;
padding: 14px 10px;
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
transition: background 80ms ease, transform 80ms ease;
}
.btn:active {
background: var(--surface-raised);
transform: scale(0.96);
}
.row {
display: flex;
gap: 12px;
}
.row-top .btn-round {
flex: 1;
aspect-ratio: 1;
border-radius: 50%;
font-size: 22px;
}
.row-top .btn-round[data-key="POWER"] {
color: var(--danger);
}
.dpad {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: 1fr 1fr 1fr;
gap: 6px;
aspect-ratio: 1;
max-width: 280px;
margin: 0 auto;
width: 100%;
}
.dpad-up { grid-area: 1 / 2 / 2 / 3; border-radius: 20px 20px 6px 6px; }
.dpad-left { grid-area: 2 / 1 / 3 / 2; border-radius: 20px 6px 6px 20px; }
.dpad-center {
grid-area: 2 / 2 / 3 / 3;
border-radius: 50%;
background: var(--accent-dim);
font-weight: 600;
letter-spacing: 0.05em;
}
.dpad-right { grid-area: 2 / 3 / 3 / 4; border-radius: 6px 20px 20px 6px; }
.dpad-down { grid-area: 3 / 2 / 4 / 3; border-radius: 6px 6px 20px 20px; }
.row-nav .btn {
flex: 1;
font-size: 14px;
}
.row-vol-ch {
gap: 16px;
}
.rocker {
flex: 1;
background: var(--surface);
border-radius: 20px;
display: flex;
flex-direction: column;
align-items: center;
overflow: hidden;
}
.rocker-label {
font-size: 11px;
letter-spacing: 0.1em;
color: var(--text-dim);
padding-top: 10px;
}
.rocker-btn {
width: 100%;
background: transparent;
border-radius: 0;
font-size: 22px;
padding: 14px 0;
}
.rocker-btn:active {
background: var(--surface-raised);
}
.row-media .btn {
flex: 1;
font-size: 18px;
}
.row-search {
gap: 10px;
}
#searchInput {
flex: 1;
min-width: 0;
background: var(--surface);
color: var(--text);
border: none;
border-radius: 16px;
padding: 14px 16px;
font-size: 16px;
}
.row-search .btn {
flex: 0 0 auto;
padding: 14px 18px;
}
.apps {
display: flex;
flex-wrap: wrap;
gap: 10px;
justify-content: center;
}
.apps .btn {
flex: 1 1 calc(33% - 10px);
font-size: 13px;
padding: 12px 6px;
}
dialog {
border: none;
border-radius: var(--radius);
background: var(--surface);
color: var(--text);
width: min(420px, 92vw);
padding: 20px;
}
dialog::backdrop {
background: rgba(0, 0, 0, 0.6);
}
dialog h2 {
margin: 0 0 12px;
font-size: 18px;
}
.device-list {
list-style: none;
margin: 0 0 16px;
padding: 0;
display: flex;
flex-direction: column;
gap: 8px;
}
.device-list li {
display: flex;
align-items: center;
justify-content: space-between;
background: var(--surface-raised);
border-radius: 12px;
padding: 10px 12px;
gap: 8px;
}
.device-list .device-name {
font-weight: 600;
font-size: 14px;
}
.device-list .device-host {
font-size: 12px;
color: var(--text-dim);
}
.device-list .device-actions {
display: flex;
gap: 6px;
}
.device-list button {
background: var(--accent-dim);
color: var(--text);
border: none;
border-radius: 8px;
padding: 8px 10px;
font-size: 12px;
}
.device-list button.danger {
background: transparent;
color: var(--danger);
}
.add-device-form, .pair-form {
display: flex;
flex-direction: column;
gap: 8px;
margin-top: 8px;
}
.add-device-form input, .pair-form input {
background: var(--surface-raised);
border: none;
border-radius: 10px;
padding: 10px 12px;
color: var(--text);
font-size: 14px;
}
.pair-details {
margin-top: 14px;
font-size: 13px;
color: var(--text-dim);
}
.pair-details p {
font-size: 12px;
line-height: 1.4;
}
.settings-message {
min-height: 18px;
font-size: 13px;
color: var(--accent);
}
.settings-message.error {
color: var(--danger);
}
.btn-close {
width: 100%;
margin-top: 8px;
background: var(--accent-dim);
}
.toast {
position: fixed;
left: 50%;
bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
transform: translateX(-50%) translateY(20px);
background: var(--surface-raised);
color: var(--text);
padding: 10px 16px;
border-radius: 12px;
font-size: 13px;
opacity: 0;
pointer-events: none;
transition: opacity 150ms ease, transform 150ms ease;
max-width: 85vw;
text-align: center;
}
.toast.show {
opacity: 1;
transform: translateX(-50%) translateY(0);
}