/* RESET & BASE STYLES */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body { 
    font-family: 'Poppins', sans-serif; 
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url("../images/hero.jpeg") center center/cover no-repeat; 
    height: 100vh; 
    overflow: hidden; /* Mutlak dikunci biar anti-scroll pas tombol kabur */
    display: flex; 
    justify-content: center; 
    align-items: center; 
}

/* GLASSMORPHISM CONTAINER */
.container { 
    background: rgba(255, 255, 255, 0.22); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 35px 25px; 
    border-radius: 20px; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.3); 
    text-align: center;
    max-width: 90%; 
    width: 380px; 
    min-height: 380px; /* Tambahkan ini agar tinggi kotak stabil dan estetik */
    color: #ffffff;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.4s ease-in-out;
}


.header-title {
    color: #ffd700;
    font-size: 22px;
    letter-spacing: 2px;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    font-weight: 600;
}

.gift-icon {
    font-size: 45px;
    margin-bottom: 15px;
    display: inline-block;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

h2 {
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 600;
}

.sub-text {
    font-size: 14px;
    color: #f0f0f0;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* BUTTONS */
.button-area { 
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 10px;
}


.btn { 
    border: none; 
    padding: 12px 35px; 
    font-size: 15px; 
    font-weight: 600;
    border-radius: 25px; 
    cursor: pointer; 
    transition: transform 0.1s ease, background 0.3s ease; 
    width: 180px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-family: 'Poppins', sans-serif;
}

#open {
    background-color: #e67e22; 
    color: white; 
}

#open:hover { 
    background-color: #d35400;
    transform: scale(1.05); 
}

#later {
    background-color: #ffffff; 
    color: #333333; 
    /* Transisi meluncur smooth saat kabur */
    transition: left 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                top 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                transform 0.1s ease;
}

/* HIDDEN STEPS STRUCT */
.hidden-step {
    display: none !important;
}

/* LOADING COMPONENT */
.progress-container {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    margin: 25px 0 15px 0; /* Mengatur jarak atas dan bawah bar agar rapi */
    overflow: hidden;
}


.progress-bar {
    width: 0%;
    height: 12px;
    background-color: #ffd700;
    box-shadow: 0 0 10px #ffd700;
    transition: width 0.1s linear;
}

#persen {
    font-weight: 600;
    font-size: 16px;
}

/* GALERI FOTO & TEKS CERITA */
.frame-foto {
    width: 100%;
    height: 250px;
    border-radius: 15px;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* GANTI BAGIAN .frame-foto img DENGAN KODE INI */
/* GANTI BAGIAN .frame-foto img DI CSS KAMU DENGAN INI */
.frame-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Durasi transisi disetel 0.4s (400ms) */
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
    opacity: 1;
    transform: scale(1);
}

/* GANTI BAGIAN .frame-foto img.fade-out DENGAN INI */
.frame-foto img.fade-out {
    opacity: 0;
    /* Diubah dari 0.96 ke 0.90 agar efek mengecil pas menghilang lebih terasa sinematik */
    transform: scale(0.90); 
}



.sub-text-cerita {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 25px;
    min-height: 75px; /* Memberi ruang kosong setinggi 3 baris teks agar kartu tetap stabil saat mengetik */
    font-weight: 400;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}


.btn-next {
    background-color: #ffd700;
    color: #333;
    border: none;
    padding: 10px 30px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: transform 0.2s;
    font-family: 'Poppins', sans-serif;
}
.btn-next:hover { transform: scale(1.05); }

/* ANIMASI JATUH HATI */
.heart { 
    position: fixed; 
    top: -10%; 
    color: #ff4d6d; 
    font-size: 20px; 
    user-select: none; 
    z-index: 1; 
    animation: fall linear infinite; 
}

/* KEYFRAMES */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes zoomIn {
    from { transform: scale(1.1); opacity: 0.7; }
    to { transform: scale(1); opacity: 1; }
}
@keyframes fall { 
    0% { top: -10%; transform: translateX(0) rotate(0deg); } 
    100% { top: 110%; transform: translateX(120px) rotate(360deg); } 
}
