html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
    background: #050812;
    color: #f4f7fb;
}

* {
    box-sizing: border-box;
}

.app-shell {
    display: flex;
    width: 100%;
    height: 100%;
}

.sidebar {
    width: 340px;
    min-width: 340px;
    padding: 20px;
    overflow-y: auto;
    background: rgba(8, 13, 24, 0.98);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 3;
}

.is-embedded .sidebar {
    width: 310px;
    min-width: 310px;
    padding: 16px;
}

.brand h1 {
    margin: 0 0 8px;
    font-size: 27px;
    line-height: 1.12;
}

.brand p,
.note p {
    margin: 0;
    color: #bdc9dd;
    line-height: 1.45;
}

.eyebrow {
    margin: 0 0 7px;
    color: #8fb9ff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.panel {
    margin-top: 16px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.panel h2 {
    margin: 0 0 12px;
    font-size: 17px;
}

.field-label {
    display: block;
    margin: 12px 0 7px;
    color: #d5def0;
    font-size: 14px;
}

input,
select,
button {
    width: 100%;
    min-height: 40px;
    border-radius: 8px;
    font-size: 14px;
}

input,
select {
    padding: 9px 11px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

button {
    border: 0;
    padding: 9px 11px;
    cursor: pointer;
    background: #2d7df0;
    color: #ffffff;
}

button:hover {
    filter: brightness(1.08);
}

.button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.toggle {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 10px 0;
    color: #e2e8f6;
    cursor: pointer;
}

.toggle input {
    width: 18px;
    min-height: 18px;
}

.status-box {
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: #e4ecff;
    line-height: 1.35;
}

#timeline {
    margin-top: 12px;
}

.viewer-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
    background:
        radial-gradient(circle at 65% 30%, rgba(89, 112, 160, 0.15), transparent 30%),
        #030712;
}

#jupiter-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
}

#jupiter-canvas:active {
    cursor: grabbing;
}

#label-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.moon-label {
    position: absolute;
    transform: translate(-50%, -50%);
    width: auto;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 3px 7px;
    border-radius: 8px;
    background: rgba(5, 9, 17, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.13);
    color: #edf4ff;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    text-shadow: 0 1px 3px #000;
    cursor: pointer;
    pointer-events: auto;
}

.moon-label:hover {
    background: rgba(28, 42, 73, 0.94);
    border-color: rgba(144, 183, 255, 0.55);
}

.loading-status {
    position: absolute;
    left: 24px;
    bottom: 24px;
    max-width: min(420px, calc(100% - 48px));
    padding: 11px 13px;
    border-radius: 8px;
    background: rgba(4, 9, 18, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #dce8ff;
    z-index: 3;
}

.loading-status.is-hidden {
    display: none;
}

.info-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    width: min(380px, calc(100% - 40px));
    max-height: calc(100% - 40px);
    overflow-y: auto;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(6, 12, 24, 0.94);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
    color: #f3f6fb;
    z-index: 4;
    opacity: 0;
    transform: translateX(16px);
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
}

.info-panel.is-visible {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.info-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    min-height: 34px;
    margin: 0;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
}

.info-kicker {
    margin: 0 0 6px;
    color: #8fb9ff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.info-panel h2 {
    margin: 0 0 6px;
    font-size: 24px;
}

.info-panel p {
    color: #c5d1e5;
    line-height: 1.45;
}

.info-flyto {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 34px;
    margin: 10px 0 0;
    padding: 7px 12px;
    border: 1px solid rgba(139, 181, 255, 0.42);
    background: rgba(45, 125, 240, 0.22);
    color: #f5f8ff;
    font-size: 13px;
    font-weight: 700;
}

.info-panel dl {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) 1.4fr;
    gap: 7px 12px;
    margin: 16px 0;
}

.info-panel dt {
    color: #92a5c4;
}

.info-panel dd {
    margin: 0;
    color: #ffffff;
    font-weight: 700;
}

.info-source {
    margin: 14px 0 0;
    font-size: 13px;
}

@media (max-width: 900px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar,
    .is-embedded .sidebar {
        width: 100%;
        min-width: 0;
        max-height: 46vh;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .viewer-wrap {
        min-height: 54vh;
    }
}
