* {
    box-sizing: border-box;
}

/* Body & basic styling */
html,
body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #ffdde1, #ee9ca7);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
}

/* Lock Screen */
.lock-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #ffdde1, #ee9ca7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lock-box {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 350px;
}

.lock-box h2 {
    color: #e75480;
    margin-bottom: 10px;
}

.lock-box input {
    width: 100%;
    padding: 14px;
    margin: 15px 0;
    border-radius: 12px;
    border: 1px solid #ccc;
    font-size: 16px;
}

.lock-box button {
    width: 100%;
    background-color: #e75480;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
}

#error-message {
    color: red;
    font-size: 0.9rem;
}

/* Progress Dots */
.progress-dots {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);

    display: flex;
    gap: 8px;

    z-index: 1000;
    pointer-events: none;
    /* prevents blocking swipes */
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.4);
    transition: all 0.15s ease;
}

.dot.active {
    width: 20px;
    /* pill shape for active */
    border-radius: 10px;
    background: white;
}


/* Carousel of Memory Cards */
.carousel {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    height: 100dvh;
    width: 100%;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
    touch-action: pan-x;
    gap: 0;
    padding: 0;
}

.carousel::-webkit-scrollbar,
.image-slider::-webkit-scrollbar {
    display: none;
}

.carousel,
.image-slider {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.note-card {
    background: linear-gradient(135deg, #e75480, #ff9a9e);
}

.note-content {
    padding: 40px 25px;
    max-width: 600px;
    text-align: center;
}

.note-card h2 {
    color: white;
    margin-bottom: 25px;
}

.memory-card:first-child {
    background: linear-gradient(135deg, #e75480, #ff9a9e);
}

.memory-card:first-child h2,
.memory-card:first-child .memory-text {
    color: rgb(54, 33, 33);
}

.memory-card {
    flex: 0 0 100%;
    height: 100dvh;
    scroll-snap-align: start;
    scroll-snap-stop: always;

    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;

    padding-top: 60px;
    padding-bottom: 40px;
    padding-left: 20px;
    padding-right: 20px;
    background: linear-gradient(135deg, #ffdde1, #ee9ca7);
    text-align: center;
}

.memory-card h2 {
    color: rgb(70, 40, 40);
    font-size: 1.6rem;
    margin-bottom: 8px;
    line-height: 1.2;
}

.memory-card .memory-text {
    color: rgb(138, 84, 84);
    font-size: 1rem;
    max-width: 420px;
    margin-bottom: 12px;
    line-height: 1.6;
}

.memory-card p {
    font-weight: bold;
    line-height: 1.4;
    color: #c0456a;
    margin-bottom: 6px;
}

.memory-card p:not(:first-child) {
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.memory-meta {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(6px);
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.ending-card {
    background: linear-gradient(135deg, #ff9a9e, #fad0c4);
}

.ending-card h2,
.ending-card .memory-text {
    color: rgb(87, 59, 59);
}

/* Image slider inside each card */
.image-slider {
    display: flex;
    overflow-x: auto;

    scroll-padding-left: 0;
    scroll-padding-right: 0;
    scroll-snap-type: x mandatory;
    scroll-snap-stop: always;
    -webkit-overflow-scrolling: auto;
    overscroll-behavior: contain;
    scroll-behavior: smooth;

    touch-action: pan-x;
    width: 100%;
    max-width: 500px;
    gap: 0;
    align-items: center;
}

.image-slider img {
    flex: 0 0 100%;
    width: 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    border-radius: 20px;
    height: 60dvh;
    object-fit: contain;
    background-color: black;
}

/* Floating Hearts */
.heart {
    position: fixed;
    bottom: -20px;
    font-size: 24px;
    animation: floatUp 4s linear forwards;
    pointer-events: none;
    z-index: 20;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(-100dvh) scale(1.5);
        opacity: 0;
    }
}