@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Exo+2:wght@300;400&display=swap');

:root {
    --glow-color: rgba(0, 191, 255, 0.7);
}

body {
    margin: 0;
    overflow: hidden;
    font-family: 'Exo 2', sans-serif;
    background-color: #000;
    color: #fff;
    cursor: default;
}

.galaxy-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at center, #0d1a2f 0%, #030610 100%);
}

/* Efek Bintang Parallax */
.galaxy-container::before, .galaxy-container::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10"><rect width="10" height="10" fill="transparent"/><circle cx="1" cy="1" r="0.5" fill="white"/></svg>');
    z-index: 1;
}
.galaxy-container::after {
    background-size: 50px 50px;
    opacity: 0.5;
    /* Tambahkan ini */
    transform: translate(var(--x-stars-far, 0px), var(--y-stars-far, 0px));
}
.galaxy-container::before {
    background-size: 25px 25px;
    opacity: 0.8;
    /* Tambahkan ini */
    transform: translate(var(--x-stars, 0px), var(--y-stars, 0px));
}

.galaxy {
    position: absolute;
    width: 4000px;
    height: 4000px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

/* Animasi Rotasi Planet */
@keyframes rotate-planet {
    from { background-position: 0% center; }
    to { background-position: 200% center; } /* 200% agar terasa mulus saat loop */
}

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

/* GANTI DENGAN KODE BARU INI */
.planet {
    position: absolute;
    border-radius: 50%;
    cursor: pointer;
    background-size: 220% 100%; /* Perbesar sedikit untuk efek 3D */
    animation: rotate-planet 30s linear infinite;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* Lapisan bayangan untuk efek 3D (sisi gelap planet) */
.planet::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 50%, transparent 40%, rgba(0,0,0,0.9) 100%);
    z-index: 5;
}

/* Lapisan atmosfer/cahaya di tepian planet */
.planet::after {
    content: '';
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    border-radius: 50%;
    box-shadow: inset 0 0 15px 5px rgba(255,255,255,0.3);
    z-index: 4;
}

.planet:hover {
    transform: scale(1.1);
    box-shadow: 0 0 35px var(--glow-color);
}

.planet:hover {
    transform: scale(1.1);
    box-shadow: 0 0 35px var(--glow-color), inset 0 0 15px rgba(0,0,0,0.3);
}

/* Panel Informasi Holografik */
.info-panel {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 90%;
    max-width: 600px;
    height: 200px;
    background: rgba(10, 25, 47, 0.7);
    border-top: 2px solid var(--glow-color);
    border-radius: 15px 15px 0 0;
    backdrop-filter: blur(10px);
    transform: translate(-50%, 100%); /* Sembunyikan di bawah */
    z-index: 100;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    color: #e0e0e0;
}

.info-content h2 {
    font-family: 'Orbitron', sans-serif;
    margin: 0 0 10px;
    color: #fff;
    text-shadow: 0 0 5px var(--glow-color);
}
.info-content p {
    margin: 0 0 15px;
    font-size: 0.9em;
    line-height: 1.5;
}
.info-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.8em;
}
.info-content ul li {
    display: inline-block;
    margin-right: 20px;
}
.info-content ul li strong {
    color: var(--glow-color);
}

/* Kelas khusus untuk setiap planet */
.earth { background-image: url('https://www.solarsystemscope.com/textures/download/8k_earth_daymap.jpg'); animation-duration: 25s; }
.mars { background-image: url('https://www.solarsystemscope.com/textures/download/8k_mars.jpg'); animation-duration: 35s; }
.jupiter { background-image: url('https://www.solarsystemscope.com/textures/download/8k_jupiter.jpg'); animation-duration: 15s; }
