/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Roboto:wght@300;400;700&display=swap');

/* --- Root Variables for Colors --- */
:root {
    --primary-violet: #e22bb7;
    --accent-blue: #00bfff;
    --background-dark: #0D0F1A;
    --text-light: #e0e0e0;
    --text-dark: #333;
    --heading-light: #ffffff;
    --border-color-light: rgba(255, 255, 255, 0.2);
    --card-bg: rgba(20, 25, 40, 0.8);
}

/* --- General Body Styling --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--background-dark);
    color: var(--text-light);
    font-family: 'Roboto', sans-serif;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    color: var(--heading-light);
    letter-spacing: 2px;
}

h2 {
    font-size: 2.8rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    padding-bottom: 20px;
    color: var(--heading-light);
    text-shadow: 0 0 10px var(--primary-violet), 0 0 20px var(--primary-violet);
}
h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background-color: var(--primary-violet);
    box-shadow: 0 0 8px var(--primary-violet);
}

section {
    padding: 100px 40px;
    border-bottom: 1px solid var(--border-color-light);
    position: relative;
}

/* --- Top Navigation Menu --- */
.top-nav {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    background: rgba(13, 15, 26, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color-light);
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    height: 70px;
}

.nav-logo img {
    height: 50px;
    object-fit: contain;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 35px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-light);
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    padding: 10px 0;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--primary-violet);
    transition: width 0.3s ease;
}
.nav-link:hover, .nav-link.active {
    color: var(--primary-violet);
    text-shadow: 0 0 5px var(--primary-violet);
}
.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Menonaktifkan efek hover pada perangkat sentuh untuk mencegah "sticky hover" */
body.touch-device .nav-link:hover::after {
    width: 0;
}
body.touch-device .nav-link:hover {
    color: var(--text-light);
    text-shadow: none;
}


.nav-extra-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}
#bgm-toggle-btn {
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-light);
    transition: color 0.3s ease;
}
#bgm-toggle-btn:hover {
    color: var(--primary-violet);
}

.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1005; /* Pastikan di atas menu */
}
.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-light);
    transition: all 0.3s ease-in-out;
}

/* --- Hero Section --- */
.hero-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

#hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1;
    object-fit: cover;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(13, 15, 26, 1) 5%, transparent 50%);
    z-index: 0;
}

.hero-content {
    z-index: 1;
    text-align: center;
}

.main-logo {
    max-width: 600px;
    width: 90%;
    margin-bottom: 15px;
    animation: logoPulse 3s ease-in-out infinite;
    filter: drop-shadow(0 0 25px white);
}

/* --- News Section --- */
.news-section { background-color: var(--background-dark); }
.news-carousel-container { position: relative; max-width: 1200px; margin: auto; aspect-ratio: 16 / 9; max-height: 500px; border-radius: 8px; overflow: hidden; }
.news-carousel { position: relative; width: 100%; height: 100%; }
.news-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; visibility: hidden; transition: opacity 0.7s ease-in-out; text-decoration: none; }
.news-slide.active-slide { opacity: 1; visibility: visible; }
.news-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-text { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent); color: white; padding: 50px 30px 30px 30px; }
.news-text h3 { color: white; font-size: 1.5rem; margin-bottom: 10px; }
.news-text p { font-size: 1rem; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.8); border: none; padding: 10px 15px; cursor: pointer; z-index: 10; border-radius: 50%; width: 50px; height: 50px; font-size: 1.5rem; transition: background-color 0.3s ease; }
.carousel-btn:hover { background: white; }
.prev-news { left: 20px; }
.next-news { right: 20px; }


/* --- Characters Section --- */
.characters-section {
    min-height: 100vh;
    padding: 0;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    --next-bg-image: none; 
}

.characters-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(13, 15, 26, 0.5);
    z-index: 1;
}

.characters-section::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: var(--next-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.7s ease-in-out;
    z-index: 0;
}

.characters-section.fading::after {
    opacity: 1;
}

.character-slider-container {
    position: relative;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 80px 40px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    z-index: 2;
}

.character-info-panel {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-color-light);
    border-radius: 10px;
    padding: 40px;
    width: 100%;
    max-width: 550px;
    color: var(--text-light);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.character-header { display: flex; align-items: center; margin-bottom: 20px; }
.character-info-panel h3 {
    font-size: 4rem;
    font-weight: 900;
    color: var(--heading-light);
    text-shadow: 0 0 10px var(--primary-violet);
    margin: 0;
}
.voice-play-btn { margin-left: 20px; padding: 8px 16px; font-family: 'Orbitron', sans-serif; background-color: transparent; border: 2px solid var(--primary-violet); border-radius: 30px; cursor: pointer; color: var(--primary-violet); font-weight: 700; transition: all 0.3s ease; }
.voice-play-btn:hover { background-color: var(--primary-violet); color: white; box-shadow: 0 0 10px var(--primary-violet); }
.character-info-panel p { line-height: 1.6; margin-bottom: 20px; }
.slider-btn { background: var(--card-bg); border: 1px solid var(--border-color-light); padding: 15px 30px; cursor: pointer; font-family: 'Orbitron'; position: absolute; bottom: 40px; transition: all 0.3s ease; color: var(--text-light); font-weight: 700; z-index: 5; }
.slider-btn:hover { background-color: var(--primary-violet); border-color: var(--primary-violet); }
.prev-char { left: 40px; }
.next-char { left: 240px; }

/* --- Music & Synopsis Sections --- */
.synopsis-section { background-color: var(--background-dark); }
.synopsis-content { max-width: 800px; margin: auto; text-align: center; border-left: 4px solid var(--primary-violet); padding-left: 30px; }
.synopsis-content p { color: var(--text-light); line-height: 1.8; font-size: 1.1rem; }
.music-section { background-color: var(--background-dark); }
.music-player { max-width: 900px; margin: auto; display: flex; gap: 20px; background: var(--card-bg); padding: 30px; border-radius: 10px; border: 1px solid var(--border-color-light); }
.album-art img { width: 150px; height: 150px; border-radius: 5px; }
.player-controls { flex-grow: 1; }
.track-info h3 { color: var(--heading-light); }
.track-info p { color: var(--text-light); }
.progress-container { width: 100%; background: rgba(0,0,0,0.3); height: 5px; cursor: pointer; border-radius: 5px; margin: 15px 0; }
.progress-bar { background: var(--primary-violet); height: 100%; width: 0%; border-radius: 5px; }
.controls button { background: none; border: 1px solid var(--border-color-light); color: var(--text-light); padding: 10px; margin: 0 5px; cursor: pointer; border-radius: 5px; transition: all 0.3s; }
.controls button:hover { background-color: var(--primary-violet); border-color: var(--primary-violet); }
.playlist { width: 300px; max-height: 150px; overflow-y: auto; background: rgba(0,0,0,0.3); padding: 5px; border-radius: 5px; }
.playlist-item { padding: 8px; cursor: pointer; border-bottom: 1px solid var(--border-color-light); font-size: 0.9rem; transition: all 0.3s; }
.playlist-item:hover { background-color: rgba(226, 43, 183, 0.5); }
.playlist-item.active { background-color: var(--primary-violet); color: white; }

/* --- Other/Media Section --- */
.other-section { background-color: var(--background-dark); text-align: center; }
.other-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; max-width: 1200px; margin: 0 auto; }
.other-card { background-color: #ffffff; border-radius: 10px; overflow: hidden; position: relative; cursor: pointer; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); transition: transform 0.3s ease; }
.other-card:hover { transform: translateY(-10px); }
.other-card img { width: 100%; height: 200px; object-fit: cover; display: block; }
.card-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: flex; flex-direction: column; justify-content: center; align-items: center; color: white; opacity: 0; transition: opacity 0.3s ease; }
.other-card:hover .card-overlay { opacity: 1; }
.play-icon { font-size: 3rem; }
.card-overlay p { font-family: 'Orbitron'; font-size: 1.2rem; margin-top: 10px; }

/* --- Footer --- */
.footer-section { display: flex; justify-content: space-between; align-items: center; padding: 20px 40px; background: #080a11; border-top: 1px solid var(--border-color-light); }
.footer-logo { width: 150px; height: auto; object-fit: contain; }
.footer-links nav a, .footer-contact a { color: var(--accent-blue); text-decoration: none; transition: color 0.3s ease; }
.footer-links nav a:hover, .footer-contact a:hover { color: var(--primary-violet); text-decoration: underline; }
.footer-links { text-align: center; }

/* --- Video Modal --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); display: none; justify-content: center; align-items: center; z-index: 2000; }
.modal-content { position: relative; }
.close-modal { position: absolute; top: -40px; right: 0; color: #fff; font-size: 3rem; cursor: pointer; }
.video-container { position: relative; width: 80vw; max-width: 1120px; aspect-ratio: 16/9; }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* --- Draggable Placeholder --- */
.draggable { 
    position: fixed; 
    z-index: 1001; 
    top: 76%; 
    right: 8px; 
    width: 200px; 
    height: 300px; 
    background: url('./images/download.png') no-repeat center center/cover; 
    border-radius: 15px; 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); 
    cursor: grab; 
    transition: box-shadow 0.3s ease, 
                transform 0.2s ease-out, 
                top 0.4s ease-in-out, 
                left 0.4s ease-in-out;
    overflow: hidden;
    mask-image: radial-gradient(white, black);
    -webkit-mask-image: radial-gradient(white, black);
    transform-style: preserve-3d;
    transform: translateY(-50%) perspective(1000px);
}

.draggable:hover { 
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4); 
}
/* Nonaktifkan hover shadow pada perangkat sentuh */
body.touch-device .draggable:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.draggable.dragging { 
    transition: none; 
    cursor: grabbing; 
}

.draggable::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient( to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0) 100% );
    transform: skewX(-25deg);
    pointer-events: none;
}

.draggable:hover::before {
    animation: shimmer 2.5s infinite;
}
/* Nonaktifkan hover shimmer pada perangkat sentuh */
body.touch-device .draggable:hover::before {
    animation: none;
}

@keyframes shimmer {
    100% {
        left: 150%;
    }
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ======================================================= */
/* --- OPTIMASI MOBILE --- */
/* ======================================================= */

/* --- Tampilan Tablet (<= 1024px) --- */
@media (max-width: 1024px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0; /* Mulai dari atas */
        flex-direction: column;
        justify-content: center; /* Teks di tengah vertikal */
        background-color: var(--background-dark);
        width: 100%;
        height: 100vh; /* Menu mengisi seluruh layar */
        text-align: center;
        transition: 0.3s;
        gap: 0;
        z-index: 1004; /* Di bawah hamburger */
    }
    .nav-menu.active { left: 0; }
    .nav-menu li { padding: 20px 0; width: 100%; }
    .hamburger { display: block; }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .character-slider-container { flex-direction: column; justify-content: center; }
    .character-info-panel { max-width: 100%; }
    .slider-btn { position: relative; bottom: auto; left: auto; right: auto; margin-top: 20px; }
    .prev-char, .next-char { transform: none; width: 45%; }
    .slider-btn-container { display: flex; width: 100%; justify-content: space-between; gap: 10%; }

    .footer-section { flex-direction: column; text-align: center; gap: 20px; }
}

/* --- Tampilan Ponsel (<= 768px) --- */
@media (max-width: 768px) {
    html {
        font-size: 90%; /* Sedikit mengurangi ukuran font dasar */
    }

    h2 { font-size: 2rem; margin-bottom: 40px; }
    section { padding: 80px 20px; }
    .nav-container { padding: 0 20px; height: 60px; }
    .nav-logo img { height: 40px; }
    
    .main-logo { max-width: 300px; }

    .character-info-panel { padding: 25px; }
    .character-info-panel h3 { font-size: 3rem; }
    
    .music-player { flex-direction: column; align-items: center; padding: 20px; }
    .playlist { width: 100%; }

    /* Penyesuaian Draggable Placeholder untuk Mobile */
    .draggable { 
        width: 140px; 
        height: 210px; 
        /* Pastikan posisi awal tidak terlalu besar */
        top: auto;
        bottom: 20px;
        right: 20px;
        transform: none; /* Hapus transform awal */
    }

    .footer-logo { width: 120px; }
}

/* --- Tampilan Ponsel Sangat Kecil (<= 480px) --- */
@media (max-width: 480px) {
    html {
        font-size: 85%;
    }
    h2 { font-size: 1.8rem; }
    section { padding: 60px 15px; }

    .news-text { padding: 30px 20px 20px 20px; }
    .news-text h3 { font-size: 1.2rem; }
    .news-text p { display: none; } /* Sembunyikan deskripsi berita agar tidak penuh */

    .carousel-btn { width: 40px; height: 40px; font-size: 1.2rem; }
    .prev-news { left: 10px; }
    .next-news { right: 10px; }

    .character-info-panel h3 { font-size: 2.5rem; }
}