* { box-sizing: border-box; margin: 0; padding: 0; font-family: "Microsoft YaHei", sans-serif; }
body { display: flex; flex-direction: column; height: 100vh; background: #e9eef2; }

.header {
    background: #1c2431; color: #fff; padding: 12px 20px;
    font-size: 16px; font-weight: bold;
}

.main-container { display: flex; flex: 1; overflow: hidden; }

/* 视频区 */
.video-section { flex: 1; display: flex; flex-direction: column; padding: 15px; }
.video-grid {
    flex: 1; display: grid; gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    align-content: center; overflow-y: auto;
}

.video-box {
    position: relative; background: #111; border-radius: 8px;
    overflow: hidden; aspect-ratio: 16 / 9; box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.video-box video { width: 100%; height: 100%; object-fit: cover; }
.user-label {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(0, 0, 0, 0.6); color: #fff;
    padding: 6px 12px; font-size: 14px;
}

/* 底部控制栏 */
.controls-bar {
    display: flex; justify-content: center; gap: 16px;
    padding-top: 15px;
}
.ctrl-btn {
    padding: 10px 20px; border: none; border-radius: 6px;
    background: #fff; color: #333; font-size: 14px; cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); transition: 0.2s;
}
.ctrl-btn:hover { background: #f0f0f0; }
.ctrl-btn.off { background: #6c757d; color: #fff; }
.ctrl-btn.danger { background: #dc3545; color: #fff; }
.ctrl-btn.primary { background: #28a745; color: #fff; }

/* 右侧聊天室 */
.chat-section {
    width: 300px; background: #fff; border-left: 1px solid #ddd;
    display: flex; flex-direction: column;
}
.chat-header { padding: 14px; font-size: 16px; font-weight: bold; border-bottom: 1px solid #eee; }
.chat-messages { flex: 1; padding: 12px; overflow-y: auto; font-size: 13px; }
.msg-item { margin-bottom: 10px; line-height: 1.4; }
.msg-sender { font-weight: bold; color: #2b579a; }
.msg-time { color: #999; font-size: 11px; margin-left: 4px; }

.chat-input-box { display: flex; border-top: 1px solid #eee; padding: 8px; }
.chat-input-box input { flex: 1; border: 1px solid #ccc; border-radius: 4px; padding: 6px 8px; outline: none; }
.chat-input-box button {
    margin-left: 6px; padding: 6px 12px; border: none;
    background: #1c2431; color: #fff; border-radius: 4px; cursor: pointer;
}