/* --- 1. RESET & DASAR --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #050505; /* Latar gelap pekat */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    position: relative;
    font-family: 'Playfair Display', serif;
}

/* --- 2. CONTAINER & POSISI --- */
.container {
    position: relative;
    width: 1000px; 
    height: 600px;
    display: flex;
    justify-content: flex-end; /* Buku di sisi kanan */
    align-items: center;
    padding-right: 50px;
}

/* --- 3. DEKORASI PENA BULU (Sisi Kiri) --- */
.quill-pen {
    position: absolute;
    left: 50px;
    bottom: 70px;
    width: 280px;
    z-index: 1;
    filter: brightness(1.0);
    transform: rotate(-0deg) scaleX(-1);
    pointer-events: none;
}

/* --- 4. STYLING BUKU (FLIP BOOK) --- */
.flip-book {
    box-shadow: none;
    background-color: transparent;
    display: block;
    z-index: 10;
}

/* --- 5. HALAMAN UMUM --- */
.page {
    background-color:  #2a0a0a;
    overflow: hidden;
}


.page-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px; /* Jarak aman agar teks tidak nabrak bingkai */
    text-align: center;
    position: relative;
    background-image: url('https://www.transparenttextures.com/patterns/dark-matter.png');
}

/* --- 6. COVER VINTAGE (BLACK LEATHER & GOLD) --- */
.page-cover {
    background-color: #2a0a0a !important;
    background-image: url('https://www.transparenttextures.com/patterns/dark-leather.png') !important;
    border-left: 15px solid #2a0a0a; /* Punggung Buku */
    position: relative;
    /* Bingkai Emas Luar */
    outline: 2px solid #c5a059;
    outline-offset: -20px; 
    border-radius: 5px 15px 15px 5px;
}

/* Efek Ornamen Sudut (Atas & Bawah) */
.page-cover::before, .page-cover::after {
    content: '·༻𐫱༺··༻𐫱༺··༻𐫱༺··༻𐫱༺··༻𐫱༺·'; /* Simbol bintang ornamen */
    position: absolute;
    color: #c5a059;
    font-size: 1.5rem;
    z-index: 5;
}

.page-cover::before { top: 30px; left: 30px; }
.page-cover::after { bottom: 30px; right: 30px; transform: rotate(180deg); }

/* Punggung Buku (Spine Ribs) */
.spine-effect {
    position: absolute;
    left: 0;
    top: 0;
    width: 15px;
    height: 100%;
    background: linear-gradient(90deg,#2a0a0a, #2a0a0a,#2a0a0a);
    box-shadow: 2px 0 5px rgba(0,0,0,0.5);
    z-index: 10;
}

/* --- 7. TYPOGRAPHY (TULISAN EMAS) --- */
.cinzel-font { 
    font-family: 'Cinzel', serif; 
    letter-spacing: 5px; 
    color: #f1d295;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    margin-bottom: 10px;
    font-size: 2.2rem;
}

.pinyon-font { 
    font-family: 'Pinyon Script', cursive; 
    color: #b59410; 
    font-size: 2rem;
    margin: 10px 0;
}

.divider {
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #c5a059, transparent);
    margin: 20px 0;
}

small {
    color: #666;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.7rem;
    margin-top: 30px;
}

/* --- 8. HALAMAN DALAM --- */
.page {
    box-shadow: inset 10px 0 20px rgba(0,0,0,0.5); /* Bayangan lipatan tengah */
}

.layout-modern {
    display: flex !important;
    flex-direction: column !important;
    padding: 30px !important;
    justify-content: flex-start !important;
}

.header-area {
    width: 100%;
    margin-bottom: 20px;
    text-align: center;
}

.content-wrapper {
    display: flex;
    width: 100%;
    gap: 25px;
    align-items: flex-start;
}

.text-side {
    flex: 1.2;
    text-align: left;
}

.text-side p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #d4d4d4;
}

.image-side {
    flex: 3;
    display: flex;
    justify-content: center;
}

.image-side img {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    border: none;
    box-shadow: none;
}

/* ==========================================================
   PAGAR PENYELAMAT HP (HANYA AKTIF DI LAYAR KECIL)
   ========================================================== */
/* 1. Sembunyikan pesan saat di laptop */
#landscape-message {
    display: none;
}

@media screen and (max-width: 1024px) and (orientation: portrait) {
    #landscape-message {
        display: flex;
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100%;
        background-color: #050505;
        background-image: url('https://raw.githubusercontent.com/Lyferaa/Lyfera/main/academia.jpg');
        background-size: cover;
        background-position: center;
        z-index: 10000;
        justify-content: center;
        align-items: center;
        flex-direction: column;
    }

    /* KERTAS AMPLOP */
    .envelope-paper {
        background: #d4bc8d; /* Warna kertas tua */
        background-image: url('https://www.transparenttextures.com/patterns/old-paper.png');
        padding: 50px 30px;
        width: 85%;
        border-radius: 5px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.8), inset 0 0 50px rgba(0,0,0,0.2);
        border: 1px solid #b59410;
        text-align: center;
        position: relative;
    }

    .script-font {
        font-family: 'Pinyon Script', cursive;
        color: #3d2b1f;
        font-size: 1.5rem;
        margin-bottom: 30px;
    }

    /* TOMBOL CAP STEMPEL */
    #wax-seal-btn {
        display: inline-block;
        cursor: pointer;
        transition: all 0.4s ease;
    }

    #wax-seal-btn img {
        width: 100px;
        filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.4));
    }

    #wax-seal-btn span {
        display: block;
        font-family: 'Cinzel', serif;
        font-size: 0.7rem;
        color: #3d2b1f;
        margin-top: 10px;
        letter-spacing: 2px;
    }

    #wax-seal-btn:active { transform: scale(0.9); }

    /* TEKS INSTRUKSI SETELAH BUKA */
    #instruction-text p {
        font-family: 'Cinzel', serif;
        color: #c5a059;
        font-size: 1.1rem;
        line-height: 1.6;
        padding: 20px;
        background: rgba(0,0,0,0.7);
        border: 2px solid #c5a059;
        border-radius: 10px;
    }
}

/* 3. Saat dibuka di HP dengan posisi Miring (Landscape) */
@media screen and (max-width: 1024px) and (orientation: landscape) {
    html, body {
        overflow-x: hidden !important;
        overflow-y: auto !important; /* Mengizinkan scroll naik-turun */
        height: 100% !important;
    }

    /* --- ANIMASI TANGAN BERGERAK (POJOK KIRI) --- */
    .scroll-instruction {
        position: fixed;
        bottom: 30px;
        left: 30px;
        z-index: 9999;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        pointer-events: none; /* Biar tidak menghalangi sentuhan */
    }

    .finger-icon {
        width: 40px;
        height: 40px;
        background-image: url('https://cdn-icons-png.flaticon.com/512/2037/2037257.png'); 
        background-size: contain;
        background-repeat: no-repeat;
        filter: sepia(1) saturate(5) hue-rotate(10deg); /* Warna Emas */
        animation: finger-bounce 1.5s infinite;
    }

    @keyframes finger-bounce {
        0%, 100% { transform: translateY(0); opacity: 0.6; }
        50% { transform: translateY(25px); opacity: 1; }
    }

    .scroll-instruction p {
        color: #c5a059;
        font-family: 'Cinzel', serif;
        font-size: 0.75rem;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.9);
    }

    /* --- PENGATURAN BUKU AGAR TENGAH TEMBUS PANDANG --- */
    .container {
        display: flex !important;
        pointer-events: none !important; /* KUNCI: Area tengah 'hantu' agar bisa scroll */
        width: 1000px !important; 
        height: 600px !important;
        position: absolute !important;
        top: 20px !important;
        left: 50% !important;
        transform: translateX(-50%) scale(0.6) !important; 
        transform-origin: top center; 
        z-index: 5;
    }

    .flip-book {
        pointer-events: auto !important; /* Cuma buku yang bisa diklik */
    }

    /* Tambahkan ruang di bawah agar scroll bisa naik turun jauh */
    body::after {
        content: "";
        display: block;
        height: 600px; 
    }

    #landscape-message { display: none !important; }
}
