html,
body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    max-width: 100vw;
}

body {
    background-color: #0B0F19;
    color: #ffffff;
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.text-gradient {
    background: linear-gradient(to right, #FACC15, #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-blue {
    background: linear-gradient(to right, #00F0FF, #3B82F6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glow-button {
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.4);
    transition: all 0.3s ease;
}

.glow-button:hover {
    box-shadow: 0 0 30px rgba(250, 204, 21, 0.8);
    transform: translateY(-2px);
}

.bg-grid {
    background-size: 40px 40px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
}

/* CUSTOM SCROLLBAR */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #05070C;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #FACC15, #CA8A04);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #00F0FF, #3B82F6);
}

html {
    scrollbar-width: thin;
    scrollbar-color: #FACC15 #05070C;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.animate-shimmer {
    animation: shimmer 3s infinite linear;
}

/* Animasi Kupu-kupu (Khusus Hero) */
.butterfly-master {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    animation: flyUp var(--duration) linear var(--delay) infinite;
    opacity: 0;
    bottom: -10vh;
}

.butterfly-flutter {
    animation: flutter var(--flutter-speed) ease-in-out infinite alternate;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.butterfly-img {
    width: var(--size);
    height: var(--size);
    object-fit: contain;
    animation: flap var(--flap-speed) ease-in-out infinite alternate;
    filter: drop-shadow(0 0 8px rgba(74, 222, 128, 0.4));
    transform-origin: center;
}

@keyframes flyUp {
    0% {
        transform: translate3d(var(--start-x), 0, 0);
        opacity: 0;
    }

    10% {
        opacity: var(--opacity);
    }

    90% {
        opacity: var(--opacity);
    }

    100% {
        transform: translate3d(var(--end-x), -120vh, 0);
        opacity: 0;
    }
}

@keyframes flutter {
    0% {
        transform: translate3d(0, 0, 0) rotate(-15deg);
    }

    50% {
        transform: translate3d(var(--wobble-dist), -20px, 0) rotate(20deg);
    }

    100% {
        transform: translate3d(calc(var(--wobble-dist) * -0.5), 10px, 0) rotate(-10deg);
    }
}

@keyframes flap {
    0% {
        transform: rotateY(-60deg);
    }

    100% {
        transform: rotateY(60deg);
    }
}

/* Modal / Lightbox Animasi */
@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-zoom-in {
    animation: zoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.container-utama {
    display: grid;
    place-items: center; /* Mengetengahkan horizontal & vertikal sekaligus */
    min-height: auto; /* Memenuhi seluruh tinggi layar browser */
}

canvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
}

.background-tp {
    background-color: black;
    background-image: url(../image/bgns.png);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-attachment: fixed;
}

/* Gaya dasar kotak */
.kotak {
  margin: 100px auto;
  padding: 40px;
  background-color: lightblue;
  /* Transisi halus selama 1 detik */
  transition: all 1s ease-out; 
}

/* Kondisi awal sebelum di-scroll */
.sembunyi {
  opacity: 0;
  transform: translateY(50px);
}

/* Kondisi setelah elemen terlihat di layar */
.muncul {
  opacity: 1;
  transform: translateY(0);
}
