:root {
    --primary-color: #3f136d; 
    --text-color: #ffffff;
    --accent-color: #ffd700;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--primary-color);
    color: var(--text-color);
    overflow-x: hidden;
}
.hidden { display: none !important; }

/* BACKGROUND LOOP */
.bg-loop {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    object-fit: cover; z-index: -1; opacity: 0.5; pointer-events: none;
}
.video-pc-only { display: block; }
.video-hp-only { display: none; }

/* ==================================
   COVER & KOTAK UTAMA (Transisi Diperhalus)
   ================================== */
.cover-container {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    display: flex; justify-content: center; align-items: center;
    z-index: 9999; background-color: rgba(63, 19, 109, 0.4);
    transition: opacity 1.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 1.8s ease;
}

.cover-elements-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 1.2s ease;
    z-index: 20;
    width: 100%;
}

.corporate-logo {
    max-width: 135px;
    margin-bottom: -5px; 
    z-index: 25;
}

/* KOTAK UTAMA */
.cover-content {
    background: rgba(52, 16, 92, 0.85); 
    border: 2px solid var(--accent-color);
    border-radius: 20px;
    width: 82vw; 
    max-width: 330px; 
    height: auto; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    position: relative;
    box-shadow: 0px 10px 30px rgba(0,0,0,0.6);
    padding: 20px 0;
}

.inner-padding-content {
    width: 88%; 
    display: flex; 
    flex-direction: column;
    align-items: center; 
    justify-content: center; 
    text-align: center; 
}

.title-image { 
    max-width: 72%; 
    height: auto;
    margin-bottom: 35px; 
}

.cover-text-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 35px; 
}

.date-text { 
    font-size: 0.78rem; 
    color: #dedede; 
}

.honorable { 
    font-size: 0.95rem; 
    font-weight: 400; 
    color: #ffffff; 
}

.guest-name { 
    font-family: 'Cinzel Decorative', serif;
    font-weight: 700; 
    font-size: 1.15rem; 
    color: var(--accent-color); 
}

/* TOMBOL "OPEN THE DOOR" */
button, .link-btn {
    background-color: rgba(63, 19, 109, 0.95); 
    color: var(--accent-color); 
    border: 2px solid var(--accent-color);
    padding: 8px 20px; 
    font-size: 0.85rem; 
    font-weight: 600;
    border-radius: 30px; 
    cursor: pointer; 
    box-shadow: 0px 4px 15px rgba(0,0,0,0.5);
    text-decoration: none; 
    display: inline-block; 
    font-family: 'Poppins', sans-serif;
    z-index: 50;
}
.submit-btn { width: 100%; font-size: 1.1rem; margin-top: 10px; }

/* VIDEO GERBANG & MUSIK */
.door-video {
    position: absolute; top: 0; left: 0; width: 100vw; height: 100vh;
    object-fit: cover; z-index: 10; display: none; opacity: 0; transition: opacity 1.5s ease;
}
#music-control {
    position: fixed; bottom: 20px; right: 20px; background-color: var(--accent-color);
    color: var(--primary-color); width: 45px; height: 45px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center; font-size: 1.3rem;
    cursor: pointer; z-index: 10000; animation: spin 4s linear infinite;
}

/* ANIMASI UMUM */
@keyframes spin { 100% { transform: rotate(360deg); } }
.fade-in-up { animation: fadeInUp 1.2s ease forwards; opacity: 0; transform: translateY(20px); }
.delay-1 { animation-delay: 0.3s; }
.pulse-btn { animation: pulse 2s infinite; }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(255, 215, 0, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

/* ==================================
   HALAMAN UTAMA (SCROLLING SECTIONS)
   ================================== */
#main-invitation {
    position: relative; z-index: 5; padding: 40px 0 60px 0;
}

.section-page {
    min-height: auto; padding: 30px 20px;
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; text-align: center;
}

h2 { 
    font-family: 'Cinzel Decorative', serif; font-weight: 700;
    font-size: 2.2rem; color: var(--accent-color); margin-bottom: 20px; 
}
.card { background-color: rgba(0,0,0,0.5); border: 1px solid var(--accent-color); border-radius: 15px; padding: 25px; width: 100%; max-width: 600px; margin-bottom: 10px; }
.fade-on-scroll { opacity: 0; transform: translateY(40px); transition: all 1s ease-out; }
.fade-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* ==========================================
   REVISI 1: COUNTDOWN BERDERET 4 DALAM 1 BARIS
   ========================================== */
.countdown-container {
    display: flex;
    gap: 6px; /* Mengurangi jarak antar kotak agar muat di layar HP */
    justify-content: center;
    flex-wrap: nowrap; /* Mencegah kotak turun ke baris bawah */
    width: 100%;
}

.time-box {
    background-color: rgba(0,0,0,0.6);
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    padding: 8px 4px; /* Padding lebih ramping */
    min-width: 65px;  /* Lebar minimal diperkecil agar 4 box muat sejajar */
    flex: 1;
}

.time-box span { 
    font-size: 1.4rem; /* Angka disesuaikan agar pas di HP */
    font-weight: 600; 
    color: var(--accent-color); 
}

.time-box p {
    font-size: 0.75rem; /* Label Hari/Jam/Menit/Detik */
}


/* ==========================================
   REVISI 2: ICON GAMES, AWARDING, DOORPRIZE MASUK DALAM KOTAK
   ========================================== */
/* Sesuaikan card dresscode agar aman menampung badge di dalamnya */
.section-page .card { 
    background-color: rgba(0,0,0,0.5); 
    border: 1px solid var(--accent-color); 
    border-radius: 15px; 
    padding: 20px 15px; /* Mengurangi padding samping agar lebih lega */
    width: 100%; 
    max-width: 600px; 
    margin-bottom: 10px; 
    overflow: hidden; /* Mencegah elemen anak keluar dari garis border */
}

/* Penyesuaian Grid Badge agar pas di dalam card */
.event-highlights-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px; /* Jarak antar badge dirapatkan */
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 215, 0, 0.3);
    width: 100%;
}

.highlight-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    max-width: 31%; /* Membatasi lebar maksimal tiap item agar tidak saling dorong */
}

.highlight-icon {
    width: 85px;  /* Ukuran diperkecil agar pas dan tidak meluber keluar card */
    height: 85px;
    object-fit: contain;
    margin-bottom: 4px;
    filter: drop-shadow(0px 2px 5px rgba(0,0,0,0.5));
}

.highlight-label {
    font-size: 0.72rem; /* Ukuran teks label disesuaikan */
    font-weight: 600;
    color: var(--accent-color);
    letter-spacing: 0.2px;
}

/* LOKASI MAPS */
.map-title { font-size: 1.1rem; font-weight: 600; color: var(--accent-color); margin-top: 20px; }
.map-address { font-size: 0.8rem; line-height: 1.4; color: #ddd; margin: 8px 0 20px 0; }

/* DRESSCODE */
.dresscode-main { font-size: 1.5rem; font-weight: 600; color: var(--text-color); margin-bottom: 5px; }
.dresscode-sub { font-size: 0.9rem; font-style: italic; color: #ccc; }

/* FORM RSVP & DESKRIPSI */
.rsvp-desc { font-size: 1rem; line-height: 1.5; color: #eee; margin-bottom: 20px; }
form { display: flex; flex-direction: column; gap: 15px; }
input, select, textarea {
    width: 100%; padding: 12px; border-radius: 8px; border: 1px solid var(--accent-color);
    background: rgba(255,255,255,0.9); color: #333; font-family: 'Poppins', sans-serif;
}
textarea { resize: none; height: 100px; }

/* STATISTIK & BUKU TAMU */
.stats-container { display: flex; gap: 15px; width: 100%; max-width: 600px; margin-top: 20px; }
.stat-box { flex: 1; padding: 15px; border-radius: 10px; color: #fff; text-align: center; font-weight: bold; }
.stat-box.green { background-color: rgba(46, 204, 113, 0.8); border: 2px solid #27ae60; }
.stat-box.yellow { background-color: rgba(241, 196, 15, 0.8); border: 2px solid #f39c12; color: #333; }
.stat-box.red { background-color: rgba(231, 76, 60, 0.8); border: 2px solid #c0392b; }
.stat-box h3 { font-size: 2rem; margin-bottom: 5px; }

.guestbook-list {
    width: 100%; max-width: 600px; margin-top: 30px; text-align: left;
    max-height: 400px; overflow-y: auto; padding-right: 10px;
}
.guest-item { background: rgba(0,0,0,0.6); border-left: 4px solid var(--accent-color); padding: 15px; margin-bottom: 15px; border-radius: 5px; }
.guest-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 5px;}
.g-name { font-weight: bold; color: var(--accent-color); font-size: 1.1rem; }
.g-badge { font-size: 0.8rem; padding: 3px 8px; border-radius: 20px; color: #fff; font-weight: 600; }
.bg-hadir { background: #2ecc71; } .bg-mungkin { background: #f1c40f; color: #333;} .bg-tidak { background: #e74c3c; }

/* PENUTUP & SPONSOR */
.closing-text { font-size: 1.2rem; font-weight: 300; max-width: 600px; margin: 0 auto 30px auto; line-height: 1.5; }
.closing-logo { max-width: 200px; margin-bottom: 40px; }
.sponsors-section p { font-size: 0.9rem; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 15px; color: #aaa;}

/* PENGATURAN GRID SPONSOR & NAMA SPONSOR */
.sponsor-grid {
    display: flex; flex-wrap: nowrap; justify-content: center; gap: 15px; max-width: 700px;
}
.sponsor-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.sponsor-img {
    width: 80px; height: 80px; object-fit: contain; 
    background: rgba(255,255,255,0.1); border-radius: 10px; padding: 5px;
    margin-bottom: 5px;
}
.sponsor-name {
    font-size: 0.85rem;
    font-weight: bold;
    color: #ffffff;
}

/* MEDIA QUERIES UNTUK HP */
@media (max-width: 768px) {
    .video-pc-only { display: none; }
    .video-hp-only { display: block; }
    
    .sponsor-grid { flex-wrap: wrap; gap: 10px; }
    .sponsor-item {
        width: calc(25% - 10px);
    }
    .sponsor-img {
        width: 100%;
        height: auto; aspect-ratio: 1/1; 
    }
}
.countdown-section-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1s ease;
}

.countdown-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.5s ease, transform 1.5s ease;
}

.countdown-fade-in.show-countdown {
    opacity: 1;
    transform: translateY(0);
}

/* Jarak sekitar 4x enter untuk logo di bawah kotak utama sampul */
.bottom-cover-logo {
    max-width: 100px;
    height: auto;
    margin-top: 60px;
    z-index: 25;
}

/* Styling Grid untuk Icon Games, Awarding, Doorprize di Section Dresscode (Aman di Dalam Card) */
.event-highlights-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px; 
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 215, 0, 0.3);
    width: 100%;
}

.highlight-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    max-width: 31%;
}

.highlight-icon {
    width: 65px;  /* Ukuran diperkecil agar pas berdampingan 3 buah di dalam card HP/PC */
    height: 65px;
    object-fit: contain;
    margin-bottom: 4px;
    filter: drop-shadow(0px 2px 5px rgba(0,0,0,0.5));
}

.highlight-label {
    font-size: 0.7rem; /* Ukuran teks label proporsional */
    font-weight: 600;
    color: var(--accent-color);
    letter-spacing: 0.2px;
}