/* --- GLOBAL STYLES & ANIMATED BACKGROUND --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Poppins', sans-serif;
    color: white;
    overflow: hidden;
    height: 100vh; width: 100vw;
    /* Animasi Gradasi Biru Langit ke Biru Laut */
    background: linear-gradient(-45deg, #4fc3f7, #0288d1, #01579b, #001f3f);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    position: relative;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Partikel Melayang (Bubbles) */
#particles { position: absolute; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    animation: floatUp infinite linear;
    box-shadow: 0 0 10px rgba(255,255,255,0.2);
}
@keyframes floatUp {
    from { transform: translateY(100vh) scale(0); opacity: 1; }
    to { transform: translateY(-10vh) scale(1.5); opacity: 0; }
}

/* --- SLIDE CONTAINER (Efek Smooth Transition) --- */
.slide {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden;
    transform: scale(0.95); /* Efek zoom in pelan */
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px; text-align: center;
    z-index: 1;
}
.slide.active {
    opacity: 1; visibility: visible;
    transform: scale(1);
    z-index: 10;
}

/* --- TYPOGRAPHY --- */
.cursive { font-family: 'Caveat', cursive; font-size: 4.5em; text-shadow: 2px 2px 8px rgba(0,0,0,0.3); margin-bottom: 10px; }
.date { font-size: 0.9em; letter-spacing: 4px; margin-bottom: 20px; opacity: 0.9; font-weight: 600; text-shadow: 1px 1px 2px rgba(0,0,0,0.2); }
.subtitle { font-size: 1.2em; font-weight: 300; margin-bottom: 30px; text-shadow: 1px 1px 3px rgba(0,0,0,0.2); }

/* --- GLASSMORPHISM BUTTONS --- */
.next-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white; font-family: 'Poppins', sans-serif; font-size: 1.1em; font-weight: 600;
    padding: 12px 35px; border-radius: 50px;
    cursor: pointer; transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    margin-top: 30px;
}
.next-btn:hover { background: rgba(255, 255, 255, 0.25); transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.3); }

/* --- SLIDE 1: ANIMASI AMPLOP PUTIH --- */
.envelope-wrapper { position: relative; cursor: pointer; transition: transform 0.8s ease; }
.envelope {
    width: 320px; height: 210px;
    background: #f4f4f4;
    position: relative;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    border-radius: 6px;
}
.flap {
    position: absolute; top: 0; left: 0;
    width: 0; height: 0;
    border-left: 160px solid transparent; border-right: 160px solid transparent;
    border-top: 110px solid #e0e0e0;
    transform-origin: top;
    transition: transform 0.6s ease 0.8s;
    z-index: 4;
}
.envelope-front {
    position: absolute; bottom: 0; left: 0;
    width: 0; height: 0;
    border-left: 160px solid transparent; border-right: 160px solid transparent;
    border-bottom: 110px solid #ffffff;
    z-index: 3;
}
.letter-inside {
    position: absolute; top: 15px; left: 20px; right: 20px; bottom: 15px;
    background: repeating-linear-gradient(#fff, #fff 24px, #f0f0f0 25px);
    border-radius: 5px; box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 2; transition: transform 0.6s ease 1.4s;
}
.click-hint { margin-top: 40px; font-size: 1em; font-weight: 300; letter-spacing: 2px; animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 0.5; } 50% { opacity: 1; } 100% { opacity: 0.5; } }

/* Animasi Buka Amplop */
.envelope-wrapper.move-up { transform: translateY(-100px); }
.envelope-wrapper.move-up .flap { transform: rotateX(180deg); z-index: 1;}
.envelope-wrapper.move-up .letter-inside { transform: translateY(-80px); }

/* --- FOTO CETAK (POLAROID GACOR) --- */
.gallery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; max-width: 550px; }
.polaroid {
    background: white; padding: 12px 12px 35px 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    border-radius: 4px;
    transform: rotate(-4deg); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.polaroid:nth-child(even) { transform: rotate(4deg); }
.polaroid:hover { transform: scale(1.1) rotate(0); z-index: 5; box-shadow: 0 15px 35px rgba(0,0,0,0.5); }
.img-wrapper { width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background: #ddd; }
.img-wrapper img { width: 100%; height: 100%; object-fit: cover; }

/* --- SURAT (GLASS KERTAS) --- */
.paper-letter {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    color: #333; padding: 45px 40px; border-radius: 12px;
    max-width: 650px; width: 90%; text-align: justify;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    font-size: 1.05em; line-height: 1.7; position: relative;
}
.paper-letter p { margin-bottom: 20px; }
.signature { font-family: 'Caveat', cursive; font-size: 1.8em; text-align: right; color: #01579b; margin-top: 10px; font-weight: bold;}

/* --- SONG PLAYER (MODERN GLASS) --- */
.music-player.glass-effect {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 25px; border-radius: 20px;
    display: flex; align-items: center; gap: 25px;
    width: 90%; max-width: 450px; margin-top: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}
.vinyl-record {
    width: 90px; height: 90px; background: #111;
    border-radius: 50%; border: 4px solid #333;
    display: flex; justify-content: center; align-items: center;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
    /* Animasi putar */
    animation: spin 4s linear infinite;
}
.album-center { width: 30px; height: 30px; background: #ff4757; border-radius: 50%; border: 3px solid #111; }
@keyframes spin { 100% { transform: rotate(360deg); } }
.song-info { text-align: left; flex-grow: 1; }
.song-title { font-size: 1.3em; font-weight: 600; margin-bottom: 5px; }
.artist { font-size: 0.9em; opacity: 0.8; }
.progress-bar { width: 100%; height: 5px; background: rgba(255,255,255,0.2); margin-top: 15px; border-radius: 3px; overflow: hidden; }
.progress { width: 45%; height: 100%; background: #36d1dc; box-shadow: 0 0 10px #36d1dc;}

@media (max-width: 480px) {
    .cursive { font-size: 3.5em !important; }
    .paper-letter { padding: 30px 20px; font-size: 0.9em; }
    .envelope { width: 280px; height: 180px; }
    .flap { border-left-width: 140px; border-right-width: 140px; border-top-width: 95px; }
    .envelope-front { border-left-width: 140px; border-right-width: 140px; border-bottom-width: 95px; }
}