* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --accent-red: #d93e31;
    --primary-purple: #3a0e71;
    --primary-blue: #0e4270;
    --dark: #120127;
    --white: #ffffff;
    
    /* Semantic Colors */
    --text-dark: var(--dark);
    --text-light: var(--white);
    --bg-primary: var(--primary-blue);
    --bg-secondary: var(--primary-purple);
    --accent: var(--accent-red);
}

html {
    scroll-behavior: auto;
    font-size: 16px;
    background-color: var(--primary-purple);
    overflow: hidden;
}

/* Hide scrollbar when loading overlay is visible */
html:not(.scrolling-enabled)::-webkit-scrollbar,
body:not(.scrolling-enabled)::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

html:not(.scrolling-enabled),
body:not(.scrolling-enabled) {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

body {
    font-family: 'Lato', sans-serif;
    background: linear-gradient(to bottom, var(--dark) 0%, var(--primary-purple) 100%);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: hidden;
    position: relative;
    font-size: 1rem;
}

body.scrolling-enabled {
    overflow-y: auto;
}

html.scrolling-enabled {
    overflow: auto;
}

/* Fullscreen Loader Overlay */
#loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    pointer-events: none;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#loader-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}

#loader-overlay.hidden {
    display: none;
}

/* Hide scrollbar when loading overlay is visible */
body.loading-overlay-visible::-webkit-scrollbar,
html.loading-overlay-visible::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

body.loading-overlay-visible,
html.loading-overlay-visible {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

#loader-overlay.party {
    animation: color 4s linear;
}

#loader-text {
    position: absolute;
    top: 50%;
    left: 10vw;
    right: 10vw;
    transform: translateY(-50%);
    font-family: 'Josefin Sans', sans-serif;
    font-size: 2rem;
    color: var(--white);
    text-align: center;
    opacity: 1;
    transition: opacity 0.5s ease-out;
    z-index: 10002;
}

#loader-text.fade-out {
    opacity: 0;
}

#candy {
    overflow: hidden;
    display: flex;
    opacity: 1;
    margin: calc(50vh - 150px) auto 0 auto;
    width: 100px;
    height: 300px;
    border-radius: 100px;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
    background-color: var(--dark);
    transform: rotate(90deg);
    /* Animation will be added via JavaScript when loading completes */
}

#candy.party {
    animation: PARTY 4s cubic-bezier(0.87, -0.41, 0.19, 1.44) forwards;
}

#candy-loader {
    height: 0%;
    width: 100%;
    z-index: 1;
    display: flex;
    align-items: center;
    align-self: flex-end;
    box-shadow: 0px 0px 10px rgba(255, 50, 0, 0.8) inset;
    background: var(--accent-red);
    background: repeating-linear-gradient(45deg, var(--white), var(--white) 15px, var(--accent-red) 15px, var(--accent-red) 30px);
    transition: height 0.3s ease-out;
}

#candy-loader::after {
    content: "";
    background-color: var(--dark);
    width: 50px;
    height: 270px;
    border-radius: 50px;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
    display: flex;
    align-self: flex-end;
    /* Animation will be added via JavaScript when loading completes */
}

#candy-loader::after {
    content: "";
    background-color: var(--dark);
    width: 50px;
    height: 270px;
    border-radius: 50px;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
    display: flex;
    align-self: flex-end;
    /* Animation will be added via JavaScript when loading completes */
}

#candy-loader.party::after {
    animation: color 4s linear;
}

#candy-loader::before {
    content: "";
    background-color: var(--dark);
    width: 25px;
    height: 210px;
    display: flex;
    align-self: flex-end;
    /* Animation will be added via JavaScript when loading completes */
}

#candy-loader.party::before {
    animation: color 4s linear;
}

@keyframes load {
    0% {
        height: 0%;
    }
    50% {
        height: 100%;
    }
}

@keyframes PARTY {
    0% {
        opacity: 1;
        transform: rotate(90deg) scale(1);
    }
    20% {
        transform: rotate(-10deg) scale(1);
    }
    40% {
        transform: rotate(20deg) scale(1);
    }
    60% {
        transform: rotate(-10deg) scale(1);
    }
    80% {
        transform: rotate(30deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: rotate(-180deg) scale(0);
        opacity: 0;
    }
}

@keyframes color {
    10% {
        background-color: var(--dark);
    }
    12% {
        background-color: #31D354;
    }
    95% {
        background-color: #31D354;
    }
}

@keyframes loaderBackgroundColor {
    55% {
        background-color: var(--dark);
    }
    57% {
        background-color: #31D354;
    }
    95% {
        background-color: #31D354;
    }
}

@keyframes loaderFadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Adjust base font size for smaller screens */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
}

@media (max-width: 375px) {
    html {
        font-size: 13px;
    }
}

/* Password Modal */
.modal {
    display: flex;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary-purple) 100%);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease-in;
}

.modal-content {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 1.25rem;
    box-shadow: 0 0.625rem 2.5rem rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 25rem;
    width: 90%;
    border: 0.1875rem solid var(--accent);
}

.modal-content h2 {
    font-family: 'Josefin Sans', sans-serif;
    color: var(--primary-purple);
    margin-bottom: 1.25rem;
    font-size: 2em;
    font-weight: 700;
}

.login-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    gap: 0.9375rem;
}

.login-header h2 {
    margin: 0;
}

.login-stocking {
    max-width: 6.25rem;
    height: auto;
}

.modal-content.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-0.625rem); }
    75% { transform: translateX(0.625rem); }
}

.modal-content p {
    margin-bottom: 1.25rem;
    color: var(--dark);
    font-size: 1.1em;
}

.modal-content input {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1.25rem;
    border: 0.125rem solid var(--primary-blue);
    border-radius: 0.5rem;
    font-size: 1em;
    outline: none;
    transition: border-color 0.3s;
}

.modal-content input:focus {
    border-color: var(--accent);
}

.modal-content button {
    background: var(--accent);
    color: var(--white);
    padding: 0.75rem 1.875rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    font-weight: bold;
}

.modal-content button:hover {
    background: var(--primary-purple);
    transform: scale(1.05);
}

.error-message {
    color: var(--accent);
    font-size: 0.9em;
    margin-top: 0.625rem;
    min-height: 1.25rem;
}

.hidden {
    display: none !important;
}

/* Snowflakes */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.snowflake {
    color: var(--white);
    font-size: 1em;
    font-family: Arial, sans-serif;
}

.snowflake,
.snowflake .inner {
    animation-iteration-count: infinite;
    animation-play-state: running;
}

@keyframes snowflakes-fall {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(110vh);
    }
}

@keyframes snowflakes-shake {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(5rem);
    }
}

.snowflake {
    position: fixed;
    top: -10%;
    z-index: 9999;
    -webkit-user-select: none;
    user-select: none;
    cursor: default;
    pointer-events: none;
    animation-name: snowflakes-shake;
    animation-duration: 3s;
    animation-timing-function: ease-in-out;
}

.snowflake .inner {
    animation-duration: 10s;
    animation-name: snowflakes-fall;
    animation-timing-function: linear;
}

.snowflake:nth-of-type(0) {
    left: 1%;
    animation-delay: 0s;
}

.snowflake:nth-of-type(0) .inner {
    animation-delay: 0s;
}

.snowflake:first-of-type {
    left: 10%;
    animation-delay: 1s;
}

.snowflake:first-of-type .inner,
.snowflake:nth-of-type(8) .inner {
    animation-delay: 1s;
}

.snowflake:nth-of-type(2) {
    left: 20%;
    animation-delay: 0.5s;
}

.snowflake:nth-of-type(2) .inner,
.snowflake:nth-of-type(6) .inner {
    animation-delay: 6s;
}

.snowflake:nth-of-type(3) {
    left: 30%;
    animation-delay: 2s;
}

.snowflake:nth-of-type(11) .inner,
.snowflake:nth-of-type(3) .inner {
    animation-delay: 4s;
}

.snowflake:nth-of-type(4) {
    left: 40%;
    animation-delay: 2s;
}

.snowflake:nth-of-type(10) .inner,
.snowflake:nth-of-type(4) .inner {
    animation-delay: 2s;
}

.snowflake:nth-of-type(5) {
    left: 50%;
    animation-delay: 3s;
}

.snowflake:nth-of-type(5) .inner {
    animation-delay: 8s;
}

.snowflake:nth-of-type(6) {
    left: 60%;
    animation-delay: 2s;
}

.snowflake:nth-of-type(7) {
    left: 70%;
    animation-delay: 1s;
}

.snowflake:nth-of-type(7) .inner {
    animation-delay: 2.5s;
}

.snowflake:nth-of-type(8) {
    left: 80%;
    animation-delay: 0s;
}

.snowflake:nth-of-type(9) {
    left: 90%;
    animation-delay: 1.5s;
}

.snowflake:nth-of-type(9) .inner {
    animation-delay: 3s;
}

.snowflake:nth-of-type(10) {
    left: 25%;
    animation-delay: 0s;
}

.snowflake:nth-of-type(11) {
    left: 65%;
    animation-delay: 2.5s;
}

/* Make snowflakes half size on mobile */
@media (max-width: 480px) {
    .snowflake {
        font-size: 0.5em;
    }
}

/* Landing Section - Fullscreen */
.landing-section {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    padding: 0;
    overflow: visible;
}

.landing-content {
    display: grid;
    grid-template-columns: 50vw 50vw;
    gap: 0;
    align-items: center;
    width: 100vw;
    height: 100%;
}

.landing-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
    padding: 4rem 5rem 4rem 8rem;
    width: 100%;
    height: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.landing-title {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 7rem;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0.1875rem 0.1875rem 0.375rem rgba(0, 0, 0, 0.5);
    line-height: 1.2;
    margin: 0;
}

.landing-image {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    width: 100%;
    height: 100%;
    overflow: visible;
    position: relative;
}

#christmas-tree-canvas {
    width: 100% !important;
    min-width: 100% !important;
    height: 100vh !important;
    display: block;
    cursor: default;
    object-fit: contain;
}

@keyframes glow {
    from {
        text-shadow: 0.1875rem 0.1875rem 0.375rem rgba(0, 0, 0, 0.3), 0 0 0.625rem var(--accent);
    }
    to {
        text-shadow: 0.1875rem 0.1875rem 0.375rem rgba(0, 0, 0, 0.3), 0 0 1.25rem var(--accent), 0 0 1.875rem var(--accent);
    }
}

/* Sections */
section {
    padding: 3.75rem 1.25rem;
    max-width: 75rem;
    margin: 0 auto;
}

/* Yearly Rewind Section */
.rewind-section {
    width: 100%;
    position: relative;
    padding: 0;
    margin: 0;
    max-width: 100%;
    overflow: hidden;
}

.rewind-opening {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    gap: 2rem;
}

.rewind-bells-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 3rem;
}

.rewind-bell {
    width: auto;
    height: 8rem;
    object-fit: contain;
    opacity: 0;
    transform: translateY(3.125rem);
    transition: opacity 1s ease-out, transform 1s ease-out;
    flex-shrink: 0;
}

.rewind-bell:first-child {
    transform: translateY(3.125rem) scaleX(-1);
}

.rewind-bell.visible {
    opacity: 1;
    transform: translateY(0);
}

.rewind-bell.visible:first-child {
    transform: translateY(0) scaleX(-1);
}

.rewind-opening:last-child {
    margin-bottom: 20vh;
}

.rewind-question {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 5rem;
    font-weight: 700;
    color: var(--white);
    text-align: center;
    text-shadow: 0.1875rem 0.1875rem 0.375rem rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(3.125rem);
    transition: opacity 1s ease-out, transform 1s ease-out;
    padding: 0 10vw;
}

.rewind-question.visible {
    opacity: 1;
    transform: translateY(0);
}

.rewind-person-section {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.rewind-name-container {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
    z-index: 5;
}

.rewind-ice-skating {
    width: auto;
    height: 18rem;
    object-fit: contain;
    position: absolute;
    left: 0;
    top: calc(50% - 1.5rem);
    transform: translateY(-50%);
    z-index: 6;
    will-change: transform, opacity;
    margin-right: 2rem;
}

.rewind-name {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 8rem;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0.1875rem 0.1875rem 0.375rem rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    position: absolute;
    left: 20rem;
    top: 50%;
    will-change: transform, opacity;
    /* Vertical centering will be handled by GSAP yPercent: -50 */
}

.rewind-image-container {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -50vh;
}

.rewind-image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rewind-image {
    width: auto;
    height: 90vh;
    object-fit: contain;
    opacity: 0;
    transform: scale(1.1);
    will-change: opacity, transform;
}

.rewind-description-container {
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: absolute;
    bottom: 8rem;
    left: 0;
    z-index: 10001;
    padding: 0 4rem;
    pointer-events: none;
}

.rewind-person-section[data-person="sister2"] .rewind-description-container {
    top: 8rem;
    bottom: auto;
    align-items: flex-start;
}

.rewind-person-section[data-person="mum"] .rewind-description-container {
    top: calc(1rem + 5vh);
    bottom: auto;
    left: auto;
    right: 1rem;
    align-items: flex-start;
    justify-content: flex-end;
    width: auto;
    max-width: min(30vw, 25rem);
    padding: 0;
    box-sizing: border-box;
    transform: translateX(0);
}

.rewind-person-section[data-person="mum"] .rewind-description {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.rewind-description {
    font-family: 'Lato', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--white);
    text-align: left;
    max-width: 50rem;
    line-height: 1.6;
    background: rgba(0, 0, 0, 0.78);
    padding: 1.5rem 2rem;
    opacity: 0;
    will-change: opacity;
    hyphens: auto;
    word-break: break-word;
}

.section-title {
    font-family: 'Josefin Sans', sans-serif;
    text-align: center;
    font-size: 2.5em;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 2.5rem;
    text-shadow: 0.125rem 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
}

/* Photos Section */
.photos-section {
    border-radius: 0;
    margin: 2.5rem auto;
    padding: 2.5rem 1.25rem;
    max-width: 75rem;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr));
    gap: 1.875rem;
    margin-top: 1.875rem;
}

.photo-card {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    background: var(--white);
    aspect-ratio: 4/3;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.photo-card:hover {
    transform: translateY(-0.625rem) scale(1.02);
    box-shadow: 0 0.75rem 1.875rem rgba(0, 0, 0, 0.4);
}

.photo-card:active {
    transform: scale(0.98);
}

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Assets Section */
.assets-section {
    margin: 2.5rem auto;
    max-width: 75rem;
}

.assets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15.625rem, 1fr));
    gap: 1.5625rem;
    margin-top: 1.875rem;
}

.asset-card {
    border-radius: 0.9375rem;
    overflow: hidden;
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    background: var(--white);
    aspect-ratio: 1;
}

.asset-card:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 0.75rem 1.875rem rgba(0, 0, 0, 0.4);
}

.asset-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Closing Section */
.closing-section {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    padding: 0;
    overflow: visible;
}

.closing-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 4rem 5rem;
    gap: 4rem;
}

.closing-text {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    color: var(--white);
    text-align: center;
    text-shadow: 0.1875rem 0.1875rem 0.375rem rgba(0, 0, 0, 0.5);
    line-height: 1.3;
    margin: 0;
    max-width: 90rem;
    padding: 0 2rem;
}

.closing-images {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    width: 100%;
    max-width: 80rem;
}

.closing-image {
    width: auto;
    height: 25rem;
    object-fit: contain;
    flex: 0 0 auto;
}

#closing-gingerbread {
    order: 1;
}

#closing-snowman {
    order: 2;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2.5rem 1.25rem;
    color: var(--white);
    margin: 3.75rem auto 0;
    max-width: 75rem;
}

.footer p {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 1.3em;
    font-weight: 400;
    margin-bottom: 0.625rem;
    text-shadow: 0.125rem 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
}

.footer-year {
    font-size: 1em;
    opacity: 0.8;
}

/* Animations */
.fade-in {
    animation: fadeIn 1s ease-in forwards;
}

.fade-in-delay {
    animation: fadeIn 1s ease-in 0.3s both;
}

/* Prevent fade-in animation from retriggering once complete */
.fade-in-complete,
.fade-in.fade-in-complete,
.fade-in-delay.fade-in-complete {
    animation: none !important;
    animation-name: none !important;
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Additional protection: prevent animation on landing title once complete */
.landing-title.fade-in-complete {
    animation: none !important;
    animation-name: none !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-1.25rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-fade {
    opacity: 0;
    transform: translateY(1.875rem);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-fade.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .rewind-opening {
        gap: 1.5rem;
    }

    .rewind-bells-row {
        gap: 2rem;
    }

    .rewind-bell {
        height: 6rem;
    }

    .rewind-image {
        width: 100%;
        height: 100vh;
        object-fit: cover;
    }
    .landing-section {
        min-height: 200vh;
        height: auto;
        position: relative;
    }

    .landing-content {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
        gap: 0;
        height: 200vh;
        width: 100vw;
    }

    .landing-text {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 2rem 1rem;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        z-index: 2;
        pointer-events: none;
    }
    
    .landing-text.scrolling {
        position: relative;
        pointer-events: auto;
        z-index: auto;
    }

    .landing-image {
        min-height: 100vh;
        width: 100vw;
        height: 100vh;
        position: relative;
        z-index: 3;
        grid-row: 2;
    }

    #christmas-tree-canvas {
        width: 100vw !important;
        height: 100vh !important;
        margin-top: -20rem;
    }

    .landing-title {
        font-size: 10rem; /* Much larger for mobile visibility */
        line-height: 1.1;
    }

    .section-title {
        font-size: 1.75em;
        margin-bottom: 1.5rem;
    }

    section {
        padding: 2rem 1rem;
    }

    .photos-section {
        padding: 1.5rem 1rem;
        margin: 1.5rem auto;
    }

    .photos-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        margin-top: 1.25rem;
    }

    .closing-content {
        padding: 3rem 2rem;
        gap: 3rem;
    }

    .closing-text {
        font-size: 2.5rem;
        padding: 0 1rem;
    }

    .closing-images {
        gap: 2rem;
        flex-wrap: wrap;
    }

    .closing-image {
        height: 15rem;
    }

    .assets-grid {
        grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
        gap: 1rem;
    }

    .modal-content {
        padding: 1.5rem 1.25rem;
        max-width: 90%;
    }

    .modal-content h2 {
        font-size: 1.5em;
        margin-bottom: 1rem;
    }

    .modal-content p {
        font-size: 0.95em;
        margin-bottom: 1rem;
    }

    .footer {
        padding: 1.5rem 1rem;
        margin: 2rem auto 0;
    }

    .footer p {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .landing-text {
        padding: 1.5rem 1rem;
    }

    .landing-title {
        font-size: 2.25rem;
        line-height: 1.1;
    }

    .section-title {
        font-size: 1.5em;
        margin-bottom: 1.25rem;
    }

    section {
        padding: 1.5rem 0.75rem;
    }

    .photos-section {
        padding: 1.25rem 0.75rem;
        margin: 1.25rem auto;
    }

    .photos-grid {
        gap: 1rem;
        margin-top: 1rem;
    }

    .closing-content {
        padding: 2rem 1rem;
        gap: 2rem;
    }

    .closing-text {
        font-size: 1.75rem;
        padding: 0 0.75rem;
    }

    .closing-images {
        gap: 1.5rem;
        flex-wrap: wrap;
    }

    .closing-image {
        height: 12rem;
    }

    .footer {
        padding: 1.25rem 0.75rem;
        margin: 1.5rem auto 0;
    }

    .rewind-question {
        font-size: 2rem;
    }

    .rewind-bells-row {
        gap: 1.5rem;
    }

    .rewind-bell {
        height: 4rem;
    }

    .rewind-ice-skating {
        height: 6rem;
        margin-right: 0.5rem;
        top: calc(50% - 0.5rem);
    }

    .rewind-name {
        font-size: 3rem;
        left: 5rem;
    }

    .rewind-description-container {
        bottom: 2rem;
        padding: 0 1rem;
    }

    .rewind-person-section[data-person="sister2"] .rewind-description-container {
        top: 2rem;
    }

    .rewind-person-section[data-person="mum"] .rewind-description-container {
        top: 2rem;
        left: 50%;
        right: 1rem;
        width: calc(50% - 1rem);
        max-width: none;
        padding: 0;
    }

    .rewind-description {
        font-size: 1rem;
        padding: 1rem;
        background: rgba(0, 0, 0, 0.78);
    }

    .footer p {
        font-size: 1em;
    }

    .footer-year {
        font-size: 0.9em;
    }

    .modal-content {
        padding: 1.25rem 1rem;
        max-width: 95%;
    }

    .modal-content h2 {
        font-size: 1.35em;
    }

    .modal-content p {
        font-size: 0.9em;
    }

    .modal-content input {
        font-size: 0.95em;
        padding: 0.625rem;
    }

    .modal-content button {
        font-size: 1em;
        padding: 0.625rem 1.5rem;
    }
}

/* Extra small devices (iPhone SE and similar - 375px and below) */
@media (max-width: 375px) {
    .landing-text {
        padding: 1rem 0.75rem;
    }

    .landing-title {
        font-size: 1.75rem;
        line-height: 1.1;
    }

    .section-title {
        font-size: 1.35em;
        margin-bottom: 1rem;
    }

    section {
        padding: 1.25rem 0.5rem;
    }

    .photos-section {
        padding: 1rem 0.5rem;
        margin: 1rem auto;
    }

    .photos-grid {
        gap: 0.875rem;
    }

    .closing-content {
        padding: 1.5rem 0.75rem;
        gap: 1.5rem;
    }

    .closing-text {
        font-size: 1.5rem;
        padding: 0 0.5rem;
    }

    .closing-images {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .closing-image {
        height: 10rem;
    }

    .footer {
        padding: 1rem 0.5rem;
        margin: 1.25rem auto 0;
    }

    .footer p {
        font-size: 0.95em;
    }

    .footer-year {
        font-size: 0.85em;
    }

    .modal-content {
        padding: 1rem 0.875rem;
        max-width: 95%;
        border-radius: 0.9375rem;
    }

    .modal-content h2 {
        font-size: 1.25em;
        margin-bottom: 0.875rem;
    }

    .modal-content p {
        font-size: 0.85em;
        margin-bottom: 0.875rem;
    }

    .login-header {
        margin-bottom: 1rem;
        gap: 0.625rem;
    }

    .login-stocking {
        max-width: 4rem;
    }

    .modal-content input {
        font-size: 0.9em;
        padding: 0.5625rem;
        margin-bottom: 0.875rem;
    }

    .modal-content button {
        font-size: 0.95em;
        padding: 0.5625rem 1.25rem;
    }

    .error-message {
        font-size: 0.8em;
    }

    .rewind-question {
        font-size: 1.75rem;
    }

    .rewind-bells-row {
        gap: 1rem;
    }

    .rewind-bell {
        height: 3rem;
    }

    .rewind-ice-skating {
        height: 5rem;
        margin-right: 0.5rem;
        top: calc(50% - 0.5rem);
    }

    .rewind-name {
        font-size: 2.5rem;
        left: 4rem;
    }

    .rewind-description-container {
        bottom: 1.5rem;
        padding: 0 0.75rem;
    }

    .rewind-person-section[data-person="sister2"] .rewind-description-container {
        top: 1.5rem;
    }

    .rewind-person-section[data-person="mum"] .rewind-description-container {
        top: 1.5rem;
        left: 50%;
        right: 1rem;
        width: calc(50% - 1rem);
        max-width: none;
        padding: 0;
    }

    .rewind-description {
        font-size: 0.9rem;
        padding: 0.875rem;
        background: rgba(0, 0, 0, 0.78);
    }
}

