/* ==========================================
   GLOBAL & BACKGROUND
   ========================================== */
body {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    background-color: #111;
    height: 100vh;
    overflow: hidden;
}

/* ==========================================
   BACKGROUND & CHARACTER LAYERS
   ========================================== */
.bg-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2; /* Layer paling belakang */
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Overlay Vignette agar background lebih menarik (Gelap di pinggir) */
.bg-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0,0,0,0.1) 30%, rgba(0,0,0,0.9) 100%);
}

.character-wrapper {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(50px); /* Posisi awal agak turun */
    z-index: 0; /* Di atas background & partikelnya, di bawah tombol */
    height: 50vh; /* Tinggi karakter menyesuaikan layar */
    opacity: 0;
    transition: all 1s ease-out;
    pointer-events: none; /* Agar klik tembus ke belakang jika perlu */
}

.character-wrapper.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.character-wrapper img {
    height: 100%;
    width: auto;
    filter: drop-shadow(0 0 20px rgba(0,0,0,0.7)); /* Efek bayangan pada karakter */
}

/* ==========================================
   EFEK PARTIKEL (BACKGROUND)
   ========================================== */
#bg-particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1; /* Di atas background, di bawah karakter */
}

.bg-particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
    will-change: transform, opacity;
}

@keyframes float {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    50% {
        transform: translateY(-20px) translateX(10px);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-40px) translateX(-10px);
        opacity: 0;
    }
}

/* ==========================================
   EFEK PARTIKEL (API) SEKITAR TOMBOL
   ========================================== */
#button-particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Agar tidak bisa diklik */
    z-index: -1; /* Di atas background, di bawah karakter */
}

.particle {
    position: absolute;
    background: #00aaff; /* Default: Biru Terang */
    border-radius: 50%;
    filter: blur(2px);
    will-change: transform, opacity; /* Optimasi performa animasi */
}

/* Variasi Warna Partikel (Campuran Muda & Tua) */
.particle:nth-child(2n) {
    background: #0077be; /* Biru Laut (Sedikit Gelap) */
}

.particle:nth-child(3n) {
    background: #80d4ff; /* Biru Sangat Muda (Es) */
}

.particle:nth-child(5n) {
    background: #004488; /* Biru Tua (Deep Blue) */
}

/* Animasi partikel naik seperti bara api */
@keyframes rise {
    from {
        transform: translateY(0) scale(1);
        opacity: 0.7;
    }
    to {
        transform: translateY(-180px) scale(0); /* Naik dan menghilang */
        opacity: 0;
    }
}

/* Menyesuaikan posisi partikel di layar kecil */
@media (max-width: 768px) {
    #button-particle-container {
        width: 100%;
        height: 150px;
    }
}

/* ==========================================
   MAIN CONTENT (TOMBOL)
   ========================================== */
.main-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column; /* Susun item (logo & tombol) secara vertikal */
    justify-content: center;
    align-items: center;
    z-index: 2; /* Layer paling depan setelah splash */
    gap: 20px; /* Jarak antara logo dan tombol */
    padding-bottom: 5vh; /* Beri sedikit padding bawah agar tidak terlalu mepet */
}

/* Animasi Glow untuk Logo */
@keyframes logo-glow {
    0% { filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3)); }
    50% { filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.9)); }
    100% { filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3)); }
}

.logo-container {
    /* State awal animasi: transparan dan sedikit turun */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out 0.1s, transform 0.8s ease-out 0.1s; /* Muncul pertama */
    margin-top: 5vh; /* Menurunkan posisi logo */
}

.logo-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.logo-container img {
    max-width: 400px; /* Ukuran maksimal logo */
    width: 70vw;
    height: auto;
    animation: logo-glow 2s infinite ease-in-out; /* Efek berkedip/glow */
}

.nav-container {
    position: absolute;
    bottom: 5vh; /* Menempelkan tombol di area bawah layar */
    width: 100%;
    box-sizing: border-box;
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    padding: 20px;
    /* State awal animasi: transparan dan sedikit turun */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out 0.3s, transform 0.8s ease-out 0.3s; /* Muncul setelah logo */
}

/* Class ini akan ditambahkan via JS saat splash tutup */
.nav-container.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   SIDE BANNERS (KIRI & KANAN)
   ========================================== */
.side-banner {
    position: absolute;
    top: 50vh;
    transform: translateY(-50%); /* Center vertikal */
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 10; /* Di atas karakter */
    
    /* Animasi Slide */
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1); /* Transisi untuk efek slide */
}

.side-banner.left-panel {
    left: -250px; /* Posisi awal di luar layar kiri (disesuaikan dengan lebar baru) */
}

.side-banner.right-panel {
    right: -250px; /* Posisi awal di luar layar kanan (disesuaikan dengan lebar baru) */
}

/* Saat class .visible ditambahkan, banner akan slide ke posisi ini */
.side-banner.visible.left-panel {
    left: 30px;
}

.side-banner.visible.right-panel {
    right: 30px;
}
.banner-box {
    position: relative; /* Penting untuk posisi tooltip */
    display: block;
    width: 200px; /* Lebar banner diperkecil */
    height: auto;
    border-radius: 10px;
    overflow: visible; /* Ubah hidden jadi visible agar tooltip bisa keluar */
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
    background: rgba(0,0,0,0.3); /* Glass effect gelap */
    backdrop-filter: blur(5px);
}

.banner-box:hover {
    transform: scale(1.05);
    border-color: #00aaff; /* Warna Biru saat hover */
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.6);
}

.banner-box img {
    width: 100%;
    height: auto;
    display: block;
}

.banner-content {
    position: relative;
    border-radius: 8px;
    overflow: hidden; /* Klip efek kilatan agar tetap di dalam banner */
    /* Fix untuk Safari agar border-radius bekerja dengan overflow:hidden */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.banner-content::before {
    content: '';
    position: absolute;
    top: 0;
    width: 70%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.25) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    animation: shine-effect 4s infinite; /* Durasi total animasi 4 detik */
    z-index: 1;
}

@keyframes shine-effect {
    0% { left: -100%; }
    25% { left: 125%; } /* Kilatan bergerak selama 1 detik (25% dari 4s) */
    100% { left: 125%; } /* Diam selama 3 detik */
}

/* ==========================================
   CUSTOM TOOLTIP STYLES
   ========================================== */
.banner-box::after {
    content: attr(data-tooltip); /* Ambil teks dari atribut HTML */
    position: absolute;
    top: 50%;
    transform: translateY(-50%) scale(0.8);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55); /* Efek bounce sedikit */
    pointer-events: none;
    z-index: 100;
    border: 1px solid #00aaff; /* Border biru */
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.banner-box:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

/* Posisi Tooltip Kiri (Muncul di Kanan) */
.left-panel .banner-box::after {
    left: 105%;
}

/* Posisi Tooltip Kanan (Muncul di Kiri) */
.right-panel .banner-box::after {
    right: 105%;
}

/* ==========================================
   SPLASH SCREEN PROMOSI
   ========================================== */
#splash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85); /* Sedikit lebih transparan */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.4s ease;
}

.splash-box {
    position: relative;
    /* Dibuat minimalis agar murni menampilkan gambar */
    background: transparent;
    max-width: 600px; /* Ukuran maksimal gambar diperbesar sedikit */
    width: 90%;
    display: flex;
    justify-content: center;
    z-index: 2; /* Pastikan di atas karakter GM */
}

/* Animasi Karakter GM Masuk */
@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.splash-gm-char {
    position: absolute;
    right: 5%; /* Jarak dari kanan */
    bottom: 0;
    height: 70vh; /* Tinggi karakter */
    z-index: 1; /* Di belakang splash box (2) tapi di dalam overlay */
    animation: slideInFromRight 1s ease-out 0.3s forwards;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.4));
    transition: opacity 0.4s ease; /* Transisi saat closeSplash */
}

/* ==========================================
   EFEK ASAP (GM CHARACTER)
   ========================================== */
#gm-smoke-container {
    position: absolute;
    right: 2%; /* Sedikit digeser agar pas dengan kaki GM */
    bottom: 0;
    width: 30vh; /* Lebar area asap menyesuaikan estimasi lebar GM */
    height: 20vh;
    pointer-events: none;
    z-index: 1; /* Selevel dengan GM, di belakang splash box */
    transition: opacity 0.4s ease;
}

.smoke-particle {
    position: absolute;
    bottom: -20px;
    background: radial-gradient(circle, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0) 70%); /* Putih transparan */
    border-radius: 50%;
    filter: blur(8px); /* Efek kabut */
    opacity: 0;
}

@keyframes smokeRise {
    0% { transform: translateY(0) scale(0.5); opacity: 0; }
    40% { opacity: 0.6; }
    100% { transform: translateY(-100px) scale(2); opacity: 0; }
}

/* Tombol Close Mengambang di KANAN Atas */
.close-btn {
    position: absolute;
    top: -15px;
    right: -15px; /* Berubah dari left ke right */
    width: 35px;
    height: 35px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    transition: transform 0.2s;
    z-index: 10;
}

.close-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.splash-box img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

/* Style untuk Caption di dalam Splash Image */
.splash-caption-box {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 10%, transparent);
    color: #fff;
    padding: 40px 20px 20px; /* Padding atas lebih besar agar teks tidak mepet gradasi */
    border-radius: 0 0 8px 8px; /* Mengikuti lengkungan bawah gambar */
    font-size: 20px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-align: center;
    box-sizing: border-box;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
}

/* Style untuk Tombol Navigasi */
.nav-card {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 280px;
    height: 60px;
    background: linear-gradient(135deg, #007bff, #0056b3); /* Warna Biru Default */
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    border-radius: 50px; /* Membuat tombol bulat (pill shape) */
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    transition: transform 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,123,255,0.6); /* Efek glow saat hover */
    background: linear-gradient(135deg, #0056b3, #004494);
}

/* Tombol Download (Warna Hijau agar beda) */
.nav-card.download {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

.nav-card.download:hover {
    box-shadow: 0 8px 25px rgba(40,167,69,0.6);
    background: linear-gradient(135deg, #1e7e34, #155724);
}

@media (max-width: 768px) {
    .nav-card {
        width: 100%;
    }

    /* Banner samping tetap tampil tapi kecil */
    .side-banner {
        display: flex;
        gap: 10px;
    }
    .side-banner.visible.left-panel {
        left: 5px;
    }
    .side-banner.visible.right-panel {
        right: 5px;
    }
    .banner-box {
        width: 60px;
    }
    /* Sembunyikan tooltip di mobile agar tidak mengganggu */
    .banner-box::after {
        display: none;
    }

    /* Banner splash screen sekitar 30% dari ukuran layar */
    .splash-box {
        width: 30%;
    }
}

/* ==========================================
   CUSTOM CURSOR (ANIMATED GIF)
   ========================================== */
/* Tampilkan kursor asli (auto) agar panah tetap terlihat */
body, a, button, .close-btn, .nav-card {
    cursor: auto !important;
}

/* Style untuk gambar kursor custom */
#custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px; /* Sesuaikan ukuran poring */
    height: auto;
    pointer-events: none; /* Agar klik tembus ke elemen di bawahnya */
    z-index: 99999; /* Pastikan selalu di paling atas */
    display: none; /* Sembunyi dulu sampai mouse bergerak */
    will-change: top, left;
    /* Geser sedikit gambar Poring agar tidak menutupi panah kursor */
    margin-top: 15px;
    margin-left: 15px;
}

/* ==========================================
   CURSOR TRAIL (RAINBOW)
   ========================================== */
.cursor-trail {
    position: fixed;
    width: 20px; /* Ukuran diperbesar sedikit agar bentuk bintang terlihat */
    height: 20px;
    background-color: #555; /* Warna abu-abu gelap */
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); /* Bentuk Bintang */
    pointer-events: none;
    z-index: 99998; /* Di bawah kursor utama (99999) */
    transform: translate(-50%, -50%);
    animation: trailFade 0.5s ease-in forwards; /* ease-in untuk efek gravitasi */
}

@keyframes trailFade {
    to {
        opacity: 0;
        transform: translate(-50%, 50px) scale(0) rotate(180deg); /* Jatuh ke bawah (Y positif) */
    }
}