/* ── Category filter pill bar ─────────────────────────────────────────────── */
.cat-bar-wrap {
    padding: 12px clamp(12px, 3vw, 28px);
    border-bottom: 1px solid var(--border);
}

.cat-bar {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.cat-bar::-webkit-scrollbar { display: none; }

.cat-pill {
    padding: 6px 16px;
    border-radius: 100px;
    border: 1.5px solid var(--border);
    background: transparent;
    color: var(--text2);
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.15s;
}

.cat-pill:hover { color: var(--text); }

.cat-pill.active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}

/* ── Photo grid (row-based, equal-scale thumbs) ───────────────────────────── */
.pg-grid-wrap { padding: 10px; }

.pg-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.pg-thumb {
    flex: 0 0 auto;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 4px;
    background: var(--surface2);
}

.pg-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.25s ease, opacity 0.7s ease;
    opacity: 0;
}

.pg-thumb:hover img {
    transform: scale(1.05);
    filter: brightness(1.08);
}

.pg-thumb-rating {
    position: absolute;
    top: 7px;
    right: 7px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 5px;
    padding: 2px 7px;
    font-size: 11px;
    color: #c9a84c;
    backdrop-filter: blur(4px);
    pointer-events: none;
    letter-spacing: 0.5px;
}

/* ── Lightbox ─────────────────────────────────────────────────────────────── */
.lb {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: #040404;
    display: none;
    flex-direction: column;
}

.lb.open { display: flex; animation: lbFadeIn 0.18s ease; }

@keyframes lbFadeIn { from { opacity: 0; } to { opacity: 1; } }

.lb-top {
    display: flex;
    align-items: center;
    padding: 0 18px;
    height: 52px;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lb-counter {
    color: rgba(255, 255, 255, 0.35);
    font-size: 13px;
    letter-spacing: 0.06em;
}

.lb-counter .sep { opacity: 0.4; }

.lb-spacer { flex: 1; }

.lb-iconbtn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.lb-iconbtn:hover { background: rgba(255, 255, 255, 0.18); }

.lb-image-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 0;
}

.lb-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    animation: lbImgFade 0.22s ease;
}

@keyframes lbImgFade {
    from { opacity: 0; transform: scale(0.98); }
    to   { opacity: 1; transform: scale(1); }
}

.lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    width: 46px;
    height: 46px;
    color: white;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    backdrop-filter: blur(4px);
}

.lb-nav:hover { background: rgba(0, 0, 0, 0.75); }

.lb-nav.prev { left: 14px; }
.lb-nav.next { right: 14px; }

.lb-bottom {
    flex-shrink: 0;
    background: rgba(8, 8, 8, 0.94);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 22px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.lb-bottom-row {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    row-gap: 10px;
}

.lb-meta { flex: 1; min-width: 0; }

.lb-name {
    font-family: 'Urbanist', sans-serif;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-info {
    color: rgba(255, 255, 255, 0.35);
    font-size: 12px;
    margin-top: 3px;
    letter-spacing: 0.02em;
}

.lb-rate-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lb-rate-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    margin-right: 2px;
}

.lb-download {
    padding: 9px 18px;
    border-radius: 7px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.02em;
    transition: opacity 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.lb-download:hover { opacity: 0.85; }

.lb-feedback {
    padding: 9px 16px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.02em;
    transition: background 0.15s, border-color 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.lb-feedback:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
}

/* FAB se sklanja kad je lightbox otvoren — feedback tipka unutar lightboxa preuzima ulogu. */
.lb.open ~ .fab-feedback { display: none; }

/* ── Star rating widget ───────────────────────────────────────────────────── */
.stars {
    display: inline-flex;
    gap: 3px;
    align-items: center;
    user-select: none;
}

.stars .star {
    font-size: 20px;
    line-height: 1;
    color: var(--text3);
    cursor: pointer;
    transition: color 0.12s, transform 0.12s;
}

.stars[data-readonly="true"] .star { cursor: default; }

.stars .star.active,
.stars .star.preview {
    color: #c9a84c;
}

.stars .star.preview { transform: scale(1.15); }

.stars-light .star { color: rgba(255, 255, 255, 0.25); }
.stars-light .star.active, .stars-light .star.preview { color: #c9a84c; }

/* ── Password screen ──────────────────────────────────────────────────────── */
.pwd-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg);
}

.pwd-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 36px 32px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.2);
}

.pwd-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--surface2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin: 0 auto 16px;
}

.pwd-title {
    font-family: 'Urbanist', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    margin-bottom: 6px;
}

.pwd-sub {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.5;
    text-align: center;
    margin-bottom: 28px;
}

.pwd-sub strong { color: var(--text); }

.pwd-input {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
}

.pwd-input.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(224, 85, 85, 0.12);
}

.pwd-error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pwd-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.pwd-actions > * { flex: 1; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.pwd-card.shake { animation: shake 0.45s ease; }
