@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap');

:root {
    font-family: "Barlow", system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: #fff;
    --color-highlight: #54adf7;
    --font-geom: "Outfit", system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
}

body {
    margin: 0;
}

.ui {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.ui>* {
    position: absolute;
    z-index: 1000;
}

.cursor-info {
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    z-index: 2000;
}

.label {
    color: #fff;
    font-size: 12px;
    /* background-color: #80808030; */
    /* padding: .25em; */
    cursor: pointer;
    text-shadow: 1px 1px 3px #000, 1px -1px 3px #000, -1px -1px 3px #000, -1px 1px 3px #000;
    transition: font-size .2s, opacity .2s;
}

.label.hide {
    opacity: 0;
    visibility: collapse;
    transition: font-size .2s, opacity .2s, visibility 0s .2s;
}

.label:hover {
    color: var(--color-highlight);
}

.label-location {
    position: relative;
    transition: font-size .2s, opacity .2s;
    width: 0;
    height: 0;
    --icon-size: 4px;
    cursor: pointer;
}

.label-location.hide {
    opacity: 0;
    visibility: collapse;
    transition: font-size .2s, opacity .2s, visibility 0s .2s;
}

.label-location .label {
    position: absolute;
    width: max-content;
    bottom: calc(var(--icon-size) / 2 + 4px);
    left: 0;
    transform: translate(-50%, 0);
}

.label-location:hover .label {
    color: var(--color-highlight);
}

.label-location:hover .icon {
    filter: brightness(.8)
}

.label-location .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    width: calc(var(--icon-size) + 4px);
    height: calc(var(--icon-size) + 4px);
    background-color: #78909c;
    border: 2px solid #fff;
    box-shadow: 0 1px 2px 0px #00000080;
    border-radius: 50%;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
}

.label-location .icon>svg {
    fill: #fff;
    width: calc(var(--icon-size) - 2px);
    height: calc(var(--icon-size) - 2px);
}

.label-location.small .icon {
    --icon-size: 2px;
    background-color: #fff;
    border: 1px solid #000;
}

.label-location.medium {
    --icon-size: 16px;
}

.label-location.large {
    --icon-size: 20px;
}

.label-location.large .label {
    font-size: 16px;
    font-weight: 600;
}

.navigation-tree {
    position: absolute;
    top: 0;
    min-width: 10em;
    height: 100vh;
    color: #fff;
    background-color: #40404040;
    backdrop-filter: blur(4px);
    z-index: 1000;
    overflow-y: auto;
}

.navigation-tree::-webkit-scrollbar {
    width: 5px;
}

.navigation-tree::-webkit-scrollbar-track {
    background: #080808;
}

.navigation-tree::-webkit-scrollbar-thumb {
    background: #222;
}

.navigation-tree .indent-0, .navigation-tree .indent-1, .navigation-tree .indent-2 {
    display: flex;
}

.navigation-tree button {
    flex-grow: 1;
    text-align: left;
    cursor: pointer;
    user-select: none;
    padding: .5em 1em .5em .75em;
    background-color: transparent;
    color: #fff;
    fill: #fff;

    transition: color .2s, fill .2s, background-color .2s;
    font-family: inherit;
    font-size: inherit;
    font-weight: 500;
    border: none;
    display: flex;
    gap: .5em;
    align-items: center;
}

.navigation-tree button .thumbnail {
    width: 2em;
    height: 2em;
    background-color: transparent;
    border-radius: 50%;
    background-size: cover;
    background-repeat: no-repeat;
}

/* .navigation-tree button * {
    filter: drop-shadow(0px 0px 2px #40404080);
} */

.navigation-tree .Planet .thumbnail, .navigation-tree .Moon .thumbnail {
    box-shadow: 0px 0px 4px 0px #00000080;
}

/* .navigation-tree .Star .thumbnail {
    background-color: #ffffd7;
    box-shadow: 0px 0px 4px 2px #ffffaa80;
} */

.navigation-tree button .sub {
    font-size: .8rem;
    color: #808080;
    text-shadow: none;
    transition: color .2s;
}


.navigation-tree button.targeting, .navigation-tree button.targeting+button {
    color: #000;
    fill: #000;
    background-color: #ddd;
}

.navigation-tree button.targeting .sub, .navigation-tree button:hover .sub, .navigation-tree button:active .sub {
    color: #606060;
}

.navigation-tree button:hover, .navigation-tree button:hover+button {
    color: #000;
    fill: #000;
    background-color: #aaa;
}

.navigation-tree button:active, .navigation-tree button:active+button {
    color: #000;
    fill: #000;
    background-color: #ddd;
}

.navigation-tree button:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px #aaa;
}


.navigation-tree .indent-1 {
    margin-left: 1em;
}

.navigation-tree .indent-2 {
    margin-left: 2em;
}

.navigation-tree .planet-gravity-system {
    margin-left: 1em;
    display: flex;
    align-items: stretch;
}

.navigation-tree .group {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.2s ease-out;
}

.navigation-tree .accordion {
    flex-grow: 0;
    padding: .5em .75em;
}

.navigation-tree .accordion:after {
    content: '+';
    text-align: center;
}

.navigation-tree .accordion.on:after {
    content: "−";
    /* Unicode Character “−” (U+2212) */
}

#settings {
    right: 0;
    bottom: 0;
}


.info-panel {
    top: 1em;
    right: 1em;
    max-height: calc(100% - 2rem);
    padding-bottom: 1em;
    width: 16em;
    background-color: #40404040;
    backdrop-filter: blur(4px);
    overflow-y: auto;
    border-radius: 1em;
    transition: right .2s ease-out;
}

.info-panel.hide {
    right: -17em;
}

.info-panel::-webkit-scrollbar {
    width: 5px;
}

.info-panel::-webkit-scrollbar-track {
    background: #080808;
}

.info-panel::-webkit-scrollbar-thumb {
    background: #222;
}

.info-panel>h1, .info-panel>p {
    padding: 0 1rem;
}

.info-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #404040;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.info-name {
    margin: 1rem 0 .25rem 0;
    font-family: var(--font-geom);
    font-weight: 500;
    line-height: 110%;
}

#location-target-name {
    font-size: 1.5em;
}

.info-type {
    color: #808080;
}

.info-panel>hr {
    border: none;
    background-color: #808080;
    height: 1px;
    margin: 1em;
}

.info-panel>.key-values {
    display: flex;
    flex-direction: column;
    gap: .25em;
    align-items: stretch;
}

.info-panel>.key-values>div {
    display: flex;
    flex-wrap: wrap;
    align-items: start;
    padding: 0 1em;
}

.info-panel>.key-values>div>* {
    flex-shrink: 0;
}

.info-panel>.key-values>div>p:first-child {
    font-weight: 600;
}

.info-panel>.key-values>div>p:last-child {
    text-align: right;
    flex-grow: 1;
}

.display-none {
    display: none !important;
}

.tabular-nums {
    font-variant-numeric: tabular-nums;
}

#analog-clock {
    aspect-ratio: 1 / 1;
    width: 80%;
    position: relative;
    margin: 0 auto;

    --color-day: #dceaff;
    --color-dawn: #af5e53;
    --color-dusk: #af5e53;
    --color-night: #192029;
    --sunrise-hour-angle: 60deg;
    --hand-direction: 0deg;
    --hand-width: 6px;
    --hand-width-half: calc(var(--hand-width) / 2);
}

#analog-clock>* {
    position: absolute;
}

#analog-clock>.face {
    top: 15%;
    left: 15%;
    width: 70%;
    aspect-ratio: 1 / 1;
    background: conic-gradient(
        var(--color-day) 0deg, 
        var(--color-day) var(--sunrise-hour-angle), 
        var(--color-dusk) min(180deg, var(--sunrise-hour-angle) + 6deg),
        var(--color-night) min(180deg, var(--sunrise-hour-angle) + 12deg),
        var(--color-night) max(180deg, 360deg - var(--sunrise-hour-angle) - 12deg), 
        var(--color-dawn) max(180deg, 360deg - var(--sunrise-hour-angle) - 6deg),
        var(--color-day) calc(360deg - var(--sunrise-hour-angle)), 
        var(--color-day) 0deg
        );
    border-radius: 50%;
}

#analog-clock>.hand {
    top: calc(50% - var(--hand-width-half));
    left: calc(50% - var(--hand-width-half));
    width: var(--hand-width);
    height: 30%;
    background-color: #222222;
    backdrop-filter: invert(1);
    transform-origin: 50% var(--hand-width-half);
    transform: rotate(var(--hand-direction));
    box-shadow: 0 0 2px 0 #000;
    border-radius: var(--hand-width-half);
    border: 2px solid #ffffff;
}