/* ===========================
   Base & Reset
   =========================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Poppins', sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }

/* ===========================
   Global Aesthetic Scrapbook Background (DI-UPGRADE)
   =========================== */
.animated-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    /* Gradasi warna dipertajam agar tidak terlihat seperti putih polos */
    background: linear-gradient(-45deg, #FFE4E8, #FFC0CB, #FFD1DC, #FFF0F2);
    background-size: 400% 400%;
    animation: gradientFlow 12s ease infinite; /* Durasi dipercepat agar alirannya terasa */
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Tekstur Kertas Kotak-Kotak Jurnal (Grid Paper Effect) */
.scrapbook-grid {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    /* Opacity garis dinaikkan ke 0.15 dan pakai warna maroon agar garisnya jelas */
    background-image: 
        linear-gradient(to right, rgba(122, 12, 30, 0.15) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(122, 12, 30, 0.15) 1px, transparent 1px);
    background-size: 28px 28px; 
}

/* ===========================
   Paper Texture
   =========================== */
.paper-texture {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%237a0c1e' fill-opacity='0.05'%3E%3Cpath opacity='.5' d='M96 95h4v1h-4v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h4v1h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9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9z'/%3E%3Cpath d='M6 5V0H5v5H0v1h5v94h1V6h94V5H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ===========================
   Loading & UI Elements
   =========================== */
.loading-dot { animation: loadingBounce 1.4s ease-in-out infinite; }
.loading-dot:nth-child(1) { animation-delay: 0s; }
.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes loadingBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.washi-tape {
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
    transform: rotate(-1.5deg);
    opacity: 0.95;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}
.washi-pink { background-color: #FFB6C1; background-image: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255,255,255,0.4) 5px, rgba(255,255,255,0.4) 10px); }
.washi-yellow { background-color: #7A0C1E; color: #FFF; }
.washi-blue { background-color: #FF6B8B; background-image: repeating-linear-gradient(-45deg, transparent, transparent 5px, rgba(255,255,255,0.4) 5px, rgba(255,255,255,0.4) 10px); }
.washi-rainbow { background: linear-gradient(90deg, #7A0C1E, #FF6B8B, #FFB6C1, #FFE4E8, #7A0C1E); }

.tape { height: 24px; opacity: 0.85; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.tape-pink { background: linear-gradient(180deg, #FFB6C1 0%, #FF9EA2 100%); }
.tape-yellow { background: linear-gradient(180deg, #7A0C1E 0%, #5C0512 100%); }
.tape-blue { background: linear-gradient(180deg, #FF6B8B 0%, #E04D6E 100%); }

.question-card { box-shadow: 0 20px 50px rgba(122, 12, 30, 0.12); }
.question.hidden { display: none; }
.question.active { display: block; }
.color-option { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.color-option:hover { transform: scale(1.1); }
.color-option.selected { transform: scale(1.2); box-shadow: 0 0 0 4px rgba(255,255,255,0.9), 0 0 15px rgba(122, 12, 30, 0.3); }

/* ===========================
   Gift Box & Cards
   =========================== */
.gift-wrapper { perspective: 1000px; }
.gift-lid { transform-style: preserve-3d; transform-origin: bottom center; }

.polaroid {
    background: #ffffff;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05), 0 2px 6px rgba(0,0,0,0.03);
}
.polaroid:hover {
    transform: scale(1.04) translateY(-12px) rotate(0deg) !important;
    box-shadow: 0 30px 50px rgba(122, 12, 30, 0.15), 0 5px 15px rgba(0,0,0,0.08);
    z-index: 10;
}
.polaroid-image img { transition: transform 0.6s ease; filter: saturate(1.05) contrast(1.02); }
.polaroid:hover .polaroid-image img { transform: scale(1.08); }

.sticky-note {
    background: linear-gradient(135deg, #FFE4E8 0%, #FFB6C1 100%);
    box-shadow: 3px 5px 15px rgba(122, 12, 30, 0.08);
    transition: transform 0.3s ease;
}
.sticky-note:hover { transform: scale(1.05) rotate(0deg) !important; z-index: 10; }
.sticky-note::before {
    content: ''; position: absolute; top: 0; right: 20px; width: 0; height: 0;
    border-style: solid; border-width: 0 25px 25px 0; border-color: transparent #FFA4B2 transparent transparent;
}

.love-item { transition: all 0.3s ease; }
.love-item:hover {
    transform: translateX(10px) !important; background: rgba(255,255,255,0.95);
    box-shadow: 0 8px 25px rgba(122, 12, 30, 0.08);
}

/* ===========================
   Animations
   =========================== */
.flame { filter: blur(0.5px); box-shadow: 0 0 12px rgba(255, 107, 139, 0.8); }
@keyframes flicker {
    0%, 100% { transform: translateX(-50%) scale(1) rotate(-1deg); }
    50% { transform: translateX(-50%) scale(0.95, 1.05) rotate(1deg); }
}
.animate-flicker { animation: flicker 0.4s ease-in-out infinite alternate; }

@keyframes heartbeat {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0px rgba(122,12,30,0)); }
    15% { transform: scale(1.15); filter: drop-shadow(0 0 15px rgba(255,107,139,0.6)); }
    30% { transform: scale(1); filter: drop-shadow(0 0 0px rgba(122,12,30,0)); }
    45% { transform: scale(1.15); filter: drop-shadow(0 0 15px rgba(255,107,139,0.6)); }
}
.animate-heartbeat { animation: heartbeat 1.6s ease-in-out infinite; }

.animate-float { animation: float 6s ease-in-out infinite; }
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(4deg); }
}

.confetti-piece { position: absolute; animation: confettiFall linear forwards; z-index: 100; }
@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
    100% { transform: translateY(120vh) rotate(720deg) scale(0.5); opacity: 0; }
}

.flower-petal { position: absolute; animation: petalFloat cubic-bezier(0.1, 0.8, 0.3, 1) forwards; z-index: 99; }
@keyframes petalFloat {
    0% { transform: translateY(0) rotate(0deg) scale(0); opacity: 0; }
    15% { transform: translateY(-80px) rotate(45deg) scale(1.3); opacity: 1; }
    100% { transform: translateY(100vh) rotate(360deg) scale(0.7); opacity: 0; }
}

.heart-burst { animation: heartBurst cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; filter: drop-shadow(0 0 10px rgba(255, 107, 139, 0.5)); }
@keyframes heartBurst {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    35% { transform: translate(var(--tx), var(--ty)) scale(1.4); opacity: 1; }
    100% { transform: translate(calc(var(--tx) * 1.3), calc(var(--ty) * 1.3 + 120px)) scale(0); opacity: 0; }
}

.album-cover {
    position: relative; background: linear-gradient(135deg, #ffffff 0%, #FFF5F6 100%);
    box-shadow: 0 30px 60px rgba(122, 12, 30, 0.15), inset 0 0 20px rgba(255,255,255,0.6);
}
.album-cover::before {
    content: ''; position: absolute; left: -4px; top: 5%; bottom: 5%; width: 8px;
    background: linear-gradient(90deg, #7A0C1E, #FF6B8B, #7A0C1E); border-radius: 4px; box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

/* ===========================
   Images & Icons Styling
   =========================== */
.sticker, .doodle-star, .doodle-heart, .doodle-sparkle, .doodle-arrow {
    filter: drop-shadow(2px 4px 6px rgba(122, 12, 30, 0.15));
    pointer-events: none;
}
.decorative-corner { opacity: 0.7; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #FFF5F6; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #7A0C1E 0%, #FF6B8B 100%); border-radius: 5px; border: 2px solid #FFF5F6; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #5C0512 0%, #E04D6E 100%); }
::selection { background: #FFB6C1; color: #4A000B; }
input:focus, button:focus { box-shadow: 0 0 0 4px rgba(122, 12, 30, 0.25); }

@media (max-width: 640px) {
    .polaroid-image { height: 160px; }
    .polaroid { padding: 10px; }
    .polaroid-small .polaroid-image { height: 120px; }
    .gift-body { width: 160px; height: 130px; }
    .gift-lid { width: 170px; height: 45px; top: -45px; }
    .bow-loop-left, .bow-loop-right { width: 25px; height: 25px; }
}

.scroll-indicator { animation: fadeInUp 1s ease-out 0.5s both; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }