/* Deelnemerspagina – mobile first. */
:root {
    --bg: #0b1a12;
    --surface: #142a1d;
    --surface-2: #1c3626;
    --text: #f2f7f3;
    --muted: #93b09d;
    --accent: #3fdc7a;
    --danger: #ff5a50;
    --border: #2a4a36;
    --radius: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body.play {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: radial-gradient(ellipse at 50% 0%, #133222 0%, var(--bg) 60%) fixed;
    color: var(--text);
    line-height: 1.45;
}

a { color: var(--accent); }

.p-header { padding: 16px; text-align: center; }
.p-logo { font-weight: 900; letter-spacing: .25em; font-size: 14px; }
.p-logo span { color: var(--accent); }

.p-main { max-width: 520px; margin: 0 auto; padding: 0 16px 120px; }

.p-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 14px; }
.p-card h1 { margin: 0 0 6px; font-size: 1.5rem; }
.p-card p { margin: 0; }
.p-muted { color: var(--muted); }
.p-small { font-size: .85rem; }
.p-center { text-align: center; }

.p-form { display: grid; gap: 12px; margin-top: 18px; }
.p-code-input, .p-pin-input, .p-points {
    font: inherit;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.p-code-input, .p-pin-input {
    width: 100%;
    padding: 16px;
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: .3em;
    text-transform: uppercase;
}

.p-btn { font: inherit; font-weight: 800; font-size: 1.05rem; padding: 16px; border-radius: 12px; border: 0; cursor: pointer; }
.p-btn-primary { background: var(--accent); color: #04210f; }
.p-btn:disabled { opacity: .45; cursor: not-allowed; }
.p-link { font: inherit; background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; }

.p-alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 14px; }
.p-alert-error { background: rgba(255, 90, 80, .15); border: 1px solid var(--danger); }
.p-alert-success { background: rgba(63, 220, 122, .15); border: 1px solid var(--accent); }

.p-footer { text-align: center; margin: 24px 0; color: var(--muted); }

/* Eigen naam bovenaan */
.p-me { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.p-me-name { font-weight: 800; font-size: 1.15rem; }

.p-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--border); }
.p-avatar-empty { display: grid; place-items: center; background: var(--surface-2); font-weight: 900; color: var(--muted); }

/* Inzetlijst */
.p-list { display: grid; gap: 10px; }
.p-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color .2s, background .2s;
}
.p-row.has-points { border-color: var(--accent); background: #173a25; }
.p-row-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.p-stepper { display: flex; align-items: center; gap: 6px; }
.p-step {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-size: 1.3rem; font-weight: 800;
    cursor: pointer;
}
.p-points { width: 60px; height: 40px; text-align: center; font-weight: 800; font-size: 1.05rem; -moz-appearance: textfield; }
.p-points::-webkit-outer-spin-button, .p-points::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Vaste balk onderaan met resterende punten + knop */
.p-bar {
    position: fixed; left: 0; right: 0; bottom: 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(11, 26, 18, .95);
    border-top: 1px solid var(--border);
    display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
    backdrop-filter: blur(8px);
}
.p-remaining { font-weight: 800; }
.p-remaining.is-zero { color: var(--accent); }

.p-summary { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.p-summary li { display: flex; justify-content: space-between; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; }

.p-pulse h1::after { content: ""; display: inline-block; width: 10px; height: 10px; margin-left: 10px; border-radius: 50%; background: var(--accent); animation: p-pulse 1.4s infinite; }
@keyframes p-pulse { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }

@media (min-width: 560px) {
    .p-bar { left: 50%; right: auto; width: 520px; transform: translateX(-50%); border: 1px solid var(--border); border-radius: 16px 16px 0 0; }
}
