/* ============================================
   RF-SIGINT Globe Sat View
   Page-specific styles
   ============================================ */

/* ── Page Layout ─────────────────────────────── */
body.globe-page {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #000;
    height: 100vh;
}

/* Force no header on globe page */
body.globe-page .nav,
body.globe-page .topbar,
body.globe-page #site-header {
    display: none !important;
}

/* ── Logo (top-left, replaces full nav) ──────── */
.gsv-logo {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 102;
    display: block;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.gsv-logo:hover {
    opacity: 1;
}

.gsv-logo img {
    height: 28px;
    width: auto;
    display: block;
}

/* ── Cesium Container ────────────────────────── */
#cesiumContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
}

/* Cesium UI tweaks - hide credits bar */
.cesium-viewer-bottom {
    display: none !important;
}

.cesium-credit-logoContainer,
.cesium-credit-textContainer,
.cesium-viewer .cesium-widget-credits {
    display: none !important;
}

/* ── Shared Panel Styles ─────────────────────── */
.gsv-panel {
    background: rgba(15, 15, 15, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    color: #fff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.gsv-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #fc8200;
}

/* ── Constellation Selector (Left Sidebar) ───── */
#constellationPanel {
    position: fixed;
    top: 54px;
    left: 16px;
    width: 240px;
    max-height: calc(100vh - 90px);
    z-index: 100;
    padding: 16px;
    overflow-y: auto;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

#constellationPanel.collapsed {
    transform: translateX(-260px);
    opacity: 0;
    pointer-events: none;
}

#constellationPanel::-webkit-scrollbar {
    width: 4px;
}

#constellationPanel::-webkit-scrollbar-track {
    background: transparent;
}

#constellationPanel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.constellation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.constellation-header h3 {
    font-size: 13px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
}

/* Toggle button for collapsing panel */
#panelToggle {
    position: fixed;
    top: 54px;
    left: 16px;
    z-index: 101;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 15, 15, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

#panelToggle:hover {
    background: rgba(252, 130, 0, 0.15);
}

#panelToggle.panel-open {
    left: 270px;
    transform: rotate(180deg);
}

/* Constellation toggle buttons */
.constellation-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 4px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: #ccc;
    cursor: pointer;
    text-align: left;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.constellation-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.constellation-btn.active {
    background: rgba(252, 130, 0, 0.1);
    border-color: rgba(252, 130, 0, 0.3);
    color: #fff;
}

.constellation-btn__color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 6px currentColor;
}

.constellation-btn__info {
    flex: 1;
    min-width: 0;
}

.constellation-btn__name {
    display: block;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.3;
}

.constellation-btn__count {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #777;
    margin-top: 1px;
}

.constellation-btn.active .constellation-btn__count {
    color: #fc8200;
}

.constellation-btn__icon {
    font-size: 16px;
    flex-shrink: 0;
}

.constellation-btn__loading {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-top-color: #fc8200;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

.constellation-btn.loading .constellation-btn__loading {
    display: block;
}

.constellation-btn.loading .constellation-btn__icon {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Active satellite count badge */
.active-count {
    display: inline-block;
    padding: 2px 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    color: #fc8200;
    background: rgba(252, 130, 0, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(252, 130, 0, 0.2);
}

/* ── Satellite Detail Panel (Right Sidebar) ──── */
#detailPanel {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 320px;
    max-height: calc(100vh - 90px);
    z-index: 100;
    padding: 20px;
    overflow-y: auto;
    transform: translateX(360px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

#detailPanel.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

#detailPanel::-webkit-scrollbar {
    width: 4px;
}

#detailPanel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-header__name {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.detail-header__type {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    background: rgba(252, 130, 0, 0.12);
    color: #fc8200;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

#detailClose {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #888;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

#detailClose:hover {
    background: rgba(255, 70, 70, 0.15);
    border-color: rgba(255, 70, 70, 0.3);
    color: #ff6666;
}

/* Data rows */
.detail-section {
    margin-bottom: 16px;
}

.detail-section__title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #fc8200;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(252, 130, 0, 0.15);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row__label {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    margin-right: 12px;
}

.detail-row__value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    color: #e0e0e0;
    text-align: right;
}

.detail-row__value--live {
    color: #00cc88;
}

/* Track satellite button */
.detail-track-btn {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 12px;
    border: 1px solid rgba(252, 130, 0, 0.4);
    border-radius: 8px;
    background: rgba(252, 130, 0, 0.08);
    color: #fc8200;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.detail-track-btn:hover {
    background: rgba(252, 130, 0, 0.18);
    border-color: rgba(252, 130, 0, 0.6);
}

/* ── Phase 2: RF Frequency Rows ──────────────── */
.freq-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 12px;
}

.freq-row:last-child {
    border-bottom: none;
}

.freq-direction {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 5px;
    border-radius: 3px;
    flex-shrink: 0;
    min-width: 16px;
    text-align: center;
}

.freq-direction--downlink {
    background: rgba(0, 204, 136, 0.12);
    color: #00cc88;
    border: 1px solid rgba(0, 204, 136, 0.2);
}

.freq-direction--uplink {
    background: rgba(68, 136, 255, 0.12);
    color: #4488ff;
    border: 1px solid rgba(68, 136, 255, 0.2);
}

.freq-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    color: #e0e0e0;
    white-space: nowrap;
}

.freq-mode {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #777;
    margin-left: auto;
    flex-shrink: 0;
}

.freq-band {
    font-size: 10px;
    color: #fc8200;
    opacity: 0.7;
    flex-shrink: 0;
}

.freq-use {
    font-size: 10px;
    color: #666;
    margin-top: 2px;
    padding-left: 30px;
}

/* ── Phase 2: Doppler Shifted Frequencies ────── */
.doppler-freq {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.doppler-freq__label {
    font-size: 11px;
    color: #888;
}

.doppler-freq__value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #00cc88;
}

.doppler-freq__shift {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #fc8200;
    margin-left: 6px;
}

/* ── Phase 2: WebSDR Station Links ───────────── */
.websdr-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.websdr-item:last-child {
    border-bottom: none;
}

.websdr-item__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00cc88;
    box-shadow: 0 0 4px rgba(0, 204, 136, 0.4);
    flex-shrink: 0;
}

.websdr-item__info {
    flex: 1;
    min-width: 0;
}

.websdr-item__name {
    font-size: 12px;
    font-weight: 500;
    color: #e0e0e0;
}

.websdr-item__location {
    font-size: 10px;
    color: #666;
    margin-top: 1px;
}

.websdr-item__range {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #888;
}

.websdr-listen-btn {
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(252, 130, 0, 0.3);
    background: rgba(252, 130, 0, 0.08);
    color: #fc8200;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.websdr-listen-btn:hover {
    background: rgba(252, 130, 0, 0.18);
    border-color: rgba(252, 130, 0, 0.5);
    color: #fc8200;
}

.websdr-empty {
    font-size: 11px;
    color: #555;
    padding: 6px 0;
    font-style: italic;
}

/* ── Phase 2: Ground Station Markers ─────────── */
.websdr-marker-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #00cc88;
    background: rgba(0, 20, 10, 0.7);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(0, 204, 136, 0.25);
    white-space: nowrap;
    pointer-events: none;
}

/* ── Phase 4: Educational Links ──────────────── */
.edu-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    text-decoration: none;
    transition: opacity 0.2s;
}

.edu-link:last-child {
    border-bottom: none;
}

.edu-link:hover {
    opacity: 0.8;
}

.edu-link__icon {
    font-size: 14px;
    flex-shrink: 0;
}

.edu-link__text {
    font-size: 12px;
    color: #fc8200;
    font-weight: 500;
}

.edu-link__desc {
    font-size: 10px;
    color: #666;
    margin-top: 2px;
}

/* ── Phase 4: Spectrum Waterfall ─────────────── */
#waterfallPanel {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    width: 600px;
    max-width: calc(100vw - 32px);
    padding: 12px 16px;
}

.waterfall-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.waterfall-header__left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.waterfall-freq-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #e0e0e0;
    font-weight: 500;
}

.waterfall-close {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #888;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.waterfall-close:hover {
    background: rgba(255, 70, 70, 0.15);
    color: #ff6666;
}

#waterfallCanvas {
    width: 100%;
    height: 120px;
    border-radius: 6px;
    background: #0a0a0a;
    display: block;
}

.waterfall-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: #555;
}

/* ── Phase 4: Space Weather Indicator ────────── */
#spaceWeather {
    position: fixed;
    bottom: 20px;
    right: 16px;
    z-index: 99;
    display: flex;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 10px;
}

.spacewx-badge {
    display: flex;
    align-items: center;
    gap: 4px;
}

.spacewx-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
}

.spacewx-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    color: #e0e0e0;
}

.spacewx-value--good { color: #00cc88; }
.spacewx-value--warn { color: #ffcc00; }
.spacewx-value--bad { color: #ff4444; }

/* ── Search Bar (Top Center) ─────────────────── */
#searchBar {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    width: 380px;
    max-width: calc(100vw - 600px);
}

.search-wrapper {
    position: relative;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

#satSearch {
    width: 100%;
    padding: 11px 16px 11px 40px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(15, 15, 15, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

#satSearch::placeholder {
    color: #666;
}

#satSearch:focus {
    border-color: rgba(252, 130, 0, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(252, 130, 0, 0.08);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #666;
    pointer-events: none;
}

.search-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Search results dropdown */
#searchResults {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 340px;
    overflow-y: auto;
    border-radius: 12px;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    display: none;
}

#searchResults.visible {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover,
.search-result-item.highlighted {
    background: rgba(252, 130, 0, 0.08);
}

.search-result-item__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.search-result-item__name {
    font-size: 13px;
    font-weight: 500;
    color: #e0e0e0;
}

.search-result-item__id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #666;
    margin-left: auto;
    flex-shrink: 0;
}

.search-empty {
    padding: 16px;
    text-align: center;
    font-size: 13px;
    color: #666;
}

/* ── Time Controls (Bottom Center) ───────────── */
#timeControls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    border-radius: 14px;
}

.time-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #ccc;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.time-btn:hover {
    background: rgba(252, 130, 0, 0.12);
    border-color: rgba(252, 130, 0, 0.3);
    color: #fc8200;
}

.time-btn.active {
    background: rgba(252, 130, 0, 0.15);
    border-color: rgba(252, 130, 0, 0.4);
    color: #fc8200;
}

.time-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.time-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.08);
}

.time-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #aaa;
    min-width: 170px;
    text-align: center;
    white-space: nowrap;
}

.time-display__utc {
    color: #e0e0e0;
    font-weight: 500;
}

.speed-btns {
    display: flex;
    gap: 4px;
}

.speed-btn {
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
    color: #888;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.speed-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ccc;
}

.speed-btn.active {
    background: rgba(252, 130, 0, 0.12);
    border-color: rgba(252, 130, 0, 0.3);
    color: #fc8200;
}

/* ── Loading Overlay ─────────────────────────── */
#globeLoading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 500;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease;
}

#globeLoading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-logo {
    width: 160px;
    margin-bottom: 32px;
    opacity: 0.9;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(252, 130, 0, 0.15);
    border-top-color: #fc8200;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #666;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ── Status Bar (top right) ──────────────────── */
#statusBar {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 99;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #888;
    transition: opacity 0.3s;
}

#statusBar.hidden-by-detail {
    opacity: 0;
    pointer-events: none;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00cc88;
    box-shadow: 0 0 6px rgba(0, 204, 136, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 1200px) {
    #searchBar {
        max-width: calc(100vw - 360px);
    }
}

@media (max-width: 900px) {
    #constellationPanel {
        width: 200px;
    }

    #panelToggle.panel-open {
        left: 230px;
    }

    #detailPanel {
        width: 280px;
    }

    #searchBar {
        max-width: 280px;
    }

    #statusBar {
        display: none;
    }
}

@media (max-width: 700px) {
    #constellationPanel {
        top: auto;
        bottom: 80px;
        left: 8px;
        right: 8px;
        width: auto;
        max-height: 240px;
        border-radius: 14px;
    }

    #constellationPanel.collapsed {
        transform: translateY(320px);
    }

    #panelToggle {
        top: auto;
        bottom: 80px;
        left: 8px;
    }

    #panelToggle.panel-open {
        left: 8px;
        bottom: 332px;
    }

    #detailPanel {
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-height: 50vh;
        border-radius: 14px 14px 0 0;
        transform: translateY(100%);
    }

    #detailPanel.open {
        transform: translateY(0);
    }

    #searchBar {
        top: 70px;
        width: auto;
        left: 12px;
        right: 12px;
        max-width: none;
        transform: none;
    }

    #timeControls {
        bottom: 12px;
        padding: 8px 12px;
        gap: 6px;
    }

    .time-display {
        min-width: auto;
        font-size: 10px;
    }

    .speed-btns {
        display: none;
    }
}

@media (max-width: 400px) {
    .constellation-btn__count {
        display: none;
    }
}

/* ── Phase 5: Mode Switcher ──────────────────── */
.mode-switcher {
    display: flex;
    gap: 2px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 2px;
    margin-bottom: 12px;
}

.mode-tab {
    flex: 1;
    padding: 6px 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #666;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.25s;
}

.mode-tab.active {
    background: rgba(252, 130, 0, 0.15);
    color: #fc8200;
}

.mode-tab:hover:not(.active) {
    color: #aaa;
    background: rgba(255, 255, 255, 0.03);
}

/* ── Phase 5: Ground Station Detail Panel ────── */
#gndDetailPanel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 340px;
    z-index: 200;
    border-radius: 0;
    padding: 20px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#gndDetailPanel.open {
    transform: translateX(0);
}

.gnd-detail-desc {
    font-size: 12px;
    color: #999;
    line-height: 1.5;
    margin: 0;
}

/* Ground station antenna rows */
.gnd-antenna-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.gnd-antenna-row:last-child {
    border-bottom: none;
}

.gnd-antenna-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #e0e0e0;
    font-weight: 600;
}

.gnd-antenna-size {
    font-size: 11px;
    color: #888;
}

.gnd-antenna-note {
    font-size: 10px;
    color: #fc8200;
    font-style: italic;
}

/* Band tags */
.gnd-band-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.gnd-band-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* DSN live link rows */
.dsn-link-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.dsn-link-row:last-child {
    border-bottom: none;
}

.dsn-link-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dsn-link-indicator--active {
    background: #00cc88;
    box-shadow: 0 0 6px rgba(0, 204, 136, 0.5);
    animation: dsn-pulse 2s ease-in-out infinite;
}

.dsn-link-indicator--idle {
    background: #444;
}

@keyframes dsn-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(0, 204, 136, 0.5); }
    50% { opacity: 0.5; box-shadow: 0 0 2px rgba(0, 204, 136, 0.2); }
}

.dsn-link-info {
    flex: 1;
    min-width: 0;
}

.dsn-link-spacecraft {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #e0e0e0;
    font-weight: 600;
}

.dsn-link-detail {
    font-size: 10px;
    color: #666;
}

.dsn-link-band {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    color: #fc8200;
}

