* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #e0e0e0;
    /* Warna latar belakang abu-abu untuk area luar di desktop */
    font-family: 'Inter', sans-serif;
    /* Menggunakan font default yang bersih */
    display: flex;
    justify-content: center;
    /* Memastikan kontainer berada di tengah pada desktop */
    min-height: 100vh;
}

.app-container {
    width: 100%;
    max-width: 480px;
    /* Batas maksimal lebar untuk meniru tampilan mobile */
    background-color: #ffffff;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.15);
    /* Efek bayangan agar terlihat seperti layar ponsel di desktop */
    overflow-x: hidden;
    position: relative;
}

.page {
    width: 100%;
    /* Menggunakan svh (small viewport height) agar tampilan tidak tertutup oleh bar navigasi HP */
    min-height: 100svh;
    background-size: 100% auto;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    /* Flexbox disiapkan jika nanti Anda ingin menaruh teks di dalam tiap halaman */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Mengatur gambar latar untuk masing-masing halaman */
#page-1 {
    background-image: url('images/1.png');
}

#page-2 {
    background-image: url('images/2.png');
}

#page-3 {
    background-image: url('images/3.png');
}

#page-4 {
    background-image: url('images/4.png');
}

#page-5 {
    background-image: url('images/5.png');
}

#page-6 {
    background-image: url('images/6.png');
}

#page-7 {
    background-image: url('images/7.png');
}

#page-8 {
    background-image: url('images/8.png');
}

#page-9 {
    background-image: url('images/9.png');
}

#page-10 {
    background-image: url('images/10.png');
}

#page-11 {
    background-image: url('images/11.png');
}

#page-12 {
    background-image: url('images/12.png');
}

/* --- Style Khusus Halaman 1 --- */
body.no-scroll {
    overflow: hidden !important;
    height: 100vh !important;
    position: fixed;
    /* Ini adalah trik paling ampuh untuk mengunci scroll di semua browser */
    width: 100%;
}

body.no-scroll .app-container {
    height: 100vh !important;
    overflow-y: hidden !important;
}

.guest-name-container {
    position: absolute;
    top: 27%;
    /* Menyesuaikan posisi di bawah teks "Kepada Yth..." */
    width: 100%;
    text-align: center;
    padding: 0 20px;
}

.guest-name {
    font-family: 'Mali', 'Sniglet', cursive;
    color: #921313;
    /* Warna merah gelap sesuai referensi */
    font-size: 1.0rem;
    /* Ukuran dikecilkan */
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.1);
}

.btn-open {
    position: absolute;
    bottom: 10%;
    /* Posisinya agak dinaikkan */
    background-color: #921313;
    /* Warna merah gelap */
    color: #ffffff;
    font-family: 'Kalam', cursive;
    font-size: 0.7rem;
    /* Teks dikecilkan */
    font-weight: 400;
    padding: 10px 35px;
    /* Bantalan tombol dikecilkan */
    border: none;
    border-radius: 30px;
    /* Melengkung sempurna */
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, background-color 0.2s;
    letter-spacing: 1.5px;
    /* Spasi antar huruf */
}

.btn-open:hover {
    background-color: #6d0c0c;
    transform: scale(1.05);
}

/* --- Style Khusus Halaman 8 (RSVP) --- */
.rsvp-container {
    width: 75%;
    max-width: 350px;
    margin-top: 10%;
    /* Posisikan di bawah tulisan RSVP */
    z-index: 10;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-family: 'Mali', 'Sniglet', cursive;
    color: #921313;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: 1px;
    padding-left: 5px;
}

.form-group input,
.form-group select {
    background-color: #921313;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    padding: 15px 25px;
    border: none;
    border-radius: 30px;
    /* Bentuk pil panjang */
    outline: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    appearance: none;
    /* Hilangkan panah default pada select */
    -webkit-appearance: none;
    -moz-appearance: none;
}

.form-group input::placeholder {
    color: #ffdcdc;
    /* Placeholder sedikit transparan putih */
}

/* Menambahkan panah kustom pada select */
.form-group select {
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23ffffff" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    cursor: pointer;
}

.btn-rsvp {
    background-color: #921313;
    color: #ffffff;
    font-family: 'Mali', 'Sniglet', cursive;
    font-size: 0.8rem;
    padding: 10px 30px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    /* Tengah */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
    letter-spacing: 1px;
}

.btn-rsvp:hover {
    transform: scale(1.05);
}

/* --- Style Khusus Halaman 9 (Wishes) --- */
.wishes-container {
    width: 75%;
    max-width: 350px;
    margin-top: -15%;
    /* Sesuaikan letak dari atas agar pas di bawah pita */
    z-index: 10;
}

.wishes-container textarea {
    background-color: #921313;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    padding: 20px;
    border: none;
    border-radius: 20px;
    /* Melengkung tapi mengotak lebar seperti di referensi */
    outline: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    resize: none;
    box-sizing: border-box;
}

.wishes-container textarea::placeholder {
    color: #ffdcdc;
}

.btn-wishes {
    background-color: #921313;
    color: #ffffff;
    font-family: 'Mali', 'Sniglet', cursive;
    font-size: 0.9rem;
    padding: 10px 40px;
    border: none;
    border-radius: 30px;
    /* Tombol melengkung penuh */
    cursor: pointer;
    margin-top: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
    letter-spacing: 1px;
}

.btn-wishes:hover {
    transform: scale(1.05);
}

/* --- Tombol Kontrol Musik Floating --- */
.music-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #921313;
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(146, 19, 19, 0.5);
    z-index: 9998;
    transition: background-color 0.2s, transform 0.2s;
}

.music-btn:hover {
    background-color: #6d0c0c;
    transform: scale(1.1);
}

.music-btn:active {
    transform: scale(0.95);
}

/* Animasi ring berdenyut saat musik playing */
.music-btn.playing::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(146, 19, 19, 0.5);
    animation: musicPulse 1.5s ease-out infinite;
}

@keyframes musicPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* --- Style Halaman 4 (Bride & Groom Instagram) --- */
.page-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    aspect-ratio: 9 / 16;
    max-width: 480px;
    pointer-events: none;
    z-index: 5;
}

.profile-text {
    position: absolute;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 6;
    pointer-events: auto;
}

.text-selvi {
    top: 35.5%;
    left: 48%;
    width: 48%;
    height: 21%;
}

.text-zidni {
    top: 70%;
    left: 4%;
    width: 48%;
    height: 21%;
}

.profile-name {
    font-family: 'Mali', cursive;
    color: #921313;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
    text-align: center;
    white-space: nowrap;
}

.profile-parents {
    font-family: 'Mali', sans-serif;
    color: #333333;
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    margin-bottom: 10px;
}

.ig-btn-square {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 2px solid #921313;
    border-radius: 8px;
    color: #921313;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
    background-color: #ffffff;
}

.ig-btn-square:hover {
    background-color: #921313;
    color: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(146, 19, 19, 0.3);
}

.ig-btn-square:active {
    transform: scale(0.95);
}

.ig-btn-icon {
    width: 16px;
    height: 16px;
    stroke-width: 2.2;
}

/* --- Style Halaman 10 (Lokasi Acara) --- */

.btn-gmaps {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: #921313;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 8px 30px;
    border-radius: 30px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    white-space: nowrap;
}

.btn-gmaps:hover {
    background-color: #6d0c0c;
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 6px 18px rgba(146, 19, 19, 0.5);
}

.btn-gmaps:active {
    transform: translateX(-50%) scale(0.97);
}

.btn-gmaps svg {
    flex-shrink: 0;
}

.btn-maps-jw {
    top: 24.8%;
}

.btn-maps-akad {
    top: 38.2%;
}

.btn-maps-resepsi {
    top: 70.2%;
}

/* --- Style Galeri Halaman 7 --- */
#page-7 {
    justify-content: center;
    padding-top: 10%;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 6px;
    width: 88%;
    max-width: 420px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    backdrop-filter: blur(4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.gallery-item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(146, 19, 19, 0);
    transition: background 0.25s ease;
    border-radius: 10px;
}

.gallery-item:hover::after {
    background: rgba(146, 19, 19, 0.25);
}

.gallery-item:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.gallery-item:active {
    transform: scale(0.97);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* --- Lightbox Modal --- */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    font-size: 1.2rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    z-index: 10001;
    padding: 0;
    line-height: 1;
}

.lightbox-close:hover {
    background: rgba(146, 19, 19, 0.7);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    font-size: 1.4rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    z-index: 10001;
    padding: 0;
    line-height: 1;
}

.lightbox-nav:hover {
    background: rgba(146, 19, 19, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 12px;
}

.lightbox-next {
    right: 12px;
}

.lightbox-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10001;
}

.lightbox-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.lightbox-dot.active {
    background: #fff;
    transform: scale(1.3);
}

.lightbox-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* --- Style Khusus Halaman 11 (Kirim Gift) --- */
.btn-copy-gift {
    position: absolute;
    background-color: #921313;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 8px 26px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, background-color 0.2s;
    letter-spacing: 0.5px;
    white-space: nowrap;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.btn-copy-gift:hover {
    background-color: #720f0f;
    transform: translateX(-50%) scale(1.05);
}

.btn-copy-gift:active {
    transform: translateX(-50%) scale(0.95);
}

.btn-copy-dana {
    top: 33.2%;
}

.btn-copy-bca {
    top: 50.2%;
}

.btn-copy-bri {
    top: 67.2%;
}

.btn-copy-alamat {
    top: 91.2%;
}

.btn-copy-bca-natasha {
    top: 73.2%;
}

.btn-copy-bca-rizky {
    top: 92.2%;
}

/* --- Styling Konten HTML Dinamis di Halaman 10 --- */
.location-details {
    position: absolute;
    top: 29.5%;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    text-align: center;
    z-index: 9;
}

.location-name {
    font-family: 'Mali', 'Sniglet', cursive;
    color: #000000;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 0.2px;
}

.location-address {
    font-family: 'Mali', 'Sniglet', cursive;
    color: #000000;
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 auto;
    max-width: 270px;
}

.gift-details {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    text-align: center;
    z-index: 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.gift-natasha {
    top: 61.0%;
}

.gift-rizky {
    top: 80.0%;
}

.bca-logo-img {
    height: 25px;
    width: auto;
    object-fit: contain;
    display: block;
    margin-bottom: 2px;
}

.account-number {
    font-family: 'Mali', 'Sniglet', cursive;
    color: #921313;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.account-name {
    font-family: 'Mali', 'Sniglet', cursive;
    color: #000000;
    font-size: 0.76rem;
    font-weight: 700;
}

/* --- Premium Toast Notification --- */
#toast {
    visibility: hidden;
    min-width: 220px;
    background-color: #921313;
    color: #ffffff;
    text-align: center;
    border-radius: 30px;
    padding: 11px 22px;
    position: fixed;
    z-index: 10000;
    left: 50%;
    bottom: 80px;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    transform: translateX(-50%);
    box-shadow: 0 5px 15px rgba(146, 19, 19, 0.4);
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    letter-spacing: 0.5px;
}

#toast.show {
    visibility: visible;
    opacity: 1;
}

/* --- Branding Created By pada Halaman 12 --- */
.created-by-container {
    position: absolute;
    bottom: 3.5%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.created-by-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    color: #c05c5c;
    letter-spacing: 0.5px;
}

.created-by-logo {
    height: 24px;
    width: auto;
    object-fit: contain;
    display: block;
    opacity: 0.9;
    transition: opacity 0.2s, transform 0.2s;
}

.created-by-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

.created-by-logo:active {
    transform: scale(0.95);
}


/* --- Responsive Desktop scaling system --- */
@media (min-width: 481px) {
    body {
        background-color: #e0e0e0;
        min-height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: hidden !important; /* Lock body scrolling on desktop */
    }

    .app-container {
        /* Proportional width & height locked to 9:16 ratio */
        width: min(calc(95vh * 9 / 16), 480px) !important;
        height: min(95vh, 853px) !important;
        border-radius: 16px;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
        overflow-y: auto;
        overflow-x: hidden;
        margin: auto;
        display: block;
        scroll-behavior: smooth;
    }

    /* Override scroll lock on desktop app-container */
    body.no-scroll .app-container {
        height: min(95vh, 853px) !important;
        overflow-y: hidden !important;
    }

    .page {
        width: 100% !important;
        height: 100% !important;
        min-height: 100% !important;
    }

    /* Elegant Custom Scrollbar */
    .app-container::-webkit-scrollbar {
        width: 6px;
    }
    .app-container::-webkit-scrollbar-track {
        background: transparent;
    }
    .app-container::-webkit-scrollbar-thumb {
        background: rgba(146, 19, 19, 0.3);
        border-radius: 10px;
    }
    .app-container::-webkit-scrollbar-thumb:hover {
        background: rgba(146, 19, 19, 0.6);
    }
    .app-container {
        scrollbar-width: thin;
        scrollbar-color: rgba(146, 19, 19, 0.3) transparent;
    }
}
