html {
    min-height: 100%;
}

body {
    min-height: 100svh;
    margin: 0;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
        url('edited-background.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    font-family: 'Orbitron', 'Courier New', monospace;
    overflow: hidden;
    user-select: none;
    position: relative;
}

* {
    box-sizing: border-box;
}

.marquee-container {
    width: 100%;
    height: clamp(128px, 29svh, 335px);
    overflow: hidden;
    padding: 0 clamp(6px, 1.5vw, 14px);
    display: flex;
    align-items: center;
    position: fixed;
    left: 0;
    z-index: 1000;
    background: transparent;
}

.marquee-top {
    top: 0;
}

.marquee-bottom {
    bottom: 0;
}

.marquee {
    display: flex;
    width: max-content;
}

.marquee-content {
    display: flex;
}

.marquee-content img {
    height: clamp(90px, 23svh, 275px);
    max-width: min(46vw, 285px);
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: clamp(10px, 2vw, 25px);
    margin: 0 clamp(4px, 1.2vw, 10px);
    box-shadow: 0 3px 25px rgba(0, 0, 0, 0.3);
    user-select: none;
    pointer-events: none;
}

.marquee-top .marquee {
    animation: marquee-scroll 30s linear infinite;
}

.marquee-bottom .marquee {
    animation: marquee-scroll-reverse 30s linear infinite;
}

@keyframes marquee-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@keyframes marquee-scroll-reverse {
    from {
        transform: translateX(-50%);
    }

    to {
        transform: translateX(0);
    }
}

.birthday-message {
    position: fixed;
    width: min(92vw, 980px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    color: #ffffff;
    font-family: 'Arial Black', Arial, sans-serif;
    font-size: clamp(3.1rem, 12vw, 10rem);
    font-weight: 900;
    line-height: 0.92;
    text-align: center;
    text-shadow:
        0 0 10px #ff69b4,
        0 0 20px #ff69b4,
        0 0 40px #ff1493,
        0 0 60px #ff1493;
    z-index: 1500;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
}

.birthday-message:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 10px;
}

.sticky-note {
    position: fixed;
    top: calc(50% + clamp(88px, 14vw, 170px));
    left: 50%;
    transform: translateX(-50%) rotate(-3deg);
    width: min(74vw, 260px);
    padding: clamp(12px, 2.5vw, 18px) clamp(14px, 3vw, 22px);
    background: #fff3a6;
    color: #4c2b0d;
    border: 1px solid rgba(117, 80, 9, 0.22);
    border-radius: 3px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
    font-family: "Comic Sans MS", "Trebuchet MS", Arial, sans-serif;
    font-size: clamp(0.95rem, 2.4vw, 1.2rem);
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    z-index: 1600;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
}

.sticky-note:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 6px;
}

.sticky-note::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    width: 58px;
    height: 18px;
    transform: translateX(-50%) rotate(2deg);
    background: rgba(255, 255, 255, 0.58);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.center-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(90vw, 720px);
    max-height: min(78svh, 560px);
    overflow-y: auto;
    background: rgba(255, 248, 250, 0.94);
    color: #481324;
    padding: clamp(24px, 5vw, 44px);
    border: 1px solid rgba(255, 105, 180, 0.55);
    border-radius: 14px;
    font-size: clamp(1rem, 2.6vw, 1.45rem);
    line-height: 1.35;
    font-weight: bold;
    text-align: center;
    display: none;
    z-index: 10000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), 0 0 22px rgba(255, 105, 180, 0.55);
}

.popup-text {
    display: block;
    white-space: pre-line;
}

.center-popup.show {
    display: block;
    animation: fadeIn 0.4s ease;
}

.close-btn {
    position: absolute;
    top: 6px;
    right: 10px;
    font-size: 1.2rem;
    background: transparent;
    border: none;
    color: #481324;
    cursor: pointer;
    font-weight: bold;
}

.close-btn:hover {
    color: #8b0000;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@media (max-width: 768px) {
    .marquee-container {
        height: clamp(128px, 25svh, 230px);
    }

    .marquee-content img {
        height: clamp(100px, 22svh, 210px);
    }

    .birthday-message {
        width: min(92vw, 560px);
        font-size: clamp(3rem, 17vw, 6.5rem);
    }

    .center-popup {
        font-size: clamp(0.95rem, 3.2vw, 1.2rem);
    }

    .sticky-note {
        top: calc(50% + clamp(74px, 19vw, 120px));
        width: min(78vw, 235px);
    }
}

@media (max-width: 520px) {
    body {
        background-position: center top;
    }

    .marquee-content img {
        max-width: 39vw;
    }

    .birthday-message {
        font-size: clamp(2.7rem, 18vw, 5.5rem);
    }

    .center-popup {
        width: calc(100vw - 24px);
    }

    .sticky-note {
        top: calc(50% + clamp(66px, 20vw, 96px));
        font-size: clamp(0.88rem, 3.7vw, 1rem);
    }
}

@media (max-height: 560px) {
    .marquee-container {
        height: 104px;
    }

    .marquee-content img {
        height: 82px;
    }

    .birthday-message {
        font-size: clamp(2.2rem, 13vh, 4.8rem);
    }

    .sticky-note {
        top: 102px;
        right: clamp(14px, 3vw, 28px);
        bottom: auto;
        left: auto;
        transform: rotate(3deg);
        width: min(34vw, 190px);
        padding: 8px 10px;
        font-size: 0.78rem;
        line-height: 1.05;
    }
}
