*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    margin: 0;
    overflow-x: hidden;
}

body {
    padding: 8px;
}

/* Main letter */
.letter {
    width: 100% !important;
    max-width: 100% !important;
    margin: 8px auto !important;
    padding: 24px 18px !important;
    font-size: 27px !important;
    line-height: 1.45 !important;
    overflow: hidden !important;
}

/* Heading */
.date {
    font-size: 36px !important;
    line-height: 1.15 !important;
    text-align: center !important;
}

/* Reduce the huge blank area before the photograph */
.intro-section {
    min-height: auto !important;
    padding-top: 80px !important;
    padding-bottom: 50px !important;
}

/* Normal sections */
.letter-section {
    width: 100% !important;
    min-height: auto !important;
    padding: 36px 0 !important;
}

/* Photograph container */
.image-message-section {
    margin-top: -20px !important;
    width: 100% !important;
    min-height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

.image-message-card {
    position: relative !important;
    width: 100% !important;
    margin: 0 auto !important;

    /* Real space for the box and arrow */
    padding-top: 165px !important;
    overflow: visible !important;
}

.message-photo {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 12px !important;
}

/* Rainbow text box */
#photo-text-box {
    position: absolute !important;

    top: 200px !important;
    left: 10px !important;
    right: 10px !important;
    bottom: auto !important;

    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;

    font-family: Arial, Bold, sans-serif !important;
    font-size: 27px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    color: white !important;

    background: linear-gradient(
        90deg,
        #43c6e9,
        #667eea,
        #7b2cbf,
        #b52ab5
    ) !important;

    border: 2px solid rgba(255, 255, 255, 0.65) !important;
    border-radius: 13px !important;

    box-shadow:
        0 0 18px rgba(255, 90, 170, 0.55),
        0 8px 24px rgba(75, 75, 190, 0.35) !important;

    z-index: 1000 !important;
}

#photo-text-box p {
    margin: 0 !important;
    color: white !important;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.45) !important;
}

#photo-arrow-position-mobile {
        position: absolute;
        top: 20%;
        left: 59%;
        z-index: 999;
        pointer-events: none;

        /* Adjust direction without changing the arrow design */
        transform: rotate(0deg);
        transform-origin: center;
    }

    .photo-arrow-symbol {
        display: inline-block;

        /* Keep the same font styling as desktop */
        font-size: 170px;
        line-height: 1;
        color:#e94b43;
        font-family: Arial, Helvetica, sans-serif;

        animation: mobileArrowBounce 1.1s ease-in-out infinite;
        will-change: transform;
    }

    @keyframes mobileArrowBounce {
        0%,
        100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-14px);
        }
    }


/* First sentence after photo */
.after-photo {
    min-height: auto !important;
    padding-top: 25px !important;
    padding-bottom: 35px !important;
}

/* GIFs */
.letter-gif,
#first-gif,
#second-gif,
#third-gif,
#fourth-gif {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 10px auto !important;
}

/* Flowers */
.flower-right {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
}

.flower-bottom {
    position: absolute !important;
    right: 10px !important;
    bottom: 10px !important;
    left: auto !important;
}

.flower-image {
    display: block !important;
    width: 58px !important;
    max-width: 58px !important;
    height: auto !important;
}

/* Stickers */
.sticker-row {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
}

#small-yezhik,
#small-krolik {
    position: static !important;
    width: 100px !important;
    max-width: 43% !important;
    height: auto !important;
    margin: 0 !important;
}

#english-text {
    font-size: 29px !important;
    line-height: 1.25 !important;
}
#photo-text-box {
    padding: 0 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    animation: none !important;
}
.image-message-card {
    position: relative !important;
    padding-top: 185px !important;
    overflow: visible !important;
}

#photo-text-box {
    position: absolute !important;

    top: 25px !important;
    left: 10px !important;
    right: 10px !important;
    bottom: auto !important;

    width: 100% !important;
}

/* Do not remove or replace its background */
.photo-text-box-surface {
    padding: 0 !important;

    font-family: Arial, Bold, sans-serif !important;
    padding: 12px 14px !important;
    font-size: 23px !important;
    border-radius: 12px !important;
}



/* Lower the rainbow text box without interfering with its fade animation */
    #photo-text-box .photo-text-box-surface {
        transform: translateY(50px) !important;
    }

    /* Lower "Дорогая Софья," beneath the date */
    .intro-section .date + p {
        margin-top: 45px !important;
    }
/* Hide the desktop arrow on phones */
#photo-arrow-position {
    display: none !important;
}



@keyframes mobileArrowBounce {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-14px);
    }
}
/* MOBILE ARROW — keep this at the very bottom of mobile.css */

#photo-arrow-position {
    display: none !important;
}

#photo-arrow-position-mobile {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;

    position: absolute !important;
    top: 100px !important;
    right: 56px !important;
    left: auto !important;
    bottom: auto !important;

    z-index: 900 !important;
    pointer-events: none;

    transform: rotate(0deg) !important;
    transform-origin: center;
}

#photo-arrow-position-mobile .photo-arrow-symbol {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;

    color: #e94b43 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 170px !important;
    font-weight: 400 !important;
    line-height: 1 !important;

    animation: mobileArrowBounce 1.1s ease-in-out infinite !important;
}

@keyframes mobileArrowBounce {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-14px);
    }
}
/* Reduce space between “Дорогая Софья,” and the photo text box */
.intro-section {
    padding-bottom: 0 !important;
}
/* Centre the photo text box on mobile */
#photo-text-box {
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    margin: 0 auto !important;
}

#photo-text-box .photo-text-box-surface {
    width: 100% !important;
    margin: 0 auto !important;
    text-align: center !important;
}

#photo-text-box .photo-text-box-surface p {
    width: 100% !important;
    margin: 0 !important;
    text-align: center !important;
}
/* Match the text box edges with the photo */
#photo-text-box {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    margin: 0 !important;
}

#photo-text-box .photo-text-box-surface {
    width: 100% !important;
    margin: 0 !important;
}