/* Custom CSS  */

/* Root Variables */
:root {
  --primary: hsl(220, 100%, 60%);
  --primary-dark: hsl(220, 100%, 45%);
  --secondary: hsl(280, 100%, 65%);
  --accent: hsl(320, 100%, 70%);
  --background: hsl(220, 30%, 5%);
  --text-white: hsl(0, 0%, 100%);
  --text-muted: hsl(0, 0%, 70%);
  --sky-1: #0b1026;
  --sky-2: #121a3a;
  --sky-3: #1d275a;
  --primary: #0ea5e9;
  --accent: #a78bfa;
  --success: #22c55e;
  --bar-bg: #1f2942;
  --bar-fill: #22d3ee;
}

/* Global Styles */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  overflow-x: hidden;
}

/* Layer dasar */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(
    1200px 800px at 50% 60%,
    var(--sky-3),
    var(--sky-2) 60%,
    var(--sky-1) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.6s ease;
}
.splash-content {
  position: relative;
  z-index: 2;
  color: #fff;
  padding-inline: 1rem;
}

.splash-title {
  font-size: 3rem;
  font-weight: bold;
  background: linear-gradient(
    270deg,
    #ff6ec7,
    #ff4e50,
    #f9d423,
    #24c6dc,
    #5433ff,
    #20bdff,
    #a5fecb
  );
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  animation: gradientMove 8s ease infinite;
}

@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Bintang dasar */
.stars {
  position: absolute;
  width: 100%;
  height: 100%;
  background: transparent;
  background-image: radial-gradient(2px 2px at 20% 30%, white, transparent),
    radial-gradient(1.5px 1.5px at 50% 80%, white, transparent),
    radial-gradient(2px 2px at 70% 20%, white, transparent),
    radial-gradient(1.8px 1.8px at 80% 60%, white, transparent),
    radial-gradient(2px 2px at 30% 70%, white, transparent);
  background-repeat: no-repeat;
  animation: twinkle 2s infinite alternate;
}

/* Layer kedua biar lebih random */
.stars.layer2 {
  background-image: radial-gradient(2px 2px at 25% 15%, white, transparent),
    radial-gradient(1.5px 1.5px at 60% 40%, white, transparent),
    radial-gradient(2px 2px at 85% 75%, white, transparent),
    radial-gradient(2px 2px at 40% 50%, white, transparent),
    radial-gradient(1.5px 1.5px at 10% 85%, white, transparent);
  animation: twinkle 3s infinite alternate;
  animation-delay: 1s; /* biar gantian sama layer1 */
}

/* Animasi kedip */
@keyframes twinkle {
  0% {
    opacity: 0.2;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.3;
  }
}

/* Planet dasar */
.planet {
  position: absolute;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  animation: float 6s ease-in-out infinite alternate, rotate 60s linear infinite; /* tambah rotasi */
}

/* Jupiter (kiri atas) */
.mars {
  width: 90px;
  height: 90px;
  top: 40px;
  left: 40px;
  background: radial-gradient(circle at 30% 30%, #f5deb3, #a0522d, #8b4513);
}

/* Saturn (bawah tengah) */
.saturn {
  width: 80px;
  height: 80px;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle at 40% 40%, #f4e2d8, #d2b48c, #a0522d);
}
.saturn::after {
  content: "";
  position: absolute;
  top: 35%;
  left: -25%;
  width: 150%;
  height: 12px;
  background: rgba(200, 180, 120, 0.6);
  border-radius: 50%;
  transform: rotate(20deg);
}

/* Mars (kanan atas) */
.jupiter {
  width: 70px;
  height: 70px;
  top: 100px;
  right: 60px;
  background: radial-gradient(circle at 30% 30%, #ff6f61, #c1440e, #8b0000);
}

/* Animasi mengapung */
@keyframes float {
  from {
    transform: translateY(0px);
  }
  to {
    transform: translateY(-15px);
  }
}

/* Animasi rotasi */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.stars,
.stars.layer2 {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(2px 2px at 20px 30px, #fff, transparent),
    radial-gradient(1px 1px at 140px 80px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 90px 120px, #fff, transparent),
    radial-gradient(1px 1px at 170px 40px, #fff, transparent),
    radial-gradient(2px 2px at 250px 70px, #fff, transparent);
  background-size: 200px 200px;
  animation: twinkle 4s ease-in-out infinite alternate;
  opacity: 0.8;
}
.stars.layer2 {
  background-size: 260px 260px;
  filter: blur(0.5px);
  animation-duration: 6s;
  opacity: 0.6;
}
@keyframes twinkle {
  from {
    opacity: 0.4;
  }
  to {
    opacity: 1;
  }
}

/* Bulan */
.moon {
  position: absolute;
  top: 8%;
  right: 10%;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 35%,
    #fff 0 30%,
    #e2e8f0 31% 60%,
    #cbd5e1 61% 100%
  );
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
}

/* Judul: fade-in per huruf + warna berjalan */
.splash-title {
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
  font-size: clamp(2rem, 5vw, 3.5rem);
  white-space: nowrap;
}
.splash-title span {
  display: inline-block;
  opacity: 0;
  background: linear-gradient(90deg, #60a5fa, #a78bfa, #22d3ee, #60a5fa);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: letterIn 0.6s forwards, hueWalk 3s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.06s), 0s;
}
@keyframes letterIn {
  from {
    transform: translateY(12px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes hueWalk {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.splash-subtext {
  color: #cbd5e1;
  opacity: 0;
  animation: subIn 0.7s 0.6s forwards;
  font-size: clamp(1rem, 2.4vw, 1.25rem);
}
@keyframes subIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* Progress dengan roket */
.loader-wrap {
  margin-top: 1.5rem;
  max-width: 720px;
  margin-inline: auto;
}
.progress-track {
  position: relative;
  width: 100%;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #0b1327, #0f1a35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 6px 20px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}
.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--bar-fill), #60a5fa);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.55);
  transition: width 0.12s ease;
}
.rocket {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  left: 0%;
  width: 72px;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.55));
}
.flame {
  animation: flame 150ms infinite ease-in-out;
  transform-origin: 12px 30px;
}
@keyframes flame {
  0% {
    opacity: 0.8;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
  100% {
    opacity: 0.85;
    transform: scale(0.95);
  }
}

.loading-text {
  color: #cbd5e1;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* Keluar saat selesai */
.splash-screen.is-done {
  opacity: 0;
  pointer-events: none;
}

/* Responsif padding */
@media (max-width: 576px) {
  .loader-wrap {
    padding-inline: 0.5rem;
  }
}

/* Rainbow Animation */
.rainbow-text {
  background: linear-gradient(
    45deg,
    #ff0000,
    #ff7f00,
    #ffff00,
    #00ff00,
    #0000ff,
    #4b0082,
    #9400d3
  );
  background-size: 400% 400%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbow 3s ease-in-out infinite;
}

@keyframes rainbow {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Navigation */
.navbar {
  background: rgba(20, 20, 40, 0.95) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.navbar-brand {
  font-size: 1.5rem;
}

.nav-link {
  color: var(--text-white) !important;
  font-weight: 500;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: var(--primary) !important;
  transform: translateY(-2px);
}

/* Page Content */
.page-content {
  min-height: 100vh;
  padding-top: 80px;
}

/* Space Background */
.space-bg {
  /* background: linear-gradient(
    135deg,
    hsl(220, 30%, 5%) 0%,
    hsl(240, 50%, 10%) 50%,
    hsl(260, 40%, 15%) 100%
  ); */
  background: radial-gradient(
    1200px 800px at 50% 60%,
    var(--sky-3),
    var(--sky-2) 60%,
    var(--sky-1) 100%
  );
  position: relative;
  overflow: hidden;
}

.space-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.stars {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(2px 2px at 20px 30px, white, transparent),
    radial-gradient(2px 2px at 40px 70px, white, transparent),
    radial-gradient(1px 1px at 90px 40px, white, transparent),
    radial-gradient(1px 1px at 130px 80px, white, transparent),
    radial-gradient(2px 2px at 160px 30px, white, transparent);
  background-repeat: repeat;
  background-size: 200px 100px;
  animation: twinkle 4s ease-in-out infinite alternate;
}

@keyframes twinkle {
  0% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.planet {
  position: absolute;
  border-radius: 50%;
}

/* Default Earth di tengah */
.earth {
  width: 80px;
  height: 80px;
  background: radial-gradient(circle at 30% 30%, #5dd1ff, #29b6f6 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  animation: rotate 20s linear infinite;

  /* Efek bersinar */
  box-shadow: 0 0 15px rgba(79, 195, 247, 0.8),
    /* cahaya dekat */ 0 0 30px rgba(79, 195, 247, 0.6),
    /* cahaya sedang */ 0 0 60px rgba(79, 195, 247, 0.4);
}

@keyframes glow {
  0% {
    box-shadow: 0 0 15px rgba(79, 195, 247, 0.8),
      0 0 30px rgba(79, 195, 247, 0.6), 0 0 60px rgba(79, 195, 247, 0.4);
  }
  50% {
    box-shadow: 0 0 25px rgba(79, 195, 247, 1), 0 0 50px rgba(79, 195, 247, 0.8),
      0 0 80px rgba(79, 195, 247, 0.6);
  }
  100% {
    box-shadow: 0 0 15px rgba(79, 195, 247, 0.8),
      0 0 30px rgba(79, 195, 247, 0.6), 0 0 60px rgba(79, 195, 247, 0.4);
  }
}

.earth {
  animation: rotate 20s linear infinite, glow 3s ease-in-out infinite;
}

.moon {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #eeeeee, #bdbdbd);
  top: 30%;
  right: 20%;
  animation: orbit 15s linear infinite;
  box-shadow: 0 0 10px rgba(238, 238, 238, 0.3);
}

/* Mobile fix */
@media (max-width: 768px) {
  .earth {
    width: 50px;
    height: 50px;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
  }

  .moon {
    width: 20px;
    height: 20px;
    top: 20%;
    right: 10%;
  }

  .satellite {
    top: 60%;
    left: 15%;
  }
}

.satellite {
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #ffd54f, #ffc107);
  top: 70%;
  left: 20%;
  animation: orbit 25s linear infinite reverse;
  box-shadow: 0 0 8px rgba(255, 213, 79, 0.4);
}

@keyframes rotate {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes orbit {
  from {
    transform: rotate(0deg) translateX(100px) rotate(0deg);
  }
  to {
    transform: rotate(360deg) translateX(100px) rotate(-360deg);
  }
}

/* Cards */
.glass-card {
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  transition: all 0.3s ease;
  cursor: pointer;
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.gradient-card {
  background: linear-gradient(
    135deg,
    rgba(var(--primary), 0.1),
    rgba(var(--secondary), 0.1)
  ) !important;
  border: 1px solid rgba(var(--primary), 0.2) !important;
}

/* Service Icons */
.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  transition: all 0.3s ease;
}

.service-icon:hover {
  transform: scale(1.1);
}

.feature-icon {
  font-size: 3rem;
}

/* Buttons */
.glow-btn {
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(var(--primary), 0.3);
  transition: all 0.3s ease;
}

.glow-btn:hover {
  box-shadow: 0 0 30px rgba(var(--primary), 0.5);
  transform: translateY(-2px);
}

.glow-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.glow-btn:hover::before {
  left: 100%;
}

.galaxy {
  position: absolute;
  top: 8%;
  right: 8%;
  width: 120px;
  height: 120px;
  pointer-events: none;
}

.galaxy span {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8),
    0 0 12px rgba(200, 220, 255, 0.5), 0 0 18px rgba(180, 200, 255, 0.3);
  animation: star-flicker 3s infinite alternate;
}

/* posisi acak tiap bintang */
.galaxy span:nth-child(1) {
  top: 10px;
  left: 20px;
  animation-delay: 0s;
}
.galaxy span:nth-child(2) {
  top: 40px;
  left: 60px;
  animation-delay: 0.7s;
}
.galaxy span:nth-child(3) {
  top: 70px;
  left: 30px;
  animation-delay: 1.3s;
}
.galaxy span:nth-child(4) {
  top: 90px;
  left: 80px;
  animation-delay: 1.9s;
}
.galaxy span:nth-child(5) {
  top: 50px;
  left: 100px;
  animation-delay: 2.5s;
}

@keyframes star-flicker {
  0% {
    opacity: 0.4;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
}

/* Product Cards */
.product-card {
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.product-image {
  height: 200px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: white;
  opacity: 0.7;
}

.product-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-top-left-radius: 0.375rem;
  border-top-right-radius: 0.375rem;
}

.product-card .card-body {
  transition: transform 0.3s ease;
}

/* Game Cards */
.game-card {
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.game-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Package Items */
.package-item {
  background: rgba(var(--primary), 0.1);
  border: 1px solid rgba(var(--primary), 0.2);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.package-item:hover {
  background: rgba(var(--primary), 0.2);
  transform: translateX(5px);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .splash-text {
    font-size: 2.5rem;
  }

  .splash-subtext {
    font-size: 1.2rem;
  }

  .service-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .feature-icon {
    font-size: 2.5rem;
  }
}

/* Custom Bootstrap overrides */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  font-weight: 600;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  transform: translateY(-2px);
}

.btn-outline-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
}

/* Loading Animation */
.loading {
  opacity: 0;
  animation: fadeIn 0.5s ease-out forwards;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}
