Files
planet/frontend/public/earth/css/toolbar.css
linkong fbca381512
Some checks failed
ci / backend (push) Has been cancelled
ci / frontend (push) Has been cancelled
ci / delivery (push) Has been cancelled
release / images (push) Has been cancelled
release: bump version to 0.62.0
2026-05-21 01:37:32 +08:00

574 lines
16 KiB
CSS

/* toolbar.css - orbital hub toolbar */
.earth-toolbar-group {
position: absolute;
bottom: 18px;
left: 50%;
transform: translateX(-50%);
display: flex;
align-items: center;
justify-content: center;
z-index: 200;
pointer-events: none;
}
.earth-toolbar-group,
.hud-panel {
transition:
top 0.45s ease,
right 0.45s ease,
bottom 0.45s ease,
left 0.45s ease,
transform 0.45s ease,
box-shadow 0.45s ease;
}
.earth-toolbar {
--toolbar-scale: var(--initial-toolbar-scale, 1);
--toolbar-orb-size: var(--initial-toolbar-orb-size, calc(46px * var(--toolbar-scale)));
--toolbar-hub-size: var(--initial-toolbar-hub-size, calc(58px * var(--toolbar-scale)));
--toolbar-arc-width: var(--initial-toolbar-arc-width, calc(420px * var(--toolbar-scale)));
--toolbar-arc-height: var(--initial-toolbar-arc-height, calc(160px * var(--toolbar-scale)));
--toolbar-inner-arc-width: var(--initial-toolbar-inner-arc-width, calc(260px * var(--toolbar-scale)));
--toolbar-inner-arc-height: var(--initial-toolbar-inner-arc-height, calc(56px * var(--toolbar-scale)));
--toolbar-light-rgb: 91, 186, 255;
--toolbar-light-intensity: 0.8;
--toolbar-light-size-ratio: 0.85;
--toolbar-glass-opacity: 0.07;
--toolbar-glass-blur: calc(16px * var(--toolbar-scale));
--toolbar-light-blur: calc(24px * var(--toolbar-scale));
--toolbar-outer-glow-blur: calc(16px * var(--toolbar-scale));
--toolbar-active-light-scale: 1.15;
position: relative;
width: min(620px, calc(100vw - 40px));
height: var(--initial-toolbar-height, calc(200px * var(--toolbar-scale)));
display: flex;
align-items: center;
justify-content: center;
background: transparent;
border: none;
box-shadow: none;
padding: 0;
pointer-events: none;
}
.earth-toolbar-cluster {
position: relative;
width: 100%;
height: 100%;
pointer-events: none;
}
.earth-toolbar-cluster::before {
content: "";
position: absolute;
left: 50%;
bottom: calc(14px * var(--toolbar-scale));
width: var(--toolbar-arc-width);
height: var(--toolbar-arc-height);
transform: translateX(-50%);
border-radius: 50%;
border: 1px solid rgba(145, 186, 255, 0.08);
border-bottom-color: transparent;
background:
radial-gradient(circle at 50% 100%, rgba(145, 186, 255, 0.05), transparent 58%);
opacity: 0.9;
mask: linear-gradient(180deg, rgba(0, 0, 0, 0.82), transparent 86%);
pointer-events: none;
}
.earth-toolbar-orb {
position: absolute;
left: 50%;
bottom: calc(30px * var(--toolbar-scale));
transform: translate(-50%, -50%);
--toolbar-button-size: var(--toolbar-orb-size);
}
.earth-toolbar-hub {
position: absolute;
left: 50%;
bottom: calc(8px * var(--toolbar-scale));
transform: translateX(-50%);
--toolbar-button-size: var(--toolbar-hub-size);
}
.earth-toolbar-orb,
.earth-toolbar-hub {
isolation: isolate;
}
.earth-toolbar-orb {
pointer-events: none;
opacity: 1;
transition:
transform 0.36s cubic-bezier(0.34, 1.15, 0.64, 1),
opacity 0.24s ease;
}
.earth-toolbar-cluster.is-expanded .earth-toolbar-orb {
transform: translate(calc(-50% + var(--orb-x)), calc(-50% + var(--orb-y)));
}
.earth-toolbar-cluster.is-collapsed .earth-toolbar-orb {
transform: translate(-50%, -50%) scale(0.42);
opacity: 0;
}
.earth-toolbar-orb > *,
.earth-toolbar-hub > * {
pointer-events: auto;
}
.earth-toolbar-orb::before,
.earth-toolbar-hub::before,
.earth-toolbar-orb::after,
.earth-toolbar-hub::after {
content: "";
position: absolute;
left: 50%;
top: 50%;
border-radius: 50%;
pointer-events: none;
transform: translate(-50%, -50%) scale(0.9);
transition:
opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
filter 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.earth-toolbar-orb::before,
.earth-toolbar-hub::before {
width: calc(var(--toolbar-button-size) * var(--toolbar-light-size-ratio));
height: calc(var(--toolbar-button-size) * var(--toolbar-light-size-ratio));
background:
radial-gradient(
circle,
rgba(var(--toolbar-light-rgb), var(--toolbar-light-intensity)) 0%,
rgba(var(--toolbar-light-rgb), 0.28) 28%,
rgba(var(--toolbar-light-rgb), 0) 72%
);
filter: blur(var(--toolbar-light-blur));
opacity: 0.12;
z-index: 0;
}
.earth-toolbar-orb::after,
.earth-toolbar-hub::after {
width: calc(var(--toolbar-button-size) + (24px * var(--toolbar-scale)));
height: calc(var(--toolbar-button-size) + (24px * var(--toolbar-scale)));
background:
radial-gradient(
circle,
rgba(var(--toolbar-light-rgb), calc(var(--toolbar-light-intensity) * 0.42)) 0%,
rgba(var(--toolbar-light-rgb), 0) 72%
);
filter: blur(var(--toolbar-outer-glow-blur));
opacity: 0;
z-index: -1;
}
.earth-toolbar-orb:hover::before,
.earth-toolbar-orb:focus-within::before,
.earth-toolbar-orb:has(> .liquid-glass-surface.active)::before,
.earth-toolbar-cluster.is-expanded .earth-toolbar-hub::before {
opacity: 1;
transform: translate(-50%, -50%) scale(var(--toolbar-active-light-scale));
filter: blur(calc(var(--toolbar-light-blur) * 0.85));
}
.earth-toolbar-orb:hover::after,
.earth-toolbar-orb:focus-within::after,
.earth-toolbar-orb:has(> .liquid-glass-surface.active)::after,
.earth-toolbar-cluster.is-expanded .earth-toolbar-hub::after {
opacity: 1;
transform: translate(-50%, -50%) scale(1.08);
}
.earth-toolbar-orb:has(#layer-action) {
display: none;
}
.layout-mode-mobile .earth-toolbar-group {
display: none;
}
.earth-toolbar-cluster.is-collapsed .earth-toolbar-orb > * {
pointer-events: none;
}
.earth-toolbar-hub > * {
pointer-events: auto;
}
.earth-toolbar-orb > .liquid-glass-surface {
animation: floatDock 4.6s ease-in-out infinite;
animation-delay: var(--orb-delay, 0s);
}
.earth-toolbar-cluster.is-dock-engaged .earth-toolbar-orb > .liquid-glass-surface {
animation-play-state: paused;
}
.earth-toolbar-btn,
.earth-toolbar-hub-btn {
position: relative;
width: 28px;
height: 28px;
border: none;
background: transparent;
color: var(--hud-text-soft);
font-size: calc(14px * var(--toolbar-scale));
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
padding: 0;
margin: 0;
appearance: none;
-webkit-appearance: none;
}
.earth-toolbar-btn.floating-btn {
width: var(--toolbar-orb-size);
height: var(--toolbar-orb-size);
min-width: var(--toolbar-orb-size);
min-height: var(--toolbar-orb-size);
aspect-ratio: 1 / 1;
border-radius: 9999px;
overflow: hidden;
}
.earth-toolbar-hub-btn {
width: var(--toolbar-hub-size);
height: var(--toolbar-hub-size);
min-width: var(--toolbar-hub-size);
min-height: var(--toolbar-hub-size);
aspect-ratio: 1 / 1;
border-radius: 9999px;
overflow: hidden;
color: var(--hud-title);
}
.earth-toolbar-btn .icon,
.earth-toolbar-hub-btn .material-symbols-rounded {
position: relative;
z-index: 1;
line-height: 1;
}
.earth-toolbar-btn .icon {
display: inline-flex;
align-items: center;
justify-content: center;
transition: transform 0.16s ease, opacity 0.16s ease;
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
}
.earth-toolbar-btn .material-symbols-rounded,
.earth-toolbar-hub-btn .material-symbols-rounded {
font-size: calc(21px * var(--toolbar-scale));
line-height: 1;
font-variation-settings:
'FILL' 0,
'wght' 500,
'GRAD' 0,
'opsz' 24;
color: currentColor;
display: inline-flex;
align-items: center;
justify-content: center;
user-select: none;
pointer-events: none;
text-rendering: geometricPrecision;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.earth-toolbar-btn {
color: var(--hud-title);
}
.liquid-glass-surface {
--elastic-x: 0px;
--elastic-y: 0px;
--tilt-x: 0deg;
--tilt-y: 0deg;
--btn-scale: 1;
--press-offset: 0px;
--float-offset: 0px;
position: relative;
isolation: isolate;
transform-style: preserve-3d;
transform-origin: center center;
will-change: transform, box-shadow;
z-index: 2;
border: 1px solid rgba(255, 255, 255, 0.14);
background:
radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.085), transparent 38%),
rgba(255, 255, 255, var(--toolbar-glass-opacity));
box-shadow:
0 8px 28px rgba(0, 0, 0, 0.38),
inset 0 1.5px 2px rgba(255, 255, 255, 0.22),
inset 0 -1.5px 2px rgba(0, 0, 0, 0.28);
backdrop-filter: blur(var(--toolbar-glass-blur, 16px)) saturate(108%) brightness(0.92);
-webkit-backdrop-filter: blur(var(--toolbar-glass-blur, 16px)) saturate(108%) brightness(0.92);
transform:
translate3d(
var(--elastic-x),
calc(var(--float-offset) + var(--press-offset) + var(--elastic-y)),
0
)
scale(var(--btn-scale));
transition:
transform 0.22s ease,
box-shadow 0.22s ease,
background 0.22s ease,
opacity 0.18s ease;
}
.liquid-glass-surface::before {
content: "";
position: absolute;
inset: 0;
border-radius: inherit;
background:
radial-gradient(circle at 32% 20%, rgba(255, 255, 255, 0.13), transparent 34%),
radial-gradient(circle at 54% 54%, rgba(var(--toolbar-light-rgb, 91, 186, 255), 0.035), transparent 58%);
opacity: 1;
pointer-events: none;
transform: translate3d(calc(var(--elastic-x) * 0.08), calc(var(--elastic-y) * 0.08), 0);
transition: opacity 0.18s ease, transform 0.18s ease;
}
.liquid-glass-surface::after {
content: "";
position: absolute;
inset: 0;
border-radius: inherit;
background:
radial-gradient(circle at 50% 50%, transparent 58%, rgba(0, 0, 0, 0.1) 100%);
box-shadow:
inset 0 0 0 0.5px rgba(255, 255, 255, 0.06);
opacity: 1;
pointer-events: none;
transition: opacity 0.18s ease, box-shadow 0.18s ease;
}
.earth-toolbar-hub-btn.liquid-glass-surface {
background:
radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.095), transparent 40%),
rgba(255, 255, 255, 0.07);
box-shadow:
0 9px 30px rgba(0, 0, 0, 0.4),
inset 0 1.5px 2px rgba(255, 255, 255, 0.24),
inset 0 -1.5px 2px rgba(0, 0, 0, 0.3);
}
.liquid-glass-surface:hover {
--btn-scale: 1.03;
--press-offset: -1px;
background:
radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.14), transparent 40%),
radial-gradient(circle at 52% 52%, rgba(var(--toolbar-light-rgb, 91, 186, 255), 0.12), transparent 62%),
rgba(255, 255, 255, 0.085);
border-color: rgba(var(--toolbar-light-rgb, 91, 186, 255), 0.42);
box-shadow:
0 12px 40px rgba(0, 0, 0, 0.44),
inset 0 1.5px 3px rgba(255, 255, 255, 0.36),
inset 0 -1.5px 3px rgba(0, 0, 0, 0.2);
}
.liquid-glass-surface:hover::before {
opacity: 1;
background:
radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.2), transparent 36%),
radial-gradient(circle at 52% 52%, rgba(var(--toolbar-light-rgb, 91, 186, 255), 0.14), transparent 62%);
transform: translate3d(calc(var(--elastic-x) * 0.08), calc(var(--elastic-y) * 0.08 - 1px), 0);
}
.liquid-glass-surface:hover::after {
opacity: 1;
box-shadow:
inset 0 0 0 0.75px rgba(var(--toolbar-light-rgb, 91, 186, 255), 0.16);
}
.liquid-glass-surface:active,
.liquid-glass-surface.is-pressed {
--btn-scale: 0.94;
--press-offset: 3px;
box-shadow:
0 4px 14px rgba(0, 0, 0, 0.28),
inset 0 1px 2px rgba(255, 255, 255, 0.18),
inset 0 -1px 3px rgba(0, 0, 0, 0.34);
}
.liquid-glass-surface.active {
background:
radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.14), transparent 40%),
radial-gradient(circle at 52% 52%, rgba(var(--toolbar-light-rgb, 91, 186, 255), 0.13), transparent 62%),
rgba(255, 255, 255, 0.09);
border-color: rgba(var(--toolbar-light-rgb, 91, 186, 255), 0.42);
box-shadow:
0 12px 40px rgba(0, 0, 0, 0.46),
inset 0 1.5px 3px rgba(255, 255, 255, 0.38),
inset 0 -1.5px 3px rgba(0, 0, 0, 0.2);
}
.liquid-glass-surface.active:hover {
background:
radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.16), transparent 40%),
radial-gradient(circle at 52% 52%, rgba(var(--toolbar-light-rgb, 91, 186, 255), 0.17), transparent 64%),
rgba(255, 255, 255, 0.1);
box-shadow:
0 12px 42px rgba(0, 0, 0, 0.48),
inset 0 1.5px 3px rgba(255, 255, 255, 0.42),
inset 0 -1.5px 3px rgba(0, 0, 0, 0.18);
}
.earth-toolbar-cluster.is-expanded .earth-toolbar-hub-btn.liquid-glass-surface {
background:
radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.15), transparent 42%),
radial-gradient(circle at 52% 52%, rgba(var(--toolbar-light-rgb, 91, 186, 255), 0.15), transparent 64%),
rgba(255, 255, 255, 0.095);
border-color: rgba(var(--toolbar-light-rgb, 91, 186, 255), 0.44);
box-shadow:
0 12px 42px rgba(0, 0, 0, 0.48),
inset 0 1.5px 3px rgba(255, 255, 255, 0.4),
inset 0 -1.5px 3px rgba(0, 0, 0, 0.18);
}
.earth-rotate-toggle .icon-play,
.earth-rotate-toggle.is-stopped .icon-pause,
.earth-layout-toggle .layout-collapse,
.earth-layout-toggle.active .layout-expand {
display: none;
}
.earth-rotate-toggle.is-stopped .icon-play,
.earth-layout-toggle.active .layout-collapse {
display: inline-flex;
}
.earth-zoom-group:hover > .earth-zoom-toolbar,
.earth-zoom-group:focus-within > .earth-zoom-toolbar,
.earth-zoom-group.open > .earth-zoom-toolbar {
opacity: 1;
visibility: visible;
pointer-events: auto;
transform: translate(-50%, 0);
}
.earth-zoom-group.force-closed > .earth-zoom-toolbar {
opacity: 0;
visibility: hidden;
pointer-events: none;
transform: translate(-50%, calc(8px * var(--toolbar-scale)));
}
.earth-toolbar-popover::before {
content: "";
position: absolute;
left: 50%;
bottom: 100%;
transform: translateX(-50%);
width: calc(56px * var(--toolbar-scale));
height: calc(16px * var(--toolbar-scale));
background: transparent;
}
.earth-toolbar-popover > .earth-stack-toolbar {
position: absolute;
left: 50%;
top: auto;
right: auto;
bottom: calc(100% + (12px * var(--toolbar-scale)));
transform: translate(-50%, calc(10px * var(--toolbar-scale)));
display: flex;
flex-direction: column;
align-items: center;
gap: calc(8px * var(--toolbar-scale));
opacity: 0;
visibility: hidden;
pointer-events: none;
transition:
opacity 0.22s ease,
transform 0.22s ease,
visibility 0.22s ease;
z-index: 220;
}
.earth-zoom-toolbar .earth-zoom-btn,
.earth-zoom-toolbar .earth-zoom-value {
width: calc(42px * var(--toolbar-scale));
min-width: calc(42px * var(--toolbar-scale));
border-radius: 50%;
color: var(--hud-text-soft);
animation: none;
}
.earth-zoom-toolbar .earth-zoom-btn {
height: calc(42px * var(--toolbar-scale));
font-size: calc(20px * var(--toolbar-scale));
font-weight: 500;
line-height: 1;
}
.earth-zoom-toolbar .earth-zoom-value {
display: inline-flex;
align-items: center;
justify-content: center;
height: calc(42px * var(--toolbar-scale));
padding: 0;
font-size: calc(11px * var(--toolbar-scale));
letter-spacing: normal;
}
.earth-app.layout-expanded .earth-toolbar-group {
bottom: 18px;
transform: translateX(-50%);
}
.earth-toolbar-btn .earth-toolbar-tooltip {
position: absolute;
bottom: calc(56px * var(--toolbar-scale));
left: 50%;
transform: translateX(-50%);
background:
linear-gradient(180deg, rgba(18, 31, 52, 0.96), rgba(8, 18, 32, 0.95));
color: var(--hud-text);
padding: calc(6px * var(--toolbar-scale)) calc(12px * var(--toolbar-scale));
border-radius: calc(6px * var(--toolbar-scale));
font-size: calc(12px * var(--toolbar-scale));
white-space: nowrap;
opacity: 0;
visibility: hidden;
transition: all 0.2s ease;
border: 1px solid var(--hud-border);
pointer-events: none;
z-index: 100;
box-shadow: var(--hud-shadow-soft);
}
.earth-toolbar-btn:hover .earth-toolbar-tooltip,
.earth-toolbar-popover:hover > .earth-toolbar-btn .earth-toolbar-tooltip,
.earth-toolbar-popover:focus-within > .earth-toolbar-btn .earth-toolbar-tooltip {
opacity: 1;
visibility: visible;
bottom: calc(58px * var(--toolbar-scale));
}
.earth-toolbar-btn .earth-toolbar-tooltip::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
border: calc(6px * var(--toolbar-scale)) solid transparent;
border-top-color: rgba(18, 31, 52, 0.96);
}