﻿.lr-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lr-label {
    font-size: var(--fs-md);
    font-family: var(--font-bold);
    color: var(--ink);
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 12px;
    background: var(--paper);
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--fs-xl);
    cursor: pointer;
}

    .checkbox-item input[type="checkbox"] {
        width: 16px;
        height: 16px;
        accent-color: var(--primary);
        cursor: pointer;
    }

.link-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--primary-50);
    border: 1px solid var(--primary-100);
    border-radius: var(--r-md);
    padding: 10px 14px;
}

.link-text {
    font-family: var(--mono);
    font-size: var(--fs-md);
    color: var(--primary-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    direction: ltr;
    text-align: left;
}

.admin-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border: 1px solid var(--line-soft);
    border-radius: var(--r-sm);
    font-size: var(--fs-xl);
}

    .admin-row:not(:last-child) {
        margin-bottom: 6px;
    }

.join-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 20%, var(--primary-50) 0%, var(--paper) 55%);
    padding: 24px;
}

.join-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-lg);
    padding: 40px 36px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    animation: join-pop .35s var(--ease);
}

@keyframes join-pop {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.join-card-error {
    border-color: var(--danger-bg);
}

.join-icon-error {
    color: var(--danger);
    background: var(--danger-bg);
    width: 68px;
    height: 68px;
    border-radius: var(--r-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.join-title {
    font-size: 19px;
    font-family: var(--font-bold);
    color: var(--ink);
}

.join-desc {
    font-size: var(--fs-xl);
    color: var(--muted);
    line-height: 1.8;
}

.join-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--warning-bg);
    color: #92610a;
    font-size: var(--fs-sm);
    font-family: var(--font-bold);
    padding: 5px 12px;
    border-radius: var(--r-full);
    margin: 4px 0 6px;
}

.join-btn {
    margin-top: 14px;
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--r-md);
    padding: 13px 20px;
    font-size: var(--fs-2xl);
    font-family: var(--font-bold);
    cursor: pointer;
    box-shadow: var(--sh-sm);
    transition: background .15s var(--ease), transform .1s var(--ease);
}

    .join-btn:hover {
        background: var(--primary-ink);
    }

    .join-btn:active {
        transform: scale(.98);
    }

.join-spinner {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid var(--primary-100);
    border-top-color: var(--primary);
    animation: join-spin .7s linear infinite;
    margin-bottom: 8px;
}

@keyframes join-spin {
    to {
        transform: rotate(360deg);
    }
}

.join-msg {
    font-size: var(--fs-xl);
    color: var(--muted);
}

.room-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--ink);
    color: #fff;
    overflow: hidden;
}

.room-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    background: rgba(255,255,255,.04);
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
}

.room-title {
    font-size: var(--fs-3xl);
    font-family: var(--font-bold);
}

.room-participants-count {
    font-size: var(--fs-md);
    color: #a3a6b8;
    background: rgba(255,255,255,.06);
    padding: 4px 12px;
    border-radius: var(--r-full);
}

.room-leave-btn {
    margin-right: auto;
    background: var(--danger);
    color: #fff;
    border: none;
    border-radius: var(--r-sm);
    padding: 8px 18px;
    font-size: var(--fs-md);
    font-family: var(--font-bold);
    cursor: pointer;
    transition: filter .15s;
}

    .room-leave-btn:hover {
        filter: brightness(1.1);
    }

.room-body {
    flex: 1;
    display: flex;
    min-height: 0;
}

.room-stage {
    flex: 1;
    position: relative;
    background: #05060a;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: auto;
}

.local-video-box {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 180px;
    height: 130px;
    border-radius: var(--r-md);
    overflow: hidden;
    border: 2px solid var(--primary);
    box-shadow: var(--sh-md);
    z-index: 5;
    background: #000;
}

    .local-video-box video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.remote-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    width: 100%;
    max-width: 1100px;
}

    .remote-video-grid video,
    .remote-video-grid audio {
        width: 100%;
        aspect-ratio: 16 / 9;
        object-fit: cover;
        border-radius: var(--r-md);
        background: #14151c;
        border: 1px solid rgba(255,255,255,.08);
    }

.room-sidebar {
    width: 320px;
    flex-shrink: 0;
    background: #101117;
    border-right: 1px solid rgba(255,255,255,.08);
    display: flex;
    flex-direction: column;
}

.room-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.room-tab {
    flex: 1;
    background: none;
    border: none;
    color: #a3a6b8;
    font-family: inherit;
    font-size: var(--fs-md);
    font-family: var(--font-bold);
    padding: 12px 0;
    cursor: pointer;
    transition: color .12s, background .12s;
}

    .room-tab:hover {
        color: #fff;
    }

    .room-tab.active {
        color: #fff;
        background: rgba(91,95,239,.12);
        box-shadow: inset 0 -2px 0 var(--primary);
    }

.chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-msg {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: rgba(255,255,255,.05);
    border-radius: var(--r-sm);
    padding: 8px 10px;
    font-size: var(--fs-md);
    max-width: 90%;
    align-self: flex-start;
}

.chat-sender {
    font-size: var(--fs-2xs);
    font-family: var(--font-bold);
    color: var(--primary);
}

.chat-text {
    color: #e5e5ea;
    line-height: 1.6;
}

.chat-input-row {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.chat-input {
    flex: 1;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--r-sm);
    padding: 9px 12px;
    color: #fff;
    font-family: inherit;
    font-size: var(--fs-md);
}

    .chat-input:focus {
        outline: none;
        border-color: var(--primary);
    }

.chat-send-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--r-sm);
    padding: 0 16px;
    font-family: inherit;
    font-size: var(--fs-md);
    font-family: var(--font-bold);
    cursor: pointer;
}

    .chat-send-btn:hover {
        background: var(--primary-ink);
    }

.files-panel {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

    .files-panel input[type="file"] {
        color: #a3a6b8;
        font-size: var(--fs-sm);
    }

.files-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,.05);
    border-radius: var(--r-sm);
    padding: 8px 12px;
    font-size: var(--fs-md);
}

    .file-row a {
        color: var(--primary);
        text-decoration: none;
        font-family: var(--font-bold);
    }

        .file-row a:hover {
            text-decoration: underline;
        }

.participants-panel {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

.participant-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,.05);
    border-radius: var(--r-sm);
    padding: 9px 12px;
    font-size: var(--fs-md);
}

.participant-controls {
    display: flex;
    gap: 6px;
}

    .participant-controls button {
        background: rgba(255,255,255,.08);
        border: 1px solid rgba(255,255,255,.1);
        color: #a3a6b8;
        border-radius: var(--r-full);
        padding: 5px 12px;
        font-size: var(--fs-sm);
        font-family: inherit;
        cursor: pointer;
        transition: all .12s;
    }

        .participant-controls button.active {
            background: var(--success);
            border-color: var(--success);
            color: #fff;
            font-family: var(--font-bold);
        }

.participants-empty {
    text-align: center;
    color: #a3a6b8;
    font-size: var(--fs-md);
    padding: 24px 0;
}

.kick-btn {
    background: var(--danger) !important;
    border-color: var(--danger) !important;
    color: #fff !important;
}

.room-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 16px;
    background: rgba(255,255,255,.04);
    border-top: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
}

.room-tool-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: var(--fs-5xl);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s, transform .1s;
}

    .room-tool-btn:hover {
        background: rgba(255,255,255,.16);
    }

    .room-tool-btn:active {
        transform: scale(.94);
    }

    .room-tool-btn.active {
        background: var(--primary);
    }

    .room-tool-btn:disabled {
        opacity: .35;
        cursor: not-allowed;
    }

        .room-tool-btn:disabled:hover {
            background: rgba(255,255,255,.08);
        }

.whiteboard-overlay {
    position: absolute;
    inset: 20px;
    background: #fff;
    border-radius: var(--r-lg);
    box-shadow: var(--sh-lg);
    z-index: 20;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.whiteboard-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

    .whiteboard-toolbar input[type="color"] {
        width: 30px;
        height: 30px;
        border: none;
        border-radius: var(--r-sm);
        padding: 0;
        cursor: pointer;
        background: none;
    }

    .whiteboard-toolbar input[type="range"] {
        width: 100px;
        accent-color: var(--primary);
    }

    .whiteboard-toolbar button {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--r-sm);
        padding: 6px 14px;
        font-size: var(--fs-md);
        font-family: inherit;
        font-family: var(--font-bold);
        color: var(--ink);
        cursor: pointer;
        margin-right: auto;
    }

        .whiteboard-toolbar button:hover {
            background: var(--primary-50);
            border-color: var(--primary-100);
        }

        .whiteboard-toolbar button:last-child {
            margin-right: 0;
        }

.whiteboard-canvas {
    flex: 1;
    width: 100%;
    cursor: crosshair;
    touch-action: none;
}

.whiteboard-readonly-note {
    font-size: var(--fs-md);
    color: var(--muted);
    margin-right: auto;
}

@media (max-width: 860px) {
    .room-body {
        flex-direction: column;
    }

    .room-sidebar {
        width: 100%;
        height: 260px;
        border-right: none;
        border-top: 1px solid rgba(255,255,255,.08);
    }

    .local-video-box {
        width: 120px;
        height: 90px;
    }
}
