*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --primary: #000000;
    /* Dark Gray */
    --accent: #bebebe;
    /* Medium Gray */
    --bg-color: #ffffff;
    /* White */
    --text: #ffffff;
    /* Black */
    --bg-alt: #ffffff;
    /* Light Gray */
}

body,
html {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    color: var(--text);
    background-color: transparent;
}

html {
    overflow: hidden;
    height: 100%;
}

body {
    height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

body.no-scroll,
html.no-scroll {
    overflow: hidden !important;
    height: 100vh !important;
    height: 100dvh !important;
    scroll-snap-type: none !important;
}

h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.page {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    width: 100%;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.page > * {
    max-width: 100%;
}

/* Page 1: Cover */
.cover {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background-color: var(--primary);
}

.bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.fixed-bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Slightly darker for contrast */
    z-index: 2;
}

.cover .content {
    position: relative;
    z-index: 3;
}

.cover h1 {
    font-size: 3rem;
    margin: 10px 0;
}

/* Page 2: Doa */
.prayer {
    background-color: transparent;
    color: #222222;
    text-shadow: none;
}
.prayer h2 { color: #222222; }

/* Page 3: Couple */
.couple {
    background-color: #FDF5E6;
    /* Warna krem agar video transparan terlihat jelas */
    color: #2a2a2a;
    /* Warna gelap untuk teks agar kontras dengan krem */
    text-shadow: none;
    /* Hilangkan shadow karena background terang */
    position: relative;
    overflow: hidden;
}

.couple .content {
    position: relative;
    z-index: 3;
}

.couple-flex {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.couple-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    margin: 0 auto 15px auto;
    border: 4px solid var(--accent);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.ampersand {
    font-family: 'Playfair Display';
    font-size: 3rem;
    color: #2a2a2a;
    /* Warna gelap menyatu dengan teks mempelai */
    display: block;
    margin: 20px 0;
    text-shadow: none;
}

/* Page 4: Timer */
.countdown-section {
    background: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)), url('assets/save.jpeg');
    background-size: cover;
    background-position: center;
    color: #333333;
    text-shadow: none;
}
.countdown-section h2 { color: #333333; }

#timer {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

.time-box {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    color: #333333;
    padding: 12px;
    border-radius: 10px;
    min-width: 75px;
    border: 1px solid rgba(0,0,0,0.1);
}

.time-box span {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Page 5: Event Card */
.event {
    background-color: transparent;
    color: #333333;
    text-shadow: none;
}
.event h2 { color: #333333; }

.event-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,0,0,0.1);
    padding: 30px;
    max-width: 400px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    color: #333333;
}

.map-container {
    width: 100%;
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Page 6: Story Timeline */
.story {
    background-color: transparent;
    color: #ffffff;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
    position: relative;
    overflow: hidden;
}

.story .content {
    position: relative;
    z-index: 3;
    width: 100%;
}

.timeline {
    position: relative;
    max-width: 800px;
    width: 100%;
    margin: 40px auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-50%);
}

.story-item {
    position: relative;
    width: 50%;
    padding: 10px 40px;
    box-sizing: border-box;
    text-align: right;
}

.story-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

.story-dot {
    position: absolute;
    top: 25px;
    right: -10px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.story-item:nth-child(even) .story-dot {
    left: -10px;
}

.story-date {
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 5px;
    opacity: 0.9;
}

.story-content {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.story-content h3 {
    margin: 0 0 10px 0;
    font-size: 1.3rem;
}

.story-content p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* --- Responsive Styles for Smartphone --- */
@media (max-width: 768px) {
    .cover h1 { font-size: 2.2rem; }
    .cover h3 { font-size: 0.9rem; }
    .page { padding: 15px; height: 100dvh; }
    .couple-photo { width: 140px; height: 140px; }
    .ampersand { font-size: 1.8rem; margin: 5px 0; width: 100%; }
    .event-card { padding: 12px; width: 100%; box-sizing: border-box; }
    .map-container { height: 150px; margin: 10px 0; }
    .btn-map { padding: 8px 15px; font-size: 12px; }
    .rsvp-form { max-width: 100%; }
    .bank-card { padding: 12px; max-width: 100%; }
    .bank-number { font-size: 1.2rem; }
    .bottom-menu { padding: 6px 0 8px 0; }
    .menu-item span { font-size: 0.6rem; }
}

@media (max-width: 480px) {
    .cover h1 { font-size: 1.8rem; }
    .cover h3 { font-size: 0.8rem; }
    .page h2 { font-size: 1.5rem; }
    .page { padding: 30px 15px; }
    .couple-photo { width: 140px; height: 140px; }
}

/* Responsive Timeline */
@media (max-width: 992px) {
    .timeline::before { left: 20px; }
    .story-item { width: 100%; padding-left: 50px; padding-right: 10px; text-align: left !important; left: 0 !important; }
    .story-dot { left: 10px !important; }
    .story-content h3 { font-size: 1.1rem; }
}

/* Page 7: RSVP */
.rsvp {
    background-color: transparent;
    color: #333333;
    text-shadow: none;
    justify-content: flex-start;
    padding-top: 60px;
}
.rsvp h2, .rsvp h3 { color: #333333; }

.rsvp-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 350px;
    margin-top: 20px;
}

.rsvp-form input, .rsvp-form select, .rsvp-form textarea {
    padding: 12px;
    border: 1px solid #6d6d6d;
    border-radius: 4px;
    background-color: #f9f9f9;
    color: #000000;
    font-family: 'Montserrat', sans-serif;
}

/* Comments Section */
.comments-section {
    margin-top: 30px;
    width: 100%;
    max-width: 600px;
    text-align: left;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.comments-section h3 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-family: 'Playfair Display', serif;
}

.comments-container {
    max-height: 40vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 5px;
    flex-grow: 1;
}

/* Custom Scrollbar */
.comments-container::-webkit-scrollbar { width: 6px; }
.comments-container::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
.comments-container::-webkit-scrollbar-thumb { background: #000000; border-radius: 4px; }

.comment-box {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    color: #000000;
    border: 1px solid #eee;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    position: relative;
}

.comment-name {
    font-weight: bold;
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment-badge {
    font-size: 0.7rem;
    background-color: var(--primary);
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: normal;
}

.comment-text {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Page 8: Gift */
.gift {
    background-color: transparent;
    color: #333333;
    text-shadow: none;
}

.gift h2 { color: #333333; }

.gift-container {
    max-width: 500px;
    width: 100%;
}

.gift-subtitle {
    margin-bottom: 30px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #000000;
}

.bank-card {
    background: linear-gradient(135deg, #444 0%, #111 100%);
    border-radius: 15px;
    padding: 25px;
    color: #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    margin: 0 auto 20px auto;
    max-width: 380px;
    text-align: left;
    position: relative;
    overflow: hidden;
    border: 1px solid #555;
}

.bank-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    animation: shine 6s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

.bank-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.bank-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 1.5px;
    font-style: italic;
    color: #eee;
}

.chip {
    width: 45px;
    height: 35px;
    background: linear-gradient(135deg, #d4af37 0%, #ffd700 50%, #daa520 100%);
    border-radius: 6px;
    position: relative;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.3);
}

.chip::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 10px 0 rgba(0, 0, 0, 0.3);
}

.bank-number {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.7rem;
    font-weight: bold;
    letter-spacing: 3px;
    margin: 0 0 15px 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.bank-owner {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    opacity: 0.8;
}

.btn-copy {
    background-color: #ffffff;
    color: #000000;
    border-radius: 30px;
    font-weight: bold;
    padding: 12px 25px;
    margin-top: 10px;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.btn-copy:hover {
    background-color: #2a2a2a;
    color: #ffffff;
}

/* Page 9: Thanks */
.thanks {
    background: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)), url('assets/terimakasih.jpeg');
    background-size: cover;
    background-position: center;
    color: #333333;
    text-shadow: none;
    padding-bottom: 140px;
    position: relative;
}
.thanks h2 { color: #333333; }

.credit-section {
    position: absolute;
    bottom: 80px; /* Di atas bottom menu */
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 100%;
}

.credit-logo {
    width: 18px;
    height: auto;
    margin-bottom: 2px;
    vertical-align: middle;
}

.credit-section p {
    font-size: 0.75rem;
    margin: 0;
    opacity: 0.9;
    letter-spacing: 1px;
}

.credit-ig {
    font-size: 0.8rem;
    color: #333333;
    text-decoration: none;
    font-weight: bold;
    display: block;
    margin-top: 4px;
    transition: 0.3s;
}

.credit-ig:hover {
    color: #000000;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .credit-section {
        bottom: 70px;
    }
}

.music-button {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: 0.3s;
    border: 1px solid rgba(255,255,255,0.2);
}

.music-button:hover {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.7);
}

.music-button.paused svg {
    opacity: 0.5;
}

/* Animasi Putar untuk Icon Musik saat menyala */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.music-button.playing svg {
    animation: spin 3s linear infinite;
}

/* Global Button */
button,
.btn-map {
    background: var(--primary);
    color: #ffffff;
    border: none;
    padding: 12px 25px;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: 0.3s;
}

button:hover,
.btn-map:hover {
    background: #000000;
}

/* Animation Utilities */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animasi Zoom-in khusus Foto */
.zoom-in {
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 1.2s ease-out, transform 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.zoom-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Bottom Navigation Menu */
.bottom-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(26, 26, 26, 0.85);
    /* Tema gelap monokrom dengan transparansi */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 0 15px 0;
    z-index: 1000;
    border-top: 1px solid rgba(255, 255, 255, 0.1);

    /* Disembunyikan di halaman cover */
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.bottom-menu.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.menu-item {
    color: var(--bg-alt);
    /* Abu-abu terang */
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    width: 25%;
}

.menu-item svg {
    margin-bottom: 5px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.menu-item:hover,
.menu-item.active {
    color: #ffffff;
}

.menu-item:hover svg,
.menu-item.active svg {
    opacity: 1;
    transform: translateY(-3px);
}

/* Penyesuaian agar bagian paling bawah tidak tertutup menu */
.thanks {
    padding-bottom: 100px;
}