Files
crossdesk-web-client/styles.css

279 lines
4.4 KiB
CSS

:root {
--primary-color: #2196f3;
--danger-color: #f44336;
--background-color: #f5f5f5;
--border-radius: 8px;
}
body {
margin: 0;
font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
background-color: var(--background-color);
color: #333;
}
.container {
max-width: 1280px;
margin: 0 auto;
padding: 20px;
display: flex;
flex-direction: column;
gap: 20px;
}
h1 {
text-align: center;
color: var(--primary-color);
margin-bottom: 10px;
}
/* Connection settings + status card */
.top-card {
display: flex;
flex-wrap: wrap;
gap: 20px;
}
.connection-card,
.status-card {
background: white;
border-radius: var(--border-radius);
padding: 20px;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
flex: 1 1 300px;
}
.connection-card h2,
.status-card h2 {
margin-top: 0;
color: #444;
}
.option {
display: flex;
align-items: center;
margin-bottom: 15px;
}
.option label {
width: 120px;
color: #666;
}
.option input {
flex: 1;
padding: 8px 12px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 14px;
}
/* Unify dropdown and button height and style */
.option select {
padding: 10px 12px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 14px;
background-color: #fff;
height: 40px;
/* Consistent visual height with buttons */
box-sizing: border-box;
}
.option select:disabled {
background-color: #f3f3f3;
color: #999;
cursor: not-allowed;
}
.actions {
display: flex;
gap: 10px;
}
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;
}
button:hover {
background-color: #1976d2;
}
button:disabled {
background-color: #ccc;
cursor: not-allowed;
}
#disconnect {
background-color: var(--danger-color);
}
#disconnect:hover {
background-color: #d32f2f;
}
/* Status display */
.status-item {
padding: 10px;
background: #f8f9fa;
border-radius: 4px;
border: 1px solid #ddd;
margin-bottom: 10px;
transition: background-color 0.5s;
}
/* Status change animation */
.status-update {
animation: flash 0.5s;
}
@keyframes flash {
0% {
background-color: #ffeb3b;
}
50% {
background-color: #f8f9fa;
}
100% {
background-color: #ffeb3b;
}
}
/* Video display */
#media {
background: #222;
border-radius: var(--border-radius);
padding: 20px;
position: relative;
}
video {
width: 100%;
border-radius: 4px;
}
#data-channel {
background: #f8f9fa;
border: 1px solid #ddd;
border-radius: 4px;
padding: 15px;
font-family: monospace;
height: 200px;
overflow-y: auto;
white-space: pre-wrap;
}
@media (max-width: 768px) {
.top-card {
flex-direction: column;
}
.option {
flex-wrap: wrap;
}
.option label {
width: 100%;
margin-bottom: 5px;
}
}
/* Virtual mouse related styles */
#video-container {
position: relative;
width: 100%;
}
#virtual-mouse {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
gap: 10px;
z-index: 10;
padding: 10px;
background-color: rgba(0, 0, 0, 0.5);
border-radius: 30px;
touch-action: none;
}
.virtual-mouse-btn {
width: 60px;
height: 60px;
border-radius: 50%;
border: 2px solid white;
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;
}
.virtual-mouse-btn:active {
background-color: rgba(200, 200, 200, 0.9);
transform: scale(0.95);
}
/* Control button styles */
.control-btn {
margin-left: 10px;
padding: 8px 12px;
background-color: var(--primary-color);
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
height: 40px;
box-sizing: border-box;
}
.control-btn:hover {
background-color: #1976d2;
}
/* Fullscreen styles */
.fullscreen {
position: fixed !important;
top: 0;
left: 0;
width: 100vw !important;
height: 100vh !important;
z-index: 9999;
padding: 0;
border-radius: 0;
}
.fullscreen #video-container {
width: 100%;
height: 100%;
}
.fullscreen video {
width: 100%;
height: 100%;
object-fit: contain;
}
/* Hide virtual mouse on desktop */
@media (hover: hover) and (pointer: fine) {
#virtual-mouse {
display: none;
}
}