/* ===================================================================
   Launch Watch Tracker -- Mission Control Theme
   =================================================================== */

/* --- Custom properties -------------------------------------------- */
:root {
    --deep-space: #0b0c10;
    --nebula: #1f1235;
    --star-blue: #162447;
    --accent-cyan: #00d2ff;
    --accent-cyan-dim: rgba(0, 210, 255, 0.15);
    --accent-cyan-glow: rgba(0, 210, 255, 0.4);
    --warning-orange: #ff6b35;
    --success-green: #00e676;
    --failure-red: #ff1744;
    --text-primary: #e0e0e0;
    --text-secondary: #8892b0;
    --glass-bg: rgba(22, 36, 71, 0.45);
    --glass-border: rgba(0, 210, 255, 0.12);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
    --card-radius: 16px;
}

/* --- Reset & base ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--deep-space);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Animated stars background ------------------------------------ */
.stars-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.stars-bg .layer {
    position: absolute;
    inset: 0;
    background-repeat: repeat;
    animation: drift linear infinite;
}
.stars-bg .layer-1 {
    background-image:
        radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,.7) 50%, transparent 50%),
        radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,.5) 50%, transparent 50%),
        radial-gradient(1.2px 1.2px at 65% 15%, rgba(255,255,255,.6) 50%, transparent 50%),
        radial-gradient(1px 1px at 80% 55%, rgba(255,255,255,.4) 50%, transparent 50%),
        radial-gradient(1.5px 1.5px at 25% 85%, rgba(200,220,255,.8) 50%, transparent 50%),
        radial-gradient(1px 1px at 90% 40%, rgba(255,255,255,.5) 50%, transparent 50%);
    background-size: 300px 300px;
    animation-duration: 120s;
}
.stars-bg .layer-2 {
    background-image:
        radial-gradient(1.5px 1.5px at 50% 50%, rgba(255,255,255,.3) 50%, transparent 50%),
        radial-gradient(2px 2px at 20% 80%, rgba(200,200,255,.4) 50%, transparent 50%),
        radial-gradient(1px 1px at 70% 30%, rgba(255,255,255,.3) 50%, transparent 50%),
        radial-gradient(1.5px 1.5px at 85% 90%, rgba(180,200,255,.5) 50%, transparent 50%);
    background-size: 400px 400px;
    animation-duration: 180s;
    animation-direction: reverse;
}
.stars-bg .layer-3 {
    background-image:
        radial-gradient(2px 2px at 30% 40%, rgba(0,210,255,.15) 50%, transparent 50%),
        radial-gradient(2.5px 2.5px at 60% 75%, rgba(0,210,255,.1) 50%, transparent 50%);
    background-size: 500px 500px;
    animation-duration: 240s;
}
@keyframes drift {
    from { transform: translateY(0); }
    to   { transform: translateY(-300px); }
}

/* --- Layout wrapper ------------------------------------------------ */
.app-wrapper {
    position: relative;
    z-index: 1;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

/* --- Header ------------------------------------------------------- */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0 12px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}
.site-header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #fff;
}
.site-header .logo i {
    color: var(--accent-cyan);
    font-size: 1.8rem;
    filter: drop-shadow(0 0 6px var(--accent-cyan-glow));
}
.site-header .meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: .85rem;
    color: var(--text-secondary);
}
.site-header .meta .status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--success-green);
    display: inline-block;
    margin-right: 4px;
    box-shadow: 0 0 6px var(--success-green);
    animation: blink 2s ease-in-out infinite;
}
@keyframes blink {
    0%,100% { opacity: 1; }
    50%     { opacity: .4; }
}

/* --- Glass card --------------------------------------------------- */
.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 24px;
    transition: border-color .25s, box-shadow .25s;
}
.glass:hover {
    border-color: rgba(0, 210, 255, 0.25);
    box-shadow: var(--glass-shadow), 0 0 20px rgba(0,210,255,.06);
}
.glass .card-title {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--accent-cyan);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.glass .card-title i {
    font-size: 1.1rem;
}

/* --- Section titles ----------------------------------------------- */
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
    margin: 36px 0 0;
    padding: 14px 14px;
    border-left: 3px solid var(--accent-cyan);
    cursor: pointer;
    display: flex;
    align-items: center;
    user-select: none;
    transition: background 0.15s;
    border-radius: 4px;
}
.section-title:hover { background: rgba(0,210,255,0.04); }
.section-title .section-chevron {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: transform 0.25s;
}
.section-title.collapsed .section-chevron { transform: rotate(-90deg); }
.section-content { margin-top: 18px; overflow: hidden; transition: max-height 0.3s ease; }
.section-content.collapsed { display: none; }

/* --- Primary grid layout ------------------------------------------ */
.grid-hero   { display: grid; gap: 24px; grid-template-columns: 1fr; margin-bottom: 24px; }
.grid-top    { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-bottom: 24px; }
.grid-main   { display: grid; gap: 24px; grid-template-columns: 2fr 1fr; margin-bottom: 24px; }
.grid-bottom { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-bottom: 24px; }

@media (max-width: 900px) {
    .grid-main { grid-template-columns: 1fr; }
}

/* --- Globe -------------------------------------------------------- */
#globe-container {
    width: 100%;
    height: 500px;
    border-radius: var(--card-radius);
    overflow: hidden;
    position: relative;
}
#globe-container canvas {
    border-radius: var(--card-radius);
}
/* Hide all Cesium UI chrome */
#globe-container .cesium-viewer-bottom,
#globe-container .cesium-viewer-toolbar,
#globe-container .cesium-viewer-animationContainer,
#globe-container .cesium-viewer-timelineContainer,
#globe-container .cesium-viewer-fullscreenContainer,
#globe-container .cesium-viewer-infoBoxContainer,
#globe-container .cesium-viewer-selectionIndicatorContainer,
#globe-container .cesium-viewer-geocoderContainer,
#globe-container .cesium-credit-logoContainer,
#globe-container .cesium-credit-textContainer { display: none !important; }
.cesium-widget-credits { display: none !important; }

/* Globe tooltip */
.globe-tooltip {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(22, 36, 71, 0.92);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
    padding: 12px 18px;
    font-size: .85rem;
    line-height: 1.5;
    color: var(--text-primary);
    max-width: 360px;
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s;
}
.globe-tooltip.show { opacity: 1; }
.globe-tooltip b { color: #fff; }
.globe-tooltip .tt-cyan { color: var(--accent-cyan); font-weight: 600; }
.globe-tooltip .tt-dim { color: var(--text-secondary); }

/* --- Countdown ---------------------------------------------------- */
.countdown-wrapper {
    text-align: center;
    padding: 24px 0 10px;
}
.countdown-label {
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.countdown-mission {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 14px;
    font-weight: 600;
}
.countdown-digits {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.countdown-digits .unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 72px;
}
.countdown-digits .unit .val {
    font-size: 2.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--accent-cyan);
    line-height: 1;
    text-shadow: 0 0 18px var(--accent-cyan-glow);
}
.countdown-digits .unit .lbl {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    margin-top: 4px;
}
.countdown-digits .sep {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1;
    align-self: flex-start;
}

/* --- Launch list -------------------------------------------------- */
.launch-list { list-style: none; }
.launch-item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
    transition: background .2s;
    cursor: pointer;
}
.launch-item:last-child { border-bottom: none; }
.launch-item:hover { background: rgba(0,210,255,.04); border-radius: 8px; }
.launch-item .thumb {
    width: 56px; height: 56px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--glass-border);
    background: var(--nebula);
}
.launch-item .thumb-placeholder {
    width: 56px; height: 56px;
    border-radius: 10px;
    background: var(--nebula);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    font-size: 1.4rem;
    border: 1px solid var(--glass-border);
}
.launch-item .info { min-width: 0; }
.launch-item .info .name {
    font-weight: 600;
    font-size: .95rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.launch-item .info .detail {
    font-size: .78rem;
    color: var(--text-secondary);
    margin-top: 2px;
}
.launch-item .info .detail span { margin-right: 10px; }
.launch-item .right-col {
    text-align: right;
    white-space: nowrap;
}
.launch-item .right-col .date-label {
    font-size: .78rem;
    color: var(--text-secondary);
}
.launch-item .right-col .status-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.badge-go    { background: rgba(0,230,118,.15); color: var(--success-green); }
.badge-tbd   { background: rgba(0,210,255,.12);  color: var(--accent-cyan); }
.badge-hold  { background: rgba(255,107,53,.15); color: var(--warning-orange); }
.badge-tbc   { background: rgba(255,235,59,.12); color: #ffeb3b; }
.badge-success { background: rgba(0,230,118,.15); color: var(--success-green); }
.badge-failure { background: rgba(255,23,68,.15); color: var(--failure-red); }

/* --- Stats cards -------------------------------------------------- */
.stat-card {
    text-align: center;
    padding: 28px 18px;
}
.stat-card .stat-value {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--accent-cyan);
    text-shadow: 0 0 12px var(--accent-cyan-glow);
    font-variant-numeric: tabular-nums;
}
.stat-card .stat-label {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-secondary);
    margin-top: 6px;
}
.stat-card .stat-sub {
    font-size: .72rem;
    color: var(--text-secondary);
    margin-top: 4px;
    opacity: .7;
}
.stat-card.green .stat-value { color: var(--success-green); text-shadow: 0 0 12px rgba(0,230,118,.35); }
.stat-card.orange .stat-value { color: var(--warning-orange); text-shadow: 0 0 12px rgba(255,107,53,.35); }
.stat-card.red .stat-value { color: var(--failure-red); text-shadow: 0 0 12px rgba(255,23,68,.35); }

/* Clickable stat cards */
a.stat-card-link {
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: transform .2s, box-shadow .2s;
    cursor: pointer;
    display: block;
}
a.stat-card-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0,210,255,.15);
}
.stat-link-icon {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: .7rem;
    color: var(--text-secondary);
    opacity: 0;
    transition: opacity .2s;
}
a.stat-card-link:hover .stat-link-icon {
    opacity: 1;
}

/* --- Astronauts panel --------------------------------------------- */
.astro-count {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-cyan);
    text-align: center;
    text-shadow: 0 0 20px var(--accent-cyan-glow);
}
.astro-list {
    list-style: none;
    margin-top: 14px;
    max-height: 260px;
    overflow-y: auto;
}
.astro-list li {
    padding: 7px 0;
    border-bottom: 1px solid rgba(255,255,255,.04);
    font-size: .85rem;
    display: flex;
    justify-content: space-between;
}
.astro-list li .craft {
    color: var(--text-secondary);
    font-size: .75rem;
}

/* --- Flight advisory --------------------------------------------- */
.advisory-card {
    border-left: 4px solid var(--warning-orange);
}
.advisory-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,.04);
}
.advisory-item:last-child { border-bottom: none; }
.advisory-item .adv-title {
    font-weight: 600;
    color: var(--warning-orange);
    font-size: .9rem;
    margin-bottom: 4px;
}
.advisory-item .adv-body {
    font-size: .82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.no-advisories {
    color: var(--success-green);
    font-size: .9rem;
    text-align: center;
    padding: 20px 0;
}
.no-advisories i { margin-right: 6px; }

/* --- Visibility panel --------------------------------------------- */
.vis-form {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.vis-form input {
    flex: 1;
    min-width: 160px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(11,12,16,.6);
    color: var(--text-primary);
    font-size: .88rem;
    outline: none;
    transition: border-color .2s;
}
.vis-form input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 2px rgba(0,210,255,.15);
}
.vis-form input::placeholder { color: var(--text-secondary); }
.vis-form button {
    padding: 10px 22px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--accent-cyan), #0090ff);
    color: #fff;
    font-weight: 600;
    font-size: .88rem;
    cursor: pointer;
    transition: opacity .2s, transform .15s;
    white-space: nowrap;
}
.vis-form button:hover { opacity: .88; transform: translateY(-1px); }
.vis-form button:active { transform: translateY(0); }

.vis-result { display: none; }
.vis-result.show { display: block; }
.vis-result .vis-level {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.vis-result .vis-level.likely   { color: var(--success-green); }
.vis-result .vis-level.possible { color: #ffeb3b; }
.vis-result .vis-level.unlikely { color: var(--text-secondary); }
.vis-result .vis-dist {
    font-size: .85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.vis-result .vis-tip {
    font-size: .82rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Select for launch picker */
.vis-form select {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(11,12,16,.6);
    color: var(--text-primary);
    font-size: .88rem;
    outline: none;
    transition: border-color .2s;
    -webkit-appearance: none;
    appearance: none;
}
.vis-form select:focus {
    border-color: var(--accent-cyan);
}

/* --- ISS info bar ------------------------------------------------ */
.iss-info {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: .85rem;
    color: var(--text-secondary);
    margin-top: 10px;
}
.iss-info span { display: flex; align-items: center; gap: 6px; }
.iss-info i { color: var(--accent-cyan); }

/* --- Loading spinner --------------------------------------------- */
.spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-secondary);
    gap: 10px;
    font-size: .9rem;
}
.spinner i { animation: spin 1s linear infinite; color: var(--accent-cyan); }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Scrollbar ---------------------------------------------------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,210,255,.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,210,255,.35); }

/* --- Progress bar (for stats) ------------------------------------- */
.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,.06);
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1.2s cubic-bezier(.22,.61,.36,1);
}
.progress-bar-fill.cyan   { background: var(--accent-cyan); }
.progress-bar-fill.green  { background: var(--success-green); }
.progress-bar-fill.orange { background: var(--warning-orange); }

/* --- Utility ------------------------------------------------------ */
.text-cyan   { color: var(--accent-cyan); }
.text-green  { color: var(--success-green); }
.text-orange { color: var(--warning-orange); }
.text-red    { color: var(--failure-red); }
.text-muted  { color: var(--text-secondary); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }

/* --- Satellite tracker -------------------------------------------- */
.sat-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 10px;
}
.sat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(0, 210, 255, 0.04);
    border: 1px solid rgba(0, 210, 255, 0.08);
    cursor: pointer;
    transition: background .2s, border-color .2s, transform .15s;
}
.sat-item:hover {
    background: rgba(0, 210, 255, 0.1);
    border-color: rgba(0, 210, 255, 0.2);
    transform: translateY(-1px);
}
.sat-flag {
    font-size: 1.6rem;
    line-height: 1;
    flex-shrink: 0;
}
.sat-info {
    flex: 1;
    min-width: 0;
}
.sat-name {
    font-weight: 600;
    font-size: .9rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sat-meta {
    font-size: .75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}
.sat-type-badge {
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* --- Space Weather ------------------------------------------------ */
.space-weather-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 24px;
}
@media (max-width: 1100px) {
    .space-weather-grid { grid-template-columns: 1fr; }
}
.sw-panel {
    display: flex;
    flex-direction: column;
}
.sw-summary {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.sw-summary .sw-count {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent-cyan);
    text-shadow: 0 0 14px var(--accent-cyan-glow);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.sw-summary .sw-period {
    font-size: .78rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: .8px;
}
.sw-list {
    list-style: none;
    flex: 1;
    max-height: 400px;
    overflow-y: auto;
}
.sw-event {
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 8px;
    border-left: 3px solid var(--accent-cyan);
    background: rgba(0, 210, 255, 0.04);
    transition: background .2s, border-color .2s;
}
.sw-event:hover {
    background: rgba(0, 210, 255, 0.08);
}
.sw-event.sw-moderate {
    border-left-color: #ffb300;
    background: rgba(255, 179, 0, 0.04);
}
.sw-event.sw-moderate:hover { background: rgba(255, 179, 0, 0.08); }
.sw-event.sw-severe {
    border-left-color: var(--warning-orange);
    background: rgba(255, 107, 53, 0.04);
}
.sw-event.sw-severe:hover { background: rgba(255, 107, 53, 0.08); }
.sw-event.sw-extreme {
    border-left-color: var(--failure-red);
    background: rgba(255, 23, 68, 0.06);
}
.sw-event.sw-extreme:hover { background: rgba(255, 23, 68, 0.1); }

.sw-event-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.sw-event-class {
    font-weight: 700;
    font-size: .95rem;
    color: #fff;
}
.sw-event-badge {
    margin-left: auto;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.sw-event-badge.sw-minor    { background: rgba(0,210,255,.12); color: var(--accent-cyan); }
.sw-event-badge.sw-moderate { background: rgba(255,179,0,.15); color: #ffb300; }
.sw-event-badge.sw-severe   { background: rgba(255,107,53,.15); color: var(--warning-orange); }
.sw-event-badge.sw-extreme  { background: rgba(255,23,68,.15); color: var(--failure-red); }

.sw-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: .76rem;
    color: var(--text-secondary);
}
.sw-event-meta i {
    margin-right: 3px;
    opacity: .6;
}
.sw-icon-minor    { color: var(--accent-cyan); }
.sw-icon-moderate { color: #ffb300; }
.sw-icon-severe   { color: var(--warning-orange); }
.sw-icon-extreme  { color: var(--failure-red); filter: drop-shadow(0 0 4px rgba(255,23,68,.5)); }

.sw-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 30px 0;
    color: var(--text-secondary);
    font-size: .88rem;
    flex-wrap: wrap;
}
.sw-donki-link {
    color: var(--accent-cyan);
    text-decoration: none;
    font-size: .78rem;
    opacity: .7;
    transition: opacity .2s;
}
.sw-donki-link:hover {
    opacity: 1;
    text-decoration: underline;
}
.sw-link-icon {
    margin-left: auto;
    font-size: .7rem;
    color: var(--text-secondary);
    opacity: 0;
    transition: opacity .2s;
}
.sw-event:hover .sw-link-icon {
    opacity: 1;
}
.sw-view-all {
    text-align: center;
    padding: 10px 0 4px;
    list-style: none;
}
.sw-view-all a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-size: .78rem;
    opacity: .7;
    transition: opacity .2s;
}
.sw-view-all a:hover {
    opacity: 1;
    text-decoration: underline;
}
.section-link {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: opacity .2s;
}
.section-link:hover {
    text-decoration: underline;
    opacity: .8;
}
.section-link .fas {
    font-size: .7em;
}

/* --- Leaderboard table ------------------------------------------- */
.leaderboard-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.lb-tab {
    background: rgba(0,210,255,.08);
    border: 1px solid rgba(0,210,255,.2);
    color: var(--text-secondary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: .78rem;
    cursor: pointer;
    transition: all .2s;
}
.lb-tab:hover {
    background: rgba(0,210,255,.15);
    color: var(--text-primary);
}
.lb-tab.active {
    background: rgba(0,210,255,.2);
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
}
.leaderboard-table {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.lb-header {
    display: grid;
    grid-template-columns: 40px 1fr 90px 90px 1fr;
    padding: 8px 12px;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--glass-border);
}
.lb-row {
    display: grid;
    grid-template-columns: 40px 1fr 90px 90px 1fr;
    padding: 10px 12px;
    font-size: .85rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    transition: background .2s;
    align-items: center;
}
.lb-row:hover {
    background: rgba(0,210,255,.06);
}
.lb-rank {
    font-weight: 700;
    color: var(--text-secondary);
    text-align: center;
}
.lb-row:nth-child(2) .lb-rank { color: #ffd700; } /* gold */
.lb-row:nth-child(3) .lb-rank { color: #c0c0c0; } /* silver */
.lb-row:nth-child(4) .lb-rank { color: #cd7f32; } /* bronze */
.lb-name {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}
.lb-type-icon {
    font-size: .65rem;
    color: var(--text-secondary);
    opacity: .6;
}
.lb-total {
    text-align: right;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--accent-cyan);
}
.lb-rate {
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.lb-bar-col {
    padding-left: 12px;
}
.lb-bar-track {
    display: block;
    height: 6px;
    background: rgba(255,255,255,.06);
    border-radius: 3px;
    overflow: hidden;
}
.lb-bar-fill {
    display: block;
    height: 100%;
    border-radius: 3px;
    transition: width .6s ease;
}

@media (max-width: 700px) {
    .lb-header, .lb-row {
        grid-template-columns: 30px 1fr 60px 60px;
    }
    .lb-bar-col { display: none; }
    .lb-header .lb-bar-col { display: none; }
}

/* --- Imminent launch banner --------------------------------------- */
.imminent-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(255,107,53,.95), rgba(255,23,68,.9));
    color: #fff;
    font-size: .88rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(255,23,68,.3);
    animation: bannerPulse 3s ease-in-out infinite;
}
.imminent-banner.show { display: flex; }
.imminent-banner i.fa-bell {
    font-size: 1.1rem;
    animation: bellRing 2s ease-in-out infinite;
}
.imminent-banner button {
    margin-left: auto;
    background: none;
    border: none;
    color: rgba(255,255,255,.7);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px 8px;
}
.imminent-banner button:hover { color: #fff; }
@keyframes bannerPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(255,23,68,.3); }
    50% { box-shadow: 0 4px 30px rgba(255,23,68,.5); }
}
@keyframes bellRing {
    0%, 100% { transform: rotate(0); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-14deg); }
    30% { transform: rotate(10deg); }
    40% { transform: rotate(-6deg); }
    50% { transform: rotate(0); }
}

/* --- ISS trail glow animation ------------------------------------ */
.iss-trail {
    filter: drop-shadow(0 0 4px rgba(0,210,255,.4));
}

/* --- About section ----------------------------------------------- */
.about-section { padding: 32px; margin-bottom: 16px; }
.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: center;
}
@media (max-width: 900px) {
    .about-grid { grid-template-columns: 1fr; }
}
.about-text h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}
.about-text p {
    font-size: .88rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 12px;
}
.about-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
}
.about-sources span {
    font-size: .76rem;
    color: var(--accent-cyan);
    background: var(--accent-cyan-dim);
    padding: 4px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.about-brand {
    text-align: center;
    padding: 24px;
    border-left: 1px solid var(--glass-border);
}
@media (max-width: 900px) {
    .about-brand { border-left: none; border-top: 1px solid var(--glass-border); padding-top: 28px; }
}
.about-brand .brand-logo {
    font-size: 3rem;
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 16px var(--accent-cyan-glow));
    margin-bottom: 8px;
}
.about-brand .brand-name {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 4px;
}
.about-brand .brand-by {
    font-size: .82rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.about-brand .brand-by a {
    color: var(--accent-cyan);
    text-decoration: none;
}
.about-brand .brand-by a:hover { text-decoration: underline; }
.about-brand .brand-contact {
    display: flex;
    justify-content: center;
    gap: 16px;
}
.about-brand .brand-contact a {
    font-size: .8rem;
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color .2s;
}
.about-brand .brand-contact a:hover { color: var(--accent-cyan); }

/* --- Failed launch highlight ------------------------------------- */
.launch-failed {
    border-left: 3px solid var(--failure-red) !important;
}

/* --- Space Programs grid ----------------------------------------- */
.space-programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 12px;
}

.sp-card {
    background: rgba(22, 36, 71, 0.35);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 14px 16px;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}
.sp-card:hover {
    background: rgba(22, 36, 71, 0.55);
    border-color: var(--accent-cyan-glow);
}

.sp-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sp-flag {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.sp-header-info {
    flex: 1;
    min-width: 0;
}

.sp-country {
    font-weight: 700;
    font-size: .95rem;
    color: var(--text-primary);
}

.sp-agency {
    font-size: .75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-badges {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.sp-status {
    font-size: .65rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sp-active { background: rgba(0, 230, 118, 0.15); color: var(--success-green); }
.sp-developing { background: rgba(255, 167, 38, 0.15); color: #ffa726; }

.sp-crewed-badge {
    font-size: .65rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    background: rgba(0, 210, 255, 0.15);
    color: var(--accent-cyan);
}

.sp-expand-icon {
    color: var(--text-secondary);
    font-size: .7rem;
    transition: transform .2s;
    flex-shrink: 0;
}
.sp-card.expanded .sp-expand-icon {
    transform: rotate(180deg);
}

.sp-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease, padding .3s ease;
    padding: 0;
}
.sp-card.expanded .sp-details {
    max-height: 300px;
    padding: 12px 0 0 0;
}

.sp-detail-row {
    font-size: .8rem;
    color: var(--text-secondary);
    padding: 3px 0;
    line-height: 1.4;
}
.sp-detail-row strong {
    color: var(--text-primary);
}

.sp-notable {
    margin-top: 6px;
    color: var(--accent-cyan);
    font-style: italic;
}
.sp-notable i {
    color: #ffa726;
    margin-right: 4px;
}

/* --- LIVE badge -------------------------------------------------- */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 23, 68, 0.15);
    color: var(--failure-red);
    padding: 3px 12px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: livePulse 2s ease-in-out infinite;
}
.live-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--failure-red);
    box-shadow: 0 0 6px var(--failure-red);
    animation: blink 1.5s ease-in-out infinite;
}
@keyframes livePulse {
    0%, 100% { background: rgba(255, 23, 68, 0.15); }
    50% { background: rgba(255, 23, 68, 0.25); }
}

/* --- Refresh timer ----------------------------------------------- */
.refresh-timer {
    font-size: .68rem;
    color: var(--text-secondary);
    margin-left: 8px;
    font-weight: 400;
    opacity: .7;
    letter-spacing: 0;
    text-transform: none;
}

/* --- Data freshness ticker --------------------------------------- */
.data-timestamp {
    font-size: .7rem;
    color: var(--success-green);
    font-weight: 500;
    margin-left: 10px;
    opacity: 0.85;
    letter-spacing: 0.3px;
    transition: color .3s;
}
.data-timestamp.stale {
    color: var(--warning-orange);
}

/* --- Skeleton shimmer -------------------------------------------- */
.skeleton {
    background: linear-gradient(90deg, rgba(22,36,71,.4) 25%, rgba(0,210,255,.06) 50%, rgba(22,36,71,.4) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}
.skeleton-line {
    height: 14px;
    margin-bottom: 10px;
    border-radius: 4px;
}
.skeleton-line.short { width: 60%; }
.skeleton-line.medium { width: 80%; }
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- Data update flash ------------------------------------------- */
@keyframes dataFlash {
    0%   { background-color: rgba(0, 210, 255, 0.08); }
    100% { background-color: transparent; }
}
.data-updated {
    animation: dataFlash 1s ease-out;
}

/* --- Globe legend ------------------------------------------------ */
.globe-legend {
    position: absolute;
    top: 52px;
    right: 16px;
    background: rgba(11, 12, 16, 0.82);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 10px 14px;
    z-index: 8;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    max-width: 180px;
}
.legend-title {
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--accent-cyan);
    margin-bottom: 8px;
}
.legend-items {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .72rem;
    color: var(--text-secondary);
}
.legend-emoji {
    font-size: .9rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}
.legend-arc {
    display: inline-block;
    width: 20px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, rgba(255,107,53,.9), rgba(0,210,255,.7));
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .globe-legend {
        position: static;
        max-width: 100%;
        margin-top: 8px;
    }
    .legend-items {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px 14px;
    }
}

/* --- Live Feeds / Camera grid ------------------------------------ */
.feeds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}

.feed-card {
    position: relative;
    background: rgba(22, 36, 71, 0.35);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .25s, transform .15s, box-shadow .25s;
}
.feed-card:hover {
    border-color: var(--accent-cyan-glow);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}
.feed-card.is-hot {
    border-color: rgba(255, 107, 53, 0.4);
    box-shadow: 0 0 16px rgba(255, 107, 53, 0.1);
}
.feed-card.is-hot:hover {
    border-color: var(--warning-orange);
    box-shadow: 0 0 24px rgba(255, 107, 53, 0.2);
}

.feed-card.feed-featured {
    grid-column: 1 / -1;
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.15);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), rgba(20, 20, 40, 1));
}
.feed-card.feed-featured:hover {
    border-color: rgba(255, 215, 0, 0.8);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.25);
}
.feed-card.feed-featured .feed-thumb {
    height: 240px;
}
.feed-featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 215, 0, 0.9);
    color: #000;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 3;
}

.feed-thumb {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
    background: var(--nebula);
}
.feed-thumb-placeholder {
    width: 100%;
    height: 170px;
    background: linear-gradient(135deg, var(--nebula), var(--star-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--accent-cyan);
    opacity: .5;
}
.feed-thumb-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 170px;
    background: linear-gradient(180deg, transparent 50%, rgba(11, 12, 16, 0.7) 100%);
    pointer-events: none;
}

.feed-hot-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 107, 53, 0.9);
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    animation: hotPulse 2s ease-in-out infinite;
    z-index: 2;
}
.feed-hot-badge i { font-size: .6rem; }
@keyframes hotPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(255, 107, 53, 0.4); }
    50% { box-shadow: 0 0 16px rgba(255, 107, 53, 0.7); }
}

.feed-live-dot {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 23, 68, 0.85);
    color: #fff;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .5px;
    z-index: 2;
}
.feed-live-dot .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #fff;
    animation: blink 1.5s ease-in-out infinite;
}

.feed-body {
    padding: 14px 16px;
}
.feed-name {
    font-weight: 700;
    font-size: .92rem;
    color: #fff;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.feed-provider {
    font-size: .72rem;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 6px;
}
.feed-desc {
    font-size: .78rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin-bottom: 8px;
}
.feed-imminent {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .72rem;
    color: var(--warning-orange);
    font-weight: 600;
    padding: 6px 10px;
    background: rgba(255, 107, 53, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(255, 107, 53, 0.15);
}
.feed-imminent i {
    font-size: .7rem;
}
.feed-watch-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 6px 14px;
    border-radius: 8px;
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid rgba(0, 210, 255, 0.2);
    color: var(--accent-cyan);
    font-size: .75rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s, border-color .2s;
}
.feed-watch-btn:hover {
    background: rgba(0, 210, 255, 0.2);
    border-color: var(--accent-cyan);
}

/* --- Video Player Modal ------------------------------------------- */
.video-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(6px);
}
.video-modal-overlay.active {
    display: flex;
}
.video-modal {
    width: 90vw;
    max-width: 1100px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(0, 210, 255, 0.15);
}
.video-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--glass-border);
}
.video-modal-title {
    font-weight: 600;
    font-size: .95rem;
    color: var(--text-primary);
}
.video-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s;
}
.video-modal-close:hover {
    color: var(--accent-cyan);
}
.video-modal-body {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
}
.video-modal-body iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- Globe markers ------------------------------------------------ */
.globe-marker {
    cursor: pointer;
    user-select: none;
    pointer-events: auto;
    transform-origin: center bottom;
}

/* Pin marker (launch pads + user) */
.gm-pin {
    --pin-color: #00d2ff;
    width: 22px;
    height: 22px;
    border-radius: 50% 50% 50% 0;
    background: var(--pin-color);
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px var(--pin-color), 0 2px 6px rgba(0,0,0,.5);
    border: 1.5px solid rgba(255,255,255,.3);
}
.gm-pin > i {
    transform: rotate(45deg); /* counteract parent rotation */
}

/* Mini label under launch pad pin */
.gm-label {
    font-size: 8px;
    color: #ccc;
    text-align: center;
    margin-top: 2px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,.8);
    white-space: nowrap;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ISS marker — pulsing ring + dot */
.globe-marker--iss {
    position: relative;
    width: 30px;
    height: 30px;
}

.gm-iss-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--accent-cyan);
    animation: iss-pulse 2s ease-in-out infinite;
    opacity: .6;
}

.gm-iss-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-cyan) 0%, rgba(0,210,255,.3) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 12px var(--accent-cyan);
}

@keyframes iss-pulse {
    0%, 100% { transform: scale(1); opacity: .6; }
    50% { transform: scale(1.5); opacity: 0; }
}

/* Hover effect — scale from bottom center */
.globe-marker:hover {
    transform: scale(1.25);
}
.globe-marker--iss:hover {
    transform: scale(1.3);
}

/* Launch pad marker status pulse */
.globe-marker--launch .gm-pin {
    animation: pad-glow 3s ease-in-out infinite;
}
@keyframes pad-glow {
    0%, 100% { box-shadow: 0 0 6px var(--pin-color), 0 2px 4px rgba(0,0,0,.4); }
    50% { box-shadow: 0 0 14px var(--pin-color), 0 0 20px var(--pin-color), 0 2px 4px rgba(0,0,0,.4); }
}

/* --- View Tabs (Earth / Solar System toggle) ---------------------- */
.view-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 4px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(12px);
    width: fit-content;
}
.view-tab {
    padding: 10px 22px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.view-tab:hover { color: var(--text-primary); background: rgba(255,255,255,.05); }
.view-tab.active {
    background: linear-gradient(135deg, var(--accent-cyan-dim), rgba(0,210,255,.08));
    color: var(--accent-cyan);
    box-shadow: 0 0 12px var(--accent-cyan-dim);
}
.view-tab i { font-size: .9rem; }

/* --- Solar System Controls ---------------------------------------- */
.solar-controls {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.solar-ctrl-btn {
    padding: 6px 14px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: rgba(22, 36, 71, 0.3);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: .78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
}
.solar-ctrl-btn:hover { border-color: var(--accent-cyan); color: var(--text-primary); }
.solar-ctrl-btn.active {
    background: var(--accent-cyan-dim);
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
}
.solar-ctrl-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .78rem;
    color: var(--text-secondary);
    margin-left: auto;
    cursor: pointer;
}
.solar-ctrl-label input { accent-color: var(--accent-cyan); }

/* --- Solar System Legend & Info ----------------------------------- */
.solar-legend {
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.05);
}
.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    vertical-align: middle;
}
.legend-line {
    display: inline-block;
    width: 18px;
    height: 2px;
    background: rgba(255,255,255,.25);
    vertical-align: middle;
    border-radius: 1px;
}
.solar-info {
    display: flex;
    gap: 18px;
    margin-top: 8px;
    font-size: .78rem;
    color: var(--text-secondary);
}
.solar-info b {
    color: var(--accent-cyan);
    font-weight: 600;
}

/* --- Mission Tracker: Telemetry Gauges ----------------------------- */
.telemetry-gauge {
    text-align: center;
    min-width: 140px;
    padding: 12px 20px;
    background: rgba(0, 210, 255, 0.04);
    border: 1px solid rgba(0, 210, 255, 0.12);
    border-radius: 12px;
}
.gauge-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #00d2ff;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 12px rgba(0, 210, 255, 0.4);
    line-height: 1.2;
}
.gauge-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #8899aa;
    margin-top: 4px;
}
.gauge-unit {
    font-size: 0.6rem;
    color: #556677;
}

/* --- Mission Tracker: Phase Timeline ------------------------------ */
.phase-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}
.phase-progress {
    height: 100%;
    background: linear-gradient(90deg, #00d2ff, #e040fb, #ff6b35);
    border-radius: 3px;
    transition: width 1s ease;
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.6);
}
.phase-labels {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    margin-top: 16px;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}
.phase-labels::-webkit-scrollbar { display: none; }
.phase-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 72px;
    flex-shrink: 0;
}
.phase-label span {
    font-size: 0.68rem;
    font-weight: 600;
    color: #667788;
    text-align: center;
    line-height: 1.3;
}
.phase-label.is-complete span { color: #aabbcc; }
.phase-label.is-active span { color: #e040fb; font-weight: 700; }
.phase-dot {
    display: block;
    width: 14px;
    height: 14px;
    min-width: 14px;
    min-height: 14px;
    border-radius: 50%;
    border: 2px solid #334;
    background: transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.phase-dot.complete {
    background: #00d2ff;
    border-color: #00d2ff;
    box-shadow: 0 0 8px rgba(0, 210, 255, 0.6);
}
.phase-dot.active {
    background: #e040fb;
    border-color: #e040fb;
    width: 18px;
    height: 18px;
    animation: phasePulse 1.5s ease-in-out infinite;
}
@keyframes phasePulse {
    0%, 100% { box-shadow: 0 0 6px rgba(224, 64, 251, 0.4); }
    50% { box-shadow: 0 0 18px rgba(224, 64, 251, 0.9); }
}

/* --- Mission Tracker: Camera Grid --------------------------------- */
.camera-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.camera-cell {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 10px;
    background: #0a0a10;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.camera-cell iframe {
    width: 100%;
    height: 100%;
    border: none;
}
.camera-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
}
.camera-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.camera-placeholder:hover img { opacity: 1; }
.camera-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 210, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.4);
}
.camera-name {
    position: absolute;
    bottom: 8px;
    left: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    padding: 3px 8px;
    border-radius: 4px;
}

/* --- Responsive --------------------------------------------------- */
@media (max-width: 768px) {
    .artemis-hero-grid { grid-template-columns: 1fr !important; padding: 16px !important; }
    .artemis-hero-grid > div:last-child { padding-left: 0 !important; border-left: none !important; border-top: 1px solid rgba(0,210,255,0.1); padding-top: 20px; }
    .camera-grid { grid-template-columns: 1fr !important; }
    #a2-telemetry > div { gap: 12px !important; }
    .telemetry-gauge { min-width: 90px; padding: 10px 12px; }
    .gauge-value { font-size: 1.2rem; }
    /* Prevent horizontal overflow on mobile */
    .app-wrapper { overflow-x: hidden; }
    .glass, #a2-phase-timeline .glass, #a2-cameras .glass { overflow: hidden; }
    body { overflow-x: hidden; }
}
@media (max-width: 640px) {
    .camera-grid { grid-template-columns: 1fr; }
    .site-header .logo { font-size: 1.15rem; }
    .countdown-digits .unit .val { font-size: 1.8rem; }
    .countdown-digits .unit { min-width: 54px; }
    .countdown-digits .sep { font-size: 1.8rem; }
    #globe-container { height: 340px; }
    .stat-card .stat-value { font-size: 1.8rem; }
    .grid-main { grid-template-columns: 1fr; }
}
