* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Segoe UI', system-ui, sans-serif;
    color: white;
    background: radial-gradient(circle at top, #2b0721, #0e0e0e);
    overflow-x: hidden;
}

/* Ambient background */
.bg-ambient {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 10%, rgba(255,80,120,0.18), transparent 45%),
        radial-gradient(circle at 80% 90%, rgba(255,140,180,0.12), transparent 45%);
    animation: pulse 8s ease-in-out infinite;
    z-index: -1;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Header */
.story-header {
    text-align: center;
    padding: 48px 24px 24px;
}

.story-header h1 {
    margin: 0;
    font-size: 36px;
    color: #ff8fab;
}

.story-header p {
    margin-top: 10px;
    font-size: 14px;
    opacity: 0.7;
}

/* Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 42px;
    padding: 32px 20px 60px;
}

/* Card */
.card {
    position: relative;
    padding: 24px;
    border-radius: 24px;

    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    box-shadow:
        0 20px 50px rgba(255, 50, 100, 0.25),
        inset 0 0 0 1px rgba(255,255,255,0.1);

    animation: fadeUp 0.8s ease forwards;
}

/* Year badge */
.year {
    position: absolute;
    top: -14px;
    left: 20px;
    padding: 6px 14px;
    border-radius: 999px;

    background: linear-gradient(135deg, #ff4d6d, #ff8fab);
    font-size: 13px;
    font-weight: 600;
}

/* Slider container */
.slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 18px;
}

/* Slides wrapper */
.slides {
    display: flex;
    transition: transform 0.4s ease;
}

/* Each slide */
.slide {
    min-width: 100%;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
    min-width: 100%;
    height: 500px;               /* ⬅️ wajib */
    object-fit: contain;
}

/* Navigation buttons */
.nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    width: 40px;
    height: 40px;
    border-radius: 50%;

    background: rgba(0,0,0,0.45);
    color: white;
    border: none;

    font-size: 22px;
    cursor: pointer;
    z-index: 10;

    display: flex;
    align-items: center;
    justify-content: center;
}

.nav.prev { left: 10px; }
.nav.next { right: 10px; }

/* Hide nav if only 1 slide */
.slider.single .nav {
    display: none;
}

/* Text */
.text {
    font-size: 15px;
    line-height: 1.7;
    opacity: 0.9;
}

/* Footer */
.end-note {
    text-align: center;
    padding: 40px 24px 80px;
    font-size: 16px;
    color: #ff8fab;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Desktop */
@media (min-width: 768px) {
    .timeline {
        max-width: 700px;
        margin: 0 auto;
    }
}

#hearts-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 10;
}

/* Heart element */
.falling-heart {
    position: absolute;
    top: -60px;

    width: 24px;
    height: 24px;

    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;

    opacity: 0.85;
    animation-name: fall;
    animation-timing-function: linear;
    pointer-events: none;
}
/* Falling animation */
@keyframes fall {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0.9;
    }
    100% {
        transform: translateY(110vh) translateX(40px) rotate(360deg);
        opacity: 0;
    }
}

/* Gift Tab */
.gift-tab {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);

    background: linear-gradient(135deg, #ff4d6d, #ff8fab);
    color: white;

    padding: 14px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;

    box-shadow: 0 12px 30px rgba(255, 80, 120, 0.45);
    cursor: pointer;
    z-index: 100;
    animation: bounceGift 1.8s infinite;
}

@keyframes bounceGift {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-6px); }
}

/* Gift Content */
.gift-content {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, #3b0a2e, #0e0e0e);
    color: white;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;

    padding: 32px;
    z-index: 200;

    opacity: 0;
    transform: scale(0.95);
    transition: all 0.8s ease;
}

.gift-content.show {
    opacity: 1;
    transform: scale(1);
}

.gift-content h2 {
    color: #ff8fab;
    margin-bottom: 16px;
}

.gift-content p {
    font-size: 16px;
    line-height: 1.7;
    max-width: 420px;
}

/* Utility */
.hidden {
    display: none;
}