2025-10-15 17:28:45 +08:00
|
|
|
.viewport {
|
|
|
|
|
position: relative;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
background: #1a1a1f;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-toolbar {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
2025-11-23 21:45:10 +08:00
|
|
|
padding: 4px 6px;
|
2025-10-15 17:28:45 +08:00
|
|
|
background: var(--color-bg-elevated);
|
|
|
|
|
border-bottom: 1px solid var(--color-border-default);
|
|
|
|
|
flex-shrink: 0;
|
2025-11-23 21:45:10 +08:00
|
|
|
gap: 4px;
|
2025-11-27 20:42:46 +08:00
|
|
|
z-index: var(--z-index-above);
|
2025-11-23 21:45:10 +08:00
|
|
|
height: 36px;
|
2025-10-15 17:28:45 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-toolbar-left {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
2025-11-23 21:45:10 +08:00
|
|
|
gap: 2px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-toolbar-center {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 2px;
|
|
|
|
|
position: absolute;
|
|
|
|
|
left: 50%;
|
|
|
|
|
transform: translateX(-50%);
|
2025-10-15 17:28:45 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-toolbar-right {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
2025-11-23 21:45:10 +08:00
|
|
|
gap: 2px;
|
2025-10-15 17:28:45 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-btn {
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
2025-11-23 21:45:10 +08:00
|
|
|
width: 26px;
|
|
|
|
|
height: 26px;
|
2025-10-15 17:28:45 +08:00
|
|
|
background: transparent;
|
|
|
|
|
border: 1px solid transparent;
|
2025-11-23 21:45:10 +08:00
|
|
|
border-radius: 3px;
|
2025-10-15 17:28:45 +08:00
|
|
|
color: var(--color-text-secondary);
|
|
|
|
|
cursor: pointer;
|
2025-11-23 21:45:10 +08:00
|
|
|
transition: all 0.1s ease;
|
2025-10-15 17:28:45 +08:00
|
|
|
padding: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-btn:hover {
|
2025-11-23 21:45:10 +08:00
|
|
|
background: rgba(255, 255, 255, 0.08);
|
2025-10-15 17:28:45 +08:00
|
|
|
color: var(--color-text-primary);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-btn.active {
|
|
|
|
|
background: var(--color-primary);
|
|
|
|
|
color: var(--color-text-inverse);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-btn:active {
|
2025-11-23 21:45:10 +08:00
|
|
|
transform: scale(0.96);
|
2025-10-15 17:28:45 +08:00
|
|
|
}
|
|
|
|
|
|
2025-11-23 14:49:37 +08:00
|
|
|
.viewport-btn:disabled {
|
2025-11-23 21:45:10 +08:00
|
|
|
opacity: 0.35;
|
2025-11-23 14:49:37 +08:00
|
|
|
cursor: not-allowed;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-btn:disabled:hover {
|
|
|
|
|
background: transparent;
|
|
|
|
|
color: var(--color-text-secondary);
|
2025-11-23 21:45:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Button group styling */
|
|
|
|
|
.viewport-btn-group {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
background: rgba(0, 0, 0, 0.2);
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
padding: 2px;
|
|
|
|
|
gap: 1px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-btn-group .viewport-btn {
|
|
|
|
|
border-radius: 2px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Playback controls special styling */
|
|
|
|
|
.viewport-playback {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
background: rgba(0, 0, 0, 0.3);
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
padding: 2px 4px;
|
|
|
|
|
gap: 2px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-playback .viewport-btn {
|
|
|
|
|
width: 28px;
|
|
|
|
|
height: 28px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-playback .viewport-btn.play-btn {
|
|
|
|
|
color: #4ade80;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-playback .viewport-btn.play-btn:hover {
|
|
|
|
|
background: rgba(74, 222, 128, 0.15);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-playback .viewport-btn.play-btn.active {
|
|
|
|
|
background: #4ade80;
|
|
|
|
|
color: #000;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-playback .viewport-btn.pause-btn.active {
|
|
|
|
|
background: #fbbf24;
|
|
|
|
|
color: #000;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-playback .viewport-btn.stop-btn:hover {
|
|
|
|
|
background: rgba(239, 68, 68, 0.15);
|
|
|
|
|
color: #ef4444;
|
2025-11-23 14:49:37 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Dropdown */
|
|
|
|
|
.viewport-dropdown {
|
|
|
|
|
position: relative;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-dropdown .viewport-btn {
|
|
|
|
|
width: auto;
|
|
|
|
|
padding: 0 8px;
|
|
|
|
|
gap: 4px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-dropdown-menu {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 100%;
|
|
|
|
|
left: 0;
|
|
|
|
|
margin-top: 4px;
|
|
|
|
|
min-width: 160px;
|
|
|
|
|
background: var(--color-bg-elevated);
|
|
|
|
|
border: 1px solid var(--color-border-default);
|
|
|
|
|
border-radius: var(--radius-sm);
|
|
|
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
2025-11-27 20:42:46 +08:00
|
|
|
z-index: var(--z-index-dropdown);
|
2025-11-23 14:49:37 +08:00
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-dropdown-menu button {
|
|
|
|
|
width: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
padding: 8px 12px;
|
|
|
|
|
background: none;
|
|
|
|
|
border: none;
|
|
|
|
|
color: var(--color-text-primary);
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
text-align: left;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-dropdown-menu button:hover {
|
|
|
|
|
background: var(--color-bg-hover);
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-15 17:28:45 +08:00
|
|
|
.viewport-divider {
|
|
|
|
|
width: 1px;
|
2025-11-23 21:45:10 +08:00
|
|
|
height: 20px;
|
|
|
|
|
background: rgba(255, 255, 255, 0.1);
|
|
|
|
|
margin: 0 6px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Coordinate system indicator */
|
|
|
|
|
.viewport-coord-indicator {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 4px;
|
|
|
|
|
padding: 2px 6px;
|
|
|
|
|
background: rgba(0, 0, 0, 0.2);
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
font-size: 10px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: var(--color-text-secondary);
|
|
|
|
|
text-transform: uppercase;
|
|
|
|
|
letter-spacing: 0.5px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-coord-indicator.world {
|
|
|
|
|
color: #60a5fa;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-coord-indicator.local {
|
|
|
|
|
color: #fbbf24;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Zoom indicator */
|
|
|
|
|
.viewport-zoom {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
padding: 2px 6px;
|
|
|
|
|
font-size: 10px;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
color: var(--color-text-secondary);
|
|
|
|
|
font-variant-numeric: tabular-nums;
|
2025-10-15 17:28:45 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-canvas {
|
|
|
|
|
flex: 1;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
display: block;
|
2025-10-15 18:08:55 +08:00
|
|
|
cursor: grab;
|
2025-10-15 17:28:45 +08:00
|
|
|
background: #1a1a1f;
|
2025-10-15 18:08:55 +08:00
|
|
|
user-select: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-canvas:active {
|
|
|
|
|
cursor: grabbing;
|
2025-10-15 17:28:45 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-stats {
|
|
|
|
|
position: absolute;
|
|
|
|
|
bottom: 12px;
|
|
|
|
|
right: 12px;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 4px;
|
|
|
|
|
background: rgba(0, 0, 0, 0.8);
|
|
|
|
|
backdrop-filter: blur(8px);
|
|
|
|
|
border: 1px solid var(--color-border-subtle);
|
|
|
|
|
border-radius: var(--radius-sm);
|
|
|
|
|
padding: 8px 12px;
|
|
|
|
|
font-family: var(--font-family-mono);
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
pointer-events: none;
|
2025-11-27 20:42:46 +08:00
|
|
|
z-index: var(--z-index-above);
|
2025-10-15 17:28:45 +08:00
|
|
|
animation: fadeIn 0.2s ease-out;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@keyframes fadeIn {
|
|
|
|
|
from {
|
|
|
|
|
opacity: 0;
|
|
|
|
|
transform: translateY(4px);
|
|
|
|
|
}
|
|
|
|
|
to {
|
|
|
|
|
opacity: 1;
|
|
|
|
|
transform: translateY(0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-stat {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-stat-label {
|
|
|
|
|
color: var(--color-text-secondary);
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-stat-value {
|
|
|
|
|
color: var(--color-primary);
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
font-variant-numeric: tabular-nums;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport:fullscreen {
|
|
|
|
|
background: #000;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport:fullscreen .viewport-canvas {
|
|
|
|
|
background: #000;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.viewport-canvas:focus {
|
|
|
|
|
outline: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
|
|
|
.viewport-btn {
|
|
|
|
|
transition: none;
|
|
|
|
|
}
|
|
|
|
|
}
|