* {
    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: cover;
    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');
}


/* --- 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: 24%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 80%;
    z-index: 10;
}

.guest-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #47372A;
    letter-spacing: 0.5px;
    margin: 0;
}

.btn-open {
    position: absolute;
    bottom: 10%;
    /* Posisinya agak dinaikkan */
    background-color: transparent;
    color: #ffffff;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 7px 22px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: none;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, transform 0.2s ease;
    letter-spacing: 0.5px;
}

.btn-open:hover {
    background-color: #6E473B;
    /* Warna coklat elegant muncul saat hover saja */
    box-shadow: 0 6px 15px rgba(110, 71, 59, 0.4);
    transform: scale(1.05);
}

/* --- Style Khusus Halaman 2 & 11 --- */
.p2-envelope,
.p11-envelope {
    max-width: 85%;
    max-height: 80svh;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0;
    transform: translateY(50px) scale(0.95);
}

#page-2.active .p2-envelope,
#page-11.active .p11-envelope {
    animation: 
        envelopeFloatIn 3s cubic-bezier(0.16, 1, 0.3, 1) forwards,
        floatAndSway 6s ease-in-out 3s infinite;
}

@keyframes envelopeFloatIn {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.95) rotate(0deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
}

@keyframes floatAndSway {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-6px) rotate(-1deg);
    }
    50% {
        transform: translateY(0px) rotate(0deg);
    }
    75% {
        transform: translateY(6px) rotate(1deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* --- Style Khusus Halaman 3 (Countdown) --- */
.countdown-container {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 4px;
    z-index: 10;
}

.countdown-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 36px;
}

.countdown-num {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.68rem;
    font-weight: 500;
    color: #47372A;
    line-height: 1.1;
}

.countdown-colon {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.68rem;
    font-weight: 500;
    color: #47372A;
    line-height: 1.1;
}

.countdown-label {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.63rem;
    font-weight: 400;
    color: #47372A;
    margin-top: 4px;
    letter-spacing: 0.5px;
}


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

.music-btn:hover {
    background-color: #55352A;
    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(110, 71, 59, 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 6 (Lokasi Acara) --- */
.btn-page6 {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4A3525;
    color: #ffffff;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.77rem;
    font-weight: 500;
    width: 31%;
    max-width: 150px;
    min-width: 120px;
    height: 34px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(74, 53, 37, 0.2);
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    letter-spacing: 0.5px;
    z-index: 10;
}

.btn-maps-cathedral {
    top: 27.2%;
}

.btn-maps-kempinski {
    top: 45.4%;
}

.btn-page6:hover {
    background-color: #6E473B;
    box-shadow: 0 6px 14px rgba(110, 71, 59, 0.35);
    transform: translateX(-50%) scale(1.04);
}

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



/* --- Style Halaman 10 (Gift Pernikahan) --- */
.btn-gift {
    position: absolute;
    top: 36.5%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4A3525;
    color: #ffffff;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.77rem;
    font-weight: 500;
    padding: 8px 27px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(74, 53, 37, 0.3);
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    letter-spacing: 0.5px;
    z-index: 10;
}

.btn-gift:hover {
    background-color: #6E473B;
    box-shadow: 0 6px 16px rgba(110, 71, 59, 0.4);
    transform: translateX(-50%) scale(1.03);
}

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

/* Modal Gift */
.gift-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.gift-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.gift-modal-card {
    background-color: #faf6f0;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    padding: 24px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.gift-modal-overlay.active .gift-modal-card {
    transform: scale(1);
}

.gift-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #8C7667;
    transition: color 0.2s;
}

.gift-modal-close:hover {
    color: #4A3525;
}

.gift-modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.gift-modal-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    color: #4A3525;
    font-weight: 600;
    margin-bottom: 6px;
}

.gift-modal-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #8C7667;
    line-height: 1.4;
}

.gift-modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Scrollbar for modal body if height overflows */
.gift-modal-body::-webkit-scrollbar {
    width: 4px;
}
.gift-modal-body::-webkit-scrollbar-track {
    background: transparent;
}
.gift-modal-body::-webkit-scrollbar-thumb {
    background: rgba(110, 71, 59, 0.2);
    border-radius: 10px;
}

.bank-account-card {
    background-color: #ffffff;
    border: 1px solid rgba(140, 118, 103, 0.15);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.bank-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px dashed rgba(140, 118, 103, 0.15);
    padding-bottom: 6px;
}

.bank-name {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: #6E473B;
    letter-spacing: 0.5px;
}

.account-owner {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.85rem;
    color: #4A3525;
    font-weight: 500;
}

.account-number-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.account-number {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #4A3525;
    letter-spacing: 0.5px;
}

.account-number.address-text {
    font-size: 0.72rem;
    font-weight: 400;
    line-height: 1.4;
    color: #555555;
    letter-spacing: 0;
}

.btn-copy-action {
    background-color: #6E473B;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 5px 12px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-copy-action:hover {
    background-color: #4A3525;
}

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

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background-color: rgba(74, 53, 37, 0.95);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 30px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    z-index: 10001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --- Style Halaman 8 (RSVP & Wishes) --- */
.btn-page8 {
    background-color: #4A3525;
    color: #ffffff;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.72rem;
    font-weight: 500;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(74, 53, 37, 0.2);
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.btn-rsvp-trigger {
    position: absolute;
    top: 30.6%;
    left: 36.1%;
    transform: translate(-50%, -50%);
    width: 22.5%;
    max-width: 109px;
    min-width: 76px;
    height: 32px;
}

.btn-wishes-trigger {
    position: absolute;
    top: 80.7%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 22.5%;
    max-width: 109px;
    min-width: 76px;
    height: 32px;
}

.btn-page8:hover {
    background-color: #6E473B;
    box-shadow: 0 6px 14px rgba(110, 71, 59, 0.35);
    transform: translate(-50%, -50%) scale(1.04);
}

.btn-page8:active {
    transform: translate(-50%, -50%) scale(0.97);
}

/* Form Styling inside Modals */
.form-group {
    margin-bottom: 16px;
    text-align: left;
    width: 100%;
}

.form-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6E473B;
    display: block;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(140, 118, 103, 0.25);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #4A3525;
    background-color: #ffffff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: #6E473B;
    box-shadow: 0 0 0 3px rgba(110, 71, 59, 0.15);
}

.form-control[readonly] {
    background-color: #f5f1ea;
    color: #8C7667;
    cursor: not-allowed;
    border-color: rgba(140, 118, 103, 0.15);
}

.form-textarea {
    resize: none;
}

.btn-submit-gift {
    background-color: #4A3525;
    color: #ffffff;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.9rem;
    font-weight: 500;
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(74, 53, 37, 0.2);
    transition: background-color 0.3s, transform 0.2s;
    margin-top: 10px;
}

.btn-submit-gift:hover {
    background-color: #6E473B;
}

.btn-submit-gift:active {
    transform: scale(0.98);
}

/* --- 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(110, 71, 59, 0.3);
        border-radius: 10px;
    }
    .app-container::-webkit-scrollbar-thumb:hover {
        background: rgba(110, 71, 59, 0.6);
    }
    .app-container {
        scrollbar-width: thin;
        scrollbar-color: rgba(110, 71, 59, 0.3) transparent;
    }
}