* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #444;
    background-color: #cccccc;
    background-image: linear-gradient(to bottom, #aaaaaa 0px, #cccccc 80px);
    background-repeat: no-repeat;
    min-height: 100vh;
}
a { color: #444; text-decoration: none; }
a:hover { color: #000; text-decoration: underline; }

.page-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 10px 10px 20px;
}

/* Header */
.album-header {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(to bottom, #eeeeee 0%, #d4d4d4 100%);
    border: 1px solid #aaaaaa;
    border-radius: 4px;
    padding: 6px 10px;
    margin-bottom: 10px;
    min-height: 42px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(to bottom, #dddddd, #c0c0c0);
    border: 1px solid #999;
    border-radius: 3px;
    font-size: 16px;
    flex-shrink: 0;
    color: #333;
    cursor: pointer;
    user-select: none;
}
.nav-btn svg {
    width: 1em;
    height: 1em;
    display: block;
}
.nav-btn:hover {
    background: linear-gradient(to bottom, #cccccc, #b0b0b0);
    color: #000;
    text-decoration: none;
}
.nav-btn.up-btn {
    background: linear-gradient(to bottom, #ffe893, #f1c40f);
    border: 1px solid #d4ac0d;
    color: #000;
    font-weight: bold;
}
.nav-btn.up-btn:hover {
    background: linear-gradient(to bottom, #ffd861, #d4ac0d);
    color: #000;
}
.nav-btn.prev-btn {
    background: linear-gradient(to bottom, #ffc485, #e67e22);
    border: 1px solid #d35400;
    color: #000;
    font-weight: bold;
}
.nav-btn.prev-btn:hover {
    background: linear-gradient(to bottom, #ffa84c, #d35400);
    color: #000;
}
.nav-btn.next-btn {
    background: linear-gradient(to bottom, #a3e4d7, #2ecc71);
    border: 1px solid #27ae60;
    color: #000;
    font-weight: bold;
}
.nav-btn.next-btn:hover {
    background: linear-gradient(to bottom, #76d7c4, #27ae60);
    color: #000;
}
.nav-btn.dl-btn {
    background: linear-gradient(to bottom, #a0c4ff, #4387f3);
    border: 1px solid #2b6ad4;
    color: #000;
    font-weight: bold;
}
.nav-btn.dl-btn:hover {
    background: linear-gradient(to bottom, #85b3ff, #2974eb);
    color: #000;
    text-decoration: none;
}
.nav-btn.disabled { opacity: 0.35; pointer-events: none; }
.header-title {
    flex-grow: 1;
    font-size: 14px;
    font-weight: bold;
    color: #333333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.header-title a {
    color: inherit;
    text-decoration: none;
}
.header-title a:hover {
    text-decoration: underline;
}
.header-nav { display: flex; gap: 4px; flex-shrink: 0; }

/* Thumbnailraster */
.thumb-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}
.thumb-cell {
    width: 460px;
    background: #e8e8e8;
    border: 1px solid #bbbbbb;
    border-radius: 3px;
    padding: 4px;
    text-align: center;
    transition: border-color 0.15s, background 0.15s;
}
.thumb-cell:hover { border-color: #777; background: #ddd; }
.thumb-cell a { display: block; color: inherit; text-decoration: none; }
.thumb-cell a:hover { text-decoration: none; }

.thumb-img-wrap {
    width: 450px;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0 auto;
    background: #d4d4d4;
}
.thumb-cell img {
    max-width: 450px;
    max-height: 450px;
    width: auto;
    height: auto;
    display: block;
}
.thumb-label {
    margin-top: 4px;
    font-size: 10px;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 450px;
    padding: 0 2px;
}

.thumb-cell.folder { background: #dce8f0; border-color: #a8c4d8; }
.thumb-cell.folder:hover { border-color: #5588aa; }
.thumb-cell.folder .thumb-label { font-weight: bold; font-size: 12px; }
.folder-icon { font-size: 120px; line-height: 450px; }

/* Map-foto aanduiding */
.thumb-cell.map-foto { border-color: #4b86db; background: #f0f4fc; }
.thumb-cell.map-foto:hover { border-color: #2b6ad4; }

/* Slideweergave */
.slide-wrap { text-align: center; margin-top: 4px; }
.slide-image {
    max-width: 100%;
    height: auto;
    border: 1px solid #aaaaaa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.slide-info { margin-top: 8px; font-size: 11px; color: #666; }
.slide-exif { margin-top: 5px; font-size: 10px; color: #777; font-style: italic; }

/* Voettekst */
.footer { margin-top: 14px; font-size: 10px; color: #888; text-align: center; }

/* Mobiele stijlen */
@media (max-width: 600px) {
    .nav-btn {
        width: 46px;
        height: 46px;
        font-size: 24px;
    }
    .album-header {
        min-height: 58px;
        height: auto;
    }
    .header-title {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: unset !important;
        overflow-wrap: break-word;
    }
    .thumb-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 6px !important;
        padding: 0 4px !important;
    }
    .thumb-cell {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        padding: 4px !important;
    }
    .thumb-img-wrap {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
    }
    .thumb-cell img {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        max-height: none !important;
    }
    .slide-image {
        max-width: 100% !important;
        height: auto !important;
    }
    .folder-icon {
        font-size: 48px !important;
        line-height: normal !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 100% !important;
        width: 100% !important;
    }
}


@media (max-width: 600px) {
    .thumb-grid {
        display: grid;
        grid-template-columns: repeat(2, 460px);
    }
}

@media (max-width: 600px) {
    .thumb-grid {
        display: grid;
        grid-template-columns: repeat(2, 460px);
    }
}
