:root { color-scheme: dark; font-family: Inter, ui-sans-serif, system-ui, sans-serif; background: #0b0f14; color: #edf3f8; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at 20% 0%, #172c3d 0, #0b0f14 42%); }
main { width: min(1100px, calc(100% - 32px)); margin: 32px auto; }
.connect { width: min(470px, 100%); margin: auto; padding: 42px; background: #111922; border: 1px solid #263442; border-radius: 22px; box-shadow: 0 28px 80px #0008; }
.eyebrow { color: #64d6b4; font-size: .73rem; font-weight: 800; letter-spacing: .16em; }
h1 { margin: 8px 0 10px; font-size: clamp(2rem, 6vw, 3.2rem); line-height: .98; }
.muted, .hint { color: #98a9b9; line-height: 1.55; }
form { display: grid; gap: 12px; margin-top: 28px; }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.panel-header h1 { margin-top: 0; }
.device-list { display: grid; gap: 10px; margin-top: 24px; }
.device { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; border: 1px solid #2a3a49; border-radius: 12px; background: #0b131b; }
.device-info { min-width: 0; }
.device-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-meta { color: #8193a3; font: .75rem/1.5 monospace; }
.device-state { color: #64d6b4; }
.device-state.offline { color: #8193a3; }
.device button { flex: 0 0 auto; padding: 10px 14px; }
.device button:disabled { cursor: not-allowed; filter: grayscale(1); opacity: .45; }
.refresh { width: 100%; margin-top: 10px; }
label { font-size: .86rem; font-weight: 700; }
input { width: 100%; border: 1px solid #334657; border-radius: 12px; background: #091017; color: white; padding: 16px; font: 700 1.4rem/1 monospace; letter-spacing: .12em; outline: none; }
input:focus { border-color: #64d6b4; box-shadow: 0 0 0 3px #64d6b422; }
button { border: 0; border-radius: 12px; padding: 14px 18px; background: #64d6b4; color: #07100d; font-weight: 800; cursor: pointer; }
button:hover { filter: brightness(1.08); }
.status { min-height: 1.5em; margin: 18px 0 0; color: #b7c4ce; }
.status.error { color: #ff8e91; }
.hidden { display: none !important; }
.viewer { overflow: hidden; border: 1px solid #263442; border-radius: 16px; background: #05080b; box-shadow: 0 28px 80px #0009; }
.viewer header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: #111922; }
.dot { display: inline-block; width: 9px; height: 9px; margin-right: 9px; border-radius: 50%; background: #64d6b4; box-shadow: 0 0 12px #64d6b4; }
.danger { padding: 9px 14px; background: #3a2025; color: #ffb6b8; }
.session-actions { display: flex; gap: 8px; }
.monitor-control, .zoom-control { display: flex; align-items: center; gap: 7px; color: #9db1c3; font-size: 14px; }
.monitor-control select, .zoom-control select { width: auto; min-width: 105px; padding: 9px 30px 9px 10px; }
.screen-wrap { position: relative; min-height: 480px; display: grid; place-items: center; overflow: auto; outline: none; }
#screen { display: block; max-width: 100%; max-height: calc(100vh - 180px); user-select: none; cursor: default; }
.viewer:fullscreen { width: 100vw; max-width: none; height: 100vh; border: 0; border-radius: 0; display: grid; grid-template-rows: auto 1fr auto; background: #080d12; }
.viewer:fullscreen .screen-wrap { min-height: 0; }
.viewer:fullscreen #screen { max-height: calc(100vh - 165px); }
#waitingFrame { position: absolute; color: #71808d; }
.toolbar { padding: 9px 16px 14px; background: #111922; }
.hint { margin: 0 0 9px; font-size: .8rem; }
.text-form { display: flex; gap: 8px; margin: 0; }
.text-form input { flex: 1; padding: 10px 12px; font: inherit; letter-spacing: normal; }
.text-form button { padding: 10px 16px; }
.file-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 9px; }
.secondary { padding: 9px 13px; background: #263442; color: #dce7ef; }
#transferStatus { color: #98a9b9; font-size: .8rem; }
#remoteFiles { max-width: 260px; padding: 9px; border: 1px solid #334657; border-radius: 9px; background: #091017; color: #edf3f8; }
@media (max-width: 600px) { .connect { padding: 28px 22px; } .screen-wrap { min-height: 280px; } .viewer header { align-items: flex-start; } .session-actions { flex-wrap: wrap; justify-content: flex-end; } }
