/* BabbelTijd: pixelart op de canvas, gewone moderne bediening eroverheen. */

:root {
    --bg: #0d0912;
    --panel: rgba(22, 15, 32, 0.82);
    --panel-solid: #1a1226;
    --line: rgba(255, 255, 255, 0.10);
    --text: #f4f0f8;
    --muted: #a99bb8;
    --accent: #ff4fa3;
    --accent-2: #ff7cc4;
    --guest: #6fb3ff;
    --npc: #ffd479;
    --radius: 14px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

html, body {
    margin: 0;
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    overflow: hidden;
}

#app {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Om de stage heen: midden in het venster, op de homepage bovenaan met de screenshots eronder. */
.page {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

    .page.home { justify-content: flex-start; }
    .page > .stage { flex-shrink: 0; }

/* De stage krijgt zijn maat van babbeltijd.js (640:400, passend in het venster).
   Panelen schalen mee via container-eenheden (cqh = 1% van de stagehoogte). */
.stage {
    position: relative;
    container-type: size;
    font-size: clamp(11px, 2.05cqh, 17px);
}

.game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    /* De laatste schaalstap mag zacht: het canvas is al met harde pixels vergroot (zie babbeltijd.js). */
    image-rendering: auto;
    cursor: default; /* de engine zet zelf de juiste cursor */
}

.overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

    .overlay > * {
        pointer-events: auto;
    }

/* ---- Bouwstenen ---------------------------------------------------------------------------- */

.panel {
    background: var(--panel);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    box-sizing: border-box;
}

h2 {
    margin: 0 0 0.7em;
    font-size: 1.3em;
    font-weight: 650;
}

p {
    margin: 0.6em 0 0;
}

.muted { color: var(--muted); }
.small { font-size: 0.85em; }
.error { color: #ff8a9a; }
.notice { color: #9be8b8; }

.fineprint {
    margin-top: 0.9em;
    font-size: 0.75em;
    color: var(--muted);
}

.row {
    display: flex;
    gap: 0.5em;
    margin-top: 0.7em;
}

    .row > .btn { flex: 1; }

label {
    display: block;
    margin-bottom: 0.7em;
    font-size: 0.85em;
    color: var(--muted);
}

input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.35em;
    padding: 0.6em 0.8em;
    font: inherit;
    font-size: 1.05em;
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}

    input:focus {
        border-color: var(--accent);
        background: rgba(255, 255, 255, 0.09);
    }

    input::placeholder { color: #776a86; }

.btn {
    font: inherit;
    font-size: 0.95em;
    font-weight: 600;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.6em 1em;
    cursor: pointer;
    transition: background 0.15s, transform 0.05s, opacity 0.15s;
}

    .btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.14); }
    .btn:active:not(:disabled) { transform: translateY(1px); }
    .btn:disabled { opacity: 0.45; cursor: default; }
    .btn.wide { width: 100%; margin-top: 0.4em; }
    .btn.ghost { background: transparent; }
    .btn.on { border-color: var(--accent); color: var(--accent-2); }

    .btn.primary {
        background: linear-gradient(135deg, var(--accent), #c43cff);
        border-color: transparent;
        color: #fff;
    }

        .btn.primary:hover:not(:disabled) { background: linear-gradient(135deg, #ff6bb3, #d05cff); }

    .btn.round {
        border-radius: 999px;
        padding: 0;
        width: 2.2em;
        height: 2.2em;
        line-height: 1;
        font-size: 1.05em;
    }

        .btn.round.small { width: 1.8em; height: 1.8em; font-size: 1em; }

.tabs {
    display: flex;
    gap: 0.25em;
    padding: 0.25em;
    margin-bottom: 1em;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.tab {
    flex: 1;
    font: inherit;
    font-size: 0.85em;
    font-weight: 600;
    padding: 0.55em 0.3em;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
}

    .tab.on { color: var(--text); background: rgba(255, 255, 255, 0.12); }

.segmented {
    display: flex;
    gap: 0.25em;
    padding: 0.2em;
    margin-bottom: 0.7em;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

    .segmented button {
        flex: 1;
        font: inherit;
        font-size: 0.9em;
        padding: 0.45em;
        color: var(--muted);
        background: transparent;
        border: 0;
        border-radius: 8px;
        cursor: pointer;
    }

        .segmented button.on { color: #fff; background: var(--accent); }

.swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35em;
    margin-bottom: 0.8em;
}

.swatch {
    width: 1.9em;
    height: 1.9em;
    padding: 0;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    position: relative;
}

    .swatch.small { width: 1.35em; height: 1.35em; }
    .swatch.on { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }

    /* Alleen met abonnement: een klein plusje erbij */
    .swatch.plus::after {
        content: "+";
        position: absolute;
        right: -0.35em;
        top: -0.45em;
        font-size: 0.75em;
        font-weight: 800;
        color: var(--accent-2);
    }

.badge {
    display: inline-block;
    margin-left: 0.3em;
    padding: 0 0.4em;
    font-size: 0.75em;
    font-weight: 800;
    color: #fff;
    background: var(--accent);
    border-radius: 999px;
}

/* ---- Ingang ---------------------------------------------------------------------------------- */

.entrance-card {
    position: absolute;
    left: 2.5%;
    top: 27%;
    width: 36%;
    max-height: 70%;
    overflow: auto;
    padding: 1.2em 1.3em;
}

    .entrance-card .close { display: block; margin: -0.6em -0.6em 0.3em auto; }

/* De deur van het hotel is de knop naar binnen: zacht pulserend licht, feller bij hover. */
.door {
    position: absolute;
    padding: 0;
    border: 0;
    border-radius: 0.4em;
    background: transparent;
    cursor: pointer;
    animation: door-glow 2.4s ease-in-out infinite;
}

    .door:hover { animation: none; box-shadow: 0 0 2.4em 0.7em rgba(255, 214, 120, 0.55); background: rgba(255, 236, 170, 0.14); }

@keyframes door-glow {
    0%, 100% { box-shadow: 0 0 1em 0.1em rgba(255, 214, 120, 0.15); }
    50% { box-shadow: 0 0 2em 0.5em rgba(255, 214, 120, 0.4); }
}

.door-label {
    position: absolute;
    left: 50%;
    bottom: 1%;
    transform: translateX(-50%);
    font-size: 0.9em;
}

.peek {
    position: absolute;
    right: 1.5%;
    bottom: 2%;
    font-size: 0.85em;
}

/* ---- Homepage: screenshots onder de gevel ----------------------------------------------------- */

.home-shots {
    width: min(1100px, 92%);
    padding: 3em 0 4em;
    text-align: center;
}

    .home-shots h2 { font-size: 1.8em; }
    .home-shots > p.muted { max-width: 40em; margin: 0 auto; line-height: 1.5; }

.shots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 1.4em;
    margin: 2em 0;
    text-align: left;
}

    .shots figure {
        margin: 0;
        overflow: hidden;
        background: var(--panel-solid);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    }

    .shots img { display: block; width: 100%; aspect-ratio: 640 / 300; }
    .shots figcaption { padding: 0.8em 1em 1em; color: var(--muted); font-size: 0.95em; line-height: 1.45; }
    .shots figcaption strong { display: block; margin-bottom: 0.2em; color: var(--text); }

/* ---- Kledingkast ----------------------------------------------------------------------------- */

.turn {
    position: absolute;
    left: 15%;
    bottom: 3%;
    display: flex;
    gap: 0.6em;
}

.wardrobe-card {
    position: absolute;
    right: 2.5%;
    top: 4%;
    bottom: 4%;
    width: 55%;
    padding: 1.1em 1.3em;
    display: flex;
    flex-direction: column;
}

    .wardrobe-card .rows {
        flex: 1;
        overflow: auto;
        padding-right: 0.3em;
    }

.wrow {
    display: grid;
    grid-template-columns: 7.5em 1fr;
    align-items: center;
    gap: 0.6em;
    padding: 0.28em 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

    .wrow .swatches, .wrow .segmented { margin: 0; }
    .wrow.disabled .wlabel { color: #6d6079; }

.wlabel {
    font-size: 0.85em;
    color: var(--muted);
}

.stepper {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

    .stepper .value {
        flex: 1;
        text-align: center;
        font-weight: 600;
    }

        .stepper .value.locked { color: var(--accent-2); }

/* ---- In het hotel ---------------------------------------------------------------------------- */

.menu-button {
    position: absolute;
    right: 1.2%;
    top: 2%;
    background: rgba(22, 15, 32, 0.7);
}

.showcase .menu-button { display: none; }

.table-buttons {
    position: absolute;
    left: 1.2%;
    top: 2%;
    display: flex;
    gap: 0.4em;
}

    .table-buttons .btn { background: rgba(22, 15, 32, 0.75); }

.waiting {
    position: absolute;
    left: 50%;
    top: 4%;
    transform: translateX(-50%);
    padding: 0.4em 1em;
    font-size: 0.9em;
    color: var(--text);
    background: rgba(22, 15, 32, 0.75);
    border-radius: 999px;
}

.menu {
    position: absolute;
    right: 1.2%;
    top: 11%;
    width: 30%;
    padding: 0.9em;
}

.choices {
    position: absolute;
    left: 1.2%;
    right: 1.2%;
    bottom: 26.5%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
}

.chip {
    font: inherit;
    font-size: 0.85em;
    padding: 0.45em 0.9em;
    color: var(--text);
    background: rgba(22, 15, 32, 0.85);
    border: 1px solid rgba(255, 79, 163, 0.6);
    border-radius: 999px;
    cursor: pointer;
    backdrop-filter: blur(6px);
}

    .chip:hover { background: var(--accent); border-color: var(--accent); }

/* De chatbalk vult de onderste 25% (y 300–400 van de 400). */
.hotel-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 25%;
    display: grid;
    grid-template-columns: 1fr 24%;
    gap: 0.6em;
    padding: 0.5em 0.7em 0.6em;
    box-sizing: border-box;
    background: linear-gradient(#1a1226, #120c1a);
    border-top: 1px solid var(--line);
}

.chat {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.log {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column-reverse;
    font-size: 0.85em;
    line-height: 1.35;
    padding-right: 0.4em;
}

    .log .line b { margin-right: 0.4em; }
    .log .me b { color: var(--accent-2); }
    .log .guest b { color: var(--guest); }
    .log .npc b { color: var(--npc); }
    .log .system { color: var(--muted); font-style: italic; }

.say {
    display: flex;
    gap: 0.5em;
    margin-top: 0.35em;
}

    .say input { margin: 0; padding: 0.45em 0.8em; font-size: 0.95em; }
    .say .btn { padding: 0.45em 1em; }

.people {
    min-height: 0;
    overflow-y: auto;
    padding-left: 0.6em;
    border-left: 1px solid var(--line);
    font-size: 0.85em;
}

    .people .logo { display: block; width: 100%; max-width: 11em; margin: 0.1em 0 0.4em -0.3em; }
    .people .room { font-weight: 700; margin-bottom: 0.3em; }

    .people .balance {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.4em;
        margin-bottom: 0.4em;
        color: #ffd479;
        font-weight: 600;
    }

.btn.tiny { padding: 0.15em 0.6em; font-size: 0.8em; border-radius: 999px; }
    .people .status { color: #ffcf7a; font-size: 0.85em; margin-bottom: 0.3em; }
    .people ul { list-style: none; margin: 0; padding: 0; }
    .people li { padding: 0.1em 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

        .people li::before {
            content: "";
            display: inline-block;
            width: 0.5em;
            height: 0.5em;
            margin-right: 0.45em;
            border-radius: 999px;
            background: var(--guest);
        }

        .people li.me::before { background: var(--accent); }
        .people li.npc::before { background: var(--npc); }

/* ---- Moderator (/moderator): gewone scrollende pagina, geen canvas ------------------------- */

#app:has(.mod-page) { display: block; overflow-y: auto; }

.mod-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.2rem 1.2rem 3rem;
    font-size: 15px;
}

.mod-head {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

    .mod-head img { height: 2.2rem; }
    .mod-head h1 { flex: 1; margin: 0; font-size: 1.4rem; font-weight: 650; }
    .mod-head a { text-decoration: none; }

.mod-tabs { max-width: 32rem; }
.mod-box { padding: 1rem 1.2rem; margin-bottom: 1rem; }
.mod-block { max-width: 32rem; }

label.check { display: flex; align-items: center; gap: 0.5em; color: var(--text); font-size: 0.95em; }
    label.check input { width: auto; margin: 0; }

.mod-search {
    display: flex;
    gap: 0.5em;
    max-width: 32rem;
    margin-bottom: 0.8rem;
}

    .mod-search input { margin: 0; }

.mod-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92em;
}

    .mod-table th { text-align: left; font-weight: 600; color: var(--muted); padding: 0.4em 0.6em; border-bottom: 1px solid var(--line); }
    .mod-table td { padding: 0.35em 0.6em; border-bottom: 1px solid var(--line); vertical-align: middle; }
    .mod-table tr:hover td { background: rgba(255, 255, 255, 0.03); }
    .mod-table .nowrap { white-space: nowrap; }
    .mod-table .badge { background: var(--guest); }
    .mod-table .badge.acc { background: #c9a227; }

.link {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    text-decoration: underline dotted rgba(255, 255, 255, 0.35);
}

    .link:hover { color: var(--accent-2); }

.g-f, .g-m { font-size: 1.25em; font-weight: 700; line-height: 1; }
.g-f { color: #ff7cc4; }
.g-m { color: #6fb3ff; }
.mod-link { display: block; box-sizing: border-box; text-align: center; text-decoration: none; }

/* ---- Laden en fouten ------------------------------------------------------------------------- */

.loading {
    font-size: 1.1rem;
    color: var(--muted);
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0.6rem 1.25rem;
    box-sizing: border-box;
    background: #aa0033;
    color: #fff;
    z-index: 1000;
}

    #blazor-error-ui .reload { color: #ffe08a; }

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.load-error {
    position: fixed;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    z-index: 10;
    color: #ff7cc4;
    white-space: pre-wrap;
    font-size: 12px;
}

/* ---- Eigen kamer (RoomPanel) ------------------------------------------------------------------ */

.room-panel {
    position: absolute;
    right: 2%;
    top: 12%;
    width: 46%;
    max-height: 62%;
    display: flex;
    flex-direction: column;
    padding: 1em 1.1em;
}

    .room-panel .room-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5em; }
    .room-panel .room-head h2 { margin: 0 0 0.5em; }
    .room-panel .room-body { overflow: auto; min-height: 0; }
    .room-panel .prose { white-space: pre-wrap; line-height: 1.45; }

.badge.vip { background: linear-gradient(135deg, #f2c24e, #c98a1a); color: #2a1a04; vertical-align: middle; }

textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.6em 0.8em;
    font: inherit;
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: none;
    resize: vertical;
}

    textarea:focus { border-color: var(--accent); }

.upload { display: flex; align-items: center; gap: 0.7em; flex-wrap: wrap; margin-bottom: 0.6em; }
    .upload label.btn { margin: 0; color: #fff; }
    .upload input[type=file] { display: none; }

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7.5em, 1fr));
    gap: 0.6em;
    margin-top: 0.6em;
}

    .gallery figure { margin: 0; }
    .gallery figure.dim { opacity: 0.55; }
    .gallery figcaption { margin-top: 0.25em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .gallery .btn.tiny { margin-top: 0.25em; }

    .gallery .thumb {
        position: relative;
        display: block;
        width: 100%;
        aspect-ratio: 1;
        padding: 0;
        border: 1px solid var(--line);
        border-radius: 10px;
        overflow: hidden;
        background: rgba(0, 0, 0, 0.3);
        cursor: pointer;
    }

        .gallery .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

        .gallery .thumb .play {
            position: absolute;
            inset: 0;
            display: grid;
            place-items: center;
            font-size: 1.8em;
            color: #fff;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
        }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6em;
    background: rgba(6, 4, 12, 0.88);
    cursor: zoom-out;
}

    .lightbox img, .lightbox video { max-width: 92vw; max-height: 82vh; border-radius: 10px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6); }
    .lightbox video { cursor: default; }
    .lightbox-caption { color: var(--text); max-width: 80vw; text-align: center; }

.diary { border-bottom: 1px solid var(--line); padding: 0.45em 0; }
    .diary-title { font: inherit; font-weight: 600; color: var(--text); background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
    .diary-title .muted { font-weight: 400; margin-right: 0.4em; }
.diary-form { display: grid; gap: 0.5em; margin-bottom: 0.8em; }
    .diary-form input { margin: 0; }

.vip-packages { display: grid; gap: 0.45em; margin-top: 0.7em; }

/* Namen in de lijst met een eigen kamer: klikbaar */
button.link { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 0.2em; }

/* Conciërge: foto's, films en dagboek beoordelen */
.mod-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(13em, 1fr)); gap: 0.8em; margin-top: 0.6em; }
    .mod-media figure { margin: 0; }
    .mod-media figure.dim { opacity: 0.55; }
    .mod-media a { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.3); }
    .mod-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .mod-media .play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2em; color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8); }
    .mod-media figcaption { margin-top: 0.35em; }
    .mod-media .row { flex-wrap: wrap; margin-top: 0.35em; }
.mod-diary { margin-top: 0.7em; padding: 0.8em 1em; }
    .mod-diary h3 { margin: 0.35em 0 0; font-size: 1.05em; }
    .mod-diary .prose { white-space: pre-wrap; }
