/* Modal popup for photo viewer */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background-color: rgba(10,0,40,0.92);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.modal-content {
    display: block;
    margin: 40px auto 0 auto;
    max-width: 90vw;
    max-height: 70vh;
    border-radius: 18px;
    box-shadow: 0 8px 32px #000a;
    border: 8px solid transparent;
    background: #fff;
    z-index: 3002;
}
.close {
    color: #fff;
    position: absolute;
    top: 24px;
    right: 48px;
    font-size: 48px;
    font-weight: bold;
    cursor: pointer;
    z-index: 3003;
    text-shadow: 0 2px 8px #000a;
}
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: #fff;
    font-weight: bold;
    font-size: 48px;
    user-select: none;
    border-radius: 0 8px 8px 0;
    background: rgba(0,0,0,0.2);
    z-index: 3003;
    transition: background 0.2s;
}
.next {
    right: 24px;
    border-radius: 8px 0 0 8px;
}
.prev {
    left: 24px;
}
.prev:hover, .next:hover, .close:hover {
    background: rgba(255,255,255,0.15);
    color: #ffe600;
}
.modal-hearts {
    position: absolute;
    top: 12px;
    left: 0;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    pointer-events: none;
    z-index: 3004;
}
.modal-heart {
    font-size: 2rem;
    margin: 0 2px;
    user-select: none;
    pointer-events: none;
}
.modal-heart::before {
    content: '❤';
}
/* Arch layout for photos */
.arch-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}
.photo-arch {
    width: 700px;
    height: 180px;
    margin: 32px auto 0 auto;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}
.arch-photo {
    position: absolute;
    width: 110px;
    height: 110px;
    object-fit: cover;
    border: 4px solid #c2a477;
    border-radius: 16px;
    box-shadow: 2px 4px 12px rgba(80, 50, 20, 0.15);
    background: #f5e6c8;
    transition: transform 0.2s;
}
.arch-photo:hover {
    transform: scale(1.08) rotate(-2deg);
    box-shadow: 0 8px 24px rgba(80, 50, 20, 0.25);
}
/* Position each photo in an arch using nth-child */
.photo-arch .arch-photo:nth-child(1) { left: 0px; top: 100px; }
.photo-arch .arch-photo:nth-child(2) { left: 50px; top: 60px; }
.photo-arch .arch-photo:nth-child(3) { left: 120px; top: 30px; }
.photo-arch .arch-photo:nth-child(4) { left: 200px; top: 10px; }
.photo-arch .arch-photo:nth-child(5) { left: 290px; top: 0px; }
.photo-arch .arch-photo:nth-child(6) { left: 380px; top: 0px; }
.photo-arch .arch-photo:nth-child(7) { left: 470px; top: 10px; }
.photo-arch .arch-photo:nth-child(8) { left: 550px; top: 30px; }
.photo-arch .arch-photo:nth-child(9) { left: 620px; top: 60px; }
.photo-arch .arch-photo:nth-child(10) { left: 670px; top: 100px; }
.photo-arch .arch-photo:nth-child(11) { left: 90px; top: 80px; }
.photo-arch .arch-photo:nth-child(12) { left: 160px; top: 50px; }
.photo-arch .arch-photo:nth-child(13) { left: 240px; top: 30px; }
.photo-arch .arch-photo:nth-child(14) { left: 330px; top: 20px; }
#effects {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 2000;
}
/* Balloon styles for modal */
.balloon {
    position: absolute;
    width: 48px;
    height: 64px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: #ff69b4;
    box-shadow: 0 8px 24px #0003;
    z-index: 2002;
    top: 50%;
    transform: translateY(-50%);
    animation: balloon-float 2.5s ease-in-out infinite alternate;
}
.balloon.left {
    left: 16px;
    background: #ff69b4;
}
.balloon.right {
    right: 16px;
    background: #00eaff;
}
@keyframes balloon-float {
    0% { transform: translateY(-50%) scale(1); }
    100% { transform: translateY(-60%) scale(1.05); }
}
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', cursive, sans-serif;
    background: linear-gradient(to bottom, #aeefff 0%, #e0f7fa 100%);
    min-height: 100vh;
    overflow-x: hidden;
}
body::before, body::after {
    display: none !important;
}
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1;
    pointer-events: none;
    background: url('https://www.transparenttextures.com/patterns/stardust.png'),
                repeating-radial-gradient(circle at 10% 20%, #fff 0 1px, transparent 1px 80px),
                repeating-radial-gradient(circle at 80% 70%, #fff 0 1.5px, transparent 1.5px 120px),
                repeating-radial-gradient(circle at 50% 50%, #fff 0 1.2px, transparent 1.2px 100px);
    opacity: 0.8;
}
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    pointer-events: none;
    background: repeating-radial-gradient(circle at 10% 20%, #fff 0 1px, transparent 1px 80px),
                repeating-radial-gradient(circle at 80% 70%, #fff 0 1.5px, transparent 1.5px 120px),
                repeating-radial-gradient(circle at 50% 50%, #fff 0 1.2px, transparent 1.2px 100px);
    opacity: 0.7;
}
.oak-background {
    background: radial-gradient(ellipse at 60% 20%, #2d1a4d 0%, #0a0026 100%);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
}
.scrapbook-frame {
    background: #fff;
    border: 8px solid #e6e6e6;
    border-radius: 32px;
    box-shadow: 0 8px 32px #0001;
    padding: 32px 24px 24px 24px;
    max-width: 900px;
    width: 95vw;
    position: relative;
    text-align: center;
    margin-top: 0;
}
.photos {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}
.photo {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 4px solid #c2a477;
    border-radius: 16px;
    box-shadow: 2px 4px 12px rgba(80, 50, 20, 0.15);
    background: #f5e6c8;
    transition: transform 0.2s;
}
.photo:hover {
    transform: scale(1.05) rotate(-2deg);
    box-shadow: 0 8px 24px rgba(80, 50, 20, 0.25);
}
.party-title {
    font-family: 'Luckiest Guy', 'Comic Sans MS', cursive, sans-serif;
    font-size: 3.2rem;
    margin: 32px 0 0 0;
    letter-spacing: 2px;
    position: relative;
    z-index: 2;
}
    .navy-glow {
        color: #ffe600;
        text-shadow:
            0 0 12px #ffe600,
            0 0 32px #ffe600aa,
            2px 2px 0 #fff,
            0 0 48px #ffe600;
        font-weight: bold;
        letter-spacing: 2px;
        margin-bottom: 18px;
    }
@keyframes party-colors {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}
#popper {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 1000;
}
#ribbons {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 999;
}
.floating-heart {
    position: fixed;
    top: 0;
    width: 36px;
    height: 36px;
    opacity: 0.92;
    background: none;
    animation: heart-float 3.2s cubic-bezier(.6,.2,.4,1) forwards;
    z-index: 1001;
}
.floating-heart::before, .floating-heart::after {
    content: '';
    position: absolute;
    left: 18px;
    top: 10px;
    width: 18px;
    height: 26px;
    background: var(--heart-color, #e255a3);
    border-radius: 18px 18px 0 0;
    transform: rotate(-45deg);
}
.floating-heart::after {
    left: 0;
    transform: rotate(45deg);
}
@keyframes heart-float {
    0% { transform: translateY(-60px) scale(1.2); opacity: 0.9; }
    60% { opacity: 1; }
    100% { transform: translateY(100vh) scale(0.8); opacity: 0; }
}
.cake-container {
    margin: 0 auto 16px auto;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cake-container {
    margin: 0 auto 0 auto;
    width: 220px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
/* Balloons and hearts on photo frames */
.photo-frame {
    position: absolute;
    width: 120px;
    height: 120px;
    left: 0; top: 0;
    pointer-events: none;
    z-index: 3;
}
.photo-balloon {
    position: absolute;
    width: 28px;
    height: 38px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: #ff69b4;
    box-shadow: 0 4px 12px #0002;
    top: -18px;
    left: 8px;
    z-index: 4;
}
.photo-heart {
    position: absolute;
    width: 22px;
    height: 22px;
    left: 80px;
    top: 90px;
    z-index: 4;
}
.photo-heart::before, .photo-heart::after {
    content: '';
    position: absolute;
    left: 11px;
    top: 6px;
    width: 11px;
    height: 16px;
    background: #e255a3;
    border-radius: 11px 11px 0 0;
    transform: rotate(-45deg);
}
.photo-heart::after {
    left: 0;
    transform: rotate(45deg);
}
}
#blowButton {
    background: #e6b980;
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 12px 32px;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 2px 8px #8b5c2a33;
    cursor: pointer;
    margin-top: 12px;
    transition: background 0.2s;
}
#blowButton:hover {
    background: #a9744f;
}
#popper {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 1000;
}
#ribbons {
}
.photo-circle {
    position: relative;
    width: 520px;
    height: 520px;
    margin: 0 auto 24px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.photo-circle .party-title {
    /* removed absolute positioning for top title */
}
.photo-circle .photo {
    position: absolute;
    width: 110px;
    height: 110px;
    object-fit: cover;
    border: 4px solid #c2a477;
    border-radius: 16px;
    box-shadow: 2px 4px 12px rgba(80, 50, 20, 0.15);
    background: #f5e6c8;
    transition: transform 0.2s;
}
.photo-circle .photo:hover {
    transform: scale(1.08) rotate(-2deg);
    box-shadow: 0 8px 24px rgba(80, 50, 20, 0.25);
}
.cake-center {
    position: absolute;
    left: 50%;
    top: 54%;
    transform: translate(-50%, 0);
    z-index: 2;
}
/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background-color: rgba(10,0,40,0.92);
    align-items: center;
    justify-content: center;
}
.modal-content {
    display: block;
    margin: 60px auto 0 auto;
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 18px;
    box-shadow: 0 8px 32px #000a;
    border: 4px solid #fff;
}
.close {
    color: #fff;
    position: absolute;
    top: 24px;
    right: 48px;
    font-size: 48px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    text-shadow: 0 2px 8px #000a;
}
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: #fff;
    .cake-center {
        display: flex;
        justify-content: center;
        align-items: flex-start;
        margin: 24px auto 16px auto;
        width: 100%;
        min-height: 240px;
        z-index: 2;
    }
}
.next {
    right: 24px;
    border-radius: 8px 0 0 8px;
}
.prev {
    left: 24px;
}
.prev:hover, .next:hover, .close:hover {
    background: rgba(255,255,255,0.15);
    color: #ffe600;
}
}
