/* =========================================================================
   PlayStation-module — eigen donkere stijl (los van de kleurrijke site.css)
   ========================================================================= */

:root {
    --ps-bg:        #0b0e14;
    --ps-bg-2:      #0e131c;
    --ps-surface:   #141c28;
    --ps-surface-2: #1b2634;
    --ps-line:      rgba(255, 255, 255, .09);
    --ps-text:      #e9eef6;
    --ps-muted:     #8b98ab;
    --ps-blue:      #1b8dff;
    --ps-blue-dk:   #0059c9;

    --bronze:   #cd8246;
    --silver:   #c8d2dc;
    --gold:     #ffcf45;
    --platinum: #74e0ff;

    --radius: 14px;
    --shadow: 0 8px 24px rgba(0, 0, 0, .35);
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body.psn {
    margin: 0;
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(27, 141, 255, .16), transparent 60%),
        radial-gradient(900px 500px at -10% 0%, rgba(116, 224, 255, .08), transparent 55%),
        var(--ps-bg);
    color: var(--ps-text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.psn .wrap { width: min(1180px, calc(100vw - 36px)); margin: 0 auto; }

a { color: inherit; text-decoration: none; }

/* ---- Topbar ---- */
.psn-topbar {
    position: sticky; top: 0; z-index: 20;
    background: rgba(11, 14, 20, .82);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ps-line);
}
.psn-topbar-inner { display: flex; align-items: center; gap: 18px; padding: 14px 0; }
.psn-brand {
    display: flex; align-items: center; gap: 10px;
    font-weight: 800; font-size: 19px; letter-spacing: .2px;
}
.psn-brand .logo {
    display: grid; place-items: center;
    width: 34px; height: 34px; border-radius: 9px;
    background: linear-gradient(135deg, var(--ps-blue), var(--ps-blue-dk));
    box-shadow: 0 4px 14px rgba(27, 141, 255, .45);
    font-size: 18px;
}
.psn-nav { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.psn-nav a, .psn-btn {
    padding: 9px 15px; border-radius: 10px; font-weight: 600; font-size: 14px;
    color: var(--ps-muted); border: 1px solid transparent; cursor: pointer;
    background: transparent; transition: .15s;
}
.psn-nav a:hover { color: var(--ps-text); background: var(--ps-surface); }
.psn-nav a.active { color: #fff; background: var(--ps-surface-2); border-color: var(--ps-line); }

.psn-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, var(--ps-blue), var(--ps-blue-dk));
    color: #fff; border: 0;
}
.psn-btn:hover { filter: brightness(1.08); }
.psn-btn-ghost {
    background: var(--ps-surface); color: var(--ps-text); border: 1px solid var(--ps-line);
}
.psn-btn-ghost:hover { border-color: var(--ps-blue); color: #fff; }

.psn-main { padding: 26px 0 60px; }

/* ---- Flash ---- */
.psn-flash {
    margin: 0 0 20px; padding: 13px 16px; border-radius: 12px; font-weight: 600;
    border: 1px solid var(--ps-line);
}
.psn-flash.ok  { background: rgba(46, 160, 96, .15); border-color: rgba(46, 160, 96, .4); }
.psn-flash.err { background: rgba(233, 84, 84, .14); border-color: rgba(233, 84, 84, .4); }
.psn-reconnect {
    display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; justify-content: space-between;
}
.psn-reconnect a { color: var(--ps-blue); font-weight: 800; white-space: nowrap; }

/* ---- Koppeling: sync-status ---- */
.psn-status {
    margin: 16px 0; border: 1px solid var(--ps-line); border-radius: 12px; overflow: hidden;
}
.psn-status > div {
    display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px;
    border-top: 1px solid var(--ps-line);
}
.psn-status > div:first-child { border-top: 0; }
.psn-status span { opacity: .7; }
.psn-status b { text-align: right; }
.psn-status .psn-status-err b { color: #ffb3b3; font-weight: 600; }

/* ---- Profiel-header ---- */
.psn-profile {
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
    padding: 22px; border-radius: var(--radius);
    background: linear-gradient(135deg, var(--ps-surface), var(--ps-bg-2));
    border: 1px solid var(--ps-line); box-shadow: var(--shadow);
    margin-bottom: 22px;
}
.psn-avatar {
    width: 84px; height: 84px; border-radius: 18px; object-fit: cover;
    border: 2px solid rgba(27, 141, 255, .6); background: var(--ps-surface-2);
}
.psn-id { display: flex; flex-direction: column; gap: 4px; }
.psn-id h1 { margin: 0; font-size: 26px; font-weight: 800; }
.psn-id .sub { color: var(--ps-muted); font-weight: 600; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.psn-plus { color: #ffd23f; font-weight: 800; font-size: 12px; letter-spacing: .5px;
    border: 1px solid rgba(255,210,63,.5); border-radius: 999px; padding: 2px 9px; }

.psn-level {
    margin-left: auto; display: flex; align-items: center; gap: 14px;
}
.psn-level-badge {
    display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%;
    background: conic-gradient(var(--ps-blue) calc(var(--p, 0) * 1%), rgba(255,255,255,.08) 0);
    position: relative; font-weight: 800;
}
.psn-level-badge span {
    position: absolute; inset: 6px; border-radius: 50%; background: var(--ps-bg-2);
    display: grid; place-items: center; font-size: 20px;
}
.psn-level small { display: block; color: var(--ps-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }

/* ---- Trofee-tellers ---- */
.psn-trophy-row { display: flex; gap: 10px; flex-wrap: wrap; }
.psn-tcount {
    display: flex; align-items: center; gap: 8px; padding: 8px 13px;
    background: var(--ps-surface-2); border: 1px solid var(--ps-line); border-radius: 11px;
    font-weight: 800; font-size: 15px;
}
.psn-tcount .ico { font-size: 17px; }
.t-platinum { color: var(--platinum); }
.t-gold     { color: var(--gold); }
.t-silver   { color: var(--silver); }
.t-bronze   { color: var(--bronze); }

/* PlayStation-trofee-icoon (inline SVG, kleurt mee via currentColor) */
.psn-tico { display: inline-block; vertical-align: -0.15em; flex: none; }

/* ---- Stat-tegels ---- */
.psn-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.psn-stat {
    padding: 16px 18px; border-radius: var(--radius);
    background: var(--ps-surface); border: 1px solid var(--ps-line);
}
.psn-stat .n { font-size: 30px; font-weight: 800; line-height: 1; }
.psn-stat .l { color: var(--ps-muted); font-weight: 600; margin-top: 6px; font-size: 13px; }

/* ---- Filterbalk ---- */
.psn-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.psn-filters input, .psn-filters select {
    background: var(--ps-surface); border: 1px solid var(--ps-line); color: var(--ps-text);
    padding: 10px 13px; border-radius: 10px; font-size: 14px; font-weight: 600;
}
.psn-filters input { min-width: 220px; flex: 1; }
.psn-filters input::placeholder { color: var(--ps-muted); }
.psn-chip-row { display: flex; gap: 7px; flex-wrap: wrap; }
.psn-chip {
    padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 13px;
    background: var(--ps-surface); border: 1px solid var(--ps-line); color: var(--ps-muted);
}
.psn-chip.active { background: var(--ps-blue); border-color: var(--ps-blue); color: #fff; }

/* ---- Spellen-grid ---- */
.psn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 16px; }
.psn-card {
    background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: var(--radius);
    overflow: hidden; transition: .18s; display: flex; flex-direction: column;
}
.psn-card:hover { transform: translateY(-4px); border-color: rgba(27,141,255,.6); box-shadow: var(--shadow); }
.psn-cover { position: relative; aspect-ratio: 1 / 1; background: var(--ps-surface-2); overflow: hidden; }
.psn-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.psn-plat-badge {
    position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 800;
    background: rgba(0,0,0,.6); color: #fff; padding: 3px 8px; border-radius: 7px; backdrop-filter: blur(4px);
}
.psn-done {
    position: absolute; top: 8px; left: 8px; width: 26px; height: 26px; border-radius: 50%;
    display: grid; place-items: center; font-size: 14px;
    background: linear-gradient(135deg, var(--platinum), #35a7d8); color: #04222e; font-weight: 900;
    box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.psn-card-body { padding: 11px 12px 13px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.psn-card-title { font-weight: 700; font-size: 13.5px; line-height: 1.25;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 34px; }
.psn-mini-trophies { display: flex; gap: 9px; font-size: 11.5px; font-weight: 700; color: var(--ps-muted); margin-top: auto; }
.psn-mini-trophies b { color: var(--ps-text); }
.psn-mini-play { display: flex; gap: 10px; font-size: 11.5px; font-weight: 700; color: var(--platinum); }

/* ---- Voortgangsbalk ---- */
.psn-progress { height: 6px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.psn-progress > i { display: block; height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, var(--ps-blue), var(--platinum)); }
.psn-progress-num { font-size: 11px; font-weight: 800; color: var(--ps-muted); }
.psn-progress.done > i { background: linear-gradient(90deg, var(--gold), var(--platinum)); }

/* ---- Paginering ---- */
.psn-pager { margin-top: 26px; display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.psn-pager a, .psn-pager span {
    padding: 8px 13px; border-radius: 9px; font-weight: 700; font-size: 14px;
    background: var(--ps-surface); border: 1px solid var(--ps-line); color: var(--ps-muted);
}
.psn-pager a:hover { color: #fff; border-color: var(--ps-blue); }
.psn-pager .cur { background: var(--ps-blue); border-color: var(--ps-blue); color: #fff; }

/* ---- Detailpagina ---- */
.psn-back { color: var(--ps-muted); font-weight: 700; font-size: 14px; }
.psn-back:hover { color: var(--ps-text); }
.psn-detail-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin: 16px 0 26px; }
.psn-detail-head img { width: 110px; height: 110px; border-radius: 16px; object-fit: cover; border: 1px solid var(--ps-line); }
.psn-detail-head h1 { margin: 0 0 8px; font-size: 24px; }

/* ---- Trofee-groepen (Base Game + add-ons) ---- */
.psn-group { margin-bottom: 28px; }
.psn-group-head {
    display: flex; align-items: center; gap: 14px; padding: 13px 16px; margin-bottom: 12px;
    background: linear-gradient(135deg, var(--ps-surface-2), var(--ps-bg-2));
    border: 1px solid var(--ps-line); border-radius: 12px;
    /* Blijft plakken onder de topbar zolang je binnen deze groep scrollt;
       de volgende groep-kop duwt 'm vanzelf weg. */
    position: sticky; top: 67px; z-index: 5;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.psn-group-head img { width: 50px; height: 50px; border-radius: 10px; object-fit: cover; background: var(--ps-surface); flex: none; }
.psn-group-info { flex: 1; min-width: 0; }
.psn-group-name { font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.psn-group-tag {
    font-size: 10px; font-weight: 900; letter-spacing: .6px; padding: 2px 9px; border-radius: 999px;
    background: linear-gradient(135deg, var(--ps-blue), var(--ps-blue-dk)); color: #fff;
}
.psn-group-tag.addon { background: rgba(255, 255, 255, .1); color: var(--ps-muted); }
.psn-group-meta { color: var(--ps-muted); font-weight: 700; font-size: 13px; margin-top: 3px; }
.psn-group-bar { width: 120px; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; flex: none; }
.psn-group-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--ps-blue), var(--platinum)); }

/* ---- Trofee-lijst ---- */
.psn-trophies { display: flex; flex-direction: column; gap: 10px; }
.psn-trophy {
    display: flex; align-items: center; gap: 14px; padding: 12px 14px;
    background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: 12px;
}
.psn-trophy.locked { opacity: .5; }
.psn-trophy img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--ps-surface-2); }
.psn-trophy .tinfo { flex: 1; min-width: 0; }
.psn-trophy .tname { font-weight: 700; }
.psn-trophy .tdetail { color: var(--ps-muted); font-size: 13px; margin-top: 2px; }
.psn-trophy .tmeta { text-align: right; font-size: 12px; color: var(--ps-muted); font-weight: 700; white-space: nowrap; }
.psn-trophy .ttype { font-size: 22px; }
.psn-rare { color: var(--platinum); }

/* ---- Statistieken ---- */
.psn-section-title { font-size: 18px; font-weight: 800; margin: 30px 0 14px; display: flex; align-items: center; gap: 8px; }
.psn-section-note { color: var(--ps-muted); font-weight: 600; font-size: 13px; }
.psn-panel-card { background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: var(--radius); padding: 16px 18px; }
.psn-cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }

/* Horizontale balkjes */
.psn-brow { display: grid; grid-template-columns: 150px 1fr 62px; gap: 12px; align-items: center; padding: 7px 0; }
.psn-blabel { font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psn-btrack { height: 12px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.psn-btrack > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--ps-blue), var(--platinum)); min-width: 2px; }
.psn-bval { font-weight: 800; font-size: 13px; text-align: right; color: var(--ps-text); }
.psn-btrack > i.tt-platinum { background: linear-gradient(90deg, #35a7d8, var(--platinum)); }
.psn-btrack > i.tt-gold     { background: linear-gradient(90deg, #b58a1b, var(--gold)); }
.psn-btrack > i.tt-silver   { background: linear-gradient(90deg, #8b95a1, var(--silver)); }
.psn-btrack > i.tt-bronze   { background: linear-gradient(90deg, #8a5228, var(--bronze)); }

.psn-brow-link { text-decoration: none; color: inherit; border-radius: 8px; transition: background .15s; }
.psn-brow-link:hover { background: var(--ps-surface-2); }
.psn-blabel-game { gap: 10px; }
.psn-blabel-game img { width: 30px; height: 30px; border-radius: 6px; object-fit: cover; flex: none; }
.psn-blabel-game span { overflow: hidden; text-overflow: ellipsis; }

/* Tabel */
.psn-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.psn-table th { text-align: left; color: var(--ps-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; padding: 6px 8px; border-bottom: 1px solid var(--ps-line); }
.psn-table td { padding: 9px 8px; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.psn-table tr:last-child td { border-bottom: 0; }
.psn-table td:not(:first-child), .psn-table th:not(:first-child) { text-align: right; }

/* Maandgrafiek */
.psn-months { display: flex; align-items: flex-end; gap: 8px; height: 170px; padding-top: 6px; }
.psn-month { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.psn-month .col { width: 72%; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, var(--ps-blue), var(--ps-blue-dk)); }
.psn-month .ml { font-size: 11px; color: var(--ps-muted); font-weight: 700; }
.psn-month .mv { font-size: 11px; font-weight: 800; min-height: 14px; }

/* Zeldzaamste trofeeën */
.psn-rare-row { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 10px; text-decoration: none; color: inherit; }
.psn-rare-row:hover { background: var(--ps-surface-2); }
.psn-rare-row img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; }
.psn-rare-row .rr-info { flex: 1; min-width: 0; }
.psn-rare-row .rr-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psn-rare-row .rr-game { color: var(--ps-muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psn-rare-row .rr-rate { font-weight: 800; font-size: 15px; white-space: nowrap; }
.psn-coverage { color: var(--ps-muted); font-size: 12.5px; margin: 14px 0 0; line-height: 1.5; }
.psn-coverage code { background: var(--ps-bg-2); padding: 1px 6px; border-radius: 5px; font-size: 12px; }

@media (max-width: 720px) {
    .psn-cols2 { grid-template-columns: 1fr; }
    .psn-brow { grid-template-columns: 110px 1fr 54px; }
}

/* ---- Vrienden ---- */
.psn-friends-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.psn-friends-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.psn-friend-card {
    background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: var(--radius);
    padding: 16px; display: flex; flex-direction: column; gap: 12px;
    text-decoration: none; color: inherit; transition: .16s;
}
.psn-friend-card[href]:hover { transform: translateY(-3px); border-color: rgba(27, 141, 255, .6); box-shadow: var(--shadow); }
.psn-friend-card.is-private { opacity: .65; cursor: default; }
.psn-friend-top { display: flex; align-items: center; gap: 12px; }
.psn-friend-avatar { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; border: 2px solid rgba(27, 141, 255, .5); flex: none; background: var(--ps-surface-2); }
.psn-friend-avatar-empty { display: grid; place-items: center; font-size: 22px; }
.psn-friend-id { min-width: 0; }
.psn-friend-name { font-weight: 800; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psn-friend-level { color: var(--ps-muted); font-weight: 700; font-size: 13px; }
.psn-friend-private { color: #ff9a9a; font-weight: 700; font-size: 12.5px; }
.psn-friend-trophies { display: flex; gap: 12px; font-weight: 800; font-size: 13px; }
.psn-friend-trophies span { display: flex; align-items: center; gap: 5px; }

/* ---- Login / registratie ---- */
.psn-auth-brand { text-align: center; font-weight: 800; font-size: 22px; display: flex; align-items: center; justify-content: center; gap: 10px; margin: 40px 0 22px; }
.psn-auth-brand .logo {
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; font-size: 20px;
    background: linear-gradient(135deg, var(--ps-blue), var(--ps-blue-dk)); box-shadow: 0 4px 14px rgba(27, 141, 255, .45);
}
.psn-auth-panel {
    max-width: 420px; margin: 0 auto; background: var(--ps-surface); border: 1px solid var(--ps-line);
    border-radius: 18px; padding: 28px; box-shadow: var(--shadow);
}
.psn-auth-panel h1 { margin: 0 0 6px; font-size: 22px; }
.psn-auth-panel p { color: var(--ps-muted); margin: 0 0 18px; line-height: 1.5; }
.psn-label { display: block; font-weight: 700; font-size: 13px; color: var(--ps-muted); margin-bottom: 12px; }
.psn-label input {
    display: block; width: 100%; margin-top: 6px; padding: 11px 13px; border-radius: 10px;
    background: var(--ps-bg-2); border: 1px solid var(--ps-line); color: var(--ps-text); font-size: 14px; font-weight: 600;
}
.psn-label input:focus { outline: none; border-color: var(--ps-blue); }
.psn-check { display: flex; align-items: center; gap: 8px; color: var(--ps-muted); font-weight: 600; font-size: 13px; margin: 4px 0 16px; }
.psn-field-error { color: #ff8a8a; font-weight: 700; font-size: 13px; margin-bottom: 12px; }
.psn-btn-block { width: 100%; justify-content: center; }

.psn-user { display: flex; align-items: center; gap: 12px; margin-left: 14px; }
.psn-user-name { color: var(--ps-muted); font-weight: 700; font-size: 13px; white-space: nowrap; text-decoration: none; }
.psn-user-name:hover, .psn-user-name.active { color: var(--ps-text); }

/* ---- Lege staat / koppelkaart ---- */
.psn-panel {
    max-width: 640px; margin: 40px auto; padding: 30px;
    background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: 18px; box-shadow: var(--shadow);
}
.psn-panel h1 { margin: 0 0 8px; font-size: 24px; }
.psn-panel p { color: var(--ps-muted); line-height: 1.6; }
.psn-steps { counter-reset: s; list-style: none; padding: 0; margin: 20px 0; display: flex; flex-direction: column; gap: 12px; }
.psn-steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; }
.psn-steps li::before {
    content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 50%;
    background: var(--ps-blue); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 13px;
}
.psn-field { width: 100%; margin: 14px 0; }
.psn-field textarea {
    width: 100%; min-height: 90px; padding: 12px 14px; border-radius: 12px; resize: vertical;
    background: var(--ps-bg-2); border: 1px solid var(--ps-line); color: var(--ps-text);
    font-family: ui-monospace, monospace; font-size: 13px;
}
.psn-footer { text-align: center; color: var(--ps-muted); font-size: 13px; padding: 30px 0; }

@media (max-width: 640px) {
    .psn-level { margin-left: 0; width: 100%; }
    .psn-nav { width: 100%; }
}

/* ==================================================================
   Ledenportaal + vergelijken
   ================================================================== */
.psn-page-title { font-size: 22px; font-weight: 800; margin: 26px 0 12px; }
.psn-sub { font-size: 15px; font-weight: 700; color: var(--ps-muted); margin: 22px 0 8px; }
.psn-you {
    font-size: 11px; font-weight: 800; background: var(--ps-blue); color: #fff;
    padding: 1px 8px; border-radius: 999px; vertical-align: middle; margin-left: 6px;
}

/* Ledenkaarten */
.psn-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.psn-member-card {
    background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: 16px; padding: 16px;
    display: flex; flex-direction: column; gap: 12px;
}
.psn-member-top { display: flex; align-items: center; gap: 12px; }
.psn-member-top img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.psn-member-name { font-weight: 800; font-size: 17px; }
.psn-member-id small { display: block; color: var(--ps-muted); font-size: 12px; }
.psn-member-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: var(--ps-muted); }
.psn-member-stats b { color: var(--ps-text); }
.psn-member-actions { display: flex; gap: 8px; margin-top: auto; }
.psn-member-actions .psn-btn { flex: 1; text-align: center; }

/* Ranglijsten */
.psn-boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.psn-board { background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: 14px; padding: 14px 16px; }
.psn-board h3 { font-size: 14px; margin: 0 0 10px; color: var(--ps-muted); text-transform: uppercase; letter-spacing: .04em; }
.psn-board-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 14px; }
.psn-board-row .rank { width: 22px; text-align: center; }
.psn-board-row a { flex: 1; color: var(--ps-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psn-board-row b { color: #fff; }
.psn-board-row.me { background: rgba(27, 141, 255, .12); border-radius: 8px; padding-inline: 6px; margin-inline: -6px; }

/* Vergelijk-koppen */
.psn-cmp-head {
    display: flex; align-items: center; gap: 16px; margin: 12px 0 8px;
    background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: 16px; padding: 16px;
}
.psn-cmp-person { display: flex; align-items: center; gap: 12px; flex: 1; }
.psn-cmp-person.right { justify-content: flex-end; text-align: right; }
.psn-cmp-person img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid var(--c); }
.psn-cmp-person b { display: block; font-size: 17px; }
.psn-cmp-person small { color: var(--ps-muted); }
.psn-cmp-vs { font-weight: 900; color: var(--ps-muted); font-size: 15px; }

/* Vergelijk-tabellen */
.psn-cmp-table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.psn-cmp-table th, .psn-cmp-table td { padding: 9px 12px; border-top: 1px solid var(--ps-line); }
.psn-cmp-table thead th { border-top: 0; color: var(--ps-muted); font-size: 13px; text-align: center; }
.psn-cmp-table thead th.c-a { color: #1b8dff; text-align: left; }
.psn-cmp-table thead th.c-b { color: #f5a623; text-align: right; }
.psn-cmp-table tbody th { font-weight: 600; color: var(--ps-muted); text-align: center; font-size: 13px; white-space: nowrap; }
.psn-cmp-table td.val { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.psn-cmp-table td.val:first-child { text-align: left; }
.psn-cmp-table td.val:last-child { text-align: right; }
.psn-cmp-table td.val.win { color: #fff; }
.psn-cmp-table td.val.win::after { content: ' ●'; color: #4ade80; font-size: 10px; vertical-align: middle; }

.psn-chart-wrap { background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: 14px; padding: 10px; overflow-x: auto; }

/* Head-to-head */
.psn-h2h-summary {
    background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: 12px;
    padding: 12px 14px; margin: 6px 0 12px;
}
.psn-h2h-wrap { overflow-x: auto; }
.psn-h2h td, .psn-h2h th { white-space: nowrap; }
.psn-h2h-game { display: flex; align-items: center; gap: 10px; }
.psn-h2h-game img { width: 34px; height: 34px; border-radius: 7px; object-fit: cover; }
.psn-h2h-game small { color: var(--ps-muted); font-size: 11px; }
.psn-h2h .val small { color: var(--platinum); font-size: 11px; font-weight: 700; }

@media (max-width: 620px) {
    .psn-cmp-table td.val { font-size: 13px; }
    .psn-cmp-table th, .psn-cmp-table td { padding: 8px 6px; }
}

/* ==================================================================
   Spellen-toolbar: filterknop + weergaveschakelaar + lijstweergave
   ================================================================== */
.psn-toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.psn-iconbtn {
    position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px;
    border-radius: 11px; background: var(--ps-surface); border: 1px solid var(--ps-line);
    color: var(--ps-muted); cursor: pointer; transition: .15s;
}
.psn-iconbtn:hover, .psn-iconbtn.open, .psn-iconbtn.on { color: #fff; border-color: var(--ps-blue); }
.psn-badge {
    position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 999px; background: var(--ps-blue); color: #fff; font-size: 11px; font-weight: 800;
    display: grid; place-items: center; line-height: 1;
}
.psn-viewswitch {
    display: inline-flex; background: var(--ps-surface); border: 1px solid var(--ps-line);
    border-radius: 11px; overflow: hidden;
}
.psn-viewswitch button {
    width: 42px; height: 42px; background: transparent; border: 0; color: var(--ps-muted);
    cursor: pointer; display: grid; place-items: center; transition: .15s;
}
.psn-viewswitch button:hover { color: var(--ps-text); }
.psn-viewswitch button.on { background: var(--ps-blue); color: #fff; }

/* Lijstweergave: kaarten onder elkaar, breedtevullend */
.psn-grid.as-list { display: flex; flex-direction: column; gap: 10px; }
.psn-grid.as-list .psn-card { flex-direction: row; align-items: stretch; width: 100%; }
.psn-grid.as-list .psn-card:hover { transform: none; }
.psn-grid.as-list .psn-cover { width: 84px; min-width: 84px; aspect-ratio: 1 / 1; }
.psn-grid.as-list .psn-card-body {
    flex-direction: row; align-items: center; gap: 18px; flex-wrap: wrap; padding: 10px 18px;
}
.psn-grid.as-list .psn-card-title {
    -webkit-line-clamp: 1; min-height: 0; margin: 0; font-size: 15px; flex: 2; min-width: 180px;
}
.psn-grid.as-list .psn-progress { order: 4; flex: 1; min-width: 130px; margin: 0; }
.psn-grid.as-list .psn-mini-trophies { margin: 0; min-width: 90px; }
.psn-grid.as-list .psn-mini-play { margin: 0; }
@media (max-width: 560px) {
    .psn-grid.as-list .psn-progress { order: 0; flex-basis: 100%; }
}

/* ── Trofee-vergelijking: lid vs jij (member-game-compare) ───────────── */
.psn-cmp-scoreboard { display: flex; align-items: center; gap: 18px; margin-top: 14px; }
.psn-cmp-score { display: flex; flex-direction: column; gap: 1px; }
.psn-cmp-score .who { font-size: 11px; color: var(--ps-muted); text-transform: uppercase; letter-spacing: .6px; }
.psn-cmp-score b { font-size: 23px; line-height: 1.1; }
.psn-cmp-score.me b { color: var(--ps-blue); }
.psn-cmp-score.them b { color: #f5a623; }
.psn-cmp-score b.muted { color: var(--ps-muted); font-size: 15px; }
.psn-cmp-vs { color: var(--ps-muted); font-weight: 700; font-size: 14px; }

.psn-cmp-list { margin-top: 20px; display: flex; flex-direction: column; gap: 6px; }
.psn-cmp-legend { display: grid; grid-template-columns: 1fr 96px 96px; gap: 8px;
    padding: 0 14px 4px; font-size: 11px; color: var(--ps-muted);
    text-transform: uppercase; letter-spacing: .6px; }
.psn-cmp-legend span:not(:first-child) { text-align: center; }

.psn-cmp-trophy { display: grid; grid-template-columns: 1fr 96px 96px; gap: 8px; align-items: center;
    background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: 12px; padding: 10px 14px; }
.psn-cmp-trophy.locked { opacity: .55; }
.psn-cmp-main { display: flex; align-items: center; gap: 11px; min-width: 0; }
.psn-cmp-main .tic { width: 46px; height: 46px; border-radius: 8px; flex: none; object-fit: cover; }
.psn-cmp-main .tinfo { min-width: 0; }
.psn-cmp-main .tname { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psn-cmp-main .tdetail { font-size: 12.5px; color: var(--ps-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.psn-cmp-cell { display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 16px; text-align: center; }
.psn-cmp-cell small { color: var(--ps-muted); font-size: 10.5px; }
.psn-cmp-cell.no { opacity: .8; }
.psn-cmp-cell .dash { color: var(--ps-muted); }

@media (max-width: 560px) {
    .psn-cmp-legend, .psn-cmp-trophy { grid-template-columns: 1fr 60px 60px; }
    .psn-cmp-main .tic { display: none; }
    .psn-cmp-cell small { display: none; }
}

/* ── Gebruikers-pagina: kop-balk, leesbare dropdown & modal ──────────── */
.psn-users-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }

/* Select nu net als de tekstvelden gestyled (was ongestyled → slecht leesbaar). */
.psn-label select {
    display: block; width: 100%; margin-top: 6px; padding: 11px 38px 11px 13px; border-radius: 10px;
    background-color: var(--ps-bg-2); border: 1px solid var(--ps-line); color: var(--ps-text);
    font-size: 14px; font-weight: 600; cursor: pointer;
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%238b98ab' d='M6 8 0 0h12z'/></svg>");
    background-repeat: no-repeat; background-position: right 13px center;
}
.psn-label select:focus { outline: none; border-color: var(--ps-blue); }
/* Leesbare optielijst op donker thema (anders zwart-op-zwart of wit-op-wit). */
.psn-label select option { background: var(--ps-surface); color: var(--ps-text); }

.psn-modal { position: fixed; inset: 0; z-index: 200; display: none; }
.psn-modal.open { display: block; }
.psn-modal-backdrop { position: absolute; inset: 0; background: rgba(4, 7, 12, .72); }
.psn-modal-card {
    position: relative; z-index: 1; width: min(460px, calc(100vw - 32px)); margin: 9vh auto 0;
    background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: var(--radius);
    padding: 20px 22px; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); max-height: 82vh; overflow: auto;
}
.psn-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.psn-modal-head h2 { margin: 0; font-size: 18px; }
.psn-modal-x {
    background: none; border: none; color: var(--ps-muted); font-size: 16px; line-height: 1;
    cursor: pointer; padding: 6px 9px; border-radius: 8px;
}
.psn-modal-x:hover { color: var(--ps-text); background: var(--ps-surface-2); }

/* ── "Samen"-markering: spellen die jij én het lid allebei hebben ─────── */
.psn-shared {
    position: absolute; bottom: 8px; left: 8px; width: 26px; height: 26px; border-radius: 50%;
    display: grid; place-items: center; color: #fff;
    background: linear-gradient(135deg, #33c27a, #1f8f57); box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}
.psn-shared.inline {
    position: static; display: inline-grid; width: 18px; height: 18px; vertical-align: -4px; box-shadow: none;
}
.psn-shared-note {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    color: var(--ps-muted); font-size: 13.5px; margin: 18px 0 -4px;
}
.psn-shared-note b { color: var(--ps-text); }

/* ── Community-portaal ───────────────────────────────────────────────── */
.muted { color: var(--ps-muted); }
.psn-sec-title { font-size: 15px; font-weight: 800; margin: 0 0 14px; }
.psn-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

.psn-cstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 18px 0 26px; }
.psn-cstat { background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.psn-cstat span { color: var(--ps-muted); font-size: 12.5px; display: flex; align-items: center; gap: 5px; }
.psn-cstat b { font-size: 24px; }
.psn-cstat.hl { background: linear-gradient(135deg, rgba(27,141,255,.22), rgba(27,141,255,.06)); border-color: rgba(27,141,255,.4); }
.psn-cstat.hl b { color: var(--ps-blue); }

.psn-community-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; align-items: start; }
.psn-community-side { display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 820px) { .psn-community-grid { grid-template-columns: 1fr; } }

.psn-feed-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--ps-line); }
.psn-feed-item:last-child { border-bottom: none; }
.psn-feed-av { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; }
.psn-feed-av.ph { display: grid; place-items: center; background: var(--ps-surface-2); color: var(--ps-muted); font-weight: 800; text-transform: uppercase; }
.psn-feed-body { min-width: 0; font-size: 14px; line-height: 1.45; }
.psn-feed-body small { color: var(--ps-muted); font-size: 12px; }
.psn-feed-body .muted { color: var(--ps-muted); }
.psn-feed-item.plat { background: linear-gradient(90deg, rgba(116,224,255,.08), transparent); border-radius: 10px; padding-inline: 8px; margin-inline: -8px; }

.psn-owned { display: flex; flex-direction: column; gap: 4px; }
.psn-owned-row { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 4px 0; }
.psn-owned-row img { width: 32px; height: 32px; border-radius: 7px; object-fit: cover; flex: none; }
.psn-owned-row .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psn-owned-row b { color: var(--ps-muted); font-size: 13px; white-space: nowrap; }

.psn-rivals { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.psn-rival { display: flex; gap: 12px; background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: 14px; padding: 14px 16px; }
.psn-rival > img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: none; }
.psn-rival-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.psn-rival-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.psn-rival-top a { color: var(--ps-text); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psn-rival-verdict { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ps-muted); }
.psn-rival-verdict.win { color: #33c27a; }
.psn-rival-verdict.lose { color: #f5a623; }
.psn-rival-score { font-size: 15px; }
.psn-rival-score b { font-size: 19px; }
.psn-rival-score small { color: var(--ps-muted); margin-left: 6px; font-size: 12px; }

.psn-challenge { background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.psn-chal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.psn-chal-head img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex: none; }
.psn-chal-name { font-weight: 700; }
.psn-chal-parts { display: flex; flex-direction: column; gap: 7px; }
.psn-chal-part { display: grid; grid-template-columns: 130px 1fr 44px; gap: 10px; align-items: center; font-size: 13px; }
.psn-chal-part.me .pn { color: var(--ps-blue); font-weight: 700; }
.psn-chal-part .pn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psn-chal-part .pp { text-align: right; color: var(--ps-muted); }
@media (max-width: 560px) { .psn-chal-part { grid-template-columns: 90px 1fr 40px; } }

.psn-chal-done-list { display: flex; flex-direction: column; gap: 6px; }
.psn-chal-done { display: flex; align-items: center; gap: 10px; font-size: 14px; background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: 10px; padding: 8px 12px; }
.psn-chal-done img { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; flex: none; }
.psn-chal-done .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psn-chal-done .winner { color: var(--gold); font-weight: 700; white-space: nowrap; }

/* ── Toolbar: los zoekveld + filter-dropdown ─────────────────────────── */
.psn-search {
    display: flex; align-items: center; gap: 9px; flex: 1 1 240px; min-width: 170px; max-width: 440px;
    background: var(--ps-bg-2); border: 1px solid var(--ps-line); border-radius: 11px; padding: 0 13px;
}
.psn-search:focus-within { border-color: var(--ps-blue); }
.psn-search svg { color: var(--ps-muted); flex: none; }
.psn-search input {
    flex: 1; min-width: 0; background: none; border: 0; outline: none;
    color: var(--ps-text); font-size: 14px; font-weight: 600; padding: 11px 0;
}
.psn-search input::placeholder { color: var(--ps-muted); font-weight: 500; }

.psn-toolbar-actions { display: flex; align-items: center; gap: 10px; }
.psn-filterwrap { position: relative; }
.psn-filtermenu {
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; width: 264px;
    background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: 14px; padding: 14px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .5); display: flex; flex-direction: column; gap: 14px;
}
.psn-filtermenu[hidden] { display: none; }
.psn-fm-group { display: flex; flex-direction: column; gap: 8px; }
.psn-fm-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--ps-muted); }
.psn-fm-select {
    width: 100%; padding: 10px 34px 10px 12px; border-radius: 9px; cursor: pointer;
    background-color: var(--ps-bg-2); border: 1px solid var(--ps-line); color: var(--ps-text);
    font-size: 14px; font-weight: 600; -webkit-appearance: none; -moz-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%238b98ab' d='M6 8 0 0h12z'/></svg>");
    background-repeat: no-repeat; background-position: right 12px center;
}
.psn-fm-select:focus { outline: none; border-color: var(--ps-blue); }
.psn-fm-select option { background: var(--ps-surface); color: var(--ps-text); }
.psn-chip { text-decoration: none; display: inline-block; cursor: pointer; }
@media (max-width: 480px) { .psn-filtermenu { right: auto; left: 0; } }
