/* ============================================
   SOLAR SYSTEM — STYLE SHEET
   Black & white theme with realistic planet colors
   ============================================ */

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

@font-face {
    font-family: 'SystemUI';
    src: local('Segoe UI'), local('Helvetica Neue'), local('Arial');
}

:root {
    --bg: #000000;
    --surface: #0a0a0a;
    --surface-2: #111111;
    --border: rgba(255,255,255,0.08);
    --border-hover: rgba(255,255,255,0.15);
    --text: #ffffff;
    --text-muted: rgba(255,255,255,0.55);
    --text-dim: rgba(255,255,255,0.3);
    --accent: #ffffff;
    --glow: rgba(255,255,255,0.06);
    --speed: 1;
    --zoom: 1;
    --font: 'Segoe UI', 'Helvetica Neue', -apple-system, sans-serif;
    --font-mono: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- Starfield Canvas ---------- */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ---------- Loading Screen ---------- */
#loading-screen {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-ring {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    border: 2px solid rgba(255,255,255,0.08);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-title {
    font-size: 2rem;
    font-weight: 200;
    letter-spacing: 1.2em;
    margin-bottom: 10px;
    padding-left: 1.2em;
}

.loader-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.3em;
    margin-bottom: 40px;
}

.loader-bar {
    width: 200px;
    height: 2px;
    background: rgba(255,255,255,0.08);
    margin: 0 auto;
    border-radius: 2px;
    overflow: hidden;
}

.loader-bar-fill {
    width: 0%;
    height: 100%;
    background: #fff;
    animation: loaderFill 2s ease-in-out forwards;
}

@keyframes loaderFill {
    0% { width: 0%; }
    60% { width: 70%; }
    100% { width: 100%; }
}

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

/* ---------- Header ---------- */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    background: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
    opacity: 0.8;
}

.site-title {
    font-size: 0.8rem;
    font-weight: 300;
    letter-spacing: 0.6em;
    color: var(--text);
    opacity: 0.9;
}

.header-nav {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    padding: 8px 20px;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    color: var(--text);
    background: rgba(255,255,255,0.04);
}

.nav-btn.active {
    color: #000;
    background: #fff;
    font-weight: 500;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.control-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.25s ease;
}

.control-btn:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text);
    border-color: var(--border-hover);
}

.control-btn.active-state {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.speed-label {
    position: absolute;
    bottom: -2px;
    right: -2px;
    font-size: 0.55rem;
    font-weight: 600;
    background: #fff;
    color: #000;
    border-radius: 4px;
    padding: 1px 3px;
    line-height: 1;
}

/* ---------- Views ---------- */
.view {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1;
}

.view.active {
    display: flex;
}

/* ---------- Orbit View ---------- */
#orbit-view {
    align-items: center;
    justify-content: center;
}

#solar-system-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#solar-system {
    position: relative;
    width: 1100px;
    height: 1100px;
    transform: scale(var(--zoom));
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Sun ---------- */
.sun-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.sun {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.sun:hover {
    transform: scale(1.15);
}

.sun-surface {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff9c4, #ffee58 25%, #ffc107 50%, #ff8f00 75%, #e65100);
    animation: sunPulse 4s ease-in-out infinite;
    z-index: 2;
}

.sun-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 180px;
    height: 180px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,200,50,0.25) 0%, rgba(255,160,0,0.08) 40%, transparent 70%);
    animation: sunGlow 3s ease-in-out infinite alternate;
    z-index: 1;
}

.sun-corona {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,200,50,0.06) 0%, transparent 60%);
    animation: coronaPulse 6s ease-in-out infinite alternate;
    z-index: 0;
    pointer-events: none;
}

@keyframes sunPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.1); }
}

@keyframes sunGlow {
    0% { opacity: 0.8; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}

@keyframes coronaPulse {
    0% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.08); }
}

/* ---------- Orbits ---------- */
.orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: border-color 0.3s ease;
}

.orbit:hover {
    border-color: rgba(255,255,255,0.12);
}

.orbits-hidden .orbit {
    border-color: transparent !important;
}

/* Orbit sizes (diameter) */
.mercury-orbit { width: 160px; height: 160px; animation: orbitRotate calc(4.8s / var(--speed)) linear infinite; }
.venus-orbit   { width: 220px; height: 220px; animation: orbitRotate calc(12.3s / var(--speed)) linear infinite; }
.earth-orbit   { width: 300px; height: 300px; animation: orbitRotate calc(20s / var(--speed)) linear infinite; }
.mars-orbit    { width: 390px; height: 390px; animation: orbitRotate calc(37.6s / var(--speed)) linear infinite; }
.jupiter-orbit { width: 520px; height: 520px; animation: orbitRotate calc(60s / var(--speed)) linear infinite; }
.saturn-orbit  { width: 660px; height: 660px; animation: orbitRotate calc(80s / var(--speed)) linear infinite; }
.uranus-orbit  { width: 800px; height: 800px; animation: orbitRotate calc(110s / var(--speed)) linear infinite; }
.neptune-orbit { width: 960px; height: 960px; animation: orbitRotate calc(150s / var(--speed)) linear infinite; }

@keyframes orbitRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ---------- Planet Wrappers ---------- */
.planet-wrapper {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

/* Counter-rotate so planets don't spin with orbits */
.mercury-orbit .planet-wrapper { animation: counterRotate calc(4.8s / var(--speed)) linear infinite; }
.venus-orbit .planet-wrapper   { animation: counterRotate calc(12.3s / var(--speed)) linear infinite; }
.earth-orbit .planet-wrapper   { animation: counterRotate calc(20s / var(--speed)) linear infinite; }
.mars-orbit .planet-wrapper    { animation: counterRotate calc(37.6s / var(--speed)) linear infinite; }
.jupiter-orbit .planet-wrapper { animation: counterRotate calc(60s / var(--speed)) linear infinite; }
.saturn-orbit .planet-wrapper  { animation: counterRotate calc(80s / var(--speed)) linear infinite; }
.uranus-orbit .planet-wrapper  { animation: counterRotate calc(110s / var(--speed)) linear infinite; }
.neptune-orbit .planet-wrapper { animation: counterRotate calc(150s / var(--speed)) linear infinite; }

@keyframes counterRotate {
    from { transform: translateX(-50%) rotate(360deg); }
    to   { transform: translateX(-50%) rotate(0deg); }
}

/* ---------- Planets ---------- */
.planet {
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease, filter 0.3s ease;
    z-index: 5;
}

.planet:hover {
    transform: scale(1.4);
    filter: brightness(1.3);
    z-index: 20;
}

.planet-sphere {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: absolute;
    inset: 0;
    overflow: hidden;
}

/* Planet self-rotation */
.planet .planet-sphere::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    animation: planetSelfRotate 8s linear infinite;
}

@keyframes planetSelfRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Planet Labels */
.planet-label {
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-dim);
    white-space: nowrap;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.labels-hidden .planet-label {
    opacity: 0 !important;
}

.sun-label {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -22px;
    font-size: 0.65rem;
    color: rgba(255,200,100,0.5);
}

/* ---- Mercury ---- */
.mercury {
    width: 12px;
    height: 12px;
}
.mercury .planet-sphere {
    background: radial-gradient(circle at 35% 35%, #d4c5a9, #a89279 50%, #8a7560 75%, #6e5d4b);
    box-shadow: inset -3px -2px 5px rgba(0,0,0,0.5), 0 0 8px rgba(180,160,130,0.3);
}

/* ---- Venus ---- */
.venus {
    width: 16px;
    height: 16px;
}
.venus .planet-sphere {
    background: radial-gradient(circle at 35% 35%, #f0dca0, #e8c872 40%, #d4a843 65%, #c49530);
    box-shadow: inset -4px -3px 6px rgba(0,0,0,0.4), 0 0 12px rgba(228,190,80,0.25);
}

/* ---- Earth ---- */
.earth {
    width: 18px;
    height: 18px;
}
.earth .planet-sphere {
    background: radial-gradient(circle at 30% 30%, #a8d5e2, #4a90b8 35%, #2e7d6e 50%, #3a9d5e 60%, #2d6e3f 75%, #1a4528);
    box-shadow: inset -4px -3px 8px rgba(0,0,0,0.45), 0 0 14px rgba(80,160,220,0.3);
}
.earth .planet-sphere::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: radial-gradient(circle at 70% 20%, rgba(255,255,255,0.2) 0%, transparent 30%);
    z-index: 1;
}

/* Earth Moon */
.moon-orbit {
    position: absolute;
    width: 40px;
    height: 40px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 50%;
    animation: orbitRotate 3s linear infinite;
}

.moon {
    position: absolute;
    border-radius: 50%;
}

.earth-moon {
    width: 5px;
    height: 5px;
    top: -2.5px;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle at 35% 35%, #e0e0e0, #b0b0b0 50%, #808080);
    box-shadow: 0 0 4px rgba(200,200,200,0.3);
}

/* ---- Mars ---- */
.mars {
    width: 14px;
    height: 14px;
}
.mars .planet-sphere {
    background: radial-gradient(circle at 35% 35%, #e8a87c, #c1440e 45%, #a0350a 65%, #8b2d09);
    box-shadow: inset -3px -2px 6px rgba(0,0,0,0.5), 0 0 10px rgba(193,68,14,0.3);
}

/* ---- Jupiter ---- */
.jupiter {
    width: 36px;
    height: 36px;
}
.jupiter .planet-sphere {
    background: radial-gradient(circle at 35% 35%, #f5e6c8, #e8c9a0 30%, #d4a76a 55%, #c49450);
    box-shadow: inset -6px -4px 12px rgba(0,0,0,0.4), 0 0 20px rgba(200,160,80,0.2);
}
.jupiter-bands {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    overflow: hidden;
    opacity: 0.5;
    z-index: 1;
}
.jupiter-bands::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0%,
        transparent 8%,
        rgba(180,120,60,0.3) 8%,
        rgba(180,120,60,0.3) 12%,
        transparent 12%,
        transparent 20%,
        rgba(200,150,80,0.25) 20%,
        rgba(200,150,80,0.25) 24%,
        transparent 24%
    );
    animation: planetSelfRotate 12s linear infinite;
}
.jupiter-spot {
    position: absolute;
    width: 8px;
    height: 5px;
    background: radial-gradient(ellipse, #c0502a, #a03a1a);
    border-radius: 50%;
    bottom: 30%;
    right: 18%;
    z-index: 2;
    opacity: 0.7;
}

/* ---- Saturn ---- */
.saturn {
    width: 30px;
    height: 30px;
}
.saturn .planet-sphere {
    background: radial-gradient(circle at 35% 35%, #f5e6b8, #e0c88a 40%, #c9a860 65%, #b89048);
    box-shadow: inset -5px -4px 10px rgba(0,0,0,0.4), 0 0 16px rgba(200,170,80,0.2);
}

.saturn-ring-container {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 16px;
    transform: translate(-50%, -50%) rotateX(75deg);
    pointer-events: none;
    z-index: 4;
}

.saturn-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid rgba(210,190,140,0.5);
    background: transparent;
    box-shadow: 0 0 3px rgba(210,190,140,0.3),
                inset 0 0 3px rgba(210,190,140,0.2);
}

/* ---- Uranus ---- */
.uranus {
    width: 22px;
    height: 22px;
}
.uranus .planet-sphere {
    background: radial-gradient(circle at 35% 35%, #d4f1f9, #a6dce8 35%, #7ec8d8 55%, #5ab4c8 75%, #3a9db8);
    box-shadow: inset -4px -3px 8px rgba(0,0,0,0.35), 0 0 14px rgba(100,190,210,0.25);
}

.uranus-ring-container {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 42px;
    height: 10px;
    transform: translate(-50%, -50%) rotateX(80deg) rotateZ(90deg);
    pointer-events: none;
    z-index: 4;
}

.uranus-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(150,210,220,0.3);
    background: transparent;
}

/* ---- Neptune ---- */
.neptune {
    width: 20px;
    height: 20px;
}
.neptune .planet-sphere {
    background: radial-gradient(circle at 35% 35%, #7ba7d4, #4a7ab5 40%, #2d5fa0 60%, #1a4580 80%, #0f3060);
    box-shadow: inset -4px -3px 8px rgba(0,0,0,0.45), 0 0 14px rgba(50,100,180,0.3);
}

/* ---------- Zoom Controls ---------- */
.zoom-controls {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 50;
}

.zoom-btn {
    width: 42px;
    height: 42px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    backdrop-filter: blur(10px);
}

.zoom-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: var(--border-hover);
}

/* ---------- Explore View ---------- */
#explore-view {
    padding: 80px 40px 40px;
    overflow-y: auto;
    align-items: flex-start;
    justify-content: center;
}

.explore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.explore-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px 28px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.explore-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.06) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.explore-card:hover::before {
    opacity: 1;
}

.explore-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.card-planet-visual {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin-bottom: 20px;
    position: relative;
}

.card-planet-name {
    font-size: 1.3rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.card-planet-type {
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.card-planet-stat {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-top: 1px solid rgba(255,255,255,0.04);
    font-size: 0.78rem;
}

.card-planet-stat .stat-label {
    color: var(--text-dim);
}

.card-planet-stat .stat-value {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.72rem;
}

.card-arrow {
    position: absolute;
    top: 28px;
    right: 24px;
    font-size: 1.2rem;
    color: var(--text-dim);
    transition: all 0.3s ease;
}

.explore-card:hover .card-arrow {
    color: var(--text-muted);
    transform: translateX(4px);
}

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    width: 90%;
    max-width: 640px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.92) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

/* Scrollbar */
.modal::-webkit-scrollbar {
    width: 6px;
}
.modal::-webkit-scrollbar-track {
    background: transparent;
}
.modal::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.modal-close {
    position: sticky;
    top: 16px;
    float: right;
    margin: 16px;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 40px 36px 28px;
}

.modal-planet-visual {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    animation: modalPlanetFloat 4s ease-in-out infinite;
}

@keyframes modalPlanetFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.modal-planet-name {
    font-size: 2rem;
    font-weight: 200;
    letter-spacing: 0.05em;
}

.modal-planet-type {
    font-size: 0.72rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 4px;
}

.modal-body {
    padding: 0 36px 36px;
}

.modal-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.stat-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 14px 16px;
}

.stat-card-label {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.stat-card-value {
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

.modal-description {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 28px;
}

.modal-moons h3 {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 14px;
    font-weight: 400;
}

.moons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}

.moon-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 10px;
    padding: 12px 14px;
    transition: all 0.25s ease;
}

.moon-card:hover {
    background: rgba(255,255,255,0.04);
    border-color: var(--border-hover);
}

.moon-card-name {
    font-size: 0.8rem;
    font-weight: 400;
    margin-bottom: 4px;
}

.moon-card-info {
    font-size: 0.65rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

/* ---------- Tooltip ---------- */
.tooltip {
    position: fixed;
    z-index: 500;
    background: rgba(10,10,10,0.9);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 16px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    backdrop-filter: blur(10px);
}

.tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-name {
    font-size: 0.85rem;
    font-weight: 400;
    display: block;
    margin-bottom: 2px;
}

.tooltip-hint {
    font-size: 0.65rem;
    color: var(--text-dim);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    #main-header {
        padding: 0 16px;
        height: 54px;
    }

    .site-title {
        font-size: 0.65rem;
        letter-spacing: 0.4em;
    }

    .header-nav {
        display: none;
    }

    .header-right {
        gap: 4px;
    }

    .control-btn {
        width: 34px;
        height: 34px;
    }

    #solar-system {
        width: 700px;
        height: 700px;
    }

    .mercury-orbit { width: 100px; height: 100px; }
    .venus-orbit   { width: 140px; height: 140px; }
    .earth-orbit   { width: 190px; height: 190px; }
    .mars-orbit    { width: 250px; height: 250px; }
    .jupiter-orbit { width: 330px; height: 330px; }
    .saturn-orbit  { width: 420px; height: 420px; }
    .uranus-orbit  { width: 520px; height: 520px; }
    .neptune-orbit { width: 620px; height: 620px; }

    #explore-view {
        padding: 70px 16px 20px;
    }

    .explore-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .modal {
        width: 95%;
        border-radius: 20px;
    }

    .modal-header {
        padding: 30px 24px 20px;
        gap: 16px;
    }

    .modal-planet-visual {
        width: 56px;
        height: 56px;
    }

    .modal-planet-name {
        font-size: 1.5rem;
    }

    .modal-body {
        padding: 0 24px 24px;
    }

    .modal-stats {
        grid-template-columns: 1fr;
    }

    .zoom-controls {
        bottom: 16px;
        right: 16px;
    }
}

/* ---------- Selection / Focus ---------- */
::selection {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

:focus-visible {
    outline: 2px solid rgba(255,255,255,0.3);
    outline-offset: 2px;
}

/* ---------- Animations Paused State ---------- */
.paused .orbit,
.paused .planet-wrapper,
.paused .moon-orbit {
    animation-play-state: paused !important;
}
