* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border: 0;
    font-size: 100%;
    vertical-align: baseline;
}

.album-page {
  padding: 100px 5% 40px;
  background-color: #fafafa;
  min-height: 100vh;
}

/* Masonry grid */
.album-gallery {
  column-count: 4;
  column-gap: 1em;
}

.album-item {
    display: inline-block;
    margin-bottom: 1em;
    width: 100%;
    break-inside: avoid;
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.album-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 60px 0 40px;
    flex-wrap: wrap;
    font-family: "Noto Sans", sans-serif;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-weight: 500;
    font-size: 16px;
    text-decoration: none;
    color: #1d1d1d;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.pagination .current {
    border: 1.6px solid #48d941;
    color: #48d941;
    background-color: #f8fff8;
}

.pagination .page-number {
    border: 1.4px solid #dcdcdc;
}

.pagination .page-number:hover {
    border-color: #48d941;
    color: #48d941;
}

.pagination .page-link {
    border: 1.4px solid #dcdcdc;
    color: #1d1d1d;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    transition: border-color 0.25s ease, color 0.25s ease;
}

.pagination .page-link:hover {
    border-color: #48d941;
    color: #48d941;
}

.pagination .dots {
    color: #999;
    font-size: 16px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    object-fit: contain;
}

.lightbox .close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox .close:hover {
    color: #ccc;
}

/* Responsive layout */
@media (max-width: 1200px) {
    .album-gallery { column-count: 3; }
}

@media (max-width: 900px) {
    .album-gallery { column-count: 3; }

    .pagination {
        gap: 6px;
        margin: 50px 0 30px;
    }

    .pagination a,
    .pagination span {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }

    .pagination .page-link {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }

    .pagination .dots {
        font-size: 16px;
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 768px) {
    .pagination {
        gap: 5px;
        margin: 40px 0 20px;
    }

    .pagination a,
    .pagination span {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }

    .pagination .page-link {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }

    .pagination .dots {
        font-size: 16px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 576px) {
    .album-gallery { column-count: 3; }

    .pagination {
        gap: 4px;
        margin: 35px 0 15px;
    }

    .pagination a,
    .pagination span {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }

    .pagination .page-link {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }

    .pagination .dots {
        font-size: 16px;
        width: 45px;
        height: 45px;
    }
}



@supports (-webkit-touch-callout: none) {
    html, body {
        margin: 0 !important;
        padding: 0 !important;
        padding-top: env(safe-area-inset-top) !important;
    }

    main.album-page {
        margin-top: 0 !important;
        padding-top: 0 !important;
        margin-top: 20px !important;
    }

    .album-gallery {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}
