.sun {
	position: absolute;
	top: 50%;
	left: 50% !important;
	width: var(--sun-size);
	height: var(--sun-size);
	transform: translate(-50%, -50%);
	border-radius: 50%;

	background: url('../assets/images/textures/sun.webp');
	background-size: cover;
	box-shadow:
		0 0 30px #ffcc33,
		0 0 60px #ff9900,
		0 0 120px #ff6600;
	animation:
		texture-shift var(--sun-texture-shift-time) linear infinite,
		sunPulse 6s ease-in-out infinite;

	&::before {
		content: '';
		position: absolute;
		inset: 0;
		border-radius: 50%;

		background: radial-gradient(
			circle at 30% 30%,
			rgba(255, 255, 255, 0.4),
			rgba(255, 255, 255, 0.1) 40%,
			rgba(0, 0, 0, 0.4) 75%,
			rgba(0, 0, 0, 0.7) 100%
		);
	}
}

.planet {
	border-radius: 50%;
	position: absolute;
	top: 50%;
	left: 0;
	transform: translate(-50%, -50%);
	background-size: cover;
	will-change: transform;
	pointer-events: auto;
	cursor: pointer;

	&:not(.sun)::before {
		content: '';
		position: absolute;
		inset: -10px;
		border-radius: 50%;
		pointer-events: none;
	}
}

.planet.dim {
	transition: opacity 0.3s ease;
	opacity: 0.3;
}

.planet.mercury {
	width: var(--mercury-size);
	height: var(--mercury-size);
	background: url('../assets/images/textures/mercury.webp');
	box-shadow:
		inset -10px -10px 16px rgba(0, 0, 0, 0.75),
		inset 4px 4px 10px rgba(255, 255, 255, 0.2);
}

.planet.venus {
	width: var(--venus-size);
	height: var(--venus-size);
	background-image: url('../assets/images/textures/venus.webp');
	box-shadow:
		inset -10px -10px 16px rgba(0, 0, 0, 0.75),
		inset 4px 4px 10px rgba(255, 255, 255, 0.2);
}

.planet.earth {
	width: var(--earth-size);
	height: var(--earth-size);
	background-image: url('../assets/images/textures/earth.webp');
	box-shadow:
		inset -8px -8px 14px rgba(0, 0, 0, 0.7),
		inset 4px 4px 10px rgba(255, 255, 255, 0.2);
	/* For Moon Orbit */
	position: relative;
}

.planet.moon {
	width: var(--moon-size);
	height: var(--moon-size);
	background-image: url('../assets/images/textures/moon.webp');
}

.planet.mars {
	width: var(--mars-size);
	height: var(--mars-size);
	background-image: url('../assets/images/textures/mars.webp');
	box-shadow:
		inset -8px -8px 14px rgba(0, 0, 0, 0.7),
		inset 4px 4px 10px rgba(255, 255, 255, 0.2);
}

.planet.jupiter {
	width: var(--jupiter-size);
	height: var(--jupiter-size);
	background-image: url('../assets/images/textures/jupiter.webp');
	box-shadow:
		inset -6px -6px 12px rgba(0, 0, 0, 0.6),
		inset 4px 4px 10px rgba(255, 255, 255, 0.2);
	filter: saturate(0.95);
}

.planet.saturn {
	position: absolute;
	top: 50%;
	left: 0;
	transform: translate(-50%, -50%);
	width: var(--saturn-size);
	height: var(--saturn-size);
	box-shadow: none;

	&::before {
		content: '';
		position: absolute;
		top: 50%;
		left: 50%;
		width: calc(var(--saturn-size) - 50px);
		height: calc(var(--saturn-size) - 50px);
		transform: translate(-50%, -50%);
		border-radius: 50%;
		background: transparent;
		box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6);
		z-index: 2;
	}

	&::after {
		content: '';
		position: absolute;
		inset: 20%;
		border-radius: 50%;
		background: rgba(0, 0, 0, 0.15);
		z-index: 1;
	}

	.saturn-body {
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		width: var(--saturn-body-size);
		height: var(--saturn-body-size);
		border-radius: 50%;
		background-image: url('../assets/images/textures/saturn.webp');
		background-size: cover;
		box-shadow:
			inset -6px -6px 12px rgba(0, 0, 0, 0.6),
			inset 4px 4px 10px rgba(255, 255, 255, 0.2);
	}

	.saturn-ring {
		position: absolute;
		top: 50%;
		left: 50%;
		width: var(--saturn-ring-size);
		height: var(--saturn-ring-size);
		border-radius: 50%;
		border: 10px solid rgba(200, 180, 140, 0.6);
		transform: translate(-50%, -50%) rotateX(65deg);
		box-shadow:
			0 0 10px rgba(255, 255, 255, 0.2),
			inset 0 0 20px rgba(0, 0, 0, 0.5);
		opacity: 0.9;
	}
}

.planet.uranus {
	width: var(--uranus-size);
	height: var(--uranus-size);
	background-image: url('../assets/images/textures/uranus.webp');
	transform: translate(-50%, -50%) rotate(82deg);
	box-shadow:
		inset -5px -5px 10px rgba(0, 0, 0, 0.5),
		inset 4px 4px 10px rgba(255, 255, 255, 0.2);

	&::after {
		content: '';
		position: absolute;
		top: 50%;
		left: 50%;
		width: calc(var(--uranus-size) + 30px);
		height: calc(var(--uranus-size) + 30px);
		transform: translate(-50%, -50%) rotate(75deg);
		border-radius: 50%;
		border: 2px solid rgba(200, 220, 255, 0.2);
	}
}

.planet.neptune {
	width: var(--neptune-size);
	height: var(--neptune-size);
	background-image: url('../assets/images/textures/neptune.webp');
	box-shadow:
		inset -5px -5px 10px rgba(0, 0, 0, 0.5),
		inset 4px 4px 10px rgba(255, 255, 255, 0.2);
	filter: saturate(1.3) brightness(1.05);
}

.texture-shift {
	animation: texture-shift linear infinite;

	&.mercury {
		animation-duration: var(--mercury-texture-shift-time);
	}
	&.venus {
		animation-duration: var(--venus-texture-shift-time);
		animation-direction: reverse;
	}
	&.earth {
		animation-duration: var(--earth-texture-shift-time);
	}
	&.mars {
		animation-duration: var(--mars-texture-shift-time);
	}
	&.jupiter {
		animation-duration: var(--jupiter-texture-shift-time);
	}
	&.saturn-body {
		animation-duration: var(--saturn-texture-shift-time);
	}
	&.uranus {
		animation-duration: var(--uranus-texture-shift-time);
	}
	&.neptune {
		animation-duration: var(--neptune-texture-shift-time);
	}
}

.planet-panel {
	position: fixed;
	top: 0;
	left: 0;

	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;

	z-index: 20;
}

.planet-panel.active {
	opacity: 1;
	pointer-events: auto;
}

.panel-card {
	padding: 1.5rem 2rem;
	background: rgba(255, 255, 255, 0.05);
	backdrop-filter: blur(20px);
	border-radius: 16px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
	text-align: center;
	max-width: 320px;
	color: rgba(255, 255, 255, 0.7);
}

.panel-card h2 {
	font-family: 'Space Grotesk', sans-serif;
	margin-bottom: 0.5rem;
}

.panel-card p {
	font-size: 0.9rem;
	line-height: 1.3;
}
