:root {
    --primary-color: #fff;
    --secondary-color: #fff;
    --border-color: #5b5e6f;
    --accent-color: #52cce3;
    --link-color: #e0de0f;
    --scene-background: #050712;
    --button-color: #d8dbe3;
    --left-panel-width: 424px;
}

html,
body,
#app {
    width: 100%;
    height: 100%;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    overflow: hidden;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.42857;
    color: var(--primary-color);
    background: #05070d;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: underline;
}

h4 {
    font-weight: 500;
    line-height: 1.1;
    color: inherit;
}

h4 {
    margin: 10px 0;
    font-size: 18px;
}

p {
    margin: 0 0 10px;
}

code,
pre {
    font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
}

.full {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.graph-empty,
.graphView {
    --galaxy-pan-x: 0px;
    --galaxy-pan-y: 0px;
    --galaxy-band-pan-x: 0px;
    --galaxy-band-pan-y: 0px;
    --galaxy-scale: 1;
    --galaxy-band-scale: 1.12;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background:
        linear-gradient(118deg, rgba(229, 161, 90, 0.08) 0%, transparent 24% 76%, rgba(82, 204, 227, 0.1) 100%),
        radial-gradient(ellipse 115% 62% at 62% 44%, rgba(82, 204, 227, 0.18) 0%, rgba(82, 204, 227, 0.08) 26%, transparent 64%),
        radial-gradient(ellipse 90% 54% at 32% 66%, rgba(185, 133, 255, 0.14) 0%, rgba(185, 133, 255, 0.06) 28%, transparent 62%),
        linear-gradient(180deg, #0a0c1d 0%, var(--scene-background) 54%, #03040a 100%);
}

.graph-empty::before,
.graph-empty::after,
.graphView::before,
.graphView::after {
    content: "";
    position: absolute;
    inset: -18%;
    z-index: 0;
    pointer-events: none;
}

.graph-empty::before,
.graphView::before {
    background-image:
        radial-gradient(circle at 16px 24px, rgba(255, 255, 255, 0.88) 0 1px, transparent 1.4px),
        radial-gradient(circle at 92px 72px, rgba(183, 248, 255, 0.72) 0 1px, transparent 1.5px),
        radial-gradient(circle at 138px 34px, rgba(224, 222, 15, 0.5) 0 0.8px, transparent 1.2px),
        radial-gradient(circle at 210px 118px, rgba(255, 255, 255, 0.48) 0 0.7px, transparent 1.1px);
    background-size: 240px 180px, 320px 260px, 360px 240px, 420px 300px;
    opacity: 0.72;
    transform-origin: center;
    transform: rotate(-10deg) translate3d(var(--galaxy-pan-x), var(--galaxy-pan-y), 0) scale(var(--galaxy-scale));
    animation: star-drift 110s linear infinite;
}

.graph-empty::after,
.graphView::after {
    background:
        linear-gradient(112deg, transparent 18%, rgba(183, 248, 255, 0.04) 36%, rgba(224, 222, 15, 0.06) 48%, rgba(185, 133, 255, 0.05) 58%, transparent 78%),
        repeating-radial-gradient(ellipse at 50% 50%, transparent 0 22px, rgba(255, 255, 255, 0.025) 23px 24px, transparent 25px 44px);
    opacity: 0.9;
    transform-origin: center;
    transform: rotate(-13deg) translate3d(var(--galaxy-band-pan-x), var(--galaxy-band-pan-y), 0) scale(var(--galaxy-band-scale));
    animation: galaxy-drift 160s linear infinite;
}

.btn {
    display: inline-block;
    padding: 6px 14px;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.16);
    cursor: pointer;
    border-radius: 14px;
    color: #101218;
    background-color: var(--button-color);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.btn:hover {
    filter: brightness(1.06);
}

.btn:disabled {
    cursor: not-allowed;
    filter: none;
    opacity: 0.65;
}

.form-control {
    display: block;
    width: 100%;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.42857;
    color: #fff;
    background-color: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.58);
}

.input-group {
    position: relative;
    display: flex;
}

.input-group .form-control {
    flex: 1 1 auto;
    width: 1%;
}

.input-group-btn {
    display: flex;
}

.left-panel {
    position: absolute;
    top: 16px;
    left: 16px;
    bottom: 16px;
    width: min(var(--left-panel-width), calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    z-index: 2;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    backdrop-filter: blur(30px) saturate(1.7);
    -webkit-backdrop-filter: blur(30px) saturate(1.7);
}

.left-panel-empty {
    bottom: auto;
}

.navbar-component {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    background: transparent;
    padding-bottom: 8px;
}

.navbar-component-empty {
    background: transparent;
    padding-bottom: 0;
}

.search {
    width: auto;
    margin: 14px;
}

.control-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search input[type="text"] {
    border-right: 0;
    border-radius: 8px 0 0 8px;
}

.search .input-group-btn .btn {
    background: var(--button-color);
    border-radius: 0 8px 8px 0;
}

.module-suggestions {
    display: flex;
    flex-direction: column;
    max-height: min(300px, calc(100vh - 160px));
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(13, 17, 27, 0.96);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.search .module-suggestion {
    appearance: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    min-height: 54px;
    padding: 10px 12px;
    color: var(--primary-color);
    background: transparent;
    border: 0;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: none;
    font: inherit;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
}

.search .module-suggestion:last-child {
    border-bottom: 0;
}

.search .module-suggestion:hover,
.search .module-suggestion:focus,
.search .module-suggestion-active {
    background: rgba(82, 204, 227, 0.12);
    outline: 0;
}

.module-suggestion-main {
    color: #f6f8fb;
    font-size: 13px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.module-suggestion-meta {
    color: rgba(213, 220, 232, 0.74);
    font-size: 12px;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.graph-errors,
.graph-progress {
    margin: 8px 14px 14px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
}

#graph-progress {
    border-radius: 8px;
}

.graph-errors h4,
.graph-progress h4 {
    margin: 0 0 6px;
    font-size: 14px;
}

.compact {
    font-size: 12px;
}

.error-message {
    color: #ffd0d2;
    line-height: 1.45;
}

#graph-result {
    min-height: 0;
}

#graph-result[data-state="loaded"] {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.infoBox {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    background-color: transparent;
    padding: 0 16px 20px;
    color: var(--primary-color);
}

.hide-info-box {
    display: none;
}

.packageInfo a {
    word-break: break-word;
}

.all-licenses h4 {
    margin-bottom: 12px;
    font-size: 18px;
    margin-top: 20px;
}

.packageInfo > .all-licenses:first-child h4 {
    margin-top: 6px;
}

.panel-intro {
    flex-shrink: 0;
    padding: 0 16px;
}

.panel-attribution {
    margin: 4px 0 14px;
}

.attribution-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.attribution-mascot-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    border-radius: 8px;
}

.attribution-mascot-link:hover,
.attribution-mascot-link:focus {
    text-decoration: none;
}

.attribution-mascot-link:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

.attribution-mascot {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.data-attribution {
    margin: 0;
    color: rgba(213, 220, 232, 0.72);
    font-size: 12px;
    line-height: 1.4;
}

.truncate {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.license-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.lens-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.lens-heading-row h4 {
    margin: 0;
}

.lens-switcher {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
}

.lens-circle {
    appearance: none;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    overflow: hidden;
    cursor: pointer;
}

.lens-circle-openssf {
    background: conic-gradient(from 220deg, #6ed0b3, #63c9ff, #b985ff, #f2c14e, #6ed0b3);
}

.lens-circle-release-freshness {
    background: conic-gradient(from 35deg, #6ed0b3, #f2c14e, #f08a4b, #dc5f65, #b985ff, #6ed0b3);
}

.lens-circle:not(.lens-circle-add):hover,
.lens-circle:not(.lens-circle-add):focus {
    border-color: rgba(245, 250, 255, 0.7);
    box-shadow: 0 0 0 2px rgba(245, 250, 255, 0.12);
}

.lens-circle-active {
    border-width: 3px;
    border-color: #f2c14e;
    box-shadow:
        0 0 0 2px rgba(242, 193, 78, 0.18),
        0 0 14px rgba(242, 193, 78, 0.34);
}

.lens-circle:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

.lens-circle-add {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(82, 204, 227, 0.08)),
        rgba(255, 255, 255, 0.06);
    border-color: rgba(82, 204, 227, 0.54);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.lens-circle-add:hover,
.lens-circle-add:focus {
    border-color: var(--link-color);
    background:
        linear-gradient(145deg, rgba(224, 222, 15, 0.2), rgba(82, 204, 227, 0.12)),
        rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.lens-circle-add::before,
.lens-circle-add::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 11px;
    height: 2px;
    border-radius: 999px;
    background: rgba(245, 250, 255, 0.94);
    transform: translate(-50%, -50%);
}

.lens-circle-add::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.lens-circle-add:hover::before,
.lens-circle-add:hover::after,
.lens-circle-add:focus::before,
.lens-circle-add:focus::after {
    background: var(--link-color);
}

.lens-circle-add:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

.lens-panel-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--primary-color);
    font-size: 14px;
    padding: 2px 0 6px;
}

.lens-panel-heading .last {
    color: var(--secondary-color);
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.lens-panel .license-row:last-child {
    border-bottom: 0;
}

.license-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    color: var(--primary-color);
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.license-row:hover {
    color: var(--link-color);
    text-decoration: none;
}

.license-row .last {
    color: var(--secondary-color);
    flex-shrink: 0;
}

.module-dependency-count {
    min-width: 34px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.score-row span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.score-swatch {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.36);
}

.graphView {
    width: 100%;
    height: 100%;
}

.graphView canvas,
.graphView svg {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: block;
}

@keyframes star-drift {
    from {
        background-position: 0 0, 0 0, 0 0, 0 0;
    }

    to {
        background-position: -120px 90px, -160px 120px, 180px -80px, -220px 140px;
    }
}

@keyframes galaxy-drift {
    from {
        background-position: 0 0, 0 0;
    }

    to {
        background-position: 90px -70px, -140px 120px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .graph-empty::before,
    .graph-empty::after,
    .graphView::before,
    .graphView::after {
        animation: none;
    }
}

.github-link {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 40px;
    height: 40px;
    padding: 0 13px;
    color: rgba(255, 255, 255, 0.84);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.github-link:hover,
.github-link:focus {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.16);
    text-decoration: none;
}

.github-link:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

.github-link svg {
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
    display: block;
}

.github-link-label {
    display: block;
}

@media (max-width: 960px) {
    body {
        overflow: hidden;
    }

    .left-panel {
        top: 12px;
        right: 12px;
        bottom: 12px;
        left: 12px;
        width: auto;
        max-height: calc(100vh - 24px);
    }

    .left-panel-empty {
        bottom: auto;
    }

    .navbar-component-empty {
        padding-top: 0;
    }

    .graphView,
    .graph-empty {
        height: 100%;
    }

    .search {
        width: auto;
    }

    .left-panel-empty {
        right: 136px;
    }

    .github-link {
        top: 12px;
        right: 12px;
    }
}
