/* Container Styling */
#planet-slider {
  width: 100%;
  padding: 20px 0 40px 0;
  overflow: hidden;
  user-select: none;
  position: relative;
  z-index: 1;
}

.planet-wrapper {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
  padding: 20px;
  perspective: 1000px;
}

/* Mobile Scroll Support */
@media (max-width: 768px) {
  .planet-wrapper {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-left: 20px;
    padding-right: 20px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  
  .planet-item {
    scroll-snap-align: center;
    flex: 0 0 auto;
    margin-right: 20px;
  }
}

/* Item Styling */
.planet-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none !important;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  position: relative;
}

.planet-item:hover {
  transform: translateY(-15px) scale(1.1);
}

.planet-item span {
  margin-top: 15px;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--font-color, #333);
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  background: rgba(255, 255, 255, 0.5);
  padding: 4px 12px;
  border-radius: 20px;
  backdrop-filter: blur(5px);
  transition: all 0.3s;
}

[data-theme='dark'] .planet-item span {
  color: #eee;
  background: rgba(0, 0, 0, 0.5);
}

.planet-item:hover span {
  background: var(--btn-bg, #49b1f5);
  color: #fff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Planet Base */
.planet-box {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 20px rgba(255,255,255,0.1);
  overflow: hidden;
  transition: box-shadow 0.3s;
  background: rgba(255, 255, 255, 0.1); /* Fallback background */
}

.planet-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: rotatePlanet 20s linear infinite;
  display: block;
}

.planet-item:hover .planet-box {
  box-shadow: 0 0 30px rgba(255,255,255,0.6);
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

@keyframes rotatePlanet {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.planet-item:nth-child(1) { animation: float 6s ease-in-out infinite; }
.planet-item:nth-child(2) { animation: float 6s ease-in-out infinite 1s; }
.planet-item:nth-child(3) { animation: float 6s ease-in-out infinite 2s; }
.planet-item:nth-child(4) { animation: float 6s ease-in-out infinite 3s; }
.planet-item:nth-child(5) { animation: float 6s ease-in-out infinite 4s; }
