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

body {
    background: #000;
    color: white;
    font-family: Arial, sans-serif;
    text-align: center;
    overflow: hidden;
    min-height: 100vh;
}

/* Heading */
h1 {
    margin-top: 20px;
    position: relative;
    z-index: 2;
}

/* Controls */
.controls {
    position: relative;
    z-index: 2;
}

#toggleBtn {
    padding: 10px 20px;
    border: none;
    background: #444;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 10px;
}

#toggleBtn:hover {
    background: #666;
}

#speedSlider {
    width: 150px;
}

/* Stars Background */
.stars {
    position: fixed;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, white, transparent),
        radial-gradient(2px 2px at 100px 80px, white, transparent),
        radial-gradient(2px 2px at 200px 150px, white, transparent),
        radial-gradient(2px 2px at 300px 50px, white, transparent),
        radial-gradient(2px 2px at 400px 200px, white, transparent),
        radial-gradient(2px 2px at 600px 120px, white, transparent),
        radial-gradient(2px 2px at 800px 250px, white, transparent),
        radial-gradient(2px 2px at 1000px 100px, white, transparent);
    animation: twinkle 4s infinite alternate;
    z-index: 0;
}

@keyframes twinkle {
    from {
        opacity: 0.5;
    }
    to {
        opacity: 1;
    }
}

/* Solar System */
.solar-system {
    position: relative;
    width: 800px;
    height: 800px;
    margin: 0 auto;
    z-index: 1;
}

/* Sun */
.sun {
    position: absolute;
    width: 60px;
    height: 60px;
    background: gold;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 30px gold;
}

/* Orbit */
.orbit {
    position: absolute;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    animation: rotate linear infinite;
    pointer-events: none;
}

/* Planet */
.planet {
    position: absolute;
    border-radius: 50%;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    z-index: 10;
    pointer-events: auto;
}

/* Mercury */
.mercury-orbit {
    width: 100px;
    height: 100px;
    margin: -50px;
    animation-duration: 5s;
}

.mercury {
    width: 10px;
    height: 10px;
    background: gray;
}

/* Venus */
.venus-orbit {
    width: 150px;
    height: 150px;
    margin: -75px;
    animation-duration: 8s;
}

.venus {
    width: 14px;
    height: 14px;
    background: orange;
}

/* Earth */
.earth-orbit {
    width: 220px;
    height: 220px;
    margin: -110px;
    animation-duration: 12s;
}

.earth {
    width: 16px;
    height: 16px;
    background: deepskyblue;
}

/* Mars */
.mars-orbit {
    width: 280px;
    height: 280px;
    margin: -140px;
    animation-duration: 16s;
}

.mars {
    width: 14px;
    height: 14px;
    background: red;
}

/* Jupiter */
.jupiter-orbit {
    width: 360px;
    height: 360px;
    margin: -180px;
    animation-duration: 22s;
}

.jupiter {
    width: 24px;
    height: 24px;
    background: peru;
}

/* Saturn */
.saturn-orbit {
    width: 450px;
    height: 450px;
    margin: -225px;
    animation-duration: 28s;
}

.saturn {
    width: 22px;
    height: 22px;
    background: khaki;
}

/* Uranus */
.uranus-orbit {
    width: 550px;
    height: 550px;
    margin: -275px;
    animation-duration: 35s;
}

.uranus {
    width: 20px;
    height: 20px;
    background: lightblue;
}

/* Neptune */
.neptune-orbit {
    width: 650px;
    height: 650px;
    margin: -325px;
    animation-duration: 42s;
}

.neptune {
    width: 20px;
    height: 20px;
    background: blue;
}

/* Rotation Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Planet Info Card */
.info-card {
    position: fixed;
    right: 20px;
    top: 120px;
    width: 250px;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid #555;
    border-radius: 10px;
    padding: 15px;
    text-align: left;
    z-index: 2;
}

.info-card h2 {
    margin-bottom: 10px;
}

.info-card p {
    font-size: 14px;
    line-height: 1.5;
}
