Files
space-game/apps/viewer/src/style.css

621 lines
11 KiB
CSS

:root {
color-scheme: dark;
font-family: "Space Grotesk", "Segoe UI", sans-serif;
--bg: #050812;
--panel: rgba(9, 18, 34, 0.78);
--panel-border: rgba(132, 196, 255, 0.18);
--text: #eaf4ff;
--muted: #98adc4;
--accent: #7fd6ff;
--warning: #ffbf69;
}
* {
box-sizing: border-box;
}
html,
body,
#app {
margin: 0;
width: 100%;
height: 100%;
overflow: hidden;
background:
radial-gradient(circle at top, rgba(89, 132, 247, 0.16), transparent 30%),
radial-gradient(circle at 18% 42%, rgba(255, 136, 92, 0.14), transparent 24%),
linear-gradient(180deg, #03060d 0%, #060c18 100%);
}
canvas {
display: block;
}
.viewer-shell {
position: fixed;
inset: 0;
pointer-events: none;
}
.left-panel-stack {
position: absolute;
top: 20px;
left: 20px;
width: min(360px, calc(100vw - 40px));
display: flex;
flex-direction: column;
gap: 16px;
}
.right-panel-stack {
position: absolute;
top: 20px;
right: 20px;
width: min(380px, calc(100vw - 40px));
display: flex;
flex-direction: column;
gap: 16px;
}
.marquee-box {
position: absolute;
display: none;
border: 1px solid rgba(127, 214, 255, 0.72);
background: rgba(127, 214, 255, 0.14);
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.hover-label {
position: absolute;
padding: 8px 10px;
border-radius: 14px;
background: rgba(7, 15, 28, 0.88);
border: 1px solid rgba(255, 88, 72, 0.5);
color: #fff2ef;
font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
font-size: 0.75rem;
line-height: 1.35;
white-space: pre-line;
box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}
.hover-label[hidden] {
display: none;
}
.topbar,
.info-panel,
.network-panel,
.performance-panel,
.ops-strip {
backdrop-filter: blur(18px);
background: var(--panel);
border: 1px solid var(--panel-border);
box-shadow: 0 18px 54px rgba(0, 0, 0, 0.35);
}
.topbar {
border-radius: 22px;
padding: 14px 16px;
pointer-events: auto;
}
.eyebrow {
margin: 0 0 6px;
color: var(--accent);
letter-spacing: 0.18em;
font-size: 0.72rem;
text-transform: uppercase;
}
.topbar h1,
.topbar h2,
.info-panel h2,
.info-panel h3,
.ship-card h3 {
margin: 0;
}
.topbar {
display: block;
align-items: start;
}
.topbar h2 {
color: var(--accent);
letter-spacing: 0.16em;
font-size: 0.64rem;
text-transform: uppercase;
line-height: 1;
}
.panel-heading {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.panel-heading-meta {
display: flex;
align-items: center;
gap: 10px;
min-width: 0;
}
.panel-summary {
display: none;
color: var(--muted);
font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
font-size: 0.72rem;
line-height: 1;
text-align: right;
white-space: nowrap;
}
.panel-toggle {
border: 1px solid rgba(127, 214, 255, 0.2);
background: rgba(127, 214, 255, 0.08);
color: var(--text);
border-radius: 999px;
width: 28px;
height: 28px;
cursor: pointer;
font: inherit;
}
.panel-toggle:hover {
background: rgba(127, 214, 255, 0.16);
}
.topbar-body {
margin-top: 14px;
color: var(--muted);
font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
font-size: 0.8rem;
line-height: 1.6;
white-space: pre-wrap;
}
.info-panel {
border-radius: 24px;
padding: 16px;
color: var(--text);
pointer-events: auto;
overflow: auto;
}
.network-panel {
border-radius: 24px;
padding: 14px 16px;
color: var(--text);
pointer-events: auto;
}
.performance-panel {
width: min(360px, calc(100vw - 40px));
border-radius: 24px;
padding: 14px 16px;
color: var(--text);
pointer-events: auto;
}
.info-panel h2 {
color: var(--accent);
letter-spacing: 0.16em;
font-size: 0.72rem;
text-transform: uppercase;
}
.network-panel h2,
.performance-panel h2 {
margin: 0;
color: var(--accent);
letter-spacing: 0.16em;
font-size: 0.64rem;
line-height: 1;
text-transform: uppercase;
}
.network-body,
.performance-body {
margin-top: 14px;
color: var(--muted);
font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
font-size: 0.8rem;
line-height: 1.6;
white-space: pre-wrap;
}
.collapsible-panel.is-collapsed .topbar-body,
.collapsible-panel.is-collapsed .network-body,
.collapsible-panel.is-collapsed .performance-body {
display: none;
}
.collapsible-panel.is-collapsed .panel-summary {
display: inline-block;
}
.collapsible-panel.is-collapsed {
padding-bottom: 12px;
}
.detail-title {
margin-top: 12px;
font-size: 1.05rem;
}
.system-title {
margin-top: 12px;
font-size: 1.05rem;
}
.system-body,
.detail-body {
margin-top: 12px;
color: var(--muted);
line-height: 1.55;
}
.system-body p,
.detail-body p {
margin: 0 0 12px;
}
.detail-progress,
.ship-action-progress {
margin: 0 0 12px;
}
.detail-progress-label,
.ship-action-progress-label {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
margin-bottom: 6px;
color: var(--muted);
font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
font-size: 0.72rem;
line-height: 1;
}
.detail-progress-track,
.ship-action-progress-track {
height: 6px;
border-radius: 999px;
overflow: hidden;
background: rgba(127, 214, 255, 0.12);
border: 1px solid rgba(127, 214, 255, 0.14);
}
.detail-progress-fill,
.ship-action-progress-fill {
height: 100%;
border-radius: 999px;
background: linear-gradient(90deg, rgba(127, 214, 255, 0.72), rgba(255, 191, 105, 0.9));
}
.history {
font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
font-size: 0.78rem;
line-height: 1.6;
}
.history-window {
position: absolute;
right: auto;
bottom: auto;
width: min(520px, calc(100vw - 40px));
height: min(360px, 56vh);
min-width: 320px;
min-height: 220px;
max-width: calc(100vw - 40px);
max-height: calc(100vh - 40px);
display: flex;
flex-direction: column;
border-radius: 24px;
overflow: hidden;
pointer-events: auto;
backdrop-filter: blur(18px);
background: rgba(6, 12, 24, 0.9);
border: 1px solid rgba(127, 214, 255, 0.2);
box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42);
resize: both;
}
.history-window[hidden] {
display: none;
}
.history-window-header {
display: flex;
justify-content: space-between;
align-items: center;
gap: 12px;
padding: 14px 16px;
border-bottom: 1px solid rgba(127, 214, 255, 0.12);
cursor: move;
}
.history-window-title {
margin: 0;
color: var(--accent);
font-size: 0.8rem;
letter-spacing: 0.16em;
text-transform: uppercase;
}
.history-window-close,
.ship-card-history-button {
border: 1px solid rgba(127, 214, 255, 0.22);
border-radius: 999px;
background: rgba(127, 214, 255, 0.08);
color: var(--text);
font: inherit;
cursor: pointer;
}
.history-window-actions {
display: flex;
align-items: center;
gap: 8px;
}
.history-window-close {
padding: 8px 12px;
}
.history-window-copy {
padding: 8px 12px;
}
.history-window-body {
overflow: auto;
padding: 16px;
color: var(--text);
font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
font-size: 0.78rem;
line-height: 1.6;
white-space: pre-wrap;
user-select: text;
cursor: text;
}
.error-strip {
border-radius: 14px;
padding: 12px 14px;
background: rgba(255, 116, 88, 0.14);
color: #ffd8cf;
pointer-events: auto;
}
.right-panel-stack .error-strip {
margin-top: -4px;
}
.system-panel-section[hidden] {
display: none;
}
.detail-panel-section[hidden] {
display: none;
}
.error-strip[hidden] {
display: none;
}
.history-layer {
position: absolute;
inset: 0;
pointer-events: none;
}
.ops-strip {
position: absolute;
left: 0;
right: 0;
bottom: 0;
width: 50vw;
min-height: 128px;
border-radius: 0;
padding: 0;
display: flex;
align-items: stretch;
gap: 0;
overflow-x: auto;
overflow-y: hidden;
pointer-events: auto;
scrollbar-width: thin;
background: linear-gradient(180deg, rgba(5, 10, 18, 0), rgba(5, 10, 18, 0.92) 28%);
}
.ship-card {
border-radius: 0;
border-top: 1px solid rgba(127, 214, 255, 0.14);
border-right: 1px solid rgba(127, 214, 255, 0.1);
background: linear-gradient(180deg, rgba(10, 20, 36, 0.96), rgba(6, 12, 22, 0.98));
padding: 10px 12px 12px;
min-width: 208px;
max-width: 208px;
display: flex;
flex-direction: column;
gap: 6px;
color: var(--text);
cursor: pointer;
transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
.ship-card:hover {
transform: translateY(-2px);
border-color: rgba(127, 214, 255, 0.38);
box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}
.ship-card.is-selected {
border-top-color: rgba(255, 191, 105, 0.82);
background: linear-gradient(180deg, rgba(31, 33, 20, 0.9), rgba(20, 18, 10, 0.92));
}
.ship-card.is-followed {
box-shadow: inset 0 0 0 1px rgba(127, 214, 255, 0.34);
}
.ship-card-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 10px;
}
.ship-card h3 {
font-size: 0.82rem;
line-height: 1.15;
letter-spacing: 0.04em;
}
.ship-card-meta {
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 6px;
}
.ship-card-badge {
padding: 3px 8px;
border-radius: 999px;
background: rgba(127, 214, 255, 0.12);
color: var(--accent);
font-size: 0.64rem;
letter-spacing: 0.12em;
text-transform: uppercase;
}
.ship-card p {
margin: 2px 0 0;
color: var(--muted);
line-height: 1.35;
font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
font-size: 0.72rem;
}
.ship-card-header+p {
font-size: 0.62rem;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.ship-action-progress {
margin-top: 2px;
}
.ship-card-ai {
margin-top: 2px;
padding-top: 6px;
border-top: 1px solid rgba(127, 214, 255, 0.08);
}
.ship-card-section-title {
margin: 0;
color: var(--accent);
letter-spacing: 0.14em;
text-transform: uppercase;
}
.ship-card-history-button {
width: 24px;
height: 24px;
padding: 0;
display: inline-flex;
align-items: center;
justify-content: center;
align-self: flex-end;
font-size: 0.78rem;
line-height: 1;
}
.faction-card {
border-top-color: rgba(180, 130, 255, 0.3);
cursor: default;
}
.faction-card:hover {
transform: none;
border-color: rgba(180, 130, 255, 0.5);
}
.station-card {
border-top-color: rgba(127, 255, 180, 0.22);
}
.station-card:hover {
border-color: rgba(127, 255, 180, 0.5);
}
.swatch {
width: 14px;
height: 48px;
border-radius: 999px;
flex: none;
}
@media (max-width: 1080px) {
.ops-strip {
width: 100vw;
}
}
@media (max-width: 760px) {
.left-panel-stack {
right: 20px;
width: auto;
}
.right-panel-stack {
left: 20px;
right: 20px;
top: auto;
width: auto;
bottom: 148px;
max-height: 38vh;
overflow: auto;
}
.info-panel {
max-height: none;
overflow: visible;
}
.system-panel-section,
.detail-panel-section,
.error-strip {
width: auto;
}
.network-panel {
width: auto;
}
.performance-panel {
width: auto;
}
.ops-strip {
left: 0;
right: 0;
bottom: 0;
width: 50vw;
min-height: 120px;
}
.history-window {
left: 20px;
right: 20px;
width: auto;
max-width: calc(100vw - 40px);
max-height: calc(100vh - 40px);
}
}