*{
	margin: 0;
	padding: 0;
	color: #ffffff;
}
body{
	position: relative;
    cursor: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-color: #000;
    overflow: hidden;
    height: 100vh;
    perspective: 2000px;
    display: grid; /* For perfect centering */
    place-items: center; /* For perfect centering */
}

#universe-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(https://www.milesteves.com/wp-content/uploads/2016/03/space-3.jpg) repeat;
    background-size: cover;
    z-index: -4;
    animation: zoom-pan 120s linear infinite;
}

@keyframes zoom-pan {
    0% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.5) translate(20%, -10%); }
    100% { transform: scale(1) translate(0, 0); }
}

/* Custom Cursor and Trail */
@keyframes rainbow-cursor-glow {
    0% { text-shadow: 0 0 5px #ff6347, 0 0 10px #ff4500; }
    25% { text-shadow: 0 0 5px #ffd700, 0 0 10px #ffdb58; }
    50% { text-shadow: 0 0 5px #adff2f, 0 0 10px #7fff00; }
    75% { text-shadow: 0 0 5px #87ceeb, 0 0 10px #add8e6; }
    100% { text-shadow: 0 0 5px #dda0dd, 0 0 10px #da70d6; }
}

.cursor-trail {
    position: fixed;
    width: 25px;
    height: 25px;
    background-color: transparent;
    border-radius: 0;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 10000;
    text-align: center;
    line-height: 25px;
    font-size: 25px;
    color: yellow;
}
.cursor-trail::before {
    content: '\2605'; /* Escaped unicode for star */
    animation: rainbow-cursor-glow 3s linear infinite;
}


.trail {
    position: fixed;
    width: 4px; /* Aur chota kiya gaya */
    height: 4px; /* Aur chota kiya gaya */
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    animation: trail-fade 0.5s linear forwards; /* Thoda aur tez fade */
}

@keyframes trail-fade {
    to {
        transform: scale(0);
        opacity: 0;
    }
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease-in-out;
}
#preloader-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#skip-button {
    position: absolute;
    bottom: 30px;
    right: 30px;
    padding: 10px 25px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-weight: bold;
    cursor: none;
    transition: all 0.3s ease;
}
#skip-button:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 8px #fff;
}

.hidden {
    display: none !important;
}
.fade-out {
    opacity: 0;
}
.content{
	width: 1400px;
	height: 1200px;
    position: relative;
    background: transparent;
    transition: filter 0.5s ease-in-out;
}
.content.blur {
    filter: blur(10px) brightness(0.5);
}


#solar-system-wrapper {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transform-style: preserve-3d;
    transition: transform 0.2s ease-out;
}

.title-container {
    position: fixed; /* Fixed to viewport */
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 25px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 101; /* Above solar system */
    transition: all 0.3s ease;
}
.title-container:hover {
    transform: translateX(-50%) scale(1.05);
    background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #007fff, #8b00ff, #ff0000);
    background-size: 200%;
    animation: background-pan 6s linear infinite;
}
#main-title {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 5px #fff;
}


#meteor-shower {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 9000;
}

.meteor {
    position: absolute;
    width: 3px;
    height: 150px;
    background: linear-gradient(to bottom, rgba(255, 100, 0, 0) 0%, rgba(255, 165, 0, 0.8) 100%);
    border-radius: 50%;
    filter: drop-shadow(0 0 6px #ff4500);
}

/* Cosmic background shown during meteor shower */
.cosmic-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
    z-index: -2; /* Behind UI but above universe-bg */
    overflow: hidden;
}
.cosmic-background.visible {
    opacity: 1;
}

.cosmic-background .star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: currentColor;
    border-radius: 50%;
    animation: twinkle 1.5s infinite ease-in-out;
    filter: drop-shadow(0 0 3px currentColor);
}

.cosmic-background .nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(30px);
    opacity: 0.35;
    animation: nebula-drift 25s infinite linear;
}

@keyframes nebula-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, 20px) scale(1.08); }
}

@keyframes twinkle {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 3px currentColor); opacity: 0.9; }
    50% { transform: scale(1.4); filter: drop-shadow(0 0 8px currentColor); opacity: 1; }
}

@keyframes shake {
    0%, 100% { transform: translate(0, 0); }
    10%, 30%, 50%, 70%, 90% { transform: translate(-5px, 5px); }
    20%, 40%, 60%, 80% { transform: translate(5px, -5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Pure CSS Star Background */
@keyframes animStar {
  from { transform: translateY(0px); }
  to { transform: translateY(-2000px); }
}

#stars, #stars2, #stars3 {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#stars {
 background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAA1BMVEX///+nxBvIAAAADElEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=) repeat top center;
 z-index: -3;
 animation: animStar 50s linear infinite;
}

#stars2 {
 background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAA1BMVEX///+nxBvIAAAADElEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=) repeat top center;
 z-index: -2;
 background-size: 2px 2px;
 animation: animStar 100s linear infinite;
}

#stars3 {
 background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAA1BMVEX///+nxBvIAAAADElEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=) repeat top center;
 z-index: -1;
 background-size: 3px 3px;
 animation: animStar 150s linear infinite;
}


.sun{
	width: 100px;
	height: 100px;
    background: radial-gradient(circle, #ff0f00, #ff6f00, #ffff00);
    box-shadow: 0px 0px 5px 2px #ffdf00, 0px 0px 7px 3px #ff6f00;
    z-index: 10;
    background-image: url("https://res.cloudinary.com/yerevan/image/upload/v1484080038/sun_vcrvuy.gif");
   
    background-position-x: -318px;
    background-position-y: -158px;
    background-size: 245%;
}
.sun>img{
	border-radius: 100%;
	height: 130px;
	margin: auto;

}

.mercury_container, .venus_container, .earth_moon_container, .mars_container, .jupiter_container, .saturn_ring_container, .uranus_container, .neptune_container {
    transform-style: preserve-3d;
}

.gif_mercury, .gif_venus, .gif_earth, .gif_mars, .gif_jupiter, .gif_saturn, .gif_uranus, .gif_neptune {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shadow_mercury, .shadow_venus, .shadow_earth, .shadow_mars, .shadow_jupiter, .shadow_saturn, .shadow_uranus, .shadow_neptune {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 100%;
    overflow: hidden;
}

.shadow_mercury>.shadow, .shadow_venus>.shadow, .shadow_earth>.shadow, .shadow_mars>.shadow, .shadow_jupiter>.shadow, .shadow_saturn>.shadow, .shadow_uranus>.shadow, .shadow_neptune>.shadow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 100%;
}

.mercury_container{
	width: 22px;
	height: 22px;
	position: absolute;
}
.gif_mercury{
    background-position-x: -15px;
    background-position-y: -3px;
    background-size: 239%;
    background-image: url("https://res.cloudinary.com/yerevan/image/upload/v1484080036/mercury_tvm7ik.gif");
	border-radius: 100%;
	overflow: hidden;
}

.venus_container{
	width: 35px;
	height: 35px;
	position: absolute;
}
.gif_venus{
    background-position-x: -4px;
    background-position-y: -3px;
    background-size: 120%;
    background-image: url("https://res.cloudinary.com/yerevan/image/upload/v1484080037/venus_mllz68.gif");
	border-radius: 100%;
}

.earth_moon_container{
	position: absolute;
	width: 50px;
	height: 50px;
}

.earth_container{
    /* FIX: Absolutely position Earth in the center of its container */
	position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
	z-index: 10;
}
.gif_earth{
	width: 40px;
	height: 40px;
	border-radius: 100%;
	overflow: hidden;
}
.gif_earth>img{
	width: 40px;
	height: 40px;
    animation: rotate-axis 5s linear infinite; /* Earth's axis rotation */
}
@keyframes rotate-axis {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.shadow_earth{
    width: 40px;
	height: 40px;
}

.moon_container{
	position: absolute;
	width: 50px;
	height: 50px;
}
.moon{
	position: absolute;
	width: 8px;
	height: 8px;
	border-radius: 100%;
    z-index: 11;
}
.moon>img{
	position: absolute;
	width: 8px;
	height: 8px;
}

.mars_container{
	width: 38px;
	height: 38px;
	position: absolute;
}
.gif_mars{
    background-position-x: -5px;
    background-position-y: -5px;
    background-size: 125%;
    background-image: url("https://res.cloudinary.com/yerevan/image/upload/v1484080036/mars_vvdvoa.gif");
	border-radius: 100%;
}

.jupiter_container{
	position: absolute;
	width: 80px;
	height: 80px;
}
.gif_jupiter>img{
	width: 80px;
	height: 80px;
}

.saturn_ring_container{
	position: absolute;
	width: 120px;
	display: flex;
	justify-content: center;
	height: 120px;
}

.saturn_container{
	align-self: center;
	position: relative;
	width: 55px;
	height: 55px;
	z-index: 10;
}
.gif_saturn:before{
	content: "";
	position: absolute;
	display: block;
	border-radius: 100%;
	background-color: rgba(255,175,100,0.4);
	width: 100%;
	height: 100%;
}
.gif_saturn>img{
	width: 100%;
	height: 100%;
}

.ring_container{
	position: absolute;
	width: 120px;
	height: 120px;
	display: flex;
	justify-content: center;
}
.gif_ring{
	align-self: center;
	width: 120px;
	height: 60px;
}
.gif_ring>div{
	width: 100%;
	height: 50%;
	overflow: hidden;
	position: relative;
}
.gif_ring>div:first-child>img{
	width: 100%;
	height: 200%;
	position: absolute;
	top: 0;
}
.gif_ring>div:last-child>img{
	z-index: 11;
	width: 100%;
	height: 200%;
	position: absolute;
	bottom: 0;
}

.uranus_container{
	position: relative;
	width: 35px;
	height: 35px;
	z-index: 10;
}
.gif_uranus{
    background-position-x: -37px;
    background-position-y: -7px;
    background-size: 325%;
    background-image: url("https://res.cloudinary.com/yerevan/image/upload/v1484080037/uranus_ubdhwe.gif");
	border-radius: 100%;
}

.neptune_container{
	width: 22px;
	height: 22px;
	position: absolute;
}
.gif_neptune{
	background-position-x: -23px;
    background-position-y: -4px;
    background-size: 325%;
	background-image: url("https://res.cloudinary.com/yerevan/image/upload/v1484080036/neptune_byzweb.gif");
	border-radius: 100%;
}


.circles>div{
	position: absolute;
	border-radius: 50%;
	border: 1px solid rgba(55,205,255,0.2);
	box-sizing: border-box;
}

.planet{
	border-radius: 100%;
	position: absolute;
}

.controls{
	position: fixed;
	left: 50%;
    transform: translateX(-50%);
	padding: 10px;
	bottom: 10px;
    z-index: 100;
    
    display: flex;
    align-items: center;
    gap: 15px;

    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes background-pan {
    0% { background-position: 0% center; }
    100% { background-position: -200% center; }
}

.credit-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 25px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    z-index: 100;
}
.credit-container:hover {
    transform: scale(1.05);
    background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #007fff, #8b00ff, #ff0000);
    background-size: 200%;
    animation: background-pan 6s linear infinite; /* Slowed down animation */
}
.credit-container:hover .credit {
    /* Added dark outline for glass effect */
    text-shadow: 0 0 2px #000, 0 0 8px #fff, 0 0 12px #fff;
}
.credit {
    margin: 0;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 0 0 5px #fff;
    transition: text-shadow 0.3s ease;
}

#speed-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 150px;
    height: 10px;
    background: #333;
    border-radius: 5px;
    outline: none;
    transition: background 0.3s ease;
}

#speed-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 5px #fff, 0 0 10px #fff;
    cursor: none;
}

#speed-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 5px #fff, 0 0 10px #fff;
    cursor: none;
    border: none;
}

#speed-display {
    font-weight: bold;
    text-shadow: 0 0 5px #fff;
    min-width: 45px;
    text-align: left;
}


label {
    vertical-align: middle;
}

#info-button {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 50%;
    cursor: none;
    transition: all 0.3s ease;
    z-index: 101;
    font-size: 24px;
    font-weight: bold;
}

#info-button:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 8px #fff;
}

.zoom-controls {
    display: flex;
    gap: 8px;
}

.zoom-controls button {
    position: relative;
    width: 35px;
    height: 35px;
    font-size: 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 50%;
    cursor: none;
    transition: all 0.3s ease;
}
.zoom-controls button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 8px #fff;
    background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #007fff, #8b00ff, #ff0000);
    background-size: 200%;
    animation: background-pan 6s linear infinite;
}

#info-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1001;
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.5), 0 0 30px rgba(0, 191, 255, 0.3);
}

#info-popup h2 {
    margin-top: 0;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 5px #fff;
}

#info-popup ul {
    list-style: none;
    padding: 0;
}

#info-popup li {
    margin-bottom: 15px;
    font-size: 16px;
}

#info-popup span {
    font-weight: bold;
    color: #87CEEB; /* Sky Blue */
}

#close-popup {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: none;
}

#planet-details {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 320px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

#planet-details.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

@keyframes rainbow-border {
    0% { border-color: #ff0000; box-shadow: 0 0 10px #ff0000, 0 8px 32px 0 rgba(0, 0, 0, 0.37); }
    25% { border-color: #ffff00; box-shadow: 0 0 10px #ffff00, 0 8px 32px 0 rgba(0, 0, 0, 0.37); }
    50% { border-color: #00ff00; box-shadow: 0 0 10px #00ff00, 0 8px 32px 0 rgba(0, 0, 0, 0.37); }
    75% { border-color: #0000ff; box-shadow: 0 0 10px #0000ff, 0 8px 32px 0 rgba(0, 0, 0, 0.37); }
    100% { border-color: #ff0000; box-shadow: 0 0 10px #ff0000, 0 8px 32px 0 rgba(0, 0, 0, 0.37); }
}

#planet-details.visible {
    animation: rainbow-border 4s linear infinite;
}

#planet-details h2 {
    margin-top: 0;
    text-align: center;
    font-size: 28px;
    margin-bottom: 15px;
    text-shadow: 0 0 8px #fff;
}
#planet-details p {
    text-align: center;
    font-style: italic;
    margin-bottom: 20px;
}
#planet-details ul {
    list-style: none;
    padding: 0;
}
#planet-details li {
    margin-bottom: 10px;
    background: rgba(0,0,0,0.2);
    padding: 8px;
    border-radius: 5px;
}
#planet-details a {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #87CEEB;
    text-decoration: none;
    font-weight: bold;
}
#close-details {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: none;
}
/* ========================================= */
/* ========= RESPONSIVE DESIGN ============= */
/* ========================================= */

@media (max-width: 900px) { /* Tablets and Phones */
    .cursor-trail {
        display: none !important; /* Hide star cursor on mobile */
    }
}
/* ------ For TABLETS (601px to 900px) ------ */
@media (max-width: 900px) {
    #solar-system-wrapper {
        /* Solar system ko thoda chota kar dete hain */
        transform: scale(0.7) !important; 
    }
    .title-container {
        top: 10px;
    }
    .controls {
        bottom: 5px;
    }
}


/* ------ For MOBILE PHONES (600px and smaller) ------ */
@media (max-width: 600px) {
    #solar-system-wrapper {
        /* Mobile ke liye aur chota kar dete hain */
        transform: scale(0.5) !important;
    }

    /* UI elements ko adjust karte hain */
    .title-container {
        padding: 5px 10px;
    }
    #main-title {
        font-size: 16px;
    }

    .controls {
        width: auto;
        padding: 8px 10px;
        gap: 8px;
    }
    #speed-slider {
        width: 80px;
    }
    #speed-display {
        min-width: 40px;
        font-size: 14px;
    }
    .zoom-controls button {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }
    .credit-container {
        display: none; /* Mobile par jagah bachane ke liye hide kar dete hain */
    }

    #info-button {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    #planet-details {
        width: 85%;
        padding: 15px;
    }
}
