/* Font San Francisco Apple Look-alike */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Palet Warna Dark Mode */
    --sys-bg: #111111; 
    --sys-text-primary: #ffffff; 
    --sys-text-secondary: rgba(255, 255, 255, 0.65); 
    --sys-text-tertiary: rgba(255, 255, 255, 0.4);
    
    /* Aksen Cyan */
    --sys-accent: #00d2ff; 

    /* Variabel Glassmorphism - Frosted White Glass (Global) */
    --glass-bg: rgba(255, 255, 255, 0.06); 
    --glass-border: rgba(255, 255, 255, 0.12); 
    --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); 
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
    background-color: var(--sys-bg); 
    color: var(--sys-text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex; justify-content: center; align-items: center;
    min-height: 100vh; overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- LATAR BELAKANG GLOBAL (STYLE DASHBOARD UNTUK HALAMAN UTAMA) --- */
.ios-bg {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 0;
    /* Latar belakang interior gelap untuk kedalaman dashboard halaman utama */
    background-image: url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    filter: grayscale(100%) brightness(0.25) blur(5px); 
}

/* Kelas Teks Utilitas */
.text-primary { color: var(--sys-text-primary); }
.text-secondary { color: var(--sys-text-secondary); }
.text-tertiary { color: var(--sys-text-tertiary); }

/* ========================================================= */
/* EFEK PREMIUM FROSTED GLASS (GLOBAL)                     */
/* ========================================================= */
.glass-panel { 
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(120%); 
    -webkit-backdrop-filter: blur(40px) saturate(120%); 
    border: 1px solid var(--glass-border);
    border-radius: 24px; 
    box-shadow: var(--glass-shadow); 
    position: relative; 
    overflow: hidden;
    -webkit-transform: translateZ(0); transform: translateZ(0);
}

.inner-glass {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
}

/* --- KONTAINER APLIKASI UTAMA --- */
.app-container { 
    position: relative; width: 100%; max-width: 420px; height: 100vh; max-height: 850px; 
    z-index: 1; display: flex; flex-direction: column;
}
.scroll-view { flex-grow: 1; overflow-y: auto; overflow-x: hidden; padding: 24px; scroll-behavior: smooth; }
.scroll-view::-webkit-scrollbar { display: none; }

/* --- HEADER TEKS --- */
.header-clean { text-align: left; margin-top: 30px; margin-bottom: 24px; padding-left: 5px;}
.couple-names { font-weight: 500; font-size: 2.2rem; letter-spacing: -0.5px; margin-bottom: 4px; }
.wedding-date { font-size: 0.85rem; color: var(--sys-accent); letter-spacing: 1px; font-weight: 500; }
.brand-text-small { font-size: 0.75rem; color: var(--sys-text-secondary); letter-spacing: 1.5px; font-weight: 600; text-transform: uppercase;}

/* --- BANNER HERO (Di Atas Hitung Mundur) --- */
.hero-banner {
    margin-bottom: 24px;
    width: 100%;
}
.banner-img {
    width: 100%;
    height: 220px;
    border-radius: 24px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--glass-shadow);
}

/* --- WIDGET HITUNG MUNDUR --- */
.dashboard-widgets { margin-bottom: 16px; }
.widget-card { display: flex; align-items: center; justify-content: space-between; padding: 24px; }
.widget-value { font-size: 3.5rem; font-weight: 400; letter-spacing: -2px; line-height: 1; margin-bottom: 4px; }
.widget-label { font-size: 0.85rem; color: var(--sys-text-secondary); font-weight: 400; }
.countdown-container { position: relative; width: 80px; height: 80px; }
.progress-ring { transform: rotate(-90deg); width: 80px; height: 80px; }
.ring-track { fill: transparent; stroke: rgba(255,255,255,0.08); stroke-width: 6; } 
.ring-progress { fill: transparent; stroke: var(--sys-accent); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 1s ease-out; }
.widget-icon { position: absolute; top:50%; left:50%; transform: translate(-50%, -50%); opacity: 1; stroke: var(--sys-accent); }

/* --- KISI MENU --- */
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.menu-item { padding: 20px 16px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; height: 110px; cursor: pointer; transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.3s; }
.menu-item:hover { background: rgba(255, 255, 255, 0.12); }
.menu-item:active { transform: scale(0.95); opacity: 0.8; }
.icon-wrapper { width: 36px; height: 36px; display: flex; justify-content: flex-start; align-items: center; margin-bottom: auto;}
.icon-wrapper svg { stroke: #fff; }
.menu-text { font-size: 0.9rem; font-weight: 500; color: var(--sys-text-primary); }

/* --- GALERI --- */
.slider-section { padding: 24px; margin-bottom: 24px; display: flex; flex-direction: column; }
.slider-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.see-all-btn { font-size: 0.85rem; color: var(--sys-text-secondary); text-decoration: none; font-weight: 400; }
.horizontal-scroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 5px; margin: 0 -10px; padding: 0 10px; }
.horizontal-scroll::-webkit-scrollbar { display: none; }
.scroll-item { flex-shrink: 0; width: 140px; height: 180px; border-radius: 16px; scroll-snap-align: center; background-size: cover; background-position: center; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); filter: grayscale(50%); transition: filter 0.3s;}
.scroll-item:hover { filter: grayscale(0%); }

/* --- UCAPAN & RSVP --- */
.section-heading { font-size: 1.1rem; font-weight: 500; margin-bottom: 16px; padding-left: 5px;}
.wishes-form { padding: 20px; }
.wishes-public-list { padding: 20px; max-height: 350px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.wishes-public-list::-webkit-scrollbar { display: none; }
.wish-card { border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 16px; }
.wish-card:last-child { border-bottom: none; padding-bottom: 0; }
.wish-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.wish-name { font-weight: 500; font-size: 0.95rem; color: var(--sys-accent); }
.wish-rsvp-badge { font-size: 0.7rem; padding: 4px 10px; border-radius: 12px; font-weight: 500; letter-spacing: 0.5px;}
.rsvp-hadir { background: rgba(0, 210, 255, 0.15); color: var(--sys-accent); border: 1px solid rgba(0, 210, 255, 0.3); }
.rsvp-tidak { background: rgba(255, 100, 100, 0.15); color: #ff6464; border: 1px solid rgba(255, 100, 100, 0.3); }
.rsvp-ragu { background: rgba(255, 200, 0, 0.15); color: #ffc800; border: 1px solid rgba(255, 200, 0, 0.3); }
.wish-date { font-size: 0.75rem; color: var(--sys-text-tertiary); margin-bottom: 8px;}
.wish-msg { font-size: 0.9rem; color: var(--sys-text-secondary); line-height: 1.5; font-weight: 400;}

/* --- INPUT & TOMBOL (GLOBAL) --- */
.input-field, .input-area { width: 100%; background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 16px; color: var(--sys-text-primary); font-family: inherit; margin-bottom: 12px; outline: none; transition: all 0.3s; font-size: 0.95rem;}
.input-field::placeholder, .input-area::placeholder { color: var(--sys-text-tertiary); }
.input-field:focus, .input-area:focus { background: rgba(0,0,0,0.4); border-color: var(--sys-accent); box-shadow: 0 0 0 2px rgba(0, 210, 255, 0.2);}
.input-area { height: 100px; resize: none; }
.rsvp-select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 1rem center; background-size: 1em; padding-right: 2.5rem;}
.rsvp-select option { background-color: #1a1a1a; color: #fff; }

.btn-primary { width: 100%; padding: 16px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.2); font-family: inherit; font-size: 1rem; font-weight: 500; cursor: pointer; transition: all 0.2s; background: rgba(255, 255, 255, 0.1); color: #FFF; backdrop-filter: blur(10px); }
.btn-primary:active { transform: scale(0.96); background: rgba(255, 255, 255, 0.2); }
.btn-secondary { width: 100%; padding: 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.1); font-family: inherit; font-size: 0.95rem; font-weight: 500; cursor: pointer; transition: transform 0.2s; background: rgba(0,0,0,0.2); color: var(--sys-text-primary); }
.btn-secondary:active { transform: scale(0.96); background: rgba(0,0,0,0.4);}

/* --- MODAL (POP-UP) --- */
.lightbox { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 9999; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.lightbox-overlay { position: absolute; top:0; left:0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.lightbox.active { opacity: 1; pointer-events: all; }
.modal-slide-up { transform: translateY(100%); transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.lightbox.active .modal-slide-up { transform: translateY(0); }

.modal-box { width: 100%; max-width: 420px; max-height: 85vh; overflow-y: auto; padding: 24px; text-align: left; border-radius: 28px 28px 0 0; background: rgba(30, 30, 30, 0.65); backdrop-filter: blur(40px); border-top: 1px solid var(--glass-border); border-bottom: none;}
.modal-box::-webkit-scrollbar { display: none; }
.modal-drag-handle { width: 40px; height: 5px; background: rgba(255,255,255,0.3); border-radius: 3px; margin: 0 auto 20px auto; }
.section-title { font-size: 1.5rem; font-weight: 500; margin-bottom: 24px; text-align: left; letter-spacing: -0.5px;}

/* Timeline & Profil */
.timeline { position: relative; margin-left: 10px; border-left: 2px solid rgba(255,255,255,0.1); padding-left: 24px; }
.timeline-item { position: relative; margin-bottom: 32px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot { position: absolute; left: -31px; top: 0; width: 14px; height: 14px; background: var(--sys-accent); border-radius: 50%; border: 3px solid #1a1a1a; }
.timeline-date { font-weight: 500; color: var(--sys-accent); margin-bottom: 8px; font-size: 0.85rem;}
.timeline-photo { width: 100%; height: 160px; background-size: cover; background-position: center; border-radius: 16px; margin-bottom: 12px; border: 1px solid rgba(255,255,255,0.1); filter: grayscale(30%);}
.timeline-text { font-size: 0.95rem; color: var(--sys-text-secondary); line-height: 1.5; font-weight: 400;}

.profile-card { padding: 24px 0; text-align: center; }
.profile-avatar { width: 100px; height: 100px; border-radius: 50%; margin: 0 auto 16px auto; background-size: cover; background-position: center; border: 2px solid rgba(255,255,255,0.2); filter: grayscale(20%);}
.profile-name { font-size: 1.5rem; font-weight: 500; margin-bottom: 4px; }
.profile-parents { font-size: 0.85rem; color: var(--sys-text-secondary); line-height: 1.5; }
.profile-divider { text-align: center; font-size: 1.5rem; font-weight: 300; color: rgba(255,255,255,0.1); margin: 10px 0;}

.gift-card { text-align: center; }
.bank-name { display: block; font-size: 0.85rem; color: var(--sys-text-secondary); margin-bottom: 4px;}
.account-name { display: block; font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; color: var(--sys-accent); }
.account-number { font-size: 2rem; letter-spacing: 2px; font-weight: 300; margin-bottom: 24px;}

/* Lightbox Galeri */
#gallery-lightbox { justify-content: center; background: rgba(0, 0, 0, 0.9); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);}
.lightbox-close { position: absolute; top: 40px; right: 24px; color: var(--sys-text-primary); font-size: 1.8rem; cursor: pointer; z-index: 10000; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; line-height: 0; padding-bottom: 4px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.1);}
.lightbox-content img { width: 90vw; max-width: 400px; height: auto; max-height: 70vh; object-fit: cover; border-radius: 20px; box-shadow: 0 20px 40px rgba(0,0,0,0.5);}

/* --- LOADER --- */
.loader-container { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: var(--sys-bg); z-index: 99999; display: flex; flex-direction: column; justify-content: center; align-items: center; transition: opacity 0.5s ease; }
.spinner { width: 40px; height: 40px; border: 3px solid rgba(255,255,255,0.1); border-top-color: var(--sys-accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ========================================================= */
/* --- LAYAR SAMPUL / COVER SCREEN (PREMIUM COLOR & GLASS) - */
/* ========================================================= */

/* 1. Latar Belakang Gradasi Abstrak (Tanpa Gambar) */
.cover-container { 
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 88888; 
    display: flex; justify-content: center; align-items: center; 
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Warna dasar gelap dipadukan dengan cahaya ungu, pink, dan biru lembut */
    background-color: #0c0d12; 
    background-image: 
        radial-gradient(circle at 15% 20%, rgba(130, 80, 255, 0.15) 0%, transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(255, 100, 160, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(0, 180, 255, 0.08) 0%, transparent 60%);
}

/* 5. Cahaya (Glow) lembut tepat di belakang kartu utama */
.cover-content { 
    text-align: center; 
    padding: 30px; 
    z-index: 1; 
    width: 100%; 
    max-width: 400px;
    position: relative;
}
.cover-content::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 120%; height: 120%;
    /* Pendaran ungu/biru di belakang kartu */
    background: radial-gradient(circle, rgba(140, 100, 255, 0.12) 0%, rgba(0, 200, 255, 0.05) 40%, transparent 70%);
    z-index: -1;
    filter: blur(40px);
    pointer-events: none;
}

.hide-cover { transform: translateY(-100%); }

/* 5. Efek glow tipis untuk teks judul utama */
.couple-hero-names { 
    font-size: 3.2rem; 
    font-weight: 500; 
    letter-spacing: -1px; 
    margin-bottom: 15px; 
    color: #ffffff;
    text-shadow: 0 0 20px rgba(160, 120, 255, 0.4), 0 4px 10px rgba(0,0,0,0.5); 
}

/* 2 & 3. Kartu Utama: Efek Kaca Kuat, Kedalaman 3D & Hover */
.cover-content .guest-info {
    background: rgba(255, 255, 255, 0.06); /* Putih semi-transparan */
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    /* Efek highlight di sudut atas & kiri layaknya pantulan cahaya di ujung kaca */
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    padding: 24px;
    /* Bayangan lembut agar terlihat melayang (floating) */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}
.cover-content .guest-info:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.25), 0 0 25px rgba(160, 120, 255, 0.15);
}

/* 4. Tombol "Buka Undangan" Gaya Kaca (Glass Style) */
.cover-content .btn-primary {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 16px;
    margin-top: 24px;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
/* Efek pantulan cahaya mengkilat yang berjalan saat di-hover */
.cover-content .btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: skewX(-20deg);
    transition: left 0.5s ease;
}
.cover-content .btn-primary:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px) scale(1.05);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 12px 25px rgba(160, 120, 255, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.25);
}
.cover-content .btn-primary:hover::after {
    left: 200%;
}
.cover-content .btn-primary:active {
    transform: scale(0.96);
}

/* --- TOMBOL MUSIK --- */
.music-btn { position: absolute; bottom: 40px; right: 24px; width: 50px; height: 50px; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; z-index: 5000; transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.1); backdrop-filter: blur(10px);}
.music-btn:active { transform: scale(0.9); }
.playing.spin-anim { animation: spinRecord 4s linear infinite; }

/* ANIMASI SCROLL */
.scroll-reveal { opacity: 0; transform: translateY(20px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.scroll-reveal.animate { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

.toast { position: fixed; top: 40px; left: 50%; transform: translateX(-50%) translateY(-50px); background: rgba(40, 40, 40, 0.85); color: var(--sys-text-primary); padding: 14px 24px; border-radius: 30px; font-size: 0.95rem; font-weight: 500; z-index: 10000; opacity: 0; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 10px 30px rgba(0,0,0,0.5); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.15);}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* --- FOOTER --- */
.app-footer {
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.app-footer p {
    font-size: 0.8rem;
    color: var(--sys-text-secondary);
    font-weight: 400;
}