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

body {
    font-family: 'Playfair Display', serif;
    background-color: #2b2b2b;
    /* Dark outer background like mobile preview frame */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    /* Prevent body scrolling */
}

/* Mobile view outer wrapper */
.mobile-wrapper {
    position: relative;
    width: 100%;
    max-width: 480px;
    height: 100vh;
    height: 100dvh;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

/* Mobile container wrapper */
.app-container {
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    background-image: url('images/background.png');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    /* Keep it static to the container */
    position: relative;
    overflow-y: scroll;
    /* Vertical scroll for pages */
    scroll-snap-type: y mandatory;
    /* Snap to each page */
    scroll-behavior: smooth;
}

/* Hide scrollbar for cleaner look */
.app-container::-webkit-scrollbar {
    display: none;
}

.app-container {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Individual page section */
.page {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    position: relative;
    scroll-snap-align: start;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
}

/* Force 9:16 Aspect Ratio so images from Canva align perfectly without cropping */
.page-wrapper {
    position: relative;
    width: 100%;
    max-width: 100vw;
    height: 100%;
    aspect-ratio: 9 / 16;
    max-height: 100vh;
    max-height: 100dvh;
}

@media (max-width: 480px) {
    body {
        align-items: flex-start;
        height: 100dvh;
    }

    .mobile-wrapper {
        width: 100%;
        height: 100dvh;
        box-shadow: none;
    }

    .page {
        display: block !important;
    }

    .page-wrapper {
        width: 100vw !important;
        height: auto !important;
        aspect-ratio: 9 / 16 !important;
        transform: scale(0.94);
        transform-origin: top center;
        margin: 2vh auto 0 auto;
    }

    .copy-btn {
        top: 54.5% !important;
        /* Sesuaikan untuk mobile */
        left: 68% !important;
    }
}

@media (min-aspect-ratio: 9/16) {
    .page-wrapper {
        width: auto;
        height: 100vh;
        height: 100dvh;
    }
}

@media (max-aspect-ratio: 9/16) {
    .page-wrapper {
        width: 100vw;
        height: auto;
    }
}

/* Absolute positioned image elements */
.img-element {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Contain ensures they fit the wrapper perfectly without any unexpected cropping */
    z-index: 2;
}

/* Flex group for text elements that are tightly cropped */
.text-group {
    position: absolute;
    top: 15%;
    /* Roughly 15% from top to match Canva */
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 3;
}

.text-item {
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Intro Overlay */
#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: opacity 0.8s ease;
    backdrop-filter: blur(5px);
}

.overlay-content {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.overlay-content h2 {
    font-size: 1.5rem;
    color: #4a4a4a;
    margin-bottom: 5px;
    font-weight: 600;
}

.overlay-content p {
    font-size: 1.2rem;
    color: #7b7b7b;
    margin-bottom: 25px;
}

.overlay-content .kepada {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: #999;
}

.overlay-content .tamu {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 25px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

#intro-overlay button {
    padding: 12px 30px;
    background-color: #d4a373;
    /* Elegant muted gold/brown */
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
    box-shadow: 0 4px 15px rgba(212, 163, 115, 0.4);
}

#intro-overlay button:hover {
    background-color: #bc8f63;
}

/* Animations */
.animate {
    opacity: 0;
    animation-fill-mode: forwards;
    animation-play-state: paused;
}

.page.is-visible .animate {
    animation-play-state: running;
}

/* Different animation types */
.fade-in {
    animation-name: fadeIn;
    animation-duration: 1.5s;
    animation-timing-function: ease-in-out;
}

.slide-up {
    animation-name: slideUp;
    animation-duration: 1.2s;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide-down {
    animation-name: slideDown;
    animation-duration: 1.2s;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide-in-left {
    animation-name: slideInLeft;
    animation-duration: 1.2s;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide-in-right {
    animation-name: slideInRight;
    animation-duration: 1.2s;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.zoom-in {
    animation-name: zoomIn;
    animation-duration: 1.5s;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.zoom-in-soft {
    animation-name: zoomInSoft;
    animation-duration: 3s;
    animation-timing-function: ease-out;
}

/* Continuous Animations */
.float-vertical {
    animation: floatComplex 6s ease-in-out infinite;
    transform-origin: bottom center;
}

.float-vertical-reverse {
    animation: floatComplexReverse 6s ease-in-out infinite;
    animation-delay: 1.5s;
    transform-origin: bottom center;
}

.float-bounce {
    animation: floatBounce 3s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
    transform-origin: center;
}

/* Keyframes */
@keyframes floatComplex {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    33% {
        transform: translateY(-8px) rotate(2deg);
    }

    66% {
        transform: translateY(-4px) rotate(-1.5deg);
    }
}

@keyframes floatComplexReverse {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    33% {
        transform: translateY(-8px) rotate(-2deg);
    }

    66% {
        transform: translateY(-4px) rotate(1.5deg);
    }
}

@keyframes floatBounce {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-12px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes zoomInSoft {
    from {
        opacity: 0;
        transform: scale(1.05);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Delay helpers */
.delay-1 {
    animation-delay: 0.4s;
}

.delay-2 {
    animation-delay: 0.8s;
}

.delay-3 {
    animation-delay: 1.2s;
}

.delay-4 {
    animation-delay: 1.6s;
}

.delay-5 {
    animation-delay: 2.0s;
}

/* Map Button */
.map3-group {
    position: absolute;
    top: 72%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    z-index: 10;
}

.map3-box .location-btn {
    display: inline-block;
    background: #ac715d;
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    font-family: 'Playfair Display', serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
    animation: pulse 2s infinite;
}

.location-btn:hover {
    background: #000;
    color: #fff;
}


@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(172, 113, 93, 0.4);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

/* Music Control Floating Button */
#musicControl {
    position: absolute;
    bottom: 80px;
    /* Adjusted to be above the side controls */
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #ac715d;
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

#musicControl svg {
    width: 20px;
    height: 20px;
    fill: #ffffff;
}

/* Copy Button */
.copy-btn {
    position: absolute;
    top: 54.5%;
    /* Atur naik/turun sejajar dengan teks BCA */
    left: 68%;
    /* Atur geser kiri/kanan (semakin besar semakin ke kanan) */
    transform: translate(-50%, -50%);
    background-color: #ac715d;
    color: white;
    border: none;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 10;
    transition: all 0.25s ease;
}

.copy-btn:active {
    background-color: #8c5b48;
    transform: translate(-50%, -50%) scale(0.95);
}

/* Bottom Navigation (Side Controls) */
.side-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 0 15px 0;
    z-index: 50;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.side-controls button {
    background: none;
    border: none;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    font-family: 'Playfair Display', serif;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.side-controls button.active,
.side-controls button:hover {
    opacity: 1;
}

.side-controls button img {
    width: 22px;
    height: 22px;
}

.side-controls button span {
    font-size: 10px;
    font-weight: 500;
}