682 lines
12 KiB
CSS
682 lines
12 KiB
CSS
:root {
|
|
--primary-color: #2196f3;
|
|
--danger-color: #f44336;
|
|
--success-color: #4caf50;
|
|
--background-color: #f5f5f5;
|
|
--border-radius: 8px;
|
|
--card-background: #ffffff;
|
|
--text-color: #333333;
|
|
--secondary-text-color: #666666;
|
|
--border-color: #dddddd;
|
|
--hover-color: #1976d2;
|
|
--danger-hover-color: #d32f2f;
|
|
--disabled-color: #cccccc;
|
|
--status-background: #f8f9fa;
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
}
|
|
|
|
/* 允许输入框和文本区域选择文本 */
|
|
input,
|
|
textarea,
|
|
select {
|
|
user-select: text !important;
|
|
-webkit-user-select: text !important;
|
|
-moz-user-select: text !important;
|
|
-ms-user-select: text !important;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
|
|
background-color: #000;
|
|
color: var(--text-color);
|
|
line-height: 1.6;
|
|
overflow: hidden;
|
|
height: 100vh;
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
}
|
|
|
|
.app-container {
|
|
width: 100vw;
|
|
height: 100vh;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* Connection overlay (shown when not connected) */
|
|
.connection-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: rgba(0, 0, 0, 0.8);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 1000;
|
|
}
|
|
|
|
.connection-panel {
|
|
background: var(--card-background);
|
|
border-radius: var(--border-radius);
|
|
padding: 24px;
|
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
|
|
max-width: 400px;
|
|
width: 90%;
|
|
}
|
|
|
|
.connection-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.connection-title-with-icon {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
}
|
|
|
|
.connection-icon {
|
|
width: 32px;
|
|
height: 32px;
|
|
object-fit: contain;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.connection-header h2 {
|
|
margin: 0;
|
|
color: #444;
|
|
font-weight: 500;
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
/* Status LED indicator */
|
|
.status-indicator {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.status-led {
|
|
width: 16px;
|
|
height: 16px;
|
|
border-radius: 50%;
|
|
background-color: #ccc;
|
|
box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.status-led-off {
|
|
background-color: #f44336;
|
|
box-shadow: 0 0 8px rgba(244, 67, 54, 0.5);
|
|
}
|
|
|
|
.status-led-on {
|
|
background-color: #4caf50;
|
|
box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
|
|
animation: pulse 2s infinite;
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0%, 100% {
|
|
opacity: 1;
|
|
}
|
|
50% {
|
|
opacity: 0.7;
|
|
}
|
|
}
|
|
|
|
/* Option styles */
|
|
.option {
|
|
display: flex;
|
|
align-items: center;
|
|
margin-bottom: 15px;
|
|
gap: 10px;
|
|
}
|
|
|
|
.option.compact {
|
|
margin-bottom: 8px;
|
|
gap: 8px;
|
|
}
|
|
|
|
.option label {
|
|
width: 120px;
|
|
color: var(--secondary-text-color);
|
|
font-weight: 500;
|
|
font-size: 14px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.option.compact label {
|
|
width: auto;
|
|
min-width: 80px;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.option input {
|
|
flex: 1;
|
|
padding: 10px 12px;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 4px;
|
|
font-size: 14px;
|
|
transition: border-color 0.2s, box-shadow 0.2s;
|
|
min-width: 0;
|
|
}
|
|
|
|
.option input:focus {
|
|
outline: none;
|
|
border-color: var(--primary-color);
|
|
box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
|
|
}
|
|
|
|
.option select {
|
|
padding: 8px 12px;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 4px;
|
|
font-size: 13px;
|
|
background-color: var(--card-background);
|
|
height: 36px;
|
|
box-sizing: border-box;
|
|
transition: border-color 0.2s, box-shadow 0.2s;
|
|
}
|
|
|
|
.option select:focus {
|
|
outline: none;
|
|
border-color: var(--primary-color);
|
|
box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
|
|
}
|
|
|
|
.option select:disabled {
|
|
background-color: #f3f3f3;
|
|
color: #999;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.actions {
|
|
display: flex;
|
|
gap: 10px;
|
|
margin-top: 20px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
button {
|
|
padding: 10px 20px;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-weight: 500;
|
|
color: white;
|
|
background-color: var(--primary-color);
|
|
transition: background-color 0.2s, transform 0.1s;
|
|
font-size: 14px;
|
|
min-width: 80px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
button:hover:not(:disabled) {
|
|
background-color: var(--hover-color);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
button:active:not(:disabled) {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
button:disabled {
|
|
background-color: var(--disabled-color);
|
|
cursor: not-allowed;
|
|
transform: none;
|
|
}
|
|
|
|
#disconnect {
|
|
background-color: var(--danger-color);
|
|
}
|
|
|
|
#disconnect:hover:not(:disabled) {
|
|
background-color: var(--danger-hover-color);
|
|
}
|
|
|
|
/* Video display */
|
|
#media {
|
|
width: 100%;
|
|
height: 100%;
|
|
position: relative;
|
|
background: #000;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.video-container {
|
|
position: relative;
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
video {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: contain;
|
|
display: block;
|
|
}
|
|
|
|
/* Connected overlay (shown when connected) */
|
|
.connected-overlay {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
z-index: 100;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.connected-panel {
|
|
background: rgba(0, 0, 0, 0.7);
|
|
backdrop-filter: blur(10px);
|
|
padding: 12px 16px;
|
|
pointer-events: auto;
|
|
position: relative;
|
|
}
|
|
|
|
.connected-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.connected-header .status-indicator {
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.connected-controls-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
flex-wrap: wrap;
|
|
flex: 1;
|
|
}
|
|
|
|
.connected-header .option.compact {
|
|
margin-bottom: 0;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.control-buttons {
|
|
display: flex;
|
|
gap: 8px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.control-btn {
|
|
padding: 6px 12px;
|
|
background-color: var(--primary-color);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
height: 36px;
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
.control-btn:hover {
|
|
background-color: var(--hover-color);
|
|
}
|
|
|
|
/* Top right controls (status and disconnect button) */
|
|
.top-right-controls {
|
|
position: absolute;
|
|
top: 12px;
|
|
right: 12px;
|
|
z-index: 200;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.connection-status-group {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
background: rgba(0, 0, 0, 0.6);
|
|
backdrop-filter: blur(10px);
|
|
padding: 6px 12px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.connection-status-label {
|
|
color: white;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.top-right-controls .status-indicator {
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* Disconnect button in top right corner */
|
|
.connected-overlay .disconnect-btn-top-right {
|
|
padding: 8px 16px;
|
|
background-color: var(--danger-color);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
height: 36px;
|
|
transition: background-color 0.2s;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
.disconnect-btn-top-right:hover {
|
|
background-color: var(--danger-hover-color);
|
|
}
|
|
|
|
.disconnect-btn-top-right:active {
|
|
transform: translateY(1px);
|
|
}
|
|
|
|
/* Virtual mouse related styles */
|
|
#virtual-mouse {
|
|
position: absolute;
|
|
bottom: 20px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
z-index: 10;
|
|
padding: 8px;
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
border-radius: 10px;
|
|
touch-action: none;
|
|
min-width: 320px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
|
|
transition: background-color 0.2s, padding 0.3s ease;
|
|
}
|
|
|
|
#virtual-mouse.dragging {
|
|
transition: none;
|
|
}
|
|
|
|
#virtual-mouse.minimized {
|
|
background-color: rgba(0, 0, 0, 0.7);
|
|
padding: 6px;
|
|
}
|
|
|
|
.virtual-mouse-row {
|
|
display: flex;
|
|
align-items: stretch;
|
|
gap: 8px;
|
|
}
|
|
|
|
.virtual-mouse-btn {
|
|
flex: 1;
|
|
height: 54px;
|
|
border-radius: 8px;
|
|
border: 1px solid #fff;
|
|
background-color: rgba(255, 255, 255, 0.9);
|
|
color: #333;
|
|
font-weight: bold;
|
|
font-size: 14px;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
|
|
user-select: none;
|
|
touch-action: manipulation;
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
.virtual-mouse-btn:active {
|
|
background-color: rgba(200, 200, 200, 0.9);
|
|
}
|
|
|
|
.virtual-mouse-wheel {
|
|
width: 36px;
|
|
height: 54px;
|
|
border-radius: 8px;
|
|
background-color: #ddd;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
user-select: none;
|
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
.virtual-mouse-wheel:active {
|
|
background-color: #ccc;
|
|
}
|
|
|
|
.drag-handle {
|
|
position: absolute;
|
|
top: -10px;
|
|
right: -10px;
|
|
width: 30px;
|
|
height: 30px;
|
|
border-radius: 50%;
|
|
background-color: #4CAF50;
|
|
cursor: move;
|
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: white;
|
|
font-weight: bold;
|
|
font-size: 18px;
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
.drag-handle:hover {
|
|
background-color: #45a049;
|
|
}
|
|
|
|
.drag-handle::after {
|
|
content: "≡";
|
|
}
|
|
|
|
#virtual-mouse.minimized .drag-handle {
|
|
position: static;
|
|
width: 40px;
|
|
height: 40px;
|
|
}
|
|
|
|
/* Hide virtual mouse on desktop */
|
|
@media (hover: hover) and (pointer: fine) {
|
|
#virtual-mouse {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
/* Debug panel */
|
|
.debug-panel {
|
|
position: fixed;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
max-height: 40vh;
|
|
background: var(--card-background);
|
|
border-top: 2px solid var(--border-color);
|
|
z-index: 2000;
|
|
display: flex;
|
|
flex-direction: column;
|
|
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
|
|
}
|
|
|
|
.debug-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 12px 16px;
|
|
border-bottom: 1px solid var(--border-color);
|
|
background: var(--status-background);
|
|
}
|
|
|
|
.debug-header h3 {
|
|
margin: 0;
|
|
font-size: 16px;
|
|
color: #444;
|
|
}
|
|
|
|
.debug-header-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
}
|
|
|
|
.debug-close-btn {
|
|
padding: 6px 12px;
|
|
background-color: var(--danger-color);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
height: 32px;
|
|
transition: background-color 0.2s;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.debug-close-btn:hover {
|
|
background-color: var(--danger-hover-color);
|
|
}
|
|
|
|
.debug-log {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 12px 16px;
|
|
font-family: monospace;
|
|
font-size: 12px;
|
|
white-space: pre-wrap;
|
|
background: #1e1e1e;
|
|
color: #d4d4d4;
|
|
min-height: 150px;
|
|
max-height: calc(40vh - 120px);
|
|
}
|
|
|
|
.debug-input {
|
|
display: flex;
|
|
gap: 8px;
|
|
padding: 12px 16px;
|
|
border-top: 1px solid var(--border-color);
|
|
background: var(--status-background);
|
|
}
|
|
|
|
.debug-input input {
|
|
flex: 1;
|
|
padding: 8px 12px;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 4px;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.debug-input input:focus {
|
|
outline: none;
|
|
border-color: var(--primary-color);
|
|
box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
|
|
}
|
|
|
|
.debug-toggle {
|
|
position: fixed;
|
|
bottom: 20px;
|
|
right: 20px;
|
|
z-index: 1500;
|
|
padding: 8px 16px;
|
|
background-color: rgba(0, 0, 0, 0.7);
|
|
color: white;
|
|
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
border-radius: 20px;
|
|
font-size: 12px;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.debug-toggle:hover {
|
|
background-color: rgba(0, 0, 0, 0.9);
|
|
}
|
|
|
|
/* Scrollbar styling */
|
|
.debug-log::-webkit-scrollbar {
|
|
width: 8px;
|
|
}
|
|
|
|
.debug-log::-webkit-scrollbar-track {
|
|
background: #1e1e1e;
|
|
}
|
|
|
|
.debug-log::-webkit-scrollbar-thumb {
|
|
background: #555;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.debug-log::-webkit-scrollbar-thumb:hover {
|
|
background: #777;
|
|
}
|
|
|
|
/* Focus styles for accessibility */
|
|
button:focus,
|
|
input:focus,
|
|
select:focus {
|
|
outline: 2px solid var(--primary-color);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
/* Mobile responsive */
|
|
@media (max-width: 768px) {
|
|
.connection-panel {
|
|
padding: 20px;
|
|
max-width: 90%;
|
|
}
|
|
|
|
.option {
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.option label {
|
|
width: 100%;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.connected-header {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
}
|
|
|
|
.connected-header .option.compact {
|
|
min-width: 100%;
|
|
}
|
|
|
|
.control-buttons {
|
|
width: 100%;
|
|
}
|
|
|
|
.control-btn {
|
|
flex: 1;
|
|
}
|
|
}
|