html {
  scroll-behavior: smooth;
}

body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body::-webkit-scrollbar {
  display: none;
}

/* === NAVBAR === */
.custom-navbar {
  width: 100%;
  background: rgba(6, 5, 5, 0.35);
  opacity: 70%;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(47, 32, 72, 0.1);
  padding: 12px 25px;
  transition: background 0.3s ease;
}

.custom-navbar.scrolled {
  background: rgba(0, 0, 0, 0.75);
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo img {
  height: 50px;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.5));
}

/* Chatbot icon */
.chatbot img {
  width: 35px;
  height: 35px;
  cursor: pointer;
}

/* Hamburger */
.hamburger {
  cursor: pointer;
  width: 30px;
  height: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger span {
  height: 3px;
  background: white;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* side menu */
.side-menu {
  position: fixed;
  top: 0;
  right: -300px;
  height: 100vh;
  width: 300px;
  background: linear-gradient(
    180deg,
    rgba(18, 18, 30, 0.98) 0%,
    rgba(10, 10, 18, 0.95) 100%
  );
  backdrop-filter: blur(8px);
  padding: 80px 25px;
  display: flex;
  flex-direction: column;
  gap: 25px;
  transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.3s ease;
  opacity: 0;
  z-index: 1000;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.6);
  font-family: "Baloo 2", sans-serif;
}

.side-menu.active {
  right: 0;
  opacity: 1;
}

/* Link Style */
.side-menu a {
  position: relative;
  color: #ddd;
  text-decoration: none;
  letter-spacing: 0.5px;
  padding: 8px 0;
  transition: color 0.3s ease;
  font-size: 1.2rem;
  font-weight: 600;
}

.side-menu .menu-icon,
.side-menu .menu-icon2,
.side-menu .menu-icon3 {
  margin-right: 0.8rem;
  margin-bottom: 7px;
}

.side-menu .menu-icon {
  width: 1.5rem;
}
.side-menu .menu-icon2 {
  width: 1.3rem;
}
.side-menu .menu-icon3 {
  width: 1.4rem;
}

/* Hover animasi underline glowing */
.side-menu a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, #a78bfa, #8b5cf6, #4c1d95);
  box-shadow: 0 0 6px #8b5cf6;
  transition: width 0.3s ease;
}

.side-menu a:hover {
  color: #c4b5fd;
}

.side-menu a:hover::after {
  width: 100%;
}

/* Entrance animation */
.side-menu.active a {
  animation: slideFadeIn 0.4s ease forwards;
}
.side-menu.active a:nth-child(1) {
  animation-delay: 0.1s;
}
.side-menu.active a:nth-child(2) {
  animation-delay: 0.2s;
}
.side-menu.active a:nth-child(3) {
  animation-delay: 0.3s;
}
.side-menu.active a:nth-child(4) {
  animation-delay: 0.4s;
}

@keyframes slideFadeIn {
  from {
    transform: translateX(20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* === BANNER DARK SPACE STYLE === */
body {
  margin: 0;
  font-family: "Baloo 2", sans-serif;
  overflow-x: hidden;
  background: #1d0331;
}

/* Banner */
.banner {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Dark overlay */
.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  z-index: 1;
}

/* gradient overlay untuk transisi halus */
.banner-gradient {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 150px;
  background: linear-gradient(
    to bottom,
    rgba(29, 3, 49, 0) 0%,
    rgba(29, 3, 49, 1) 100%
  );
  z-index: 2;
}

.banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(black, rgba(255, 255, 255, 0) 2px),
    radial-gradient(black, rgba(255, 255, 255, 0) 1px);
  background-size: 3px 3px, 1px 1px;
  animation: twinkle 4s infinite alternate;
  z-index: 0;
}

@keyframes twinkle {
  0% {
    opacity: 0.7;
  }
  100% {
    opacity: 1;
  }
}

/* LOGO */
.main-logo {
  width: 35rem;
  z-index: 3;
  padding-bottom: 3rem;
}

.main-button {
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  z-index: 3;
  text-decoration: none;
  font-family: "Baloo 2", sans-serif;
  font-weight: 600;
  color: white;
  padding: 1rem;
}

.main-button:hover {
  border: 2px solid rgb(255, 255, 255);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  transition: 0.2s;
}

/* floating icons */
.icon {
  position: absolute;
  width: 60px;
  animation: float 8s ease-in-out infinite, rotate 12s linear infinite;
  z-index: 1;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}
@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Positions */
.python {
  top: 20%;
  left: 10%;
}
.js {
  top: 60%;
  left: 15%;
}
.html {
  top: 40%;
  right: 15%;
}
.css {
  top: 70%;
  right: 10%;
}
.scratch {
  top: 15%;
  left: 50%;
}
.cpp {
  top: 80%;
  left: 45%;
}

#starsCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Materi Section */

.materi-section {
  position: relative;
  z-index: 3;
  padding-top: 50px;
}

.materi-box {
  display: flex;
  align-items: center;
  min-height: 120px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  border-radius: 15px;
  padding: 15px;
  transition: all 0.2s ease;
}

.materi-box:hover {
  transform: translateY(-3px);
  border-color: rgb(255, 255, 255);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.materi-icon {
  width: 50px;
  height: auto;
  margin-right: 15px;
  flex-shrink: 0;
}
.materi-box h4 {
  margin: 0;
  font-weight: 700;
  color: #fff;
}
.materi-box p {
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
}

.materi-h .kategori-text {
  font-weight: 600;
  font-family: "Baloo 2", sans-serif;
  color: white;
}

.materi-h .judul-materi {
  font-weight: 600;
  font-family: "Baloo 2", sans-serif;
  color: white;
}

/* === Mascot Tips Section === */
.mascot-section {
  position: relative;
  z-index: 3;
}

.mascot-img {
  padding-left: 6rem;
  padding-right: 6rem;
  width: 30rem;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.45));
  transform: translateZ(0);
}

.mascot-bubble {
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  border-radius: 16px;
  padding: 130px 150px;
  color: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.mascot-bubble:hover {
  transform: translateY(-3px);
  border-color: rgb(255, 255, 255);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.mascot-bubble:hover::before {
  border-left: 4px solid rgb(255, 255, 255);
  border-top: 4px solid rgb(255, 255, 255);
}

.mascot-bubble h4 {
  font-weight: 700;
  margin: 0 0 6px 0;
  font-size: 2rem;
}

.mascot-bubble p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.45;
  font-size: 1.5rem;
}

@media (max-width: 767.98px) {
  .mascot-section .row {
    text-align: center;
  }
  .mascot-bubble {
    margin-top: -6px;
  }
}

/* Game Section */
.games-section {
  padding: 20px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* selalu 2 kolom */
  gap: 20px;
  max-width: 1300px;
  margin: 0 auto;
}

.game-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  border-radius: 12px;
  overflow: hidden;
  padding: 15px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.media-card {
  position: relative;
  width: 99%;
  height: 100%;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
}

.media-card video {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.media-card .poster {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  transition: opacity 0.7s ease;
}

.media-card:hover .poster {
  opacity: 0;
}

/* Poster responsive */
.poster {
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  margin-bottom: 10px;
}

.game-card video {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 10px;
  background-color: #0f172a;
  transform: scale(1.4) translateX(10%);
}

.game-card h3 {
  margin-top: 10px;
  color: #fff;
}

.game-card p {
  color: #cbd5e1;
  font-size: 14px;
}

.games-h {
  padding-left: 5.3rem;
  padding-bottom: 2rem;
}

.games-h .Games-text {
  font-weight: 600;
  font-family: "Baloo 2", sans-serif;
  color: white;
}

.games-h .judul-games {
  font-weight: 600;
  font-family: "Baloo 2", sans-serif;
  color: white;
}

.game-card h3 {
  font-family: "Baloo 2", sans-serif;
  font-weight: 600;
}

.game-card p {
  font-family: "Baloo 2", sans-serif;
  font-weight: 400;
}

.game-card:hover {
  transform: translateY(-5px);
  border-color: rgb(255, 255, 255);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  transition: 0.4s;
}

/* Footer */
.footer {
  background: #120a25;
  color: #eee;
  padding: 40px 20px;
  margin-top: 60px;
  font-family: "Baloo 2", sans-serif;
  font-weight: 600;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: auto;
}

.footer-about,
.footer-links,
.footer-contact {
  flex: 1 1 250px;
  margin: 20px;
}

.footer h2,
.footer h3 {
  color: #0ff;
  margin-bottom: 15px;
  font-family: "Baloo 2", sans-serif;
  font-weight: 600;
}

.footer p,
.footer a {
  color: #ccc;
  font-size: 14px;
  text-decoration: none;
}

.footer a:hover {
  color: #0ff;
  text-decoration: underline;
}

.footer-links {
  padding-left: 9rem;
}

.footer-contact {
  padding-left: 9rem;
}

/* Quick links list */
.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links ul li {
  margin-bottom: 8px;
}

/* Copyright */
.footer .copyright {
  text-align: center;
  margin-top: 30px;
  font-size: 13px;
  color: #888;
  border-top: 1px solid #333;
  padding-top: 15px;
}

/* === RESPONSIVE SYSTEM === */

/* Laptop/Desktop (≥ 1200px) */
@media (min-width: 1200px) {
  .banner .main-logo {
    width: 35rem;
  }
  .mascot-bubble {
    padding: 80px 100px;
  }
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .games-h {
    padding-left: 5.3rem;
    padding-bottom: 2rem;
  }
}

/* Tablet (768px – 1199px) */
@media (max-width: 1199px) and (min-width: 768px) {
  .navbar-container {
    padding: 0 20px;
  }

  .main-logo {
    width: 25rem;
  }

  .mascot-img {
    width: 22rem;
    padding: 0 2rem;
  }

  .mascot-bubble {
    padding: 50px 60px;
    font-size: 1rem;
  }

  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .games-h {
    padding-left: 2rem;
  }

  .footer-container {
    text-align: center;
  }
  .footer-links,
  .footer-contact {
    padding-left: 0;
    margin: 10px 0;
  }
}

/* Handphone (≤ 767px) */
@media (max-width: 767px) {
  /* Navbar */
  .custom-navbar {
    padding: 10px 15px;
  }
  .logo img {
    height: 40px;
  }
  .chatbot img {
    width: 28px;
    height: 28px;
  }

  /* Banner */
  .main-logo {
    width: 18rem;
    padding-bottom: 1rem;
  }
  .main-button {
    font-size: 0.9rem;
    padding: 0.4rem 0.7rem;
  }

  .banner img {
    transform: scale(80%);
  }

  .html {
    top: 30%;
    right: 15%;
  }

  /* Materi */
  .materi-box {
    flex-direction: column;
    text-align: center;
    padding: 12px;
  }
  .materi-icon {
    margin-bottom: 10px;
    margin-left: 1rem;
  }

  /* Mascot */
  .mascot-section {
    flex-direction: column;
    text-align: center;
  }
  .mascot-img {
    width: 15rem;
    padding: 0;
    margin-bottom: 20px;
  }
  .mascot-bubble {
    padding: 25px;
    font-size: 0.9rem;
  }

  /* Games */
  .games-h {
    padding-left: 1rem;
    padding-bottom: 2rem;
  }

  .games-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .game-card {
    min-height: auto;
    padding: 15px;
  }
  .game-card video {
    height: 180px;
  }

  /* Footer */
  .footer-container {
    text-align: center;
  }
  .footer-links,
  .footer-contact {
    padding-left: 0;
    margin: 10px 0;
  }
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  width: 300px;
}
.modal-content button {
  margin: 10px;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
