diff --git a/index.html b/index.html index 7c02e97..07e63b9 100644 --- a/index.html +++ b/index.html @@ -20,16 +20,69 @@ -webkit-user-select: none; } + #drag-stick { + position: absolute; + left: max(18px, env(safe-area-inset-left)); + bottom: max(22px, env(safe-area-inset-bottom)); + width: 132px; + height: 132px; + border: 1px solid rgba(255, 255, 255, 0.28); + border-radius: 50%; + background: rgba(7, 16, 24, 0.42); + box-shadow: inset 0 0 0 1px rgba(140, 211, 255, 0.08); + backdrop-filter: blur(5px); + -webkit-backdrop-filter: blur(5px); + pointer-events: auto; + touch-action: none; + } + + #drag-stick::before, + #drag-stick::after { + content: ''; + position: absolute; + background: rgba(232, 242, 247, 0.18); + pointer-events: none; + } + + #drag-stick::before { + left: 50%; + top: 12px; + bottom: 12px; + width: 1px; + } + + #drag-stick::after { + top: 50%; + left: 12px; + right: 12px; + height: 1px; + } + + #drag-thumb { + position: absolute; + left: 50%; + top: 50%; + width: 58px; + height: 58px; + margin: -29px 0 0 -29px; + border-radius: 50%; + border: 1px solid rgba(255, 255, 255, 0.5); + background: rgba(140, 211, 255, 0.28); + box-shadow: 0 3px 18px rgba(0, 0, 0, 0.28); + pointer-events: none; + will-change: transform; + } + .mobile-control { position: absolute; - min-width: 62px; - height: 62px; + min-width: 72px; + height: 64px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 18px; background: rgba(7, 16, 24, 0.68); color: #e8f2f7; - font: 700 18px/1 system-ui, sans-serif; + font: 700 13px/1 system-ui, sans-serif; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); pointer-events: auto; @@ -42,13 +95,26 @@ transform: scale(0.96); } - .mobile-control.left { left: max(14px, env(safe-area-inset-left)); bottom: max(18px, env(safe-area-inset-bottom)); } - .mobile-control.right { left: max(88px, calc(env(safe-area-inset-left) + 74px)); bottom: max(18px, env(safe-area-inset-bottom)); } - .mobile-control.throttle { right: max(14px, env(safe-area-inset-right)); bottom: max(92px, calc(env(safe-area-inset-bottom) + 74px)); } - .mobile-control.reverse { right: max(14px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); } - .mobile-control.port { left: max(14px, env(safe-area-inset-left)); bottom: max(100px, calc(env(safe-area-inset-bottom) + 82px)); font-size: 13px; } - .mobile-control.starboard { right: max(88px, calc(env(safe-area-inset-right) + 74px)); bottom: max(18px, env(safe-area-inset-bottom)); font-size: 13px; } - .mobile-control.restart { top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); width: 48px; min-width: 48px; height: 48px; border-radius: 50%; } + .mobile-control.port { + right: max(18px, env(safe-area-inset-right)); + bottom: max(100px, calc(env(safe-area-inset-bottom) + 82px)); + } + + .mobile-control.starboard { + right: max(18px, env(safe-area-inset-right)); + bottom: max(26px, env(safe-area-inset-bottom)); + } + + .mobile-control.restart { + top: max(14px, env(safe-area-inset-top)); + right: max(14px, env(safe-area-inset-right)); + width: 48px; + min-width: 48px; + height: 48px; + padding: 0; + border-radius: 50%; + font-size: 20px; + } @media (hover: hover) and (pointer: fine) { #mobile-controls { display: none; } @@ -61,53 +127,125 @@