:root {
    --ios-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --app-height: 100vh;
}

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

html,
body {
    width: 100%;
    height: 100vh;
    height: var(--app-height);
    overflow: hidden;
}

body {
    background-color: #000;
    font-family: var(--ios-font);
}

/* Container Utama */
.iphone-screen {
    width: 100%;
    height: var(--app-height);
    background-image: url('https://i.pinimg.com/564x/4c/c3/97/4cc3971c012c50be3472c5e307925f30.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    max-width: 450px;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.screen {
    position: absolute;
    inset: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s;
    color: white;
}

/* Dynamic Island */
.dynamic-island {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #000;
    border-radius: 20px;
    height: 36px;
    min-width: 120px;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.65, 0, 0.35, 1);
    padding: 0 12px;
}

.island-content {
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: scale(0.8) translateY(10px);
    transition: all 0.4s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dynamic-island.active .island-content {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Marquee untuk musik di Dynamic Island */
.island-marquee {
    overflow: hidden;
    width: 130px;
    /* Lebar maksimal teks sebelum di-scroll */
    position: relative;
}

.island-marquee span {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 5s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

.dynamic-island.playing {
    min-width: 180px;
    /* Lebar island saat musik diputar */
}

/* Lock Screen */
/* ======================================================= */
/* PERBAIKAN 1: Menggunakan Flexbox untuk layout Lock Screen */
/* ======================================================= */
/* ======================================================= */
/* PERBAIKAN 1: Menggunakan Flexbox untuk layout Lock Screen */
/* ======================================================= */
#lock-screen {
    z-index: 50;
    display: flex;
    flex-direction: column;
    /* Menumpuk konten (atas) dan footer (bawah) */
    position: absolute;
    inset: 0;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s;
    color: white;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

/* Anda tidak perlu kode duplikat di sini lagi */

#lock-screen.unlocked {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}


/* ======================================================= */
/* PERBAIKAN 2: Konten mengisi ruang yang tersedia */
/* ======================================================= */
.lock-screen-content {
    padding: 80px 30px 20px 30px;
    /* Sedikit padding di bawah */
    text-align: center;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);

    /* Ini kode barunya: */
    flex-grow: 1;
    /* Membuat konten mengisi semua ruang & mendorong footer ke bawah */
    overflow-y: auto;
    /* Agar bisa di-scroll jika nama tamu sangat panjang */
}

.lock-date {
    font-size: 1.1rem;
    font-weight: 500;
}

.lock-time {
    font-size: 5rem;
    font-weight: 800;
    margin: 5px 0 40px 0;
}

.notification {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 18px;
    padding: 12px;
    text-align: left;
}

.notif-header {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    opacity: 0.8;
}

.notif-icon {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    margin-right: 8px;
}

.notif-time {
    margin-left: auto;
}

.notif-body {
    margin-top: 5px;
}

.notif-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.notif-text {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ======================================================= */
/* PERBAIKAN 3: Footer menjadi bagian normal dari layout */
/* ======================================================= */
.lock-footer {
    /* Hapus: position: absolute, bottom, width */
    text-align: center;
    font-weight: 600;
    animation: bounce 2s infinite;

    /* Ini kode barunya: */
    color: white;
    /* Pastikan warnanya putih */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    padding-bottom: 30px;
    /* Jarak dari bawah layar */
    flex-shrink: 0;
    /* Mencegah footer 'kusut' */
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Home Screen */
#home-screen {
    z-index: 40;
}

.home-screen-content {
    padding: 40px 20px;
}

.widget-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.widget {
    flex: 1;
    height: 150px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 15px;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.widget:active {
    transform: scale(0.95);
}

.calendar-widget {
    text-align: left;
}

.calendar-widget .month {
    font-size: 1rem;
    font-weight: 600;
    color: #ff3b30;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.calendar-widget .day {
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.calendar-widget .weekday {
    font-size: 1rem;
    font-weight: 600;
    color: #ff3b30;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.photo-widget {
    display: flex;
    gap: 5px;
    padding: 5px;
    overflow: hidden;
}

.photo-widget img {
    width: 50%;
    object-fit: cover;
    border-radius: 12px;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.app-icon {
    text-align: center;
    cursor: pointer;
}

.icon-bg {
    width: 60px;
    height: 60px;
    border-radius: 17px;
    margin: 0 auto 8px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.4), 0 4px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease;
}

.app-icon:active .icon-bg {
    transform: scale(0.9);
}

.icon-bg i {
    font-size: 2rem;
    color: white;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
}

.icon-bg img {
    width: 100%;
    height: 100%;
    border-radius: 17px;
}

.app-icon span {
    font-size: 0.7rem;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.3px;
}

.dock {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 12px 10px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* App Screen (Modal) */
.app-screen {
    position: absolute;
    inset: 0;
    background: #f0f2f5;
    color: #1c1c1e;
    z-index: 60;
    transform: scale(0.8) translateY(50px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
    border-radius: 40px 40px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}

.app-screen.active {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.app-header {
    padding: 25px 20px 5px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #dcdcdc;
    background-color: #f8f8f8;
}

.app-close-btn {
    background: none;
    border: none;
    font-size: 1rem;
    color: #007aff;
    cursor: pointer;
    font-weight: 500;
}

.app-title {
    margin: 0 auto;
    font-size: 1.1rem;
    font-weight: 600;
}

/* GANTI BLOK INI */
.app-content {
    /* Tinggi 100% dikurangi tinggi header (55px) */
    height: calc(100% - 55px);

    /* Hapus padding dan overflow dari sini */
    padding: 0;
    overflow: hidden;
    /* Sembunyikan scrollbar di container utama */

    /* Ini adalah kode barunya: */
    display: flex;
    flex-direction: column;
    /* Menumpuk list di atas form */
}

/* TAMBAHKAN BLOK BARU INI */
#guest-greetings-list {
    flex-grow: 1;
    /* Ini adalah kuncinya: ambil semua sisa ruang */
    overflow-y: auto;
    /* Buat HANYA list ini yang bisa di-scroll */

    /* Pindahkan padding yang tadinya ada di .app-content ke sini */
    padding: 20px;
}

/* TAMBAHKAN BLOK BARU INI */
/* Mengatur garis <hr> di antara list dan form */
.app-content hr {
    margin: 0;
    /* Hapus margin default */
    border: 0;
    border-top: 1px solid #dcdcdc;
    /* Garis pemisah tipis */
    flex-shrink: 0;
    /* Mencegahnya 'kusut' */
}

/* Mengatur area form di bagian bawah */
#greeting-form {
    padding: 20px;
    /* Beri padding di sekitar form */
    padding-top: 15px;
    /* Padding lebih kecil di atas karena sudah ada garis */
    flex-shrink: 0;
    /* Mencegah form 'kusut' */
    background-color: #f0f2f5;
    /* Samakan dengan background app */
}

/* Control Center */
.control-center {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    z-index: 70;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.control-center.active {
    opacity: 1;
    pointer-events: auto;
}

.cc-platter {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 15px;
    width: 100%;
}

.music-platter {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 15px;
}

.music-icon {
    font-size: 2rem;
}

.music-info p {
    font-weight: 600;
}

.music-info span {
    font-size: 0.9rem;
    opacity: 0.8;
}

.music-controls {
    display: flex;
    gap: 20px;
    font-size: 1.2rem;
}

.music-controls i {
    cursor: pointer;
}

/* STYLE UNTUK KONTEN APLIKASI */
.event-card-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.event-card {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    gap: 20px;
}

.event-icon {
    font-size: 1.8rem;
    color: #007aff;
    flex-shrink: 0;
}

.event-details h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #1c1c1e;
}

.event-details p {
    font-size: 0.9rem;
    margin: 0;
    color: #555;
    line-height: 1.4;
}

.chat-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 10px;
}

.chat-bubble {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 20px;
    line-height: 1.4;
    position: relative;
}

.chat-bubble p {
    margin: 0;
    color: inherit;
    font-size: 0.9rem;
}

.chat-bubble.received {
    background-color: #e5e5ea;
    color: #1c1c1e;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.chat-bubble.sent {
    background-color: #007aff;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.chat-bubble.received::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -7px;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at 100% 0, transparent 13px, #e5e5ea 14px);
    transform: translateY(1px);
}

.chat-bubble.sent::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: -7px;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at 0 0, transparent 13px, #007aff 14px);
    transform: translateY(1px);
}

.gift-intro {
    text-align: center;
    margin-bottom: 15px;
    color: #555;
    font-size: 0.9rem;
}

.bank-card {
    display: flex;
    align-items: center;
    background-color: #fff;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid #e5e5e5;
}

.bank-card img {
    height: 25px;
    margin-right: 15px;
}

.bank-info {
    flex-grow: 1;
}

.bank-info p {
    font-size: 0.8rem;
    color: #888;
    margin: 0;
}

.bank-info strong {
    font-size: 1rem;
    color: #1c1c1e;
}

.copy-btn {
    background-color: #f0f2f5;
    border: none;
    color: #007aff;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.15s ease, background-color 0.2s;
}

.copy-btn:active {
    transform: scale(0.92);
    background-color: #e5e5ea;
}

#copy-notif {
    text-align: center;
    color: #34c759;
    font-weight: 500;
    margin-top: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

#copy-notif.show {
    opacity: 1;
}

#guest-greetings-list {
    margin-bottom: 15px;
}

.comment {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.comment-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #007aff;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    flex-shrink: 0;
}

.comment-body {
    background: #fff;
    border-radius: 15px;
    padding: 10px;
    width: 100%;
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.comment-body .name {
    font-weight: 600;
    font-size: 0.9rem;
}

.comment-body .text {
    font-size: 0.9rem;
    color: #333;
}

#greeting-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#greeting-form input,
#greeting-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: var(--ios-font);
    outline: none;
    transition: border-color 0.3s;
}

#greeting-form input:focus,
#greeting-form textarea:focus {
    border-color: #007aff;
}

#greeting-form textarea {
    resize: vertical;
}

#submit-greeting-btn {
    background: #007aff;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.2s;
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.3);
}

#submit-greeting-btn:active {
    transform: scale(0.95);
    background-color: #0062cc;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.gallery-grid img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

/* Modal Gambar (Image Viewer) */
.image-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.image-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.image-modal-content {
    max-width: 90%;
    max-height: 80%;
    display: block;
    border-radius: 10px;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.image-modal.show .image-modal-content {
    transform: scale(1);
}

.close-image-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-image-modal:hover {
    color: #bbb;
}

/* Video Container */
.video-container {
    position: relative;
    overflow: hidden;

    /* GANTI DENGAN 2 BARIS INI */
    width: 100%;
    /* Jadi 100% */
    padding-top: 56.25%;
    /* Ini adalah rasio 16:9 untuk width 100% */

    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);

    /* Margin auto tidak diperlukan lagi untuk width 100% */
}

/* Biarkan iframe style seperti ini */
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Nama Tamu di Notifikasi */
.notif-guest-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 8px 0 !important;
    padding: 0;
    color: #ffffff;
}

/* Aplikasi Dress Code */
.dresscode-container {
    padding: 20px;
    text-align: center;
}

.dresscode-image {
    width: 100%;
    max-width: 250px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dresscode-container h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.dresscode-container p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}

.color-palette {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
    margin-bottom: 8px;
}

.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.palette-label {
    font-size: 0.8rem !important;
    color: #888 !important;
}

/* ======================================================= */
/* STYLE UNTUK TOMBOL SOSIAL MEDIA MEMPELAI            */
/* ======================================================= */
.social-links {
    margin-top: 15px;
    /* Jarak dari teks di atasnya */
    display: flex;
    justify-content: center;
    /* Posisikan di tengah */
    gap: 12px;
    /* Jarak antar ikon jika ada lebih dari satu */
}

.social-link {
    display: inline-flex;
    width: 36px;
    /* Ukuran tombol */
    height: 36px;
    /* Ukuran tombol */
    border-radius: 50%;
    /* Membuatnya bulat sempurna */
    color: white;
    font-size: 1.1rem;
    /* Ukuran ikon di dalam */
    text-decoration: none;
    /* Hilangkan garis bawah link */

    /* Menengahkan ikon di dalam lingkaran */
    align-items: center;
    justify-content: center;

    transition: transform 0.2s ease;
}

.social-link:hover {
    transform: scale(1.1);
    /* Efek zoom saat disentuh */
}

/* ======================================================= */
/* STYLE UNTUK SKELETON LOADER (EFEK SHIMMER BARU)     */
/* ======================================================= */

/* Keyframes baru untuk efek shimmer (gelombang) */
@keyframes shimmer {
    0% {
        background-position: -468px 0;
        /* Mulai dari kiri */
    }

    100% {
        background-position: 468px 0;
        /* Bergerak ke kanan */
    }
}

/* Style .skeleton yang baru */
.skeleton {
    animation: shimmer 1s linear infinite;
    background-color: #f0f0f0;
    /* Warna dasar blok */

    /* Ini adalah "gelombang" cahayanya */
    background-image: linear-gradient(to right,
            #f0f0f0 0%,
            #e4e4e4 40%,
            /* Warna gelombang (sedikit lebih terang) */
            #f0f0f0 60%,
            #f0f0f0 100%);
    background-repeat: no-repeat;
    background-size: 800px 104px;
    /* Ukuran gelombangnya (buat lebih besar dari blok) */
    opacity: 1;
    /* Tidak perlu transparan lagi */
    position: relative;
}

/* Kode di bawah ini biarkan sama seperti sebelumnya */
.skeleton-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-text {
    height: 12px;
    border-radius: 4px;
    margin-bottom: 6px;
    /* Kita pindahkan warna dasar ke .skeleton */
}

.skeleton-name {
    width: 30%;
}

.skeleton-line1 {
    width: 80%;
}

.skeleton-line2 {
    width: 60%;
}

/* ======================================================= */
/* BARU: CONTAINER SCROLL UNTUK APLIKASI LAIN         */
/* ======================================================= */
.app-scrollable-content {
    flex-grow: 1;
    /* Mengisi sisa ruang yang ada */
    overflow-y: auto;
    /* Membuat HANYA area ini yang bisa di-scroll */
    padding: 20px;
    /* Memberi padding seperti sebelumnya */
}
