:root {
    --bg: #0a0b0c;
    --header-bg: #253364;
    --fg: #eee;
    --accent: hsl(210, 45%, 55%);
    --card-bg: rgba(255, 255, 255, 0.1);
    --shadow: rgba(37, 51, 100, 0.5);
    --radius: 0.8rem;
    --logo-height: 250px;
    /* larger logo for PC */
    --logo-margin: 0.5rem;
}

@media (max-width: 600px) {
    :root {
        --logo-height: 120px;
        /* smaller logo for mobile */
    }
}

/* ... existing rules remain ... */

.header {
    text-align: center;
    background: var(--header-bg);
    width: 100vw;
    padding: 2rem 0 1rem 0;
    margin-top: -2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.header img {
    max-height: var(--logo-height) !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    margin-bottom: var(--logo-margin) !important;
}


body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* ── AI Photography Watermark Background ── */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.10;
    /* Tijdelijk verhoogd naar 80% zodat je hem goed kunt zien! */
    background-image: url('bg_camera.jpg');
    background-size: cover;
    background-position: center 0vh;
    /* Pushes the image down by 25% of the screen height */
    background-repeat: no-repeat;
}

/* Secret admin link in footer */
.secret-link-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 60px;
    z-index: 9999;
    background: transparent;
    cursor: default;
    /* Doesn't change to pointer, keeping it a secret */
}

h1 {
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Gallery layout – masonry via CSS columns */
.gallery {
    column-count: var(--cols, 5);
    column-gap: 1.2rem;
    max-width: 1800px;
    width: 100%;
    margin: 3rem auto 4rem auto;
}

@media (max-width: 900px) {
    .gallery {
        column-count: min(var(--cols, 5), 3);
    }
}

@media (max-width: 600px) {
    .gallery {
        column-count: min(var(--cols, 5), 2);
        column-gap: 0.8rem;
    }
}

.gallery a,
.gallery .photo-card {
    display: block;
    break-inside: avoid;
    margin-bottom: 1.2rem;
    overflow: hidden;
    border-radius: var(--radius);
}

@media (max-width: 600px) {

    .gallery a,
    .gallery .photo-card {
        margin-bottom: 0.8rem;
    }
}

.gallery img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: 0 4px 8px var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}



.upload-page {
    max-width: none;
}

.gallery .photo-card {
    display: flex;
    flex-direction: column;
}


.gallery .photo-card {
    width: 100%;
}


.gallery img {
    background: #253364;
}

.gallery img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 16px var(--shadow);
}

/* ── Bulk-delete UI ── */
.bulk-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    width: 95%;
    max-width: 1800px;
    margin: 1.5rem auto 0 auto;
}

.bulk-delete-btn {
    background: #c33 !important;
}

.bulk-delete-btn:hover:not(:disabled) {
    background: #a00 !important;
}

.bulk-delete-btn:disabled {
    background: #555 !important;
    cursor: not-allowed;
}

#select-count {
    color: #aaa;
    font-size: 0.9rem;
    margin-left: 0.3rem;
}

/* Checkbox overlay on photo-card */
.photo-card {
    position: relative;
}

.photo-select-label {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 5;
    cursor: pointer;
}

.photo-select-label .photo-check {
    display: none;
}

.photo-select-label .checkmark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.35);
    color: transparent;
    font-size: 1.1rem;
    font-weight: 700;
    transition: all 0.15s;
}

.photo-select-label .photo-check:checked+.checkmark {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.photo-card.selected img {
    outline: 3px solid var(--accent);
    outline-offset: -3px;
    opacity: 0.85;
}

/* Forms */
form {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: 0 2px 6px var(--shadow);
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
}

/* Override for the bulk-delete form – full width, no card styling */
#bulk-form {
    max-width: none;
    background: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 0.8rem;
    margin-top: 0.5rem;
    border: 1px solid #ccc;
    border-radius: var(--radius);
    font-size: 1rem;
    box-sizing: border-box;
}

label {
    display: block;
    margin-bottom: 0.5rem;
}

input[type="file"] {
    display: none;
}

.custom-file-upload {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 0;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    margin-bottom: 0.5rem;
}

.custom-file-upload:hover {
    background: hsl(210, 45%, 45%);
}

#file-chosen {
    text-align: center;
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 1.5rem;
    word-break: break-all;
}

button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 0;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
    width: 100%;
}

button:hover {
    background: hsl(210, 45%, 45%);
}

.delete-btn {
    width: auto !important;
    padding: 0.4rem 0.8rem !important;
}

p.error {
    color: #c00;
}

p.msg {
    color: #0c0;
}

.auth-page,
.upload-page {
    /* removed width: 100% to prevent scrollbars */
}

.action-buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    width: 100%;
    max-width: 400px;
    margin-top: 1rem;
}

.upload-btn {
    display: block;
    flex: 1;
    text-align: center;
    padding: 0.6rem 0.4rem;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    border-radius: 0;
    font-size: 0.95rem;
    white-space: nowrap;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .action-buttons {
        max-width: 100%;
    }

    .upload-btn {
        padding: 0.5rem 0.2rem;
        font-size: 0.85rem;
    }
}

/* Delete button */
.delete-btn {
    background: #c33;
    color: #fff;
    border: none;
    border-radius: 0;
    cursor: pointer;
    width: auto !important;
    padding: 0.4rem 0.8rem !important;
}

.delete-btn:hover {
    background: #a00;
}

/* ── Detail page ── */
.detail-page {
    padding: 1rem;
    justify-content: flex-start;
}

.detail-header {
    margin-bottom: 1rem;
}

.detail-header img {
    max-height: 50px !important;
    margin-bottom: 0 !important;
}

.detail-viewer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.detail-img {
    display: block;
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 8px 24px var(--shadow);
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    font-size: 3rem;
    line-height: 1;
    color: #fff;
    background: transparent;
    text-decoration: none;
    transition: transform 0.2s, color 0.2s;
    user-select: none;
    z-index: 10;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.nav-prev {
    left: 12px;
}

.nav-next {
    right: 12px;
}

.nav-arrow:hover {
    transform: translateY(-50%) scale(1.1);
    color: #ddd;
}

/* On small screens: smaller arrows */
@media (max-width: 600px) {
    .nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 2.5rem;
    }

    .nav-prev {
        left: 6px;
    }

    .nav-next {
        right: 6px;
    }
}

.detail-back-btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: var(--accent) !important;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 0 !important;
    /* Forces sharp corners */
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: background 0.2s, transform 0.2s;
    border: 2px solid var(--accent);
}

.detail-back-btn:hover {
    background: transparent !important;
    color: var(--accent) !important;
}



/* ── Scroll-reveal fade-in ── */
.gallery a,
.gallery .photo-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.gallery a.revealed,
.gallery .photo-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ── Hover overlay ── */
.gallery a {
    position: relative;
}

.gallery a::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    border-radius: var(--radius);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gallery a:hover::after {
    opacity: 1;
}

.gallery a:hover img {
    transform: scale(1.03);
    box-shadow: 0 8px 16px var(--shadow);
}

/* ── Lightbox ── */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-img {
    max-width: 92vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 28px;
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
    z-index: 1001;
    line-height: 1;
    transition: transform 0.2s;
    background: none;
    border: none;
    width: auto;
}

.lightbox-close:hover {
    transform: scale(1.2);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
    padding: 0.5rem;
    transition: transform 0.2s, color 0.2s;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    width: auto;
}

.lightbox-nav:hover {
    transform: translateY(-50%) scale(1.15);
    color: #ccc;
}

.lightbox-prev {
    left: 16px;
}

.lightbox-next {
    right: 16px;
}

@media (max-width: 600px) {
    .lightbox-close {
        top: 12px;
        right: 14px;
        font-size: 2rem;
    }

    .lightbox-nav {
        font-size: 2.2rem;
    }

    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }
}

/* ── Page Loader ── */
#page-loader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.aperture-icon {
    animation: spin 3s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Back to Top Button ── */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 0;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    background: hsl(210, 45%, 45%);
    transform: translateY(-5px);
}

@media (max-width: 600px) {
    #back-to-top {
        bottom: 20px;
        right: 20px;
    }
}

/* ── Footer ── */
.site-footer {
    position: relative;
    /* For the secret link */
    width: 100vw;
    background-color: #0f1324;
    color: #fff;
    text-align: center;
    padding: 2rem 0;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    margin-top: auto;
    margin-bottom: -2rem;
    /* counteract body padding-bottom */
}