/* ── Sky Explorer V2 ── */
#sky2-wrap {
    display: flex;
    gap: 0;
    width: 100%;
    min-height: 600px;
    background: #020810;
    border-radius: 16px;
    overflow: hidden;
    font-family: 'Inter', -apple-system, sans-serif;
    position: relative;
}

/* ── Panel ── */
#sky2-panel {
    width: 240px;
    flex-shrink: 0;
    background: rgba(6, 12, 28, 0.97);
    border-right: 1px solid rgba(80, 120, 220, 0.18);
    padding: 18px 16px;
    overflow-y: auto;
    scrollbar-width: none;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 0;
}
#sky2-panel::-webkit-scrollbar { display: none; }

.sky2-panel-title {
    font-size: 14px;
    font-weight: 700;
    color: rgba(210, 230, 255, 0.95);
    margin-bottom: 16px;
    letter-spacing: -0.2px;
}

.sky2-field-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}
.sky2-field {
    flex: 1;
    min-width: 0;
}
.sky2-field label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(120, 150, 210, 0.6);
    margin-bottom: 4px;
}
.sky2-field input {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(80,120,220,0.2);
    border-radius: 7px;
    padding: 7px 8px;
    color: rgba(210,230,255,0.9);
    font-family: inherit;
    font-size: 12px;
    outline: none;
    transition: border-color 0.15s;
}
.sky2-field input:focus { border-color: rgba(80,140,255,0.6); }

.sky2-btn-row {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
}
.sky2-btn-ghost {
    flex: 1;
    background: none;
    border: 1px solid rgba(80,120,220,0.2);
    border-radius: 7px;
    color: rgba(140,170,220,0.7);
    font-family: inherit;
    font-size: 11px;
    padding: 6px 4px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}
.sky2-btn-ghost:hover {
    border-color: rgba(80,140,255,0.5);
    color: rgba(180,210,255,0.9);
}
.sky2-btn-primary {
    width: 100%;
    background: linear-gradient(135deg,#1a3a99,#4a8fff);
    border: none;
    border-radius: 9px;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 9px;
    cursor: pointer;
    transition: opacity 0.15s;
    margin-bottom: 14px;
}
.sky2-btn-primary:hover { opacity: 0.88; }

/* Readout */
#sky2-readout {
    border-top: 1px solid rgba(80,120,220,0.15);
    padding-top: 12px;
    margin-bottom: 12px;
}
.sky2-body-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
}
.sky2-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}
.sky2-bname {
    font-size: 12px;
    font-weight: 600;
    color: rgba(200,220,255,0.9);
    line-height: 1.3;
}
.sky2-bcoord {
    font-size: 10px;
    color: rgba(120,150,200,0.65);
    margin-top: 1px;
    line-height: 1.5;
}
.sky2-vis {
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 99px;
    flex-shrink: 0;
    margin-left: auto;
    white-space: nowrap;
}
.sky2-vis.up   { background: rgba(40,180,80,0.12);  color: #4dca70; }
.sky2-vis.down { background: rgba(200,80,60,0.12);  color: #e05c3a; }

/* Location info */
#sky2-location-info {
    font-size: 11px;
    color: rgba(120,150,200,0.6);
    margin-bottom: 12px;
    line-height: 1.6;
    border-top: 1px solid rgba(80,120,220,0.12);
    padding-top: 10px;
}

/* Legend */
.sky2-legend {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 12px;
}
.sky2-leg-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    color: rgba(130,160,210,0.65);
}

.sky2-hint {
    font-size: 10px;
    color: rgba(100,130,190,0.4);
    text-align: center;
    margin-top: auto;
    padding-top: 8px;
}

/* ── 3D Container ── */
#sky2-container {
    flex: 1;
    min-height: 560px;
    position: relative;
    cursor: grab;
}
#sky2-container:active { cursor: grabbing; }
#sky2-container canvas { display: block; }

/* ── Tooltip ── */
#sky2-tooltip {
    position: absolute;
    background: rgba(6,12,28,0.94);
    border: 1px solid rgba(80,120,220,0.3);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    color: rgba(200,220,255,0.9);
    pointer-events: none;
    display: none;
    z-index: 50;
    line-height: 1.6;
    backdrop-filter: blur(10px);
}

/* ── Responsive ── */
@media (max-width: 640px) {
    #sky2-wrap { flex-direction: column; min-height: auto; }
    #sky2-panel { width: 100%; border-right: none; border-bottom: 1px solid rgba(80,120,220,0.18); }
    #sky2-container { min-height: 360px; }
}
