@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');
app {
    position: relative;
    display: flex;
    flex-direction: column;
}
/* Page background like album paper */
html, body {
    font-family: "Segoe UI", Tahoma, sans-serif;
    color: #3a3a3a;
    background-color: #f3efe6;
}
.header {
    display: flex;
    align-items: center; /* vertical */
    justify-content: center; /* horizontal */
    height: 180px; /* adjust */
    background: #f3efe6;
}

    .header h1 {
        margin: 0;
        font-size: 2.25rem;
    }
/* Album container */
.album {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-gap: 25px;
}

/* Each photo frame placeholder */
.album-item {
    background: white;
    padding: 10px;
    border: 3px solid #e4ded3;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    min-height: 200px; /* so placeholders have a size before images */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

    /* Placeholder text */
    .album-item span {
        font-style: italic;
        color: #999;
    }
.pin-emoji {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    z-index: 10;
    pointer-events: none;
}

    .pin-emoji.cornered {
        top: -12px;
        right: -12px;
        transform: rotate(-10deg);
    }

    .pin-emoji.centered {
        top: -14px;
        left: 50%;
        transform: translateX(-50%);
    }
.caption-box {
    width: 100%;
    min-height: 1.5em;
    max-height: 10em; /* optional max */
    overflow-y: hidden;
    resize: none; /* prevent manual resizing */
}
.album-scatter-container {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
    padding: 2rem;
}

.photo-scatter-frame {
    /*height: 25vh;

    aspect-ratio: 4 / 5;
    flex: 1 1 calc(25% - 20px);
    margin: 10px;
    padding: 8px;
    border: 4px solid #ccc;
    background: white;
    box-shadow: 2px 4px 12px rgba(0,0,0,0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 4 / 3; 
    overflow: hidden;
    position: relative;
    transform: rotate(var(--angle, 0deg)); 

    */
    max-width: 20%;
    height: fit-content;
    background: #fefefe;
    border: 4px solid #fff;
    border-radius: 8px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    overflow: visible;
    position: relative;
    transition: transform 0.2s ease;
    cursor: pointer;
}

    .photo-scatter-frame img {
        max-width: 100%;
        height: auto;
        object-fit: cover;
        border-radius: 4px;
    }

    .photo-scatter-frame:hover {
        transform: scale(1.05) rotate(0deg) !important;
        z-index: 999 !important;
    }

.photo-date {
    margin-top: 6px;
    font-size: 0.9em;
    color: #555;
    border: 4px solid #fff;
    border-radius: 8px;
    font-style: italic;
}

.reload-icon {
    background-color: transparent;
    display: inline-flex;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    /*
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    font-size: 24px;
    border-radius: 50%;
    background-color: #1E90FF;
    border: 2px solid #ccc;
    box-shadow: 0 0 4px rgba(0,0,0,0.2);
        */
}

.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
.pagination-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}
.lightbox-backdrop {
    position: fixed;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1010; /* above backdrop */
}

.lightbox-backdrop img {
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: 0 0 15px black;
    left: 0;
    border-radius: 8px;
    display: block;
}

.lightbox-caption {
    margin-top: 8px;
    color: white !important;
    padding: 6px 12px;
    font-size: 1rem;
    text-align: center;
    border-radius: 4px;
    max-width: 100%; /* prevent overflow */
    box-sizing: border-box;
    user-select: none;
    z-index: 1010; /* above backdrop */
    position: relative; /* ensure z-index applies */
    font-weight: 600;
    text-shadow: 0 0 5px rgba(0,0,0,0.9), 0 0 10px rgba(0,0,0,0.7);
}
