:root {
    --black: #080808;
    --surface: #111111;
    --surface-light: #191919;
    --border: #2b2b2b;
    --gold: #c8a45a;
    --gold-light: #dcc486;
    --text: #f5f3ee;
    --muted: #a9a7a2;
    --danger: #d94a4a;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 50% 0%, rgba(215, 173, 85, 0.1), transparent 35%),
        var(--black);
    font-family: Arial, Helvetica, sans-serif;
}

.allurix-header {
    min-height: 76px;
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: rgba(8, 8, 8, 0.96);
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 3px;
    text-decoration: none;
}

.brand small {
    color: var(--gold);
    font-size: 11px;
    letter-spacing: 2px;
}

.brand-mark {
    width: 52px;
    height: 52px;
    display: block;
    object-fit: contain;
    flex: 0 0 auto;
    border-radius: 0;
}

.brand-mark.small {
    width: 32px;
    height: 32px;
    border-radius: 0;
}

.live-status {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 14px;
}

.status-dot {
    width: 9px;
    height: 9px;
    display: inline-block;
    flex: 0 0 auto;
    background: #e24747;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(226, 71, 71, 0.8);
}

main {
    width: 100%;
    min-height: calc(100vh - 142px);
}

#join {
    min-height: calc(100vh - 142px);
    padding: 55px 20px;
    display: grid;
    place-items: center;
}

#join-dialog {
    width: min(100%, 590px);
    padding: 46px;
    background: linear-gradient(145deg, #171717, #101010);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

.eyebrow {
    margin-bottom: 16px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
}

.eyebrow i {
    margin-right: 7px;
}

#join-dialog h1 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.08;
    font-weight: 750;
}

.intro {
    margin: 0 0 32px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
}

.field-group {
    margin-bottom: 20px;
}

.field-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--gold-light);
    font-size: 14px;
    font-weight: 700;
}

.form-control {
    min-height: 54px;
    padding: 0 16px;
    color: var(--text);
    background: #0b0b0b;
    border: 1px solid #353535;
    border-radius: 9px;
}

.form-control:focus {
    color: var(--text);
    background: #0b0b0b;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(215, 173, 85, 0.15);
}

.form-control::placeholder {
    color: #686868;
}

#join-button {
    width: 100%;
    min-height: 56px;
    margin-top: 8px;
    color: #17120a;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    border: 0;
    border-radius: 9px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
}

#join-button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

#join-button:disabled {
    cursor: wait;
    filter: grayscale(0.5);
    opacity: 0.7;
}

#join-button i {
    margin-right: 8px;
}

.privacy-note {
    margin: 20px 0 0;
    color: #777;
    font-size: 12px;
    text-align: center;
}

.privacy-note i {
    margin-right: 6px;
    color: var(--gold);
}

#room {
    width: min(1500px, 94%);
    margin: 0 auto;
    padding: 38px 0 55px;
}

#room-header {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

#room-title {
    margin: 8px 0 0;
    font-size: clamp(25px, 4vw, 38px);
    font-weight: 750;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    color: #fff;
    background: rgba(217, 74, 74, 0.13);
    border: 1px solid rgba(217, 74, 74, 0.35);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
}

#leave-room-button {
    padding: 13px 18px;
    color: #fff;
    background: transparent;
    border: 1px solid rgba(217, 74, 74, 0.7);
    border-radius: 9px;
    font-weight: 700;
    cursor: pointer;
}

#leave-room-button:hover {
    background: var(--danger);
}

#leave-room-button i {
    margin-right: 7px;
}

#layout-container {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 20px;
}

/* Allurix Live server-side pauzescherm */
#pause-screen {
    position: absolute;
    z-index: 30;
    inset: 0;
    min-height: 280px;
    padding: 28px;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: var(--text);
    text-align: center;
    background:
        radial-gradient(circle at 50% 25%, rgba(215, 173, 85, 0.18), transparent 42%),
        linear-gradient(145deg, #111, #030303 72%);
    border: 1px solid rgba(215, 173, 85, 0.55);
    border-radius: 14px;
    box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.7);
}

#pause-screen::before {
    content: "";
    position: absolute;
    inset: 14px;
    pointer-events: none;
    border: 1px solid rgba(215, 173, 85, 0.18);
    border-radius: 10px;
}

.pause-screen-content {
    position: relative;
    z-index: 1;
    width: min(100%, 620px);
}

.pause-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 11px;
    display: grid;
    place-items: center;
    color: #080808;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    border-radius: 50%;
    box-shadow: 0 0 35px rgba(215, 173, 85, 0.25);
    font-size: 24px;
}

.pause-eyebrow {
    margin: 0 0 7px;
    color: var(--gold);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2.4px;
}

#pause-screen h3 {
    margin: 0 0 7px;
    color: var(--gold-light);
    font-size: clamp(25px, 4vw, 38px);
}

#pause-screen p:not(.pause-eyebrow) {
    margin: 0 auto 11px;
    color: var(--muted);
    line-height: 1.55;
}

#pause-countdown {
    margin: 0 0 7px;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    font-size: clamp(36px, 6vw, 58px);
    font-weight: 800;
    letter-spacing: 3px;
    text-shadow: 0 0 24px rgba(215, 173, 85, 0.28);
}

#pause-screen small {
    color: #85827b;
}

.stream-paused #layout-container video,
.stream-paused #layout-container audio {
    visibility: hidden;
}

.live-badge.pause-badge {
    color: #17120a;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    border-color: var(--gold);
}

#resume-broadcast-button {
    color: #17120a !important;
    background: linear-gradient(135deg, var(--gold-light), var(--gold)) !important;
}

.video-container {
    position: relative;
    min-height: 280px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

.video-container video {
    width: 100%;
    height: auto;
    min-height: 280px;
    display: block;
    object-fit: cover;
}

.participant-data {
    position: absolute;
    z-index: 2;
    top: 14px;
    left: 14px;
}

.participant-data p {
    margin: 0;
    padding: 7px 11px;
    color: var(--text);
    background: rgba(8, 8, 8, 0.78);
    border: 1px solid rgba(215, 173, 85, 0.35);
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
}

#layout-container audio {
    display: none;
}

footer {
    min-height: 66px;
    padding: 16px 5%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #777;
    background: #0b0b0b;
    border-top: 1px solid var(--border);
    font-size: 13px;
}

footer p {
    margin: 0;
}

@media (max-width: 700px) {
    .allurix-header {
        padding: 0 20px;
    }

    .live-status {
        display: none;
    }

    #join {
        padding: 30px 15px;
    }

    #join-dialog {
        padding: 30px 22px;
    }

    #room-header {
        align-items: flex-start;
        flex-direction: column;
    }

    #leave-room-button {
        width: 100%;
    }

    .video-container,
    .video-container video {
        min-height: 220px;
    }
}

.viewer-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    color: var(--gold-light);
    font-weight: 700;
    font-size: 16px;
}

.viewer-count i {
    color: var(--gold);
}

#live-chat {
    margin-top: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    color: var(--gold-light);
}

.chat-header h3 {
    margin: 0;
    font-size: 20px;
}

#chat-messages {
    height: 320px;
    padding: 20px;
    overflow-y: auto;
}

.chat-placeholder {
    color: var(--muted);
    text-align: center;
    margin-top: 100px;
}

#chat-form {
    position: relative;
    display: flex;
    gap: 10px;
    padding: 16px;
    border-top: 1px solid var(--border);
}

#chat-input {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
    color: var(--text);
    background: var(--black);
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
}

#chat-input:focus {
    border-color: var(--gold);
}

#chat-send-button,
#chat-emoji-button {
    width: 50px;
    border: 0;
    border-radius: 10px;
    color: var(--black);
    background: var(--gold);
    cursor: pointer;
}

.chat-message {
    width: fit-content;
    max-width: 75%;
    margin-bottom: 14px;
    padding: 10px 14px;
    color: var(--text);
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 4px 14px 14px 14px;
}

.chat-message strong {
    display: block;
    margin-bottom: 4px;
    color: var(--gold-light);
    font-size: 13px;
}

.chat-message p {
    margin: 0;
    overflow-wrap: anywhere;
}

.own-message {
    margin-left: auto;
    background: rgba(215, 173, 85, 0.14);
    border-color: var(--gold);
    border-radius: 14px 4px 14px 14px;
}

/* Allurix Live-overzicht */
#join {
    display: block;
    padding: 36px 24px;
}
#live-overview {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}
.overview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}
.overview-header h1 {
    margin: 0 0 10px;
    color: var(--text);
    font-size: 32px;
}
#streams-status, .live-stream-card p {
    color: var(--muted);
    line-height: 1.6;
}
#streams-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}
.live-stream-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    background: linear-gradient(145deg, #171717, #101010);
    border: 1px solid var(--border);
    border-radius: 16px;
}
.live-stream-card h2 {
    margin: 18px 0 10px;
    font-size: 21px;
    overflow-wrap: anywhere;
}
#start-broadcast-button, .live-stream-card button {
    padding: 14px 20px;
    color: #17120a;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    border: 0;
    border-radius: 9px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}
.live-stream-card button { width: 100%; }
#start-broadcast-button i { margin-right: 8px; }
#start-broadcast-button:disabled { opacity: 0.5; cursor: not-allowed; }
#live-overview button:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 4px; }
.stream-actions {
    display: grid;
    gap: 10px;
}

#chat-emoji-button {
    flex: 0 0 46px;
    border: 1px solid var(--gold);
    color: var(--gold-light);
    background: #151515;
    font-size: 20px;
}

#chat-emoji-button:hover,
#chat-emoji-button:focus-visible,
#chat-emoji-button[aria-expanded="true"] {
    color: var(--black);
    background: var(--gold);
    outline: none;
}

#chat-emoji-picker {
    position: absolute;
    z-index: 20;
    left: 16px;
    bottom: calc(100% + 8px);
    grid-template-columns: repeat(5, 40px);
    gap: 5px;
    max-height: 245px;
    padding: 10px;
    overflow-y: auto;
    border: 1px solid var(--gold);
    border-radius: 12px;
    background: #111111;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.72);
}

#chat-emoji-picker:not([hidden]) {
    display: grid;
}

#chat-emoji-picker .chat-emoji-option {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    color: inherit;
    background: #1a1a1a;
    font-size: 22px;
    cursor: pointer;
}

#chat-emoji-picker .chat-emoji-option:hover,
#chat-emoji-picker .chat-emoji-option:focus-visible {
    border-color: var(--gold);
    background: #29220d;
    outline: none;
}

@media (max-width: 380px) {
    #chat-emoji-picker {
        left: 8px;
        grid-template-columns: repeat(5, minmax(34px, 1fr));
        width: calc(100vw - 32px);
    }

    #chat-emoji-picker .chat-emoji-option {
        width: 100%;
        height: 38px;
    }
}
.live-stream-card .moderator-end-stream-button {
    color: #ffffff;
    background: linear-gradient(145deg, #2a1515, #1b1010);
    border: 1px solid var(--danger);
}
.live-stream-card .moderator-end-stream-button:hover:not(:disabled) {
    color: #ffffff;
    background: var(--danger);
}
.live-stream-card button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
#live-overview .moderator-end-stream-button:focus-visible {
    outline-color: var(--danger);
}

@media (max-width: 1050px) {
    #streams-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    #join { padding: 28px 16px; }
    .overview-header { flex-direction: column; align-items: stretch; }
    #streams-grid { grid-template-columns: 1fr; }
}

/* Allurix uitzendbediening */
#broadcast-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

#broadcast-controls button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 18px;
    color: var(--gold-light);
    background: var(--surface);
    border: 1px solid var(--gold);
    border-radius: 10px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

#broadcast-controls button:hover:not(:disabled) {
    background: var(--surface-light);
}

#broadcast-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#broadcast-controls button:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 4px;
}

#toggle-microphone-button[aria-pressed="true"] {
    color: var(--text);
    border-color: var(--danger);
    background: rgba(217, 74, 74, 0.15);
}

#broadcast-controls-status {
    flex-basis: 100%;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

#broadcast-controls-status:empty {
    display: none;
}

@media (max-width: 640px) {
    #broadcast-controls button {
        width: 100%;
    }
}

/* Allurix kijkersbediening */
#viewer-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

#viewer-controls button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 18px;
    color: var(--gold-light);
    background: var(--surface);
    border: 1px solid var(--gold);
    border-radius: 10px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

#viewer-controls button:hover:not(:disabled) {
    background: var(--surface-light);
}

#viewer-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#viewer-controls button:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 4px;
}

#toggle-viewer-audio-button[aria-pressed="true"] {
    border-color: var(--muted);
    color: var(--muted);
}

#viewer-controls-status {
    flex-basis: 100%;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

#viewer-controls-status:empty {
    display: none;
}

.video-container:fullscreen {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: #000;
}

.video-container:fullscreen video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 640px) {
    #viewer-controls button {
        width: 100%;
    }
}

/* Allurix profielfoto livestreamkaarten */
.stream-profile {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    margin: 0 0 18px;
}

.stream-profile h2 {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.stream-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid var(--gold);
    border-radius: 14px;
    background:
        radial-gradient(circle at 50% 35%, rgba(215, 173, 85, 0.16), transparent 48%),
        #090909;
    color: var(--gold-light);
    font-size: 42px;
}

.stream-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Allurix automatische iframehoogte */
html.allurix-embedded,
html.allurix-embedded body {
    height: auto;
    min-height: 0;
    overflow-y: hidden;
}

html.allurix-embedded body {
    display: flow-root;
}

html.allurix-embedded main,
html.allurix-embedded #join {
    min-height: 0;
}
/* Video links en livechat rechts bij voldoende ruimte */
@media (min-width: 700px) {
    #room {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 320px;
        column-gap: 24px;
        align-items: start;
    }

    #room-header {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    #broadcast-controls,
    #viewer-controls {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    #layout-container {
        grid-column: 1;
        grid-row: 3;
        min-width: 0;
    }

    #live-chat {
        grid-column: 2;
        grid-row: 3;
        min-width: 0;
        margin-top: 0;
        height: 280px;
        display: flex;
        flex-direction: column;
    }

    #live-chat .chat-header,
    #chat-form {
        flex-shrink: 0;
    }

    #chat-messages {
        flex: 1;
        min-height: 0;
        height: auto;
    }
}@media (min-width: 700px) {
    #room > #layout-container {
        height: 280px;
    }

    #room > #layout-container > .video-container {
        height: 100%;
        min-height: 0;
    }

    #room > #layout-container > .video-container video {
        height: 100%;
        min-height: 0;
        object-fit: contain;
    }
}

/* Allurix Live: bovenste gedeelte compacter */
@media (min-width: 700px) {
    #room {
        padding-top: 20px;
        padding-bottom: 35px;
    }

    #room-header {
        margin-bottom: 12px;
    }

    .live-badge {
        padding: 4px 9px;
    }

    #room-title {
        margin-top: 4px;
        font-size: clamp(24px, 3vw, 32px);
    }

    .viewer-count {
        margin-top: 7px;
        font-size: 14px;
    }

    #broadcast-controls,
    #viewer-controls {
        gap: 10px;
        margin-bottom: 12px;
    }

    #broadcast-controls button,
    #viewer-controls button {
        min-height: 42px;
        padding: 9px 15px;
    }
}
/* Allurix Live: logobalk compacter */
@media (min-width: 700px) {
    .allurix-header {
        min-height: 58px;
        padding-left: 4%;
        padding-right: 4%;
    }

    .brand-mark {
        width: 42px;
        height: 42px;
    }

    .brand {
        font-size: 19px;
    }

    #room {
        padding-top: 14px;
    }
}
/* Interne Allurix Live-logobalk verbergen */
html.allurix-embedded .allurix-header {
    display: none;
}

/* Livestreaminhoud hoger en ruimer in beeld */
html.allurix-embedded #room {
    padding-top: 0;
}
@media (min-width: 700px) {
    .chat-placeholder {
        margin-top: 45px;
    }
}
/* LIVE-logo naast het kijkersaantal plaatsen */
#room-header > div:first-child {
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    justify-content: start;
    column-gap: 12px;
    row-gap: 6px;
}

#room-title {
    grid-column: 1 / -1;
    grid-row: 1;
    margin: 0;
}

.viewer-count {
    grid-column: 1;
    grid-row: 2;
    margin: 0;
}

.live-badge {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
}
/* =========================================
   Allurix Live ??? bediening in het videovak
   ========================================= */

@media (min-width: 700px) {
    #room {
        grid-template-areas:
            "room-header room-header"
            "video-area live-chat";
        align-items: start;
    }

    #room-header {
        grid-area: room-header;
    }

    #layout-container {
        grid-area: video-area;
        position: relative;
    }

    #live-chat {
        grid-area: live-chat;
    }

    /* Uitzender- en kijkerbediening over het videovak plaatsen */
    #broadcast-controls,
    #viewer-controls {
        grid-area: video-area;
        align-self: start;
        justify-self: start;
        flex-direction: column;
        flex-wrap: nowrap;
        width: auto;
        max-width: 230px;
        margin: 72px 0 0 22px;
        gap: 8px;
        z-index: 20;
    }

    #broadcast-controls button,
    #viewer-controls button {
        width: 100%;
        min-width: 190px;
        min-height: 42px;
        padding: 9px 13px;
        background: rgba(8, 8, 8, 0.82);
        backdrop-filter: blur(4px);
    }

    #broadcast-controls-status,
    #viewer-controls-status {
        max-width: 220px;
        margin: 0;
        font-size: 12px;
    }
}/* =========================================
   Allurix Live ??? bediening in het videovak
   ========================================= */

@media (min-width: 700px) {
    #room {
        grid-template-areas:
            "room-header room-header"
            "video-area live-chat";
        align-items: start;
    }

    #room-header {
        grid-area: room-header;
    }

    #layout-container {
        grid-area: video-area;
        position: relative;
    }

    #live-chat {
        grid-area: live-chat;
    }

    /* Uitzender- en kijkerbediening over het videovak plaatsen */
    #broadcast-controls,
    #viewer-controls {
        grid-area: video-area;
        align-self: start;
        justify-self: start;
        flex-direction: column;
        flex-wrap: nowrap;
        width: auto;
        max-width: 230px;
        margin: 72px 0 0 22px;
        gap: 8px;
        z-index: 20;
    }

    #broadcast-controls button,
    #viewer-controls button {
        width: 100%;
        min-width: 190px;
        min-height: 42px;
        padding: 9px 13px;
        background: rgba(8, 8, 8, 0.82);
        backdrop-filter: blur(4px);
    }

    #broadcast-controls-status,
    #viewer-controls-status {
        max-width: 220px;
        margin: 0;
        font-size: 12px;
    }

    /* =========================================
   Correctie: bediening naast het videobeeld
   ========================================= */

@media (min-width: 700px) {
    #room {
        grid-template-columns: 220px minmax(0, 1fr) 360px;
        grid-template-areas:
            "room-header room-header room-header"
            "controls video-area live-chat";
        align-items: stretch;
    }

    #room-header {
        grid-area: room-header;
    }

    #broadcast-controls,
    #viewer-controls {
        grid-area: controls;
        align-self: start;
        justify-self: stretch;
        flex-direction: column;
        flex-wrap: nowrap;
        width: 100%;
        max-width: none;
        margin: 0;
        gap: 8px;
        z-index: 1;
    }

    #broadcast-controls button,
    #viewer-controls button {
        width: 100%;
        min-width: 0;
        min-height: 42px;
        padding: 9px 12px;
        background: #080808;
        backdrop-filter: none;
    }

    #layout-container {
        grid-area: video-area;
        position: relative;
    }

    #live-chat {
        grid-area: live-chat;
    }
}

/* Interne Allurix Live-footer verwijderen */
html.allurix-embedded footer {
    display: none !important;
}
/* =========================================
   Definitieve desktopindeling:
   video links, chat rechts, knoppen onder video
   ========================================= */

@media (min-width: 700px) {
    #room {
        grid-template-columns: minmax(0, 1fr) 360px;
        grid-template-areas:
            "room-header room-header"
            "video-area live-chat"
            "controls    live-chat";
        column-gap: 24px;
        row-gap: 10px;
        align-items: stretch;
    }

    #room-header {
        grid-area: room-header;
    }

    #layout-container {
        grid-area: video-area;
        width: 100%;
        position: relative;
    }

    #broadcast-controls,
    #viewer-controls {
        grid-area: controls;
        align-self: start;
        justify-self: stretch;
        flex-direction: row;
        flex-wrap: nowrap;
        width: 100%;
        max-width: none;
        margin: 0;
        gap: 10px;
        z-index: 1;
    }

    #broadcast-controls button,
    #viewer-controls button {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        min-height: 42px;
        padding: 9px 12px;
        background: #080808;
    }

    #broadcast-controls-status,
    #viewer-controls-status {
        display: none;
    }

    #live-chat {
        grid-area: live-chat;
        align-self: stretch;
        height: 100%;
        min-height: 0;
    }
}
/* Beschikbare schermhoogte volledig benutten */
@media (min-width: 700px) {
    html.allurix-embedded #room {
        min-height: 100vh;
        grid-template-rows: auto minmax(0, 1fr) auto;
        padding-bottom: 0;
    }

    html.allurix-embedded #layout-container,
    html.allurix-embedded #live-chat {
        height: 100% !important;
        min-height: 0;
    }
}

/* Correctie: videobeeld groot, maar knoppen altijd zichtbaar */
@media (min-width: 700px) {
    html.allurix-embedded #room {
        min-height: 0;
        grid-template-rows: auto auto auto;
        padding-bottom: 0;
    }

    html.allurix-embedded #layout-container {
        height: clamp(320px, calc(100vh - 250px), 520px) !important;
        min-height: 0;
    }

    html.allurix-embedded #live-chat {
        height: 100% !important;
        min-height: 0;
    }

    html.allurix-embedded #broadcast-controls,
    html.allurix-embedded #viewer-controls {
        margin-top: 0;
        margin-bottom: 0;
    }
}/* =========================================
   Optie 2: videovak volledig vullen
   en gele achtergrondgloed verwijderen
   ========================================= */

html.allurix-embedded body,
html.allurix-embedded main,
html.allurix-embedded #room {
    background-color: #050505 !important;
    background-image: none !important;
}

html.allurix-embedded main::before,
html.allurix-embedded main::after,
html.allurix-embedded #room::before,
html.allurix-embedded #room::after {
    display: none !important;
    content: none !important;
}

html.allurix-embedded .video-container video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
}
/* =========================================
   Livechat: berichten scrollen,
   invoerveld altijd zichtbaar
   ========================================= */

#live-chat {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

/* Alleen de berichtenlijst mag scrollen */
#chat-messages {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
}

/* Invoergedeelte permanent onderaan houden */
#live-chat form {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 10 !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    margin: 0 !important;
    background: #101010 !important;
}

/* Invoerveld mag niet worden samengedrukt */
#live-chat form input {
    min-width: 0 !important;
}
/* =========================================
   Definitieve chatcorrectie desktop
   Chat blijft even hoog als video + knoppen
   ========================================= */

@media (min-width: 700px) {
    #live-chat {
        height: calc(
            clamp(320px, calc(100vh - 250px), 520px) + 75px
        ) !important;
        max-height: calc(
            clamp(320px, calc(100vh - 250px), 520px) + 75px
        ) !important;
        min-height: 0 !important;
        overflow: hidden !important;
        align-self: start !important;
    }

    #chat-messages {
        flex: 1 1 0 !important;
        height: 0 !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }

    #live-chat form {
        position: relative !important;
        bottom: auto !important;
        flex: 0 0 auto !important;
        z-index: 10 !important;
    }
}
html.allurix-embedded #room:not([hidden]) #live-chat {
    height: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
}

/* Allurix Live - laatste hoogtecorrectie desktop */
html.allurix-embedded #layout-container {
    height: clamp(320px, calc(100vh - 155px), 615px) !important;
}

html.allurix-embedded #live-chat {
    height: calc(clamp(320px, calc(100vh - 155px), 615px) + 75px) !important;
    max-height: calc(clamp(320px, calc(100vh - 155px), 615px) + 75px) !important;
}

.live-stream-card > .live-badge {
    position: absolute;
    z-index: 2;
    top: 36px;
    left: 36px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.58);
}

.live-stream-card > .pause-badge {
    color: #090909;
    background: var(--gold);
}

/* Allurix Live v36 - chat vasthouden tijdens teruglezen */
#chat-hold-button {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 7px 11px;
    border: 1px solid var(--gold);
    border-radius: 999px;
    color: var(--gold-light);
    background: transparent;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
}

#chat-hold-button:hover,
#chat-hold-button:focus-visible {
    background: rgba(225, 180, 79, 0.12);
    outline: none;
}

#chat-hold-button.is-holding {
    color: #080808;
    background: var(--gold);
}

#chat-new-count {
    min-width: 20px;
    padding: 3px 6px;
    border-radius: 999px;
    color: #fff;
    background: #a5161b;
    font-size: 11px;
    text-align: center;
}

@media (max-width: 480px) {
    .chat-header {
        padding-inline: 14px;
    }

    #chat-hold-button {
        padding-inline: 9px;
    }
}

/* Sluit het bestaande desktopblok voordat de algemene v40-regels beginnen. */
}

/* Allurix Live v40 - terug naar de community */
.overview-actions,
.room-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.back-to-allurix-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 12px 18px;
    color: var(--gold-light);
    background: #080808;
    border: 1px solid var(--gold);
    border-radius: 9px;
    font: inherit;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.back-to-allurix-button:hover,
.back-to-allurix-button:focus-visible {
    color: #17120a;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    outline: none;
}

.back-to-allurix-button:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 4px;
}

@media (max-width: 700px) {
    .overview-actions,
    .room-header-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .overview-actions > *,
    .room-header-actions > * {
        width: 100%;
    }
}





