body {
    margin: 0;
    min-height: 100vh;

    background:
        radial-gradient(
            circle at top left,
            rgba(255, 182, 205, 0.45),
            transparent 35%
        ),
        radial-gradient(
            circle at bottom right,
            rgba(255, 218, 233, 0.6),
            transparent 40%
        ),
        linear-gradient(
            135deg,
            #fff8fb,
            #ffe8f0
        );

    background-attachment: fixed;
}


.container{

    width:90%;
    max-width:900px;
    margin:auto;
    padding:30px;

}


h1{

    text-align:center;
    color:#ff4d88;

}


.subtitle{

    text-align:center;
    color:#777;

}



.card{

    background:white;
    padding:25px;
    margin-top:25px;
    border-radius:20px;

    box-shadow:
    0 5px 15px rgba(0,0,0,0.1);

}



.gallery{

    display:flex;
    gap:15px;
    flex-wrap:wrap;

}


.gallery img{

    width:200px;
    height:200px;
    object-fit:cover;
    border-radius:15px;

}



textarea{

    width:100%;
    height:120px;

    border-radius:15px;
    padding:15px;

    border:1px solid #ddd;

    resize:none;

}



button{

    margin-top:15px;

    padding:12px 25px;

    border:none;

    background:#ff4d88;

    color:white;

    border-radius:20px;

    cursor:pointer;

}
input{

    width:100%;
    padding:15px;

    margin-bottom:15px;

    border:1px solid #ddd;
    border-radius:15px;

    box-sizing:border-box;

}


textarea{

    box-sizing:border-box;

}


#messageStatus{

    margin-top:12px;
    color:#ff4d88;

}


.message-item{

    background:#fff0f5;

    padding:15px;
    margin-top:12px;

    border-radius:15px;

}


.message-item h3{

    margin:0 0 8px;
    color:#ff4d88;

}


.message-item p{

    margin:0;
    white-space:pre-wrap;
    overflow-wrap:anywhere;

}


.message-date{

    display:block;

    margin-top:10px;

    color:#888;
    font-size:12px;

}
.gallery{

    display:grid;

    grid-template-columns:
    repeat(auto-fill,minmax(220px,1fr));

    gap:20px;

    margin-top:20px;

}



.gallery img{

    width:100%;

    height:220px;

    object-fit:cover;

    border-radius:15px;

}



.image-card{

    background:white;

    padding:10px;

    border-radius:15px;

    box-shadow:
    0 5px 10px rgba(0,0,0,.1);

}



.image-card p{

    text-align:center;

    margin-top:10px;

}
.delete-picture-button {

    display: block;

    width: 100%;

    margin-top: 10px;

    background: #e63946;

    border-radius: 12px;

}


.delete-picture-button:hover {

    background: #c82333;

}
.memory-list {

    display: grid;

    grid-template-columns:
        repeat(auto-fill, minmax(240px, 1fr));

    gap: 20px;

    margin-top: 20px;

}


.memory-card {

    background: #fff0f5;

    padding: 12px;

    border-radius: 18px;

    box-shadow:
        0 5px 12px rgba(0, 0, 0, 0.1);

}


.memory-card img {

    width: 100%;

    height: 230px;

    object-fit: cover;

    border-radius: 14px;

}


.memory-card h3 {

    color: #ff4d88;

    margin: 12px 0 6px;

}


.memory-card p {

    margin: 0;

    line-height: 1.5;

    white-space: pre-wrap;

    overflow-wrap: anywhere;

}


.memory-date {

    display: block;

    margin-top: 10px;

    color: #888;

    font-size: 12px;

}


#memoryStatus {

    margin-top: 12px;

    color: #ff4d88;

}
.lock-screen {

    position: fixed;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background:
        linear-gradient(
            135deg,
            #ffd6e5,
            #fff0f5
        );

    z-index: 9999;
}


.lock-card {

    width: 100%;
    max-width: 380px;

    padding: 35px;

    background: white;

    border-radius: 25px;

    text-align: center;

    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.15);
}


.lock-card h1 {

    margin: 10px 0;

    color: #ff4d88;
}


.lock-card p {

    color: #777;
}


.lock-heart {

    font-size: 55px;

    animation: heartbeat 1.4s infinite;
}


#passcodeInput {

    width: 100%;

    margin-top: 15px;
    margin-bottom: 5px;

    padding: 14px;

    border: 1px solid #ddd;
    border-radius: 15px;

    text-align: center;

    box-sizing: border-box;
}


#lockStatus {

    min-height: 20px;

    margin-top: 12px;

    color: #e63946;
}


.lock-screen.unlocked {

    animation: unlockScreen 0.6s forwards;
}


@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }

}


@keyframes unlockScreen {

    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        visibility: hidden;
    }

}
/* =========================================
   FALLING HEART BACKGROUND
========================================= */

.heart-background {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.falling-heart{

    position:fixed;

    top:-50px;

    pointer-events:none;

    user-select:none;

    z-index:0;

    animation:heartFall linear forwards;

    filter:drop-shadow(
        0 0 8px rgba(255,255,255,.4)
    );

}

@keyframes heartFall {
    0% {
        transform:
            translateY(-50px)
            rotate(0deg);

        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        transform:
            translateY(110vh)
            rotate(360deg);

        opacity: 0;
    }
}

/* Keep the website above the hearts */

.lock-screen {
    z-index: 9999;
}

#mainWebsite {
    position: relative;
    z-index: 1;
}
/* =========================================
   MEMORY LIGHTBOX
========================================= */

.memory-lightbox {
    position: fixed;
    inset: 0;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(20, 8, 15, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    z-index: 10000;

    opacity: 0;
    transition: opacity 0.3s ease;
}

.memory-lightbox.show {
    display: flex;
    opacity: 1;
}

.memory-lightbox-content {
    position: relative;

    width: 100%;
    max-width: 850px;
    max-height: 90vh;

    overflow-y: auto;

    background: rgba(255, 255, 255, 0.97);

    border-radius: 24px;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.45);

    transform: scale(0.75);
    opacity: 0;

    transition:
        transform 0.35s ease,
        opacity 0.35s ease;
}

.memory-lightbox.show .memory-lightbox-content {
    transform: scale(1);
    opacity: 1;
}

.memory-lightbox-image {
    display: block;

    width: 100%;
    max-height: 65vh;

    object-fit: contain;

    background: #1c1017;

    border-radius: 24px 24px 0 0;
}

.memory-lightbox-details {
    padding: 24px 28px 30px;
    text-align: center;
}

.memory-lightbox-details h2 {
    margin: 0 0 12px;

    color: #ff4d88;
    font-size: 28px;
}

.memory-lightbox-details p {
    margin: 0;

    color: #666;
    line-height: 1.7;
    white-space: pre-wrap;
}

.memory-lightbox-close {
    position: absolute;
    top: 12px;
    right: 14px;

    width: 42px;
    height: 42px;

    border: none;
    border-radius: 50%;

    background: rgba(0, 0, 0, 0.65);
    color: white;

    font-size: 30px;
    line-height: 1;

    cursor: pointer;

    z-index: 2;

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.memory-lightbox-close:hover {
    transform: scale(1.1);
    background: #ff4d88;
}

.memory-card img {
    cursor: zoom-in;
}

body.lightbox-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .memory-lightbox {
        padding: 12px;
    }

    .memory-lightbox-content {
        border-radius: 18px;
    }

    .memory-lightbox-image {
        border-radius: 18px 18px 0 0;
        max-height: 60vh;
    }

    .memory-lightbox-details {
        padding: 20px;
    }

    .memory-lightbox-details h2 {
        font-size: 23px;
    }
}
/* =========================================
   MOBILE DESIGN
========================================= */

@media (max-width: 768px) {

    body {
        overflow-x: hidden;
    }

    #mainWebsite,
    .container {
        width: 100%;
        max-width: 100%;
        padding: 14px;
        box-sizing: border-box;
    }

    h1 {
        font-size: 30px;
        line-height: 1.2;
    }

    h2 {
        font-size: 24px;
    }

    p,
    input,
    textarea,
    button {
        font-size: 16px;
    }

    input,
    textarea,
    button {
        width: 100%;
        box-sizing: border-box;
    }

    button {
        min-height: 48px;
    }

    .memory-list,
    #memoryList,
    .gallery,
    #gallery {
        display: grid;
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .memory-card,
    .image-card {
        width: 100%;
        margin: 0;
        box-sizing: border-box;
    }

    .memory-card img,
    .image-card img {
        width: 100%;
        height: auto;
        max-height: 420px;
        object-fit: cover;
    }

    .lock-card {
        width: 100%;
        max-width: 350px;
        padding: 26px 20px;
        box-sizing: border-box;
    }

    .memory-lightbox {
        padding: 10px;
    }

    .memory-lightbox-content {
        width: 100%;
        max-height: 92vh;
        border-radius: 18px;
    }

    .memory-lightbox-image {
        width: 100%;
        max-height: 58vh;
        object-fit: contain;
        border-radius: 18px 18px 0 0;
    }

    .memory-lightbox-details {
        padding: 18px;
    }

    .memory-lightbox-details h2 {
        font-size: 22px;
    }

    .memory-lightbox-close {
        top: 8px;
        right: 8px;
        width: 44px;
        height: 44px;
    }
}
/* =========================================
   MUSIC PLAYER
========================================= */

.music-player {
    position: fixed;
    right: 16px;
    bottom: 16px;

    width: calc(100% - 32px);
    max-width: 320px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 12px 14px;

    background: rgba(255, 255, 255, 0.9);

    border: 1px solid rgba(255, 77, 136, 0.2);
    border-radius: 18px;

    box-shadow:
        0 10px 30px rgba(100, 30, 60, 0.18);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    z-index: 5000;

    box-sizing: border-box;
}

.music-info {
    display: flex;
    align-items: center;
    gap: 10px;

    min-width: 0;
}

.music-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    flex-shrink: 0;

    border-radius: 50%;

    background: #ffe0eb;
    color: #ff4d88;

    font-size: 23px;
}

.music-title,
.music-artist {
    margin: 0;
}

.music-title {
    color: #3f2731;
    font-size: 14px;
    font-weight: bold;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-artist {
    margin-top: 3px;

    color: #8c6b78;
    font-size: 12px;
}

.music-toggle-button {
    width: auto;
    min-width: 82px;
    min-height: 42px;

    padding: 10px 13px;

    border: none;
    border-radius: 14px;

    background: #ff4d88;
    color: white;

    font-size: 14px;
    font-weight: bold;

    cursor: pointer;
}

.music-toggle-button:active {
    transform: scale(0.96);
}

.music-icon.playing {
    animation: musicPulse 1.5s infinite;
}

@keyframes musicPulse {
    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.12);
    }
}

@media (max-width: 480px) {
    .music-player {
        right: 10px;
        bottom: 10px;

        width: calc(100% - 20px);
    }

    .music-title {
        max-width: 130px;
    }
}
.music-player {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease;
}

body.website-unlocked .music-player {
    visibility: visible;
    opacity: 1;
}
/* =========================================
   CAMERA MODAL
========================================= */

.camera-modal{

    position:fixed;
    inset:0;

    display:none;
    align-items:center;
    justify-content:center;

    padding:20px;

    background:rgba(0,0,0,.75);

    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);

    z-index:20000;

}

.camera-modal.show{

    display:flex;

}

.camera-box{

    width:100%;
    max-width:500px;

    background:white;

    border-radius:25px;

    padding:20px;

    text-align:center;

    box-shadow:
        0 20px 50px rgba(0,0,0,.3);

    animation:cameraPopup .35s ease;

}

@keyframes cameraPopup{

    from{

        opacity:0;
        transform:scale(.85);

    }

    to{

        opacity:1;
        transform:scale(1);

    }

}

.camera-box h2{

    color:#ff4d88;

    margin-top:0;

}

#cameraVideo,
#cameraPreview{

    width:100%;

    aspect-ratio:3/4;

    object-fit:cover;

    border-radius:20px;

    background:#111;

}

.camera-buttons{

    display:flex;

    flex-wrap:wrap;

    gap:12px;

    margin-top:18px;

}

.camera-buttons button{

    flex:1;

    min-width:140px;

}

#captureButton{

    background:#ff4d88;

}

#retakeButton{

    background:#ff9800;

}

#usePhotoButton{

    background:#4CAF50;

}

#closeCameraButton{

    background:#777;

}

#cameraStatus{

    margin-top:15px;

    color:#ff4d88;

    font-weight:bold;

}

#openCameraButton{

    width:100%;

    font-size:18px;

}
.flower-section{

    text-align:center;

    margin:60px 0;

}

.flower-bouquet{

    display:flex;

    flex-direction:column;

    align-items:center;

    gap:15px;

}

.flower-row{

    display:flex;

    gap:25px;

}

.flower{

    font-size:55px;

    background:none;

    border:none;

    cursor:pointer;

    transition:.3s;

}

.flower:hover{

    transform:scale(1.15);

}

.flower.bloom{

    transform:scale(1.2);

}

.flower-popup{

    display:none;

    position:fixed;

    inset:0;

    background:rgba(0,0,0,.55);

    justify-content:center;

    align-items:center;

    z-index:9999;

}

.flower-popup-content{

    background:white;

    max-width:350px;

    width:90%;

    padding:30px;

    border-radius:20px;

    text-align:center;

    position:relative;

}

#closeFlowerPopup{

    position:absolute;

    right:15px;

    top:10px;

    cursor:pointer;

    font-size:28px;

}
.message-card{

    max-height:500px;

}

.message-content{

    max-height:350px;

    overflow-y:auto;

    padding-right:10px;

}

.message-content p{

    white-space:pre-wrap;

    line-height:1.8;

}
.flower {
    width: auto;
    min-height: auto;
    padding: 5px;
    margin-top: 0;
}

.flower:disabled {
    opacity: 1;
    cursor: default;
}