:root {
    --biru-muda: #D0E3FF;
    --biru-tua: #2D5DA7;
    --kuning-aksen: #FFB300;
    --putih: #FFFFFF;
    font-size: 15px;
}

* {
    box-sizing: border-box;
    font-family: 'Lexend', sans-serif;
    margin: 0;
    padding: 0;
}

body {
    /* Background gradien agar tampilan tidak flat */
    background: linear-gradient(180deg, #E5EFFF 0%, #B5D2FF 100%);
    background-attachment: fixed;
    color: var(--biru-tua);
    overflow-x: hidden;
}

/* HERO SECTION (BERANDA) */
.hero { 
    display: flex; 
    align-items: center; 
    padding: 60px 5%; 
    justify-content: space-between; 
}
.hero-text h1 { font-size: 3.4rem; margin-bottom: 15px; }
.hero-text p { font-size: 1.3rem; line-height: 1.6; max-width: 600px; }
.hero-img img { width: 420px; height: auto; cursor: pointer; }

/* TOMBOL MULAI MEMBACA */
.btn-mulai {
    display: inline-block;
    background-color: var(--kuning-aksen);
    padding: 18px 45px;
    border-radius: 50px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
    margin-top: 30px;
    transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-mulai:hover {
    background-color: #e6a100;
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

/* CAROUSEL DAFTAR CERITA DI BERANDA */
.carousel-section {
    padding: 40px 5%;
    position: relative;
}

.carousel-section h3 {
    font-size: 2.3rem;
    margin-bottom: 25px;
}

.story-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 20px;
    padding: 15px 5px;
}

.story-wrapper::-webkit-scrollbar { display: none; }

.story-wrapper .card {
    min-width: 220px; 
    width: 220px; 
    height: 220px;
    background: white; 
    border-radius: 25px;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); 
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.story-wrapper .card:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.story-wrapper .card img { width: 120px; height: 120px; object-fit: contain; margin-bottom: 10px; }
.story-wrapper .card h4 { font-size: 1.1rem; text-align: center; padding: 0 10px; }

/* NAVIGASI CAROUSEL (PANAH) */
.btn-nav {
    position: absolute;
    top: 60%;
    transform: translateY(-50%);
    background: white;
    border: none;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    font-size: 24px;
    color: var(--biru-tua);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.btn-nav:hover {
    background-color: var(--biru-muda);
    transform: translateY(-50%) scale(1.1);
}
.prev { left: 15px; }
.next { right: 15px; }

/* HALAMAN DAFTAR CERITA (GRID) */
#page-daftar-cerita {
    min-height: 100vh;
    background: linear-gradient(180deg, #E5EFFF 0%, #B5D2FF 100%);
}

.header-daftar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 5%;
    background: transparent;
}

.grid-cerita {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px 5%;
}

.grid-cerita .card { 
    background: white; 
    padding: 30px; 
    border-radius: 25px; 
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.grid-cerita .card img { width: 150px; height: 150px; object-fit: contain; margin-bottom: 15px; }

.btn-play {
    background-color: var(--kuning-aksen);
    border: none;
    padding: 12px 35px;
    border-radius: 30px;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 15px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.btn-play:hover {
    background-color: #e6a100;
    transform: scale(1.05);
}

/* HALAMAN BACA CERITA */
#page-baca-cerita { height: 100vh; display: flex; flex-direction: column; }

.header-baca {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.story-fullscreen-frame {
    flex-grow: 1;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin: 15px 25px;
    border-radius: 25px;
    border: 6px solid white;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

/* AREA KLIK AUDIO (Ghaib/Transparan) */
.btn-audio-overlay {
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    height: 65%;
    background: transparent;
    cursor: pointer;
    z-index: 5;
}

.bubble-teks {
    position: absolute;
    background: rgba(255, 255, 255, 0.96);
    padding: 18px 28px;
    border-radius: 30px;
    min-width: 280px;
    max-width: 380px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    z-index: 10;
}
.bubble-kiri { top: 10%; left: 5%; }
.bubble-kanan { top: 10%; right: 5%; }
.bubble-teks p { font-weight: 600; color: var(--biru-tua); font-size: 1.4rem; text-align: center; line-height: 1.4; }

/* NAVIGASI DI DALAM CERITA */
.nav-baca-container {
    position: absolute;
    bottom: 35px;
    width: 100%;
    padding: 0 45px;
    display: flex;
    justify-content: space-between;
    z-index: 10;
}

.btn-story-nav {
    background: white;
    color: var(--biru-tua);
    padding: 14px 30px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    border: none;
    transition: transform 0.2s, background-color 0.2s;
}

.btn-story-nav:hover {
    background-color: var(--biru-muda);
    transform: scale(1.05);
}

.btn-selesai { background: var(--kuning-aksen); color: white; }

/* IKON HOME & TOMBOL KEMBALI */
.home-icon {
    width: 48px;
    height: 48px;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
}
.home-icon:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.btn-kembali {
    display: block;
    width: fit-content;
    margin: 40px auto;
    font-weight: bold;
    cursor: pointer;
    padding: 12px 25px;
    background: white;
    border-radius: 12px;
    color: var(--biru-tua);
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.btn-kembali:hover { transform: scale(1.05); box-shadow: 0 6px 15px rgba(0,0,0,0.15); }

/* FOOTER */
footer {
    background-color: var(--biru-tua); color: white; padding: 25px 5%;
    display: flex; justify-content: space-between; align-items: center;
}
.footer-left { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.footer-left img { width: 45px; height: 45px; }
.social-icons { display: flex; gap: 15px; }
.social-icons a img { width: 38px; height: 38px; transition: transform 0.2s; }
.social-icons a img:hover { transform: scale(1.2); }

/* ANIMASI BOUNCE UNTUK BERUANG */
@keyframes bounce-zoom {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
.animate-bounce { animation: bounce-zoom 0.5s ease-in-out; }