* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    background: #000;
    font-family: 'Arial', sans-serif;
    color: white;
}

.universe {
    width: 100vw;
    height: 100vh;
    position: relative;
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #000 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.solar-system {
    position: relative;
    width: 800px;
    height: 800px;
    flex-shrink: 0;
}

/* Sun */
.sun {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #ffd700 0%, #ff8c00 50%, #ff4500 100%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 
        0 0 20px #ffd700,
        0 0 40px #ff8c00,
        0 0 60px #ff4500;
    animation: sunGlow 4s ease-in-out infinite alternate;
    z-index: 10;
}

@keyframes sunGlow {
    0% {
        box-shadow: 
            0 0 20px #ffd700,
            0 0 40px #ff8c00,
            0 0 60px #ff4500;
    }
    100% {
        box-shadow: 
            0 0 30px #ffd700,
            0 0 60px #ff8c00,
            0 0 90px #ff4500;
    }
}

/* Orbit paths */
.orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* Planet base styles */
.planet {
    position: absolute;
    border-radius: 50%;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* Mercury */
.mercury-orbit {
    width: 120px;
    height: 120px;
    animation: orbit 8.8s linear infinite;
}

.mercury {
    width: 8px;
    height: 8px;
    background: #8c7853;
    margin-top: -4px;
}

/* Venus */
.venus-orbit {
    width: 160px;
    height: 160px;
    animation: orbit 22.5s linear infinite;
}

.venus {
    width: 12px;
    height: 12px;
    background: #ffc649;
    margin-top: -6px;
}

/* Earth */
.earth-orbit {
    width: 200px;
    height: 200px;
    animation: orbit 36.5s linear infinite;
}

.earth {
    width: 14px;
    height: 14px;
    background: linear-gradient(45deg, #6b93d6 0%, #4d84c4 50%, #2e5984 100%);
    margin-top: -7px;
    position: relative;
}

.earth::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    background: #4d84c4;
    border-radius: 50%;
    top: 2px;
    left: 8px;
}

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

.moon {
    position: absolute;
    top: 0;
    left: 50%;
    width: 3px;
    height: 3px;
    background: #c0c0c0;
    border-radius: 50%;
    transform: translateX(-50%);
    margin-top: -1.5px;
}

/* Mars */
.mars-orbit {
    width: 260px;
    height: 260px;
    animation: orbit 68.7s linear infinite;
}

.mars {
    width: 10px;
    height: 10px;
    background: #cd5c5c;
    margin-top: -5px;
}

/* Jupiter */
.jupiter-orbit {
    width: 360px;
    height: 360px;
    animation: orbit 433.3s linear infinite;
}

.jupiter {
    width: 28px;
    height: 28px;
    background: linear-gradient(45deg, #d8ca9d 0%, #fad5a5 50%, #824a02 100%);
    margin-top: -14px;
}

/* Saturn */
.saturn-orbit {
    width: 460px;
    height: 460px;
    animation: orbit 1075.9s linear infinite;
}

.saturn {
    width: 24px;
    height: 24px;
    background: linear-gradient(45deg, #fad5a5 0%, #ffb347 50%, #daa520 100%);
    margin-top: -12px;
    position: relative;
}

.saturn-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.saturn-rings::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* Uranus */
.uranus-orbit {
    width: 560px;
    height: 560px;
    animation: orbit 3068.7s linear infinite;
}

.uranus {
    width: 18px;
    height: 18px;
    background: #4fd0e7;
    margin-top: -9px;
}

/* Neptune */
.neptune-orbit {
    width: 660px;
    height: 660px;
    animation: orbit 6019s linear infinite;
}

.neptune {
    width: 16px;
    height: 16px;
    background: #4169e1;
    margin-top: -8px;
}

/* Orbit animation */
@keyframes orbit {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Stars */
.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite alternate;
}

.star.small {
    width: 1px;
    height: 1px;
}

.star.medium {
    width: 2px;
    height: 2px;
}

.star.large {
    width: 3px;
    height: 3px;
}

@keyframes twinkle {
    0% {
        opacity: 0.3;
        transform: scale(1);
    }
    100% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Control Panel */
.control-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 100;
}

.control-panel h3 {
    margin-bottom: 10px;
    font-size: 16px;
    color: #ffd700;
}

.speed-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.speed-control label {
    font-size: 12px;
    white-space: nowrap;
}

.speed-control input {
    width: 100px;
}

.speed-control span {
    font-size: 12px;
    min-width: 25px;
}

/* Data Panel */
.data-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 600px;
    max-height: calc(100vh - 40px);
    background: rgba(0, 0, 0, 0.9);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 100;
    overflow: hidden;
}

.data-panel h3 {
    padding: 15px;
    margin: 0;
    font-size: 18px;
    color: #ffd700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.table-container {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

th, td {
    padding: 8px 6px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 10;
}

td {
    color: #ffffff;
}

tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.05);
}

tr:hover {
    background: rgba(255, 215, 0, 0.1);
}

/* Planet tooltip */
.planet-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Responsive design */
@media (max-width: 1400px) {
    .data-panel {
        width: 500px;
    }
    
    table {
        font-size: 10px;
    }
    
    th, td {
        padding: 6px 4px;
    }
}

@media (max-width: 1200px) {
    .universe {
        flex-direction: column;
        justify-content: flex-start;
        padding: 20px;
    }
    
    .solar-system {
        width: 600px;
        height: 600px;
        margin-bottom: 20px;
    }
    
    .data-panel {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        max-width: 800px;
        max-height: 400px;
    }
    
    .control-panel {
        position: relative;
        top: auto;
        left: auto;
        margin-bottom: 20px;
    }
    
    /* Scale down orbits */
    .mercury-orbit { width: 90px; height: 90px; }
    .venus-orbit { width: 120px; height: 120px; }
    .earth-orbit { width: 150px; height: 150px; }
    .mars-orbit { width: 195px; height: 195px; }
    .jupiter-orbit { width: 270px; height: 270px; }
    .saturn-orbit { width: 345px; height: 345px; }
    .uranus-orbit { width: 420px; height: 420px; }
    .neptune-orbit { width: 495px; height: 495px; }
}

@media (max-width: 768px) {
    .solar-system {
        width: 400px;
        height: 400px;
    }
    
    .data-panel {
        font-size: 10px;
    }
    
    table {
        font-size: 9px;
    }
    
    th, td {
        padding: 4px 2px;
    }
    
    /* Further scale down orbits */
    .mercury-orbit { width: 60px; height: 60px; }
    .venus-orbit { width: 80px; height: 80px; }
    .earth-orbit { width: 100px; height: 100px; }
    .mars-orbit { width: 130px; height: 130px; }
    .jupiter-orbit { width: 180px; height: 180px; }
    .saturn-orbit { width: 230px; height: 230px; }
    .uranus-orbit { width: 280px; height: 280px; }
    .neptune-orbit { width: 330px; height: 330px; }
    
    /* Scale down planets */
    .sun { width: 30px; height: 30px; }
    .jupiter { width: 20px; height: 20px; margin-top: -10px; }
    .saturn { width: 18px; height: 18px; margin-top: -9px; }
    .uranus { width: 14px; height: 14px; margin-top: -7px; }
    .neptune { width: 12px; height: 12px; margin-top: -6px; }
}