:root {
    --bg: #0f1115;
    --bg-card: #1a1d24;
    --bg-card-hover: #21242e;
    --text: #eef0f4;
    --text-muted: #9aa0ac;
    --accent: #ff7a45;
    --accent-hover: #ff965f;
    --border: #2a2e38;
    --success: #3ddc97;
    --warning: #ffb547;
    --danger: #ff5d5d;
    --radius: 12px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.page { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1rem 5rem; }
.page-center { text-align: center; max-width: 700px; }

.logo-img { max-height: 8rem; max-width: 60vw; margin-bottom: 1rem; }
.logo-img-small { max-height: 4rem; display: block; margin: 0 auto 0.5rem; }
.logo-link { display: inline-block; }
.profile-img { max-height: 45vh; max-width: 80vw; border-radius: var(--radius); margin: 1rem 0; }

h1, h2, h3 { font-weight: 600; }
h1 { font-size: 1.8rem; }

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 1rem auto;
    max-width: 600px;
    text-align: left;
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    border: none;
    font-size: 0.95rem;
    cursor: pointer;
    text-align: center;
}
.btn-primary { background: var(--accent); color: #1a1000; font-weight: 600; }
.btn-primary:hover { background: var(--accent-hover); color: #1a1000; }
.btn-secondary { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-hover); }

.code-form { display: flex; gap: 0.5rem; justify-content: center; margin: 1.5rem 0; flex-wrap: wrap; }
.code-form input {
    padding: 0.65rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-size: 1rem;
    min-width: 220px;
}
.code-form input:focus { outline: none; border-color: var(--accent); }

.link-list { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1.5rem; }

.alert { border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1rem 0; text-align: left; }
.alert-warning { background: rgba(255, 181, 71, 0.12); border: 1px solid var(--warning); color: var(--warning); }

.footer-link { position: fixed; bottom: 0.5rem; font-size: 0.75rem; color: var(--text-muted); }
.footer-link-left { left: 0.75rem; }
.footer-link-right { right: 0.75rem; }

/* --- Albumheader (bekijk.php) --- */
.album-header { text-align: center; position: relative; padding-bottom: 1rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.close-album { position: absolute; top: 0; right: 0; font-size: 0.85rem; color: var(--warning); }
.album-code-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.album-code { font-size: 2rem; font-weight: 700; letter-spacing: 0.05em; }
.album-infotext { color: var(--text-muted); max-width: 500px; margin: 0.75rem auto; }
.album-warning { color: var(--danger); font-size: 0.9rem; max-width: 500px; margin: 0.5rem auto; }
.download-status { font-size: 0.85rem; color: var(--text-muted); }
.download-status-ok { color: var(--success); }
.download-status-locked { color: var(--warning); }

/* --- Gallerij --- */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}
.gallery-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.15s ease, background 0.15s ease;
}
.gallery-item:hover { transform: translateY(-2px); background: var(--bg-card-hover); }
.open-lightbox {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}
.open-lightbox img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.gallery-meta { display: flex; align-items: center; justify-content: space-between; padding: 0.4rem 0.6rem; font-size: 0.8rem; }
.gallery-meta button {
    background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.85rem;
    padding: 0.2rem 0.35rem; border-radius: 6px;
}
.gallery-meta button:hover { background: var(--border); color: var(--text); }
.gallery-item.voted-like .btn-like[data-type="like"] { color: var(--success); }
.gallery-item.voted-dislike .btn-like[data-type="dislike"] { color: var(--danger); }

.gallery-loader, .gallery-empty { text-align: center; color: var(--text-muted); padding: 1.5rem; font-size: 0.9rem; }

/* --- Lightbox --- */
.lightbox {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 50;
    align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox-content { max-width: 95vw; max-height: 92vh; display: flex; flex-direction: column; align-items: center; }
.lightbox-image { max-width: 95vw; max-height: 75vh; border-radius: 8px; user-select: none; -webkit-user-drag: none; }
.lightbox-toolbar { width: 100%; max-width: 700px; margin-top: 0.75rem; text-align: center; }
.lightbox-title { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 0.5rem; }
.lightbox-actions { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.lightbox-actions .btn-like { background: var(--bg-card); border: 1px solid var(--border); color: var(--text); padding: 0.5rem 0.9rem; border-radius: 999px; cursor: pointer; }
.lightbox-close, .lightbox-nav {
    position: absolute; background: none; border: none; color: var(--text); font-size: 2rem; cursor: pointer; z-index: 51;
}
.lightbox-close { top: 1rem; right: 1.25rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* --- Reacties-paneel --- */
.comments-panel {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 60;
    justify-content: flex-end;
}
.comments-panel.open { display: flex; }
.comments-panel-inner {
    background: var(--bg-card);
    width: 100%; max-width: 420px;
    height: 100%;
    padding: 1.5rem;
    overflow-y: auto;
    position: relative;
    border-left: 1px solid var(--border);
}
.comment-form { display: flex; flex-direction: column; gap: 0.5rem; margin: 1rem 0 1.5rem; }
.comment-form input, .comment-form textarea {
    background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text);
    padding: 0.6rem 0.8rem; font-family: inherit; font-size: 0.9rem;
}
.comment-form textarea { min-height: 80px; resize: vertical; }
.comment { border-bottom: 1px solid var(--border); padding: 0.75rem 0; }
.comment-head { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.comment-head span { color: var(--text); font-weight: 600; }
.comment-body { font-size: 0.9rem; }

@media (max-width: 600px) {
    .album-code { font-size: 1.5rem; }
    .gallery { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}