#backgroundCanvas{
    top: 0;
    left: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit:contain;
    overflow: hidden;
    z-index: 1;
    background: radial-gradient(#100826,#060212);
}
#starsCanvas{
    top: 0;
    left: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit:contain;
    overflow: hidden;
    z-index: 2;
    background-color: transparent;
}
#milkyWayCanvas{
    top: 0;
    left: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: transparent;
    object-fit:contain;
    overflow: hidden;
    z-index: 1;
    filter: blur(0px);
}

:root{
    --accent-blue:#3b505966;
    --accent-white:#f8f8ff;
}

body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('/static/guardians.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: .15; /* Subtle visibility */
    z-index: -2; /* Behind starfield and gradient */
    pointer-events: none;
    filter: brightness(1.1) saturate(1.2);
}

body {
    background: #000;
    position: relative;
    margin: 0;
}

a:hover {
    text-shadow: 0 0 5px #3b505966, 0 0 10px #3b505966, 0 0 15px #80c4e6;
}

#resultPre, #resultTable {
    max-height: 60vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #3b505966 #1a1a1a;
}

#resultPre::-webkit-scrollbar, #resultTable::-webkit-scrollbar {
    width: 6px;
}

#resultPre::-webkit-scrollbar-track, #resultTable::-webkit-scrollbar-track {
    background: #111;
}

#resultPre::-webkit-scrollbar-thumb, #resultTable::-webkit-scrollbar-thumb {
    background-color: #3b505966;
    border-radius: 3px;
}
/* Thin grid lines for table columns and rows */
#resultTable table {
    border-collapse: collapse;
}

#resultTable th,
#resultTable td {
    border-left: 1px solid rgba(255, 255, 255, 0.1); /* Subtle vertical lines */
    padding-left: 5px;
    padding-right: 5px;
}

#resultTable th:first-child,
#resultTable td:first-child {
    border-left: none; /* Avoid border on far-left edge */
}

#resultTable th {
    border-bottom: 1px solid rgba(18, 148, 214, 0.3); /* Stronger bottom line for header */
}

.bodies-embed {
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.55);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bodies-embed:hover {
    border-color: rgba(18, 148, 214, 0.6);
    transform: translateY(-1px);
}

.bodies-embed:focus-visible {
    outline: 2px solid rgba(18, 148, 214, 0.8);
    outline-offset: 4px;
}

.bodies-embed__frame-wrapper {
    position: relative;
    border-radius: inherit;
    overflow: hidden;
}

.bodies-embed__frame {
    width: 100%;
    min-height: 320px;
    display: block;
    border: none;
    background: #020202;
    pointer-events: none;
}

.bodies-embed__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.bodies-embed:hover .bodies-embed__overlay,
.bodies-embed:focus-visible .bodies-embed__overlay {
    opacity: 1;
}

.bodies-embed__overlay:focus-visible {
    outline: 2px solid rgba(18, 148, 214, 0.8);
    outline-offset: 4px;
}

.bodies-embed__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.5rem 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.bodies-embed__caption {
    margin: 0;
}

.bodies-embed__cta {
    font-size: 0.8rem;
    color: #1294d6;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@keyframes drift{from{transform:translate3d(0,0,0)}to{transform:translate3d(-400px,-200px,0)}}
.glass{background:rgba(255,255,255,0.03);backdrop-filter: blur(6px);border:1px solid rgba(255,255,255,0.10);}
.mono{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", monospace}

.quote {
    min-height: 80px;
}

.quote blockquote {
    margin: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.4;
}

.quote #quote-author {
    overflow-wrap: anywhere;
}

.hero-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: nowrap;
}

.hero-header h1 {
    flex: 1 1 auto;
    margin: 0;
    min-width: 0;
}

.hero-title {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    padding: 0;
    cursor: pointer;
}

.hero-title svg {
    display: block;
}

.hero-title:focus-visible {
    outline: 2px solid rgba(18, 148, 214, 0.8);
    outline-offset: 4px;
    border-radius: 0.25rem;
}

.system-card {
    margin-top: 1.5rem;
    padding: 1.75rem;
    border-radius: 1.5rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

.system-card__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.system-card__eyebrow {
    margin: 0 0 0.25rem;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

.system-card__title {
    margin: 0;
    font-size: clamp(1.5rem, 4vw, 1.9rem);
    line-height: 1.2;
    color: #f8fbff;
}

.system-card__subtitle {
    margin: 0.35rem 0 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
}

.system-card__mainstar {
    margin: 0.4rem 0 0.8rem;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.system-card__mainstar-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1rem;
    letter-spacing: normal;
    text-transform: none;
    color: #f8fbff;
}

.system-card__star-indicator {
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 120ms ease, transform 120ms ease;
}

.system-card__star-indicator.is-active {
    opacity: 1;
}

.system-card__star-indicator.is-neutron {
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 0.4rem;
    border: none;
    background: transparent;
}

.system-card__star-indicator.is-neutron svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: var(--accent-blue);
}

.system-card__actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 160px));
    gap: 1rem;
    justify-content: center;
    margin: 1.25rem auto;
}

.system-card__action-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(6, 8, 16, 0.4);
    color: #fff;
    padding: 1.2rem 0.75rem;
    min-height: 140px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    cursor: pointer;
    transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
    box-shadow: 0 25px 30px rgba(0, 0, 0, 0.35);
}

.system-card__action-tile:hover,
.system-card__action-tile:focus-visible {
    border-color: rgba(255, 255, 255, 0.65);
    transform: translateY(-3px);
    outline: none;
}

.system-card__action-tile.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: none;
    transform: none;
}

.system-card__action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
}

.system-card__action-icon svg {
    width: 48px;
    height: 48px;
}

.system-card__action-label {
    font-size: 0.8rem;
    white-space: nowrap;
}

.system-card__grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.system-card__stat {
    padding: 1.1rem 1.25rem;
    border-radius: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(5, 8, 20, 0.4);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
}

.system-card__stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.65);
}

.system-card__stat-value {
    font-size: 1.4rem;
    font-weight: 600;
    color: #f8fbff;
    word-break: break-word;
}

.system-card__stat--distance .system-card__stat-value::after {
    content: ' ly';
    font-size: 0.8rem;
    font-weight: 400;
    margin-left: 0.15rem;
    color: rgba(255, 255, 255, 0.55);
}

.system-card__axes {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.system-card__stat--coords {
    grid-column: span 2;
}

.system-card__axis {
    flex: 1 1 90px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.65rem;
    border-radius: 0.85rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.system-card__axis-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
}

.system-card__axis-value {
    font-size: 1rem;
    font-weight: 600;
    color: #f8fbff;
}

.collapsible-col.is-collapsed,
.collapsible-cell.is-collapsed {
    display: none;
}

.table-collapse-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    margin-bottom: 0.5rem;
}


.system-card__hint {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
}

.table-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.table-actions button[data-tooltip] {
    position: relative;
}

.table-actions button[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translate(-50%, 4px);
    background: rgba(6, 8, 18, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease, transform 150ms ease;
    z-index: 5;
}

.table-actions button[data-tooltip]::before {
    content: "";
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 6px 6px 6px;
    border-style: solid;
    border-color: transparent transparent rgba(6, 8, 18, 0.95) transparent;
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease;
    z-index: 4;
}

.table-actions button[data-tooltip]:hover::after,
.table-actions button[data-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

.table-actions button[data-tooltip]:hover::before,
.table-actions button[data-tooltip]:focus-visible::before {
    opacity: 1;
}

.status--loading {
    display: inline-flex;
    align-items: baseline;
    gap: 0.1rem;
}

.status-label {
    margin-right: 0.1rem;
}

.status-dot {
    display: inline-block;
    animation: statusDotPulse 1.2s ease-in-out infinite;
    opacity: 0.25;
}

.status-dot--2 {
    animation-delay: 0.15s;
}

.status-dot--3 {
    animation-delay: 0.3s;
}

.status-dot--4 {
    animation-delay: 0.45s;
}

.status-dot--5 {
    animation-delay: 0.6s;
}

@keyframes statusDotPulse {
    0% {
        opacity: 0.2;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.2;
    }
}

.tool-menu {
    margin-top: 0;
    display: flex;
    justify-content: flex-end;
    position: relative;
    z-index: 20;
    flex: 0 0 auto;
}

.tool-menu__toggle {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(6px);
    color: #f8f8ff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 120ms ease, border-color 120ms ease;
}

.tool-menu__toggle:hover,
.tool-menu__toggle:focus-visible {
    border-color: rgba(18, 148, 214, 0.9);
    transform: scale(1.05);
    outline: none;
}

.tool-menu__bars {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
}

.tool-menu__bars span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.tool-menu__dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    width: min(220px, 80vw);
    padding: 0.75rem;
    border-radius: 0.75rem;
    background: rgba(5, 7, 15, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 120ms ease, transform 120ms ease;
}

.tool-menu__dropdown.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.tool-menu__title {
    margin: 0 0 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
}

.tool-menu__item {
    border: none;
    border-radius: 0.5rem;
    text-align: left;
    padding: 0.5rem 0.6rem;
    background: transparent;
    color: #f8f8ff;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease;
}

.tool-menu__item:hover,
.tool-menu__item:focus-visible {
    background: rgba(18, 148, 214, 0.25);
    outline: none;
}

.tool-menu__item.active {
    background: rgba(18, 148, 214, 0.4);
}

.tool-menu__item.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.hero-tagline {
    display: none;
}

@media (min-width: 640px) {
    .hero-tagline {
        display: block;
    }
}

@media only screen and (max-width: 767px) {
    .quote {
        min-height: 95px !important;
    }
}
