/* Profile Polaroids */
.profile-polaroid.left {
    transform: rotate(-8deg);
}

.profile-polaroid.right {
    transform: rotate(8deg);
}

.profile-polaroid:hover {
    transform: rotate(0deg) scale(1.05);
}

/* Tape effect on profile pics */
.profile-polaroid::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(2deg);
    width: 50px;
    height: 20px;
    background: rgba(255, 253, 208, 0.7);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.profile-caption {
    position: absolute;
    bottom: 6px;
    left: 0;
    right: 0;
    text-align: center;
    font-family: 'Indie Flower', cursive;
    font-size: 12px;
    color: #5d4e37;
}



/* Pin/tack decoration */
.profile-polaroid::after {
    content: '📌';
    position: absolute;
    top: -15px;
    right: 10px;
    font-size: 18px;
    transform: rotate(45deg);
}

/* Alternative: Star sticker decoration */
.profile-polaroid.right::after {
    content: '⭐';
    transform: rotate(-30deg);
    left: 10px;
    right: auto;
}

/* Scrapbook Button */
.scrapbook-btn {
    background: linear-gradient(135deg, rgb(174, 47, 51) 0%);
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(157, 33, 37, 0.4);
}

.scrapbook-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 154, 158, 0.6);
}

/* Main Container */
.scrapbook-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: auto;
    min-height: 85vh;
    max-height: 85vh;
    margin: 0 auto;
    padding: 20px 15px;
    background-color: #f4e4c1;

    /*background-image: url("https://thegenzbuzz.com/wp-content/uploads/2025/10/45degree-fabric-dark.png");
    background-blend-mode: multiply;*/
    opacity: 0.95;
    border-radius: 0;
    font-family: 'Patrick Hand';
    /*box-shadow:
        inset 0 0 50px rgba(0, 0, 0, 0.1),
        0 10px 30px rgba(0, 0, 0, 0.3);*/
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Torn paper edge effect */
.scrapbook-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: #d4c4a1;
    /* Solid color */
    opacity: 0.8;
}

/* Paper texture overlay */
.scrapbook-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(212, 196, 161, 0.05);
    /* Simple tint instead of SVG */
    pointer-events: none;
}

/* Top Section Layout */
.scrapbook-top-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-top: 15px;
    position: relative;
}

.scrapbook-center-content {
    flex: 1;
    max-width: 500px;
    margin: 0 auto;
}

/* Header */
.scrapbook-header {
    position: relative;
    margin-bottom: 10px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.scrapbook-header h1 {
    font-size: 36px;
    color: #8b4513;
    margin-bottom: 10px;
    font-weight: 700;
    font-family: 'Permanent Marker', cursive;
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.5);
    transform: rotate(-2deg);
    line-height: 1.1;
    word-wrap: break-word;
}


/* Profiles */
.scrapbook-profiles {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 10px 0;
    position: relative;
    z-index: 2;
}

.profile-polaroid {
    width: 70px;
    height: 85px;
    background: white;
    padding: 6px 6px 20px;
    box-shadow:
        0 3px 6px rgba(0, 0, 0, 0.15),
        0 6px 12px rgba(0, 0, 0, 0.1);
    position: relative;
}

.profile-polaroid img {
    width: 58px;
    height: 58px;
    object-fit: cover;
}

/* Photo */
.scrapbook-photo {
    position: relative;
    margin: 10px auto;
    max-width: 200px;
    transform: rotate(-2deg);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.scrapbook-photo:hover {
    transform: rotate(0deg) scale(1.02);
}

.scrapbook-photo img {
    width: 160px;
    height: 160px;
    object-fit: cover;
    display: block;
    border: 8px solid white;
    border-bottom: 35px solid white;
    box-shadow:
        0 3px 5px rgba(0, 0, 0, 0.1),
        0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Tape effect on photo */
.scrapbook-photo::before,
.scrapbook-photo::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 25px;
    background: rgba(255, 253, 208, 0.7);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.scrapbook-photo::before {
    top: -8px;
    left: 25px;
    transform: rotate(-5deg);
}

.scrapbook-photo::after {
    top: -8px;
    right: 25px;
    transform: rotate(5deg);
}

.scrapbook-photo-caption {
    position: absolute;
    bottom: 6px;
    left: 0;
    right: 0;
    text-align: center;
    font-family: 'Indie Flower', cursive;
    font-size: 13px;
    color: #5d4e37;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 8px;
    /* Add padding so text doesn't touch edges */
}

/* Side Quote Cards - Same size as photo */
.side-quote {
    width: 176px;
    height: 203px;
    padding: 20px 12px 10px 22px;
    margin: 0;
    flex-shrink: 0;
    position: relative;
    background: #fff9e6;
    border: 1px solid #d4c4a1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: visible;
    /* CHANGED from 'hidden' to 'visible' - this allows tape to show outside */
}

.left-quote {
    align-self: flex-start;
    margin-top: 15px;
}

.right-quote {
    align-self: flex-start;
    margin-top: 30px;
}

.side-quote {
    font-size: 19px !important;
    line-height: 1.3;
    margin: 0;
    color: #d2691e;
    font-family: 'Patrick Hand';
    font-weight: 700;
    font-style: italic;
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex: 1;
    display: flex;
    align-items: center;
}

.side-quote .quote-timestamp {
    font-size: 9px;
    padding: 2px 5px;
    background: rgba(139, 69, 19, 0.1);
    border-radius: 8px;
    display: inline-block;
    margin-top: auto;
}

.side-quote .quote-context {
    display: none;
}

.keepsake-label {
    font-size: 14px;
    font-style: italic;
    color: #8b7355;
    margin-bottom: 8px;
    text-align: center;
    font-weight: 600;
}

@media (max-width: 768px) {
    .keepsake-label {
        font-size: 12px;
        margin-bottom: 5px;
    }
}

/* Decorative pin on quotes */
.side-quote::before {
    content: '';
    position: absolute;
    top: -8px;
    /* Negative positioning puts it outside the card */
    left: 50%;
    transform: translateX(-50%) rotate(-3deg);
    width: 60px;
    height: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
    /* High z-index ensures it's on top */
}

.left-quote::before {
    background: rgba(169, 169, 169, 0.7);
    /* Gray for left */
}

.right-quote::before {
    background: rgba(169, 169, 169, 0.7);
    /* Gray for right */
}



/* Washi tape effect on side quotes */
.side-quote::after {
    content: '';
    position: absolute;
    top: 8px;
    left: -4px;
    width: 18px;
    height: calc(100% - 16px);
    background: rgba(211, 47, 47, 0.7);
    /* Solid color instead of repeating gradient */
    opacity: 0.8;
    /*box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);*/
    border-radius: 2px;
}









/* GLightbox Custom Styling */
.glightbox-container {
    background: rgba(0, 0, 0, 0.95) !important;
}

.gslide-inline .scrapbook-container {
    max-width: 900px;
    margin: 0 auto;
    max-height: 85vh;
    overflow: hidden !important;
}

.glightbox-clean .gslide-media {
    background: transparent;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

.glightbox-clean .gslide-inline {
    max-width: 920px;
    max-height: 90vh;
}

.gclose {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
}

.gclose:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: rotate(90deg) !important;
}

/* GLightbox Mobile Scroll Fix */
@media (max-width: 768px) {
    .gslide-inline .scrapbook-container {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        max-height: 85vh !important;
        -webkit-overflow-scrolling: touch !important;
        position: relative !important;
    }

    /* Prevent body scroll when lightbox is open, but allow container scroll */
    .glightbox-open .gslide-inline {
        overflow: hidden !important;
    }

    .glightbox-open .gslide-media {
        overflow: visible !important;
    }

    /* Make sure content doesn't get cut off */
    .scrapbook-container {
        min-height: auto !important;
        height: auto !important;
    }
}

/* Responsive - Very Small Screens */
@media (max-width: 400px) {
    .scrapbook-profiles {
        gap: 15px;
    }

    .profile-polaroid {
        width: 80px;
        padding: 6px;
        padding-bottom: 28px;
    }

    .profile-polaroid img {
        width: 68px;
        height: 68px;
    }

    .profile-caption {
        font-size: 11px;
        bottom: 6px;
    }


}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .scrapbook-top-section {
        flex-direction: column;
        align-items: center;
    }

    .side-quote {
        width: 166px;
        height: 193px;
        margin: 6px 0;
        padding: 8px 10px 8px 18px;
    }

    .side-quote {
        font-size: 11px !important;
    }

    /* Adjust tape position on mobile to avoid blocking text */
    .side-quote::before {
        top: -6px;
        width: 50px;
        height: 20px;
    }

    .side-quote {
        padding: 12px 10px 8px 18px;
        /* Increased top padding */
    }

    .left-quote,
    .right-quote {
        margin-top: 6px;
    }

    .scrapbook-center-content {
        max-width: 100%;
        width: 100%;
    }

    .scrapbook-container {
        max-width: 95vw;
        height: 90vh;
        max-height: none;
        padding: 20px 15px;
    }

    .scrapbook-header h1 {
        font-size: 26px;
    }



    .scrapbook-photo img {
        width: 150px;
        height: 150px;
        border: 8px solid white;
        border-bottom: 35px solid white;
    }

    .vibe-sticker {
        padding: 5px 12px;
        font-size: 13px;
    }

    .gslide-inline .scrapbook-container {
        max-height: 90vh;
    }
}

/* Responsive - Tablet/Desktop */
@media (max-width: 1024px) {
    .gslide-inline .scrapbook-container {
        max-width: 95vw;
    }

    .glightbox-clean .gslide-inline {
        max-width: 98vw;
    }
}

/* Extra tall screens */
@media (min-height: 900px) {
    .scrapbook-container {
        max-height: 850px;
    }
}

/* Header with title and calendar */
.header-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 15px;
    margin-bottom: -10px;
    flex-wrap: wrap;
}

.scrapbook-header h1 {
    font-size: 32px;
    color: #8b4513;
    margin: 0;
    font-weight: 700;
    font-family: 'Permanent Marker', cursive;
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.5);
    transform: rotate(-2deg);
    line-height: 1.2;
    word-wrap: break-word;
    flex: 1;
    min-width: 180px;
}

/* Scrapbook Calendar - Smaller Size */
.scrapbook-calendar {
    position: relative;
    width: 70px;
    /* Reduced from 100px */
    background: white;
    border-radius: 6px;
    /* Slightly smaller radius */
    overflow: hidden;
    /*box-shadow:
        0 3px 6px rgba(0, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 0 0 2px #e0d5c4;*/
    transform: rotate(3deg);
    flex-shrink: 0;
}

.calendar-month {
    background: #d32f2f;
    /* Solid red instead of gradient */
    color: white;
    text-align: center;
    padding: 5px 0;
    font-family: 'Permanent Marker', cursive;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.5px;
    /*box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);*/
}

.calendar-day {
    font-family: 'Permanent Marker', cursive;
    font-size: 32px;
    /* Reduced from 48px */
    font-weight: bold;
    color: #2c2c2c;
    text-align: center;
    padding: 6px 0 3px;
    /* Reduced padding */
    line-height: 1;
}

.calendar-year {
    font-family: 'Indie Flower', cursive;
    font-size: 13px;
    /* Reduced from 18px */
    color: #666;
    text-align: center;
    padding: 0 0 6px;
    /* Reduced padding */
    border-top: 1.5px solid #f0f0f0;
    margin: 0 8px;
    /* Reduced margin */
    padding-top: 5px;
    /* Reduced padding */
}



/* Tape effect on calendar */
.scrapbook-calendar::after {
    content: '';
    position: absolute;
    top: -4px;
    /* Adjusted position */
    left: 50%;
    transform: translateX(-50%);
    width: 35px;
    /* Narrower tape */
    height: 15px;
    /* Shorter tape */
    background: rgba(255, 253, 208, 0.7);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}



/* Responsive adjustments */
@media (max-width: 400px) {
    .header-title-row {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .scrapbook-header h1 {
        font-size: 24px;
        text-align: center;
    }

    .scrapbook-calendar {
        width: 60px;
        /* Even smaller on mobile */
    }

    .calendar-day {
        font-size: 28px;
        /* Smaller on mobile */
    }

    .calendar-year {
        font-size: 11px;
        /* Smaller on mobile */
    }

    .calendar-month {
        font-size: 10px;
        /* Smaller on mobile */
        padding: 4px 0;
    }

    /* Further adjust tape on very small screens */
    .side-quote::before {
        top: -5px;
        width: 45px;
        height: 18px;
    }

    .side-quote {
        padding: 14px 8px 8px 16px;
        /* Even more top padding */
    }
}

/* Vibe stickers in header section */
.scrapbook-vibes-row.header-vibes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 15px auto 20px;
    padding: 0 20px;
    max-width: 500px;
}

.scrapbook-vibes-row.header-vibes .vibe-sticker {
    background: #fff9e6;
    /* Solid color */
    border: 2px solid #ffe4b5;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    color: #5d4e37;
    font-family: 'Indie Flower', cursive;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.15);
    position: relative;
    transition: transform 0.3s ease;
}

/* Vibe Stickers Row */
.scrapbook-vibes-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 0 10px;
    position: relative;
    z-index: 2;
}

.vibe-sticker {
    display: inline-block;
    background: #fff9e6;
    /* Solid color instead of gradient */
    border: 2px solid #ffe4b5;
    /* Border simulates gradient effect */
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    color: #5d4e37;
    font-family: 'Indie Flower', cursive;
    font-weight: 600;
    /*box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.2);*/
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
}

.vibe-sticker:hover {
    background: #ffe4b5;
    /* Lighter on hover */
    transform: rotate(0deg) scale(1.1) !important;
    /*box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);*/
    z-index: 10;
}

.vibe-sticker .vibe-emoji {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
}

.vibe-sticker .vibe-text {
    display: inline;
    vertical-align: middle;
}

/* Adjust spacing after vibes */
.scrapbook-top-section {
    margin-top: 0;
}

/* Responsive adjustments */
@media (max-width: 400px) {
    .scrapbook-vibes-row.header-vibes {
        gap: 6px;
        margin: 12px auto 15px;
        padding: 0 15px;
    }

    .scrapbook-vibes-row.header-vibes .vibe-sticker {
        padding: 5px 12px;
        font-size: 12px;
    }
}

/* Footer Section */
/* GenZbuzz Branding Footer */
.scrapbook-footer {
    margin-top: 30px;
    padding: 20px 15px 15px;
    text-align: center;
    border-top: 2px dashed #d4c4a1;
    background: rgba(255, 255, 255, 0.3);
}

.created-with {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.created-text {
    font-size: 14px;
    color: #8b7355;
    font-family: 'Indie Flower', cursive;
    font-style: italic;
}

.genzbuzz-logo {
    height: 20px;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.genzbuzz-logo:hover {
    opacity: 1;
}

/* Alternative: Stamp Style (Optional) */
.scrapbook-footer.stamp-style {
    position: relative;
    margin-top: 25px;
    padding: 15px;
}

.scrapbook-footer.stamp-style .created-with {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #8b7355;
    border-radius: 8px;
    padding: 10px 15px;
    display: inline-flex;
    box-shadow:
        2px 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 0 3px rgba(139, 115, 85, 0.2);
    transform: rotate(-1deg);
}

/* Responsive adjustments */
@media (max-width: 400px) {
    .scrapbook-footer {
        padding: 15px 10px 10px;
        margin-top: 20px;
    }

    .created-text {
        font-size: 12px;
    }

    .genzbuzz-logo {
        height: 16px;
    }
}

/* Play Button */

/* Scrapbook Audio Player */
.scrapbook-audio-player {
    margin: 15px auto;
    text-align: center;
}

.play-audio-btn {
    background: radial-gradient(circle at center, #1a1a1a 0%, #1a1a1a 25%, #000 25%, #000 30%, #2d2d2d 30%, #2d2d2d 100%);
    border: none;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 0 15px rgba(255, 255, 255, 0.1);
    position: relative;
    animation: spin-slow 8s linear infinite paused;
}

.play-audio-btn:hover {
    transform: scale(1.05);
    box-shadow:
        0 6px 12px rgba(0, 0, 0, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.15);
    animation-play-state: running;
}

/* Vinyl grooves effect */
.play-audio-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: repeating-radial-gradient(circle at center,
            transparent 0px,
            transparent 2px,
            rgba(0, 0, 0, 0.3) 2px,
            rgba(0, 0, 0, 0.3) 3px);
    pointer-events: none;
}

/* Center label */
.play-audio-btn::before {
    content: '';
    position: absolute;
    width: 28px;
    height: 28px;
    background: radial-gradient(circle, #8b4513 0%, #5d4e37 100%);
    border-radius: 50%;
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 1px 2px rgba(255, 255, 255, 0.2);
    z-index: 1;
}

.play-audio-btn svg {
    color: white;
    pointer-events: none;
    z-index: 2;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

/* Spin animation when playing */
@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Add spinning class when audio is playing */
.play-audio-btn.playing {
    animation-play-state: running;
}

.play-audio-btn.playing::before {
    background: radial-gradient(circle, #d2691e 0%, #8b4513 100%);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .play-audio-btn {
        width: 60px;
        height: 60px;
    }

    .play-audio-btn::before {
        width: 24px;
        height: 24px;
    }

    .play-audio-btn svg {
        width: 20px;
        height: 20px;
    }
}



/* NEW: Fixed Share Button in GLightbox Container (not in scrapbook) */
.glightbox-container .scrapbook-share-fixed {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    /* Above everything */
    pointer-events: auto;
}

.scrapbook-share-fixed .scrapbook-download-btn {
    background: linear-gradient(135deg, #cc0000 0%, #c97522 100%);
    color: white;
    border: none;
    padding: 15px 35px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    background-clip: padding-box;
}

.scrapbook-share-fixed .scrapbook-download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(204, 0, 0, 0.6);
}

.scrapbook-share-fixed .scrapbook-download-btn:active {
    transform: translateY(-1px);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .glightbox-container .scrapbook-share-fixed {
        bottom: 15px;
    }

    .scrapbook-share-fixed .scrapbook-download-btn {
        padding: 12px 28px;
        font-size: 14px;
    }
}

/* Caption Overlay - Taller container that sits on top of scrapbook content */
.captions-container {
    position: absolute;
    bottom: 0;
    /* Sits at the bottom */
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.75) 50%, transparent 100%);
    backdrop-filter: blur(8px);
    padding: 80px 20px 20px;
    /* Large top padding to extend height above share button */
    border-radius: 0;
    box-shadow: none;
    transform: translateY(0);
    transition: opacity 0.3s ease;
    z-index: 200;
    min-height: 150px;
    /* Minimum height ensures it clears share button */
    opacity: 0;
    pointer-events: none;
    text-align: center;
}

.captions-container.active {
    opacity: 1;
    pointer-events: auto;
}

/* Make sure it appears in GLightbox */
.glightbox-container .captions-container,
.gslide-media .captions-container {
    position: absolute !important;
    bottom: 0 !important;
    display: block !important;
}

/* Hide header, just show text */
.captions-header {
    display: none;
}

/* Caption text - positioned in the safe zone above share button */
.captions-text {
    font-family: 'Patrick Hand', cursive;
    font-size: 24px;
    line-height: 1.4;
    color: #fff;
    text-align: center;
    min-height: 50px;
    padding: 0 40px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
    font-weight: 600;
    max-height: 120px;
    overflow-y: auto;
    margin-bottom: 15px;
    /* Space above the share button */
}

/* Pre-loaded caption items */
.caption-item {
    display: none;
    animation: captionFadeIn 0.3s ease-in;
}

@keyframes captionFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tablet/iPad adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
    .captions-container {
        padding: 90px 20px 20px;
        /* Even more height on tablets */
        min-height: 170px;
    }

    .captions-text {
        font-size: 22px;
        padding: 0 35px;
        margin-bottom: 20px;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .captions-container {
        padding: 70px 15px 15px;
        /* Tall enough to clear mobile share button */
        min-height: 130px;
    }

    .captions-text {
        font-size: 18px;
        padding: 0 20px;
        max-height: 90px;
        margin-bottom: 12px;
    }
}

/* Very small screens */
@media (max-width: 400px) {
    .captions-container {
        padding: 65px 10px 12px;
        min-height: 120px;
    }

    .captions-text {
        font-size: 16px;
        padding: 0 15px;
        max-height: 80px;
        margin-bottom: 10px;
    }
}

/* Ensure share button stays at fixed bottom */
.glightbox-container .scrapbook-share-fixed {
    z-index: 99999;
    /* Above captions */
    position: fixed;
    bottom: 15px;
}

/* Optional: Add subtle animation when caption changes */
.caption-item {
    animation: captionPulse 0.4s ease-out;
}

@keyframes captionPulse {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}