* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    background: #fff7fa;
    font-family: Georgia, "Times New Roman", serif;
    color: #4a4144;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 30px;
}

.book {
    width: 900px;
    max-width: 100%;
    min-height: 650px;

    background: #fffafd;

    border: 2px solid #e2a6bb;
    border-radius: 8px;

    box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.18),
    0 8px 20px rgba(0, 0, 0, 0.10);

    position: relative;
    overflow: visible;
}

.page {
    min-height: 650px;
    height: auto;

    padding: 60px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    text-align: center;
}

.cover h1 {
    font-size: 64px;
    font-weight: normal;
    margin-bottom: 20px;

    color: #c76589;

    text-shadow:
        0 2px 12px rgba(199, 101, 137, 0.12);
}

.cover {
    position: relative;

    overflow: hidden;
}

.cover::before {
    content: "";

    position: absolute;

    width: 420px;
    height: 420px;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    background: radial-gradient(
        circle,
        rgba(242, 203, 217, 0.35) 0%,
        rgba(242, 203, 217, 0.12) 45%,
        transparent 70%
    );

    pointer-events: none;
}

.cover > * {
    position: relative;
    z-index: 1;
}

.cover .names {
    font-size: 28px;
    margin-bottom: 50px;
}

.cover .date {
    font-size: 18px;
    font-style: italic;
}

.heart {
    font-size: 54px;

    margin-bottom: 25px;

    color: #c76589;

    text-shadow:
        0 4px 12px rgba(199, 101, 137, 0.18);

    animation: heartFloat 3s ease-in-out infinite;
}

@keyframes heartFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }

}

.divider {
    width: 180px;
    height: 1px;

    background: #e6a8bc;

    margin: 25px auto;

    position: relative;
}


.divider::after {
    content: "♡";

    position: absolute;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    background: #fffafd;

    padding: 0 8px;

    color: #c76589;

    font-size: 15px;
}

button {
    font-family: Georgia, "Times New Roman", serif;

    border: 1px solid #d79ab1;

    background: #f6dce6;

    color: #6b4553;

    padding: 12px 25px;

    font-size: 16px;

    border-radius: 5px;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}


button:hover {
    background: #edc2d2;

    transform: translateY(-2px);

    box-shadow:
        0 4px 10px rgba(199, 101, 137, 0.20);
}


button:disabled {
    opacity: 0.35;

    cursor: default;

    transform: none;

    box-shadow: none;
}



.hidden {
    display: none;
}

.memory-title {
    font-size: 42px;
    font-weight: normal;
    margin-bottom: 15px;

    color: #c76589;
}

.memory-subtitle {
    font-size: 17px;
    font-style: italic;
    margin-bottom: 30px;
}

.memory-text {
    max-width: 650px;
    font-size: 19px;
    line-height: 1.7;

    margin-top: 25px;
}

.navigation {
    position: relative;

    margin-top: 25px;

    display: flex;
    justify-content: center;
    align-items: center;

    gap: 25px;
}

.page-number {
    font-size: 14px;
    opacity: 0.65;
}

@media (max-width: 600px) {

    body {
        padding: 10px;
    }

    .page {
        padding: 35px 25px;
        min-height: 600px;
    }

    .cover h1 {
        font-size: 42px;
    }

    .memory-title {
        font-size: 30px;
    }

}

.memory-video {
    width: 100%;
    max-width: 650px;

    max-height: 360px;

    border-radius: 14px;

    margin: 10px 0 5px;

    padding: 6px;

    background: #f9e4ec;

    border: 2px solid #d79ab1;

    box-shadow:
        0 10px 25px rgba(199, 101, 137, 0.18);

    object-fit: contain;
}

.memory-date {
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;

    color: #c9829d;

    opacity: 0.75;

    margin-bottom: 10px;
}

.navigation button {
    min-width: 100px;
}

.navigation button:disabled {
    opacity: 0.35;
    cursor: default;
    transform: none;
}

.page-number {
    min-width: 70px;

    text-align: center;

    font-size: 14px;

    letter-spacing: 1px;

    opacity: 0.65;
}

/* Scrapbook decorations */

.page {
    position: relative;
}

/* Small decorative heart in the corner */
.page::before {
    content: "♡";

    position: absolute;
    top: 22px;
    left: 28px;

    font-size: 30px;

    color: #c76589;

    opacity: 0.45;

    transform: rotate(-12deg);
}

/* Small decorative star in the opposite corner */
.page::after {
    content: "✦";

    position: absolute;
    top: 25px;
    right: 30px;

    font-size: 22px;

    color: #d47a9b;

    opacity: 0.45;

    transform: rotate(12deg);
}
.photo-area {
    display: flex;

    justify-content: center;
    align-items: center;

    margin-top: 25px;
}


.polaroid {
    width: 180px;

    padding: 10px 10px 15px;

    background: white;

    box-shadow:
        0 6px 15px rgba(0, 0, 0, 0.15);

    transform: rotate(-3deg);

    transition: transform 0.25s ease;
}


.polaroid:hover {
    transform: rotate(0deg) scale(1.03);
}


.polaroid img {
    display: block;

    width: 100%;

    aspect-ratio: 1 / 1;

    object-fit: cover;
}


.polaroid p {
    margin-top: 10px;

    font-family: "Comic Sans MS", "Segoe Print", cursive;

    font-size: 13px;

    line-height: 1.3;
}


.page {
    animation: pageTurn 0.4s ease;
}


@keyframes pageTurn {

    from {
        opacity: 0;
        transform: translateX(18px) rotateY(-2deg);
    }

    to {
        opacity: 1;
        transform: translateX(0) rotateY(0deg);
    }

}

/* =========================================
   SCREENSHOT MEMORY PAGES
   ========================================= */

.screenshot-grid {
    width: 100%;
    max-width: 720px;

    margin: 20px auto;

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 18px;
}


/* Individual photo card */

.screenshot-photo {
    background: #ffffff;

    padding: 8px;
    padding-bottom: 12px;

    border: 1px solid #f0d3de;

    box-shadow:
        0 6px 14px rgba(199, 101, 137, 0.14);

    display: flex;
    flex-direction: column;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;

    border-radius: 3px;

    position: relative;
}

.screenshot-photo::after {
    content: "♡";

    position: absolute;

    top: -12px;
    right: -8px;

    font-size: 20px;

    color: #c76589;

    opacity: 0.65;

    transform: rotate(12deg);

    pointer-events: none;
}

.screenshot-photo:nth-child(even)::after {
    content: "✦";

    color: #d47a9b;

    font-size: 17px;

    transform: rotate(8deg);
}

/* Slight scrapbook rotation */

.screenshot-photo:nth-child(1) {
    transform: rotate(-2deg);
}

.screenshot-photo:nth-child(2) {
    transform: rotate(1.5deg);
}

.screenshot-photo:nth-child(3) {
    transform: rotate(-1deg);
}

.screenshot-photo:nth-child(4) {
    transform: rotate(1.5deg);
}

.screenshot-photo:nth-child(5) {
    transform: rotate(-1.5deg);
}

.screenshot-photo:nth-child(6) {
    transform: rotate(2deg);
}


/* Hover effect */

.screenshot-photo:hover {
    transform: rotate(0deg) scale(1.04);

    box-shadow:
        0 10px 22px rgba(199, 101, 137, 0.22);

    position: relative;

    z-index: 2;
}


/* Image frame */

.screenshot-image {
    width: 100%;

    height: 145px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #f4f1ed;

    overflow: hidden;
}


/* Actual screenshot */

.screenshot-image img {
    width: 100%;

    height: 100%;

    object-fit: contain;

    display: block;
}


/* Small caption underneath each screenshot */

.screenshot-caption {
    margin: 8px 2px 0 2px;

    text-align: center;

    font-size: 12px;

    line-height: 1.3;

    color: #555;

    font-style: italic;
}

.screenshot-date {
    display: block;

    margin-top: 3px;

    font-size: 10px;

    color: #c9829d;

    font-style: normal;
}

/* =========================================
   FINAL ANNIVERSARY PAGE
   ========================================= */

.final-page {
    position: relative;

    overflow: hidden;
}


/* Large heart */

.final-heart {
    font-size: 52px;

    margin-bottom: 18px;

    color: #c76589;

    text-shadow:
        0 4px 12px rgba(199, 101, 137, 0.18);

    animation: finalHeartFloat 3s ease-in-out infinite;
}


@keyframes finalHeartFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }

}


/* Small introduction */

.final-small-title {
    font-size: 16px;

    font-style: italic;

    color: #b36a84;

    margin-bottom: 8px;
}


/* Main title */

.final-title {
    font-size: 42px;

    font-weight: normal;

    color: #c76589;

    margin-bottom: 5px;

    text-shadow:
        0 2px 10px rgba(199, 101, 137, 0.10);
}


/* Message */

.final-message {
    max-width: 600px;

    font-size: 18px;

    line-height: 1.8;

    color: #4a4144;
}


.final-message p {
    margin-bottom: 20px;
}


/* Final "I love you" */

.final-love {
    font-size: 24px;

    color: #c76589;

    margin-top: 25px;
}


/* Little decoration */

.final-decoration {
    margin-top: 10px;

    font-size: 18px;

    color: #d47a9b;

    letter-spacing: 4px;

    opacity: 0.75;
}


/* Navigation */

.final-navigation {
    margin-top: 30px;
}

.made-with-love {
    margin-top: 8px;

    font-size: 13px;

    font-style: italic;

    color: #b36a84;

    opacity: 0.75;

    letter-spacing: 0.5px;
}

/* =========================================
   MUSIC BUTTON
   ========================================= */

.music-button {
    position: fixed;

    bottom: 25px;
    right: 25px;

    z-index: 1000;

    padding: 9px 16px;

    font-size: 14px;

    border-radius: 20px;

    border: 1px solid #d79ab1;

    background: #f9e4ec;

    color: #6b4553;

    box-shadow:
        0 4px 12px rgba(199, 101, 137, 0.15);
}

.music-button:hover {
    background: #edc2d2;

    transform: translateY(-2px);

    box-shadow:
        0 6px 15px rgba(199, 101, 137, 0.22);
}

/* =========================================
   VOLUME CONTROL
   ========================================= */

.volume-control {
    position: fixed;
    bottom: 28px;
    right: 100px; /* Positioned left of music button */
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-toggle {
    width: 34px;
    height: 34px;
    padding: 0;
    font-size: 16px;
    border-radius: 50%;
    border: 1px solid #d79ab1;
    background: #f9e4ec;
    color: #6b4553;
    box-shadow: 0 3px 10px rgba(199, 101, 137, 0.12);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
}

.volume-toggle:hover {
    background: #edc2d2;
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(199, 101, 137, 0.18);
}

.volume-panel {
    background: #fffafd;
    border: 1px solid #d79ab1;
    border-radius: 20px;
    padding: 8px 14px;
    box-shadow: 0 6px 20px rgba(199, 101, 137, 0.15);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: right center;
    opacity: 0;
    transform: scale(0.85);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 34px;
}

.volume-panel.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.volume-panel.hidden {
    display: flex; /* Override hidden class */
    opacity: 0;
    transform: scale(0.85);
    pointer-events: none;
}

.volume-slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 3px;
    border-radius: 2px;
    background: #e6a8bc;
    outline: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

/* Custom slider thumb - heart shaped */
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #c76589;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(199, 101, 137, 0.25);
    transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 10px rgba(199, 101, 137, 0.35);
}

/* Firefox support */
.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #c76589;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(199, 101, 137, 0.25);
}

.volume-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
}

/* Volume icon inside panel */
.volume-icon {
    font-size: 16px;
    color: #6b4553;
    min-width: 20px;
    text-align: center;
    user-select: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.volume-icon:hover {
    transform: scale(1.1);
}

/* Update existing music button to match */
.music-button {
    position: fixed;
    bottom: 28px;
    right: 25px;
    z-index: 1000;
    padding: 7px 18px;
    font-size: 14px;
    border-radius: 20px;
    border: 1px solid #d79ab1;
    background: #f9e4ec;
    color: #6b4553;
    box-shadow: 0 3px 10px rgba(199, 101, 137, 0.12);
    transition: all 0.2s ease;
    opacity: 0.8;
}

.music-button:hover {
    background: #edc2d2;
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(199, 101, 137, 0.18);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .volume-control {
        bottom: 22px;
        right: 85px;
        gap: 8px;
    }

    .volume-toggle {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .volume-slider {
        width: 60px;
    }

    .volume-panel {
        padding: 6px 10px;
        height: 30px;
        gap: 8px;
    }

    .volume-icon {
        font-size: 14px;
        min-width: 18px;
    }

    .music-button {
        bottom: 22px;
        right: 20px;
        padding: 6px 14px;
        font-size: 13px;
    }
}

/* =========================================
   LIGHTBOX / IMAGE POPUP
   ========================================= */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 30px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.lightbox.visible {
    opacity: 1;
    pointer-events: auto;
}

.lightbox.hidden {
    display: flex;
    opacity: 0;
    pointer-events: none;
}

.lightbox-image {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 3px solid #f9e4ec;
    object-fit: contain;
}

.lightbox.visible .lightbox-image {
    transform: scale(1);
}

.lightbox-close {
    position: fixed;
    top: 25px;
    right: 30px;
    font-size: 32px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-family: Georgia, serif;
    line-height: 1;
    z-index: 10000;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Small heart decoration in lightbox */
.lightbox::after {
    content: "♡";
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 10px;
    pointer-events: none;
}

/* =========================================
   PASSWORD GATE
   ========================================= */

.password-gate {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff7fa;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.password-gate.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.05);
}

.password-card {
    background: #fffafd;
    border: 2px solid #e2a6bb;
    border-radius: 16px;
    padding: 50px 45px 45px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 30px 80px rgba(199, 101, 137, 0.2);
    animation: passwordFloat 4s ease-in-out infinite;
}

@keyframes passwordFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

.password-heart {
    font-size: 48px;
    margin-bottom: 10px;
    color: #c76589;
    animation: heartFloat 3s ease-in-out infinite;
    display: inline-block;
}

.password-title {
    font-size: 28px;
    font-weight: normal;
    color: #c76589;
    margin-bottom: 8px;
}

.password-subtitle {
    font-size: 15px;
    color: #6b4553;
    opacity: 0.8;
    margin-bottom: 20px;
    font-style: italic;
}

.password-input-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 5px;
}

.password-input {
    padding: 14px 20px;
    font-size: 16px;
    font-family: Georgia, "Times New Roman", serif;
    border: 1.5px solid #d79ab1;
    border-radius: 8px;
    background: #fffafd;
    color: #4a4144;
    outline: none;
    transition: all 0.3s ease;
    text-align: center;
    letter-spacing: 2px;
}

.password-input:focus {
    border-color: #c76589;
    box-shadow: 0 0 0 3px rgba(199, 101, 137, 0.15);
}

.password-input::placeholder {
    color: #c9829d;
    opacity: 0.6;
    letter-spacing: 0;
}

.password-button {
    padding: 14px 30px;
    font-size: 16px;
    font-family: Georgia, "Times New Roman", serif;
    border: 1px solid #d79ab1;
    border-radius: 8px;
    background: #f6dce6;
    color: #6b4553;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.password-button:hover {
    background: #edc2d2;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(199, 101, 137, 0.2);
}

.password-button:active {
    transform: translateY(0);
}

.password-error {
    color: #c76589;
    font-size: 14px;
    margin-top: 12px;
    font-style: italic;
    transition: all 0.3s ease;
}

.password-error.hidden {
    opacity: 0;
    pointer-events: none;
}

.password-hint {
    font-size: 13px;
    color: #c9829d;
    margin-top: 18px;
    opacity: 0.7;
    font-style: italic;
}

/* Responsive adjustments for password gate */
@media (max-width: 600px) {
    .password-card {
        padding: 35px 25px 30px;
        margin: 15px;
    }
    
    .password-title {
        font-size: 22px;
    }
    
    .password-heart {
        font-size: 40px;
    }
    
    .password-input {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    .password-button {
        padding: 12px 24px;
        font-size: 15px;
    }
}